From 0394c39f6dd226f21997cfae1a2905952fc4795b Mon Sep 17 00:00:00 2001 From: Boris <boris.ouya@gmail.com> Date: Tue, 26 Apr 2022 13:54:55 +0200 Subject: [PATCH] Modification gommette --- bin/default/src/com/uca/StartServer.class | Bin 4837 -> 5039 bytes .../src/com/uca/core/GommetteCore.class | Bin 1734 -> 2927 bytes bin/default/src/com/uca/dao/GommetteDAO.class | Bin 2969 -> 3025 bytes .../src/com/uca/dao/_Initializer.class | Bin 4543 -> 4677 bytes .../java/main/com/uca/StartServer.class | Bin 7149 -> 7460 bytes .../java/main/com/uca/core/EleveCore.class | Bin 2144 -> 1987 bytes .../java/main/com/uca/core/GommetteCore.class | Bin 1229 -> 2110 bytes .../java/main/com/uca/dao/GommetteDAO.class | Bin 2474 -> 2751 bytes .../java/main/com/uca/dao/_Initializer.class | Bin 3850 -> 4218 bytes .../java/main/com/uca/entity/Couleur.class | Bin 1657 -> 1672 bytes build/resources/main/views/gommettes.ftl | 41 +++++++++++++++- .../compileJava/previous-compilation-data.bin | Bin 10040 -> 10043 bytes src/com/uca/StartServer.java | 20 +++++++- src/com/uca/core/GommetteCore.java | 46 ++++++++++++++++++ src/com/uca/dao/GommetteDAO.java | 5 +- src/com/uca/dao/_Initializer.java | 6 ++- src/com/uca/entity/Couleur.java | 43 ++++++++-------- src/com/uca/entity/GommetteEntity.java | 2 +- src/main/resources/views/gommettes.ftl | 41 +++++++++++++++- 19 files changed, 176 insertions(+), 28 deletions(-) diff --git a/bin/default/src/com/uca/StartServer.class b/bin/default/src/com/uca/StartServer.class index 21d599d5804c9dc8b3b0bd657f787f52bc143448..716c19ed24ee67dd7fcca0cdd1724ea6eb6c77df 100644 GIT binary patch delta 48 ycmaE=x?X+4Y{tctxRp2Vm*$)tz|S-J0Dt7>TbwG4OzeW2xYw}3#nuQ~G6DdwO%P-N delta 38 vcmZ3l{#13sY(~4uce#`|?w97=Y|o{_$i%j0@?9>E&1<<+*fy65Suz3u8l4SY diff --git a/bin/default/src/com/uca/core/GommetteCore.class b/bin/default/src/com/uca/core/GommetteCore.class index cbdcfdac0ed87af26ef581abe0fdf55a019246d4..c82974e471f0ab02daf5991affb29f0f71a18523 100644 GIT binary patch delta 295 zcmX@c`(BLe)W2Q(7#JAL8Pq3oO=V))wsGNBrpXOVYLjzVmQKFU$T4|8i|QoiFgDKM z%HopL$pMUFlXF<qS>PN&*09ZC%)(4OY^4P$i6yCw42Bw>lQ%Q#v4?RmNHa1iPh6-x zc@m2%@#gJRQe<Rccg`=(Ni8j6XHaHj;B(K<%}p&SNp;OD$t<a4XHcE|hSijjd9o5) zYa%0q1cM|4BLgP`1A_?zGXpCF0|VD?2ChgUsqGAW`xzJ*m>2{Z7#P?X7#SECBp8Gk q7#MiKY%T_21~vu;24)5suqs&wIWR5HpvJ(!z`?-GpunKSpaK9m7eL(r delta 111 zcmaDac8r(n)W2Q(7#JAL8I&h-O=V)*x^dxFrp@83!c3Dda3(6rGBU6`=a=TBmKL!y z$TKqVx##ERrk0eXy5^N+mQ=DcC{7OMGG%0%+{x7{&&(jfz`(%7Aju#FrllE_7#J8h M7?>Gk7~~if05jJahyVZp diff --git a/bin/default/src/com/uca/dao/GommetteDAO.class b/bin/default/src/com/uca/dao/GommetteDAO.class index 31ab96b2134257c59dd96742c89b6ab3413ef024..311fc87ba9fccffb5ba0645a83634f5c591e44ef 100644 GIT binary patch delta 72 zcmbO!eo=fvA>+}>``DB>PHki1;B?L}%}FgSn!J!%c(W9%9y6oO<b7=AlMisLM3u|n Re8<QrIe8|R;^Yc$MF6%{80!E4 delta 46 zcmca8K2v-`A>+!)x7d_7PHkh^Y|g67%&0K=7F+q`I~*%FFXVj7$S5)SBA4Ri4cv+V Dr7jUx diff --git a/bin/default/src/com/uca/dao/_Initializer.class b/bin/default/src/com/uca/dao/_Initializer.class index 676fe4e035dc36552b64ca1223c932ea38f07c52..1a39a2eeb03d691341f9997b4b5f331bd5e0a833 100644 GIT binary patch delta 84 zcmdn5d{kvZ5o6V4T~6hV(?mEXZ(x^UEzL<SEt-6gNs^;1u_!Y!DJOOFN{;VLOsoPR RWt)$3uVTTaE>9qk5diRg9aaDU delta 38 scmX@AvR`>Z5u^F!0#4<P(?mEnzvcMG#KdwI#NW)pvx;T&SAhUV02d<-xBvhE diff --git a/build/classes/java/main/com/uca/StartServer.class b/build/classes/java/main/com/uca/StartServer.class index 8878afbb40590f136d850ab2c8a9a48c7b332c68..b9a288435f46c505f2f1a3a5031b26f849c300a8 100644 GIT binary patch delta 3800 zcmaEBzQn5j)W2Q(7#JAL8LPP%LK$XpGR$U}BgDYKuz-tUA;Th0hQ$m^I2e|4F)U+P z&c(2pVFee%N`_S&46C^qLKxO?Fsv0~U}V?`lG((;(8<BDS%`s&VIv2_Rv`vv5WQW9 zfdwMJlY?Ow2g7b523CfRLJVvm$$df$_3R+V0U-ts5Pe99ffGa@5n|v1(Z_@sxIy#@ zAqE~0eM*Rd7ep6wG4wH<;bJ(;aE^nagoB}!gW)_U!v%(mTnv{OE^{$lVYtf0(9dv< zi(w(dbrAOkCqoFsO)iF847WKL>NptcIT#u^7#cYl>Mt<d;bOSUaF2tb3`E}-V&G$V z2x2|rVtCB(goEKJ2SW$Q>}OmI&lz5DGfZH3$;~j4;T4E@&Cc+Ki@}rOEf+&I!#fb` zJ;<UD91I`17(Ow425Gs^#qfpUD~R~U#qgcs2Rp-0c7|V!3_OXYB^jxkOBqcW8I2~d zX0n(p#%w+LJCpq6$4nyTOqnT+3|y`i$*Bb;nfZCe><qsd8TfJ%bCXgMRdN$E^HdBC z85wwkOA?c_eG>~p5|eUL*%|&!E@BRwe3tnn*I#yqf9wqZ*%=uoFJP&yk79^sXJq7I zWMX7yWDs!5&o3!1DM~ExO)bgDPbubSV`SlAWaVLGV`OJ%<ltfCWaMIJ<mO@IVdQ6I z;LtBFNi4}s)@NrF<Y5$I<l<ozW)xv(6y;$QV~A#CU@a|9Eh^?=NMuN2WMI<=^Z3~q z#RV90_}LgGco-!a>!o-Yr5R;F(gj8NX&?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;}1RBH)2KvJJ0 zDD`b(aN5S;Y{kN8#VX0Nlfi|N!HP|iZ6|{(V<f{&22~K#jgjF1gS!>GB>Of751nlc zp0gOZB-yQ4mou;}|9@SQ^%#Q&C`o$hf~90wHZvGVvTkPZ))o@l#-I;Q#@iUQ7&i#{ zfC>i|hUm!|lHTCZ1tmiZ24RL~hH!9#tcHhkH9VY47+RnSGMAwhnjljd+8EjySQsQ3 zk{CJ|!Wmc@I-y0f7z0SIi-8548I>7W{xc{su(LCCvorLtGn9f+FFS)fdp$!R1B1pd z1}05t5{9JUepq-hSTHbxOI(&6489<DGl2^=NEP6N6cH?NH?u(9j2!0^;N~Ia2q!He z>v~w0@Y5C&K+4JREaAey&)~`+%HW1%7yc|U5pGu;v~&{%mu_5}7`%5d_@gE<#^}k0 z(&FG)fMhpOxIaXp{s5Ju%nXdYC;>DHZV5&r4nVa5R0lwcP;CY_23-a&215n`1|uZz z2r<;dig6)SJ5h_!$#6T7A|((#Qq+)4#uF(F91K(76@9%bxEg0*;AGy+V8FPU!5dVy zGJ>NTQcd$SurLTPFf&XAw*sayaxpM4fO<rW8F?5v83Y+~7>gKl86+8Ify-WghS>~^ z409M(GcYr(VOYzs2Flt9XKjYFwlb_?h=wTK2^ZW2XYGNr_Q6>P;H*P%))6@C7{eN{ J^;f{;9RTz-e0cx> diff --git a/build/classes/java/main/com/uca/core/EleveCore.class b/build/classes/java/main/com/uca/core/EleveCore.class index 7b4cd18578057b5aa8a890c8a5986c4cd2509c67..258fca1f7748c3a2cfa7e68e4a91cd30db03bfb9 100644 GIT binary patch delta 812 zcmaDLaG1aT)W2Q(7#JAL8Isr;Ot=^r8BDnt#2L)k8O*sDSU?;W1`80&5=2;m2y0FT z5e6GB23rO@5Mj^7;K1Mrl5heM&LF}CM7V+oH;@u{b_NeF1`!5RkWNo_1}{bi4$r*e zlEl2^js0Fs98wI@JPc9{-jg3P$$R-Q`0_CLfe3#P5db0r8G_guf_WGe7(#d$LK(u? z8NzuOA{Zih7@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`x#v;tfz+M1Sl#@3( zl4Xaq1cNjK0|O(2B!ditECT}r3j-5_9D_UqBZI<Z9adRwMFs{2E(RtB1_oXRZU#OE zB?blt9tK7*sSMV^$e_ZY3RYjj>cFTtc`K`YJxG-u0~-SagFXX96^NzApbpll&!EAe z4mMMtL6bq9ff=k$i$R@%g@KbnjX|41hk=!WkwKS14`eO_17k4*69WeW1H<Co3@nk` z8Cb2@HZkxB@or<_)7rwoCB2P-{{RDv6+1{!U>gHpz0NiU!Fdckl59HL7}%CG@Jg~t zvTtJ$+Qz`93zN~^#=s7j5#GkYF3AFx0;y%$#=rrW6WPYVA;}7tW8KEU36~Sy#=t4b zCcTY84CD?;wrvdJ;Tstk>KT|BKmq5+Ak4tPAkDzZAj=@gAO{XuH3mfnT?S<aGX`}A z2L>$$cLr^S00w=AC<Y^jBnA_P90p5<G6q|QItF`&4hCn2Neu1`GZ;J>7BP5%13w57 z5b$7K%%IO;01np044?o8MOFP`a0r9Kbul=ESwLaO019DN22O@q;1FhGkYi|NFl5kS zU}rF5U|<kp;P}g6#?HXP&cMRS&nd_$$jQLLU<^qM3=9m);22|I;NHz35xJc~ax;U} gMsU&r`IHUp0#HIRVPIh3W@0d9Fk@g~U}7)_06R32<p2Nx diff --git a/build/classes/java/main/com/uca/core/GommetteCore.class b/build/classes/java/main/com/uca/core/GommetteCore.class index 1a15aa11dc156a8e7304f53314aff391d9f3f036..14d82a51932195af8be0bb6c5f99e19d76b09b3c 100644 GIT binary patch delta 1197 zcmX@hxlf?})W2Q(7#JAL8FJYf%(xgB8O*sDBp58%87#RNSU?;W1}hND8bsJ|GKezR zaxvI3*n<cMP6kH?Cy<0Q7lR9fD;I+sgFA@p0pfasSY9B)8>HBWoxzujL6pH9WQHF* zgFhn!hiBeKUmr#uw$g%>#FA7-1_uq#iHB@W!WbEN3W`$8;*;}Bb5cu-7#Wx{Qy3W- zJsBA|K;oJCrNxX4yul@j$=SY%1tEz^IjNJUGfw7~W{}}wkY)&AWRRW2C>z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JAL8En`YRJj-!8PvEK_!!jL88o;USU?;W22Bu43q)vhGH^5K za53mI=&>{Cb1`r;sDVTb*cl8rRs}Ln_F|gIEyy6m!yw3D#K<5!xsFLzhKIqJ!Gwpw zl);RL!5qZ0V6bFou;O75XRw|e#Vp6n&mge5nwgz3jX{xtn}Lskfq{`hl7XK=fPsO5 znSqHxkU@xnkwKV&fx(J_nSqgkfq_SBHv?njb_S;H49puD7#NrsL>L$txEPoi7#MiL zW{84RLDVvcflXp$5ND78nKPN2&9WY(UW|d2fq_Agfs;XqfuBK`L6kv+L7G970i@Ri zET;k0%fO()Aju#FHcx{=nn4C^lLmt<gA@ZZ11Ez#gB*iA0}BHOg96;G%3w7N4BWdJ hxFfeS@N8z_1v!-w>{LlMuvs7%D}vpx#GnkORR9#&Au9j? diff --git a/build/classes/java/main/com/uca/dao/GommetteDAO.class b/build/classes/java/main/com/uca/dao/GommetteDAO.class index 609b5df8ae4b1ca6d4d4f1f9ad4161f4f5437fde..40f95733066dfd1c814d7d489be55702c85d3573 100644 GIT binary patch delta 1270 zcmZ1_ykE5b)W2Q(7#JAL876Wu$TQe+FxYc4$T2u@F~~7E3NbJ+xN<YNF}QOv@H2RD zGk7w1fmq%k!iS5&m%$Ij@&`!-fQUeLh9HoL9S1`&H$w<RD2Nlr!4MAOM1V9zf<&S? z7@|RR3<rZ)EQk>YvMwG(B(O6ivNI%YtW#rTOy0bdQHQZ!fkBaxfipcnH#fDUB(<1_ zA%!88he4e|gONeNDL=oYxTGktz&EudBR{2>pN%1ngCU)VA%h{4ogs^dA)6tGhas0i zgPkFdhasP#fQO-wL4${(h@qIBp@fH_6vQcGDCc3QV5sC_sA4E*WROkH&($wYPSj7$ zE6FUWoP3v&KbVn$DKmwgp_+%GhM|^+p^l-Rk%2uqzceScv<PHMCJ#dcLn9AE6GJm2 z19M(}E)PQsLn|W#cS>q;a#3bMNoIZ?4?`P6D-VM)g9#6VCWF@GiOhLy?F=1^3|5m_ zSrmD66rkoQ*eYyRW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&NkQi!uvJGV}9z z7)lt5c^LE<^m!Om7*rV<#3$YrpZu6PgsqgJjFCZivMr0^=4=*D#>t0SOSm}GQ%izN ziZb)kC(mLtVJio@v3l|qHciIb$^Y24veYp$s7}7mE;soqyLNyigA@Y@urV+)NHfSV zFfzz8FfiydFfuSQFfg!cZD(NI$iTqB#30AOzyMOjz`(&E&%nUI15v=Bz@W&$z`zI! z6_Do10URR62({cuYMJ3`RTxwmn7|e-XJBSvVPIfzpFEwzs(vQ}H#39IP6i%EhH!+f zat!PY3=9Gc!VH28q6|U|$_&B`h72MM_6(v7ZVX~z8?+#%Ky6@PaA#0sP-kFd5N0r8 z&|uJHU}6wuFk;YR&}Lv}&|zR;U}0cn&}Co*1u4`eH4M!449pA+40^j6cq6wn@cHU! z3-Rw{5MW~1#vrJpEhMy)K^Vjq(a{zXg|fwTHoyZ%jDeMbfkB#qgF%Ktgh7r$fkB=@ z2TU?BC_qexJ5P_nfWeS~k%5CjjlqaPoq-ALsCuxg1RNRk7>uE=GGJh0U;>4_mi9IV zafD@<F~J5k9PT>-M+OxJ6R0^L^FZcsYH1%};N8X`fe2oNQJ%0^<wQ4&frY^o>`^lY kb1-eeP{qK&z{SAGP{B~cP{|<4V9NkX8H@~e42%r+0PRw95C8xG diff --git a/build/classes/java/main/com/uca/dao/_Initializer.class b/build/classes/java/main/com/uca/dao/_Initializer.class index e6c47231ee0add74f5e1a47f5fe29cbbd7ee5c0c..34421e65dc7f3e338c8c3d30fb5d3095fed33ceb 100644 GIT binary patch delta 1162 zcmeB@`=wBS>ff$?3=9nB43D@NTp6Oc7@`?sgcukY61W)>8Irgek{MFi8B#eJ(iqaY z7}yvxxEL}Sve+52g%}ta61W(+7;=Rem>3c`81lIoTo?*C7z#NUiZ~dGIT%Vn0;L=b zWgHCU91Im443(S=RSeY}3^g1KwOkB!4D}og4HNrRk~kQ8IT-pl82ULFCU7uJ1gV<D z!7!PFVG0MsR1St|Tny70W^gdf<Y1V^!7!VHVGc;eTn>hL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>ff$?3=9nB4ClER92i2m7{VCBg%}tZqPZDj7-G2@;uzxD84@@d5*d=X z7}yw+xfoIyQrQ{OgcukZqPZBj7&3$ym>8lt7_zt+>>08-7;-omayc0CI2iIl0tFll zg&Yh;91O)A3?-Zlr3_^p4CNdQ6<iFJ3{@Nq)m$75H5?4J91L|F6RR}sKq`7U82UIE z`Z*XTa4<~dVwl7*nS)^p2g6hjhG`rO(?Kd`a4^i|V3@_hFq?y64j02*hI#A^^Vt~| zY-VNDWwdf+aAIdz$iuLRVKF0vfKz^cNpVS0Vu5dJNk)E3F+Ur_5)Ou?JPgYima{Xg z;9*$Fu!@~wH4noYhP9J(m?VVP@i44s*ucZEkzo@%!)6|aEexKMr!&cmZRKHbWbou* z*v81fT3Vc1RLsNR!QeUh4AV3=e+ExRhQ*WlSfn>MGn+9omV%g*ud+l;c4lp1+s?zV zgJI|7v#bhiyLcFOGwhlCnRPPrUWR>>JJ~eZ_Jf2DOy0q!EWqWKm|5(bpXr;J!^3cp z;n3uFY#MBbLGni?=dc$tA7wbU`2l+#GY31vagh5@Pd4MxWIQ`LfoChrIYtK6$&S2o zlg)Xx1MC?b7(jr9fsw(H!HI#9!I^=9L7#z<fsuiMfmLfe1LH;p1_mYu7X}6fHn1QE zgDV3A0}q(Z%HYP}&cMLH3GyIF^W;suUW_i2|MJQkfmDexFfm9lNHBOYc!Sj&GWam~ zGB7asF)%Q&Gcbj-Gq6c8a5DHac!D+i@wvu<ERteiV_;yAV&G?xV-RAHW)NnOVUT5z zWzc4j2U`v@Rv5`x9fkm8V}qc^2EshV=*_?iw*Tbhk9;S15k87z5TAU7Kib^}Y%Iu6 z77P;^ycmKQ7#Nrtg26ryVK~LWz`(`8$Z&$;48utVNrngp1_luZW`;-xMusRbnGPm1 E0fmd0LI3~& diff --git a/build/classes/java/main/com/uca/entity/Couleur.class b/build/classes/java/main/com/uca/entity/Couleur.class index a1018f3a40fa07dcd47e0defd077bfc86207aa8a..838af1444e4d0106e2e798b9ee12f5fa749b4939 100644 GIT binary patch delta 128 zcmey#)4{tzhLv|60}}%y0|SGb)-eX>$*QalNsJp97#Nrt)EO8U%ounX7#PGDSQsQ2 zcp0P^1Q}!)q!?rw<QU`_R2UQ(G#Hc^3>j1yOc~S|>=-l{oEWqjTp08iv=|r|cp%0y cC@?58Fff=fFfed1unF>T^6)TD-ov^V01HnI>;M1& delta 113 zcmeC+{mHXIhLv+Z0}}%y0|SG@WKC9wa0UhjW(IWz1_nI_ZUzPhF$PWs2?kyUDF!hH zX$C0<83qLgIR+I51qNLPB?dzV6$UE?H3mBdO$IFn1_mC8K@18EiVO@4CJYP=><p~D NJe)i{lTWkm1pu=83l;zX diff --git a/build/resources/main/views/gommettes.ftl b/build/resources/main/views/gommettes.ftl index adf8969..3eb2600 100644 --- a/build/resources/main/views/gommettes.ftl +++ b/build/resources/main/views/gommettes.ftl @@ -4,7 +4,7 @@ <ul> <#list gommettes as gommette> - <li>${gommette.id} - ${gommette.nom} : ${gommette.description} </li> + <li>${gommette.id} -${gommette.strCouleur} - ${gommette.nom} : ${gommette.description} </li> </#list> </ul> @@ -41,6 +41,45 @@ </form> + +<h1>Modifier une gommette</h1> + +<form action="/gommettes/update" method="post" id="update_form"> + + <label for="nom">Nom</label> + <input type="text" name="nom"> + + + <input type="radio" id="choixArcEnCiel" name="couleur" value="arcEnCiel"> + <label for="choixArcEnCiel">Arc en ciel</label> + + <input type="radio" id="choixRouge" name="couleur" value="rouge"> + <label for="choixRouge">Rouge</label> + + <input type="radio" id="choixVert" name="couleur" value="vert"> + <label for="choixVert">Vert</label> + + <input type="radio" id="choixBleu" name="couleur" value="blue"> + <label for="choixBleu">Bleu</label> + + <input type="radio" id="choixBlanc" name="couleur" value="blanc"> + <label for="choixBlanc">Blanc</label> + + <br> + <label for="description">Description</label> + <input type="text" name="description"> + + <br> + <button type="submit">Modifier</button> +</form> + +<label for="id_selection">Selectionner l'identifiant</label> +<select name="id_selection" form="update_form"> + <#list gommettes as gommette> + <option value="${gommette.id}">${gommette.id}</option> + </#list> +</select> + </body> </html> diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index f2501bad7540451399cf5ae00781c1c415aca5a1..ddeef7e307271564160bfa1d047b5e8f0e6fb6b4 100644 GIT binary patch delta 146 zcmdntx7%-mu0U`;PxXiN3k%q?1q0{jY|YtdtHdZ!ANymaWP+@&*RR7d`<b*ZOwMO~ zD^RF-(_ymg>ysNJ#F94j+@Cx-hsjGo?eczCTXU@`YLhFsCVrR`JNX#XYk@yP^A6lO zE>>C6|8hc~XY|j>2bm?rCQOOs>6;;Wy-#z8qL!JZp@ttLvp&P*x6G@Um>D+DU|FC9 E07UscX#fBK delta 143 zcmdn(x5ICOu0Y!dcBPoPfjL|38ayNRo;<$MR*6yI%Yn^L7N6UwzqGyD>c@G#Gn4Zf z-wN!IFEX_HdhwNw8XI3mmi30oIZR#xKSOplz7fi{W!WO%v&&z>W%4nm*8+uU0w<!6 z=!Zv@T9|pAwBI@TAhU$Xauv=weLaj;$2o8QX}h4aOv8_naq@fSRg6rVXR|C&0st#0 BJ*5Bu diff --git a/src/com/uca/StartServer.java b/src/com/uca/StartServer.java index f72f495..dc1f23f 100644 --- a/src/com/uca/StartServer.java +++ b/src/com/uca/StartServer.java @@ -160,7 +160,6 @@ public class StartServer { post("/gommettes/ajout", (req,res) ->{ String couleur = req.queryParams("couleur"); - System.out.println(couleur); if (couleur != null) { @@ -170,7 +169,6 @@ public class StartServer { { String description = req.queryParams("description"); String nom = req.queryParams("nom"); - System.out.println(description); Core.Gommette.create(nom,c, description); } @@ -178,5 +176,23 @@ public class StartServer { res.redirect("/gommettes"); return null; }); + + post("/gommettes/update", (req,res)->{ + + + String couleur = req.queryParams("couleur"); + + Couleur c = Couleur.retrieve(couleur); + + String description = req.queryParams("description"); + String nom = req.queryParams("nom"); + String id = req.queryParams("id_selection"); + + + Core.Gommette.update(Integer.parseInt(id),nom,c, description); + + res.redirect("/gommettes"); + return null; + }); } } \ No newline at end of file diff --git a/src/com/uca/core/GommetteCore.java b/src/com/uca/core/GommetteCore.java index bc4fabc..b6ec50e 100644 --- a/src/com/uca/core/GommetteCore.java +++ b/src/com/uca/core/GommetteCore.java @@ -20,4 +20,50 @@ public class GommetteCore extends _DefaultCore<GommetteEntity> { entity.setDescription(description); return dao.create(entity); } + + public void update(int id, String nom, Couleur couleur, String description) { + + GommetteEntity entity = new GommetteEntity(); + GommetteEntity previous = dao.getById(id); + + System.out.println(previous.getNom()); + + if (nom.length() > 0) + { + entity.setNom(nom); + } + else + { + entity.setNom(previous.getNom()); + } + + + if (couleur != null) + { + entity.setCouleur(couleur); + } + else + { + Couleur prev_couleur = previous.getCouleur(); + System.out.println(prev_couleur); + entity.setCouleur(previous.getCouleur()); + + } + + + if (description.length() > 0) + { + entity.setDescription(description); + } + else + { + entity.setDescription(previous.getDescription()); + } + + + + entity.setId(id); + dao.push(entity); + + } } diff --git a/src/com/uca/dao/GommetteDAO.java b/src/com/uca/dao/GommetteDAO.java index 52b9d27..3f2099b 100644 --- a/src/com/uca/dao/GommetteDAO.java +++ b/src/com/uca/dao/GommetteDAO.java @@ -13,10 +13,11 @@ public class GommetteDAO extends _DefaultDAO<GommetteEntity> { @Override public void pushUnsafe(GommetteEntity obj) throws Exception { - PreparedStatement stmt = this.connect.prepareStatement("update " + getDefaultTableName() + " set nom=?, description=? where id=?;"); + PreparedStatement stmt = this.connect.prepareStatement("update " + getDefaultTableName() + " set nom=?, description=?, couleur = ? where id=?;"); int idx = 1; stmt.setString(idx++, obj.getNom()); stmt.setString(idx++, obj.getDescription()); + stmt.setString(idx++, obj.getCouleur().getString()); stmt.setInt (idx++, obj.getId()); stmt.executeUpdate() ; } @@ -26,7 +27,7 @@ public class GommetteDAO extends _DefaultDAO<GommetteEntity> { { GommetteEntity entity = new GommetteEntity(); entity.setId(resultSet.getInt("id")); - // entity.setCouleur TODO + entity.setCouleur(Couleur.retrieve(resultSet.getString("couleur"))); entity.setNom(resultSet.getString("nom")); entity.setDescription(resultSet.getString("description")); return entity; diff --git a/src/com/uca/dao/_Initializer.java b/src/com/uca/dao/_Initializer.java index f647004..59e248c 100644 --- a/src/com/uca/dao/_Initializer.java +++ b/src/com/uca/dao/_Initializer.java @@ -38,7 +38,7 @@ public class _Initializer { CreateTable("CREATE TABLE IF NOT EXISTS users (id int primary key auto_increment, firstname varchar(100), lastname varchar(100));"); CreateTable("CREATE TABLE IF NOT EXISTS profs (id int primary key auto_increment, firstname varchar(100), lastname varchar(100), username varchar(100), password varchar(100));"); CreateTable("CREATE TABLE IF NOT EXISTS eleves (id int primary key auto_increment, firstname varchar(100), lastname varchar(100), nomClasse varchar(100), dateNaissance varchar(100));"); - CreateTable("CREATE TABLE IF NOT EXISTS gommettes (id int primary key auto_increment, nom varchar(100), description varchar(100));"); + CreateTable("CREATE TABLE IF NOT EXISTS gommettes (id int primary key auto_increment, nom varchar(100), description varchar(100), couleur varchar(100));"); CreateTable("CREATE TABLE IF NOT EXISTS gommetteAttribs (id int primary key auto_increment, idEleve int, idProf int, raison varchar(500));"); @@ -54,8 +54,10 @@ public class _Initializer { Core.User.create("Judas", "Nanas"); Core.Prof.create("Boris", "OUYA", "DaWarudo","KonoDioDa!"); - Core.Prof.create("Thomas", "TAMAGNAUD", "CéMoiLul","FaisMoiMal"); + Core.Prof.create("Thomas", "TAMAGNAUD", "CéMoiLul","BlockusMaster"); Core.Eleve.create("Bibi","Johnson","23/10/2018","Zarbi"); + + Core.Gommette.create("Brave Petit",Couleur.Vert,"S'est montré obéissant devant le prêtre"); } } diff --git a/src/com/uca/entity/Couleur.java b/src/com/uca/entity/Couleur.java index 96daa9f..53fe3c9 100644 --- a/src/com/uca/entity/Couleur.java +++ b/src/com/uca/entity/Couleur.java @@ -19,27 +19,32 @@ public enum Couleur public static Couleur retrieve(String value) { - if (value.compareTo("rouge") == 0) + if (value != null) { - return Rouge; - } - else if (value.compareTo("blanc") == 0) - { return Blanc; } - else if (value == "bleu") - { - return Bleu; - } - else if (value.compareTo("vert") == 0) - { - return Vert; - } - else if (value.compareTo("arcEnCiel") == 0) - { - return ArcEnCiel; - } - else { - return null; + if (value.compareTo("rouge") == 0) + { + return Rouge; + } + else if (value.compareTo("blanc") == 0) + { return Blanc; } + else if (value == "bleu") + { + return Bleu; + } + else if (value.compareTo("vert") == 0) + { + return Vert; + } + else if (value.compareTo("arcEnCiel") == 0) + { + return ArcEnCiel; + } + else { + return null; + } } + return null; + } } diff --git a/src/com/uca/entity/GommetteEntity.java b/src/com/uca/entity/GommetteEntity.java index 82f0053..f8b522b 100644 --- a/src/com/uca/entity/GommetteEntity.java +++ b/src/com/uca/entity/GommetteEntity.java @@ -11,7 +11,7 @@ public class GommetteEntity extends Entity private String strCouleur; public Couleur getCouleur() { return couleur; } - public void setCouleur(Couleur value) { + public void setCouleur(Couleur value) { couleur = value; strCouleur = value.getString(); } diff --git a/src/main/resources/views/gommettes.ftl b/src/main/resources/views/gommettes.ftl index adf8969..ad98634 100644 --- a/src/main/resources/views/gommettes.ftl +++ b/src/main/resources/views/gommettes.ftl @@ -4,7 +4,7 @@ <ul> <#list gommettes as gommette> - <li>${gommette.id} - ${gommette.nom} : ${gommette.description} </li> + <li>${gommette.id} - ${gommette.strCouleur} - ${gommette.nom} : ${gommette.description} </li> </#list> </ul> @@ -41,6 +41,45 @@ </form> + +<h1>Modifier une gommette</h1> + +<form action="/gommettes/update" method="post" id="update_form"> + + <label for="nom">Nom</label> + <input type="text" name="nom"> + + + <input type="radio" id="choixArcEnCiel" name="couleur" value="arcEnCiel"> + <label for="choixArcEnCiel">Arc en ciel</label> + + <input type="radio" id="choixRouge" name="couleur" value="rouge"> + <label for="choixRouge">Rouge</label> + + <input type="radio" id="choixVert" name="couleur" value="vert"> + <label for="choixVert">Vert</label> + + <input type="radio" id="choixBleu" name="couleur" value="blue"> + <label for="choixBleu">Bleu</label> + + <input type="radio" id="choixBlanc" name="couleur" value="blanc"> + <label for="choixBlanc">Blanc</label> + + <br> + <label for="description">Description</label> + <input type="text" name="description"> + + <br> + <button type="submit">Modifier</button> +</form> + +<label for="id_selection">Selectionner l'identifiant</label> +<select name="id_selection" form="update_form"> + <#list gommettes as gommette> + <option value="${gommette.id}">${gommette.id}</option> + </#list> +</select> + </body> </html> -- GitLab