$B@uLn$G$9!#(B<div>$B$*@$OC$K$J$j$^$9!#(B</div><div><br></div><div>$BJV?.$"$j$,$H$&$4$6$$$^$9!#(B</div><div><br></div><div>$B@bL@ITB-$G!VF~NO$7$?9`L\$@$1$r%P%j%G!<%7%g%s%A%'%C%/$9$k!W$,@53N$KEA$o$j$^$;$s$G$7$?!#$9$_$^$;$s!#(B</div><div><br></div><div>$BNc$($P!"(B</div><div>function test1(element, result){</div><div> if(result){</div>
<div> element.style.background = '#ffffff';</div><div> }else{</div><div> element.style.background = '#ffc0cb';</div><div> alert("$BCM$rF~NO$7$F$/$@$5$$(B");</div><div> }</div><div>}</div>
<div>(test2$B>JN,(B)</div><div>KumuValidatorConf = {</div><div> aaa : {'Required' : test1},</div><div> bbb : {'MaxLength:3' : test2}</div><div>}</div><div>$B$N$h$&$K$7$?$H$-!"(Baaa$B9`L\(B($B%F%-%9%H%U%#!<%k%I(B)$B$N(Bkeyup$B%$%Y%s%H$,H/@8$7$?%?%$%_%s%0$G!"(Baaa$B$H(Bbbb$B$N%P%j%G!<%7%g%s%A%'%C%/$,<B9T$5$l$F$$$k$h$&$K8+<u$1$i$l$^$7$?!#!J(Bbbb$B$OL$F~NO!K(B</div>
<div>$B$h$C$F!"(Baaa$B9`L\!J%$%Y%s%H$,H/@8$7$?9`L\!K$KBP$9$k%P%j%G!<%7%g%s%A%'%C%/$N$_<B9T$7$?$$$N$G$9$,!"2DG=$G$7$g$&$+!)(B</div><div>$B!J%3!<%k%P%C%/4X?t(B(test1, test2)$BFb$G!"%(%i!<;~$K(Balert$BJ8$rI=<($7$F$$$k$3$H$,4X78$7$F$$$k$N$G$7$g$&$+!)!K(B</div><div><br></div><div>$B$^$?!"65$($F$$$?$@$$$?%5%V%_%C%H;~$K%P%j%G!<%7%g%s%A%'%C%/$9$kJ}K!$b;n$7$^$7$?!#(B</div><div>$B>e5-$,4X78$9$k$H;W$&$N$G$9$,!"(Baaa$B$N%A%'%C%/;~$K(Baaa$B$H(Bbbb$B$N%P%j%G!<%7%g%s%A%'%C%/$,<B9T$5$l!"(Bbbb$B$N%A%'%C%/;~$K$b(Baaa$B$H(Bbbb$B$N%P%j%G!<%7%g%s%A%'%C%/$,<B9T$5$l$F$7$^$$$^$9!#(B</div>
<div>$B!J>e5-$,2r7h$9$l$P!"$3$A$i$b2r7h$9$k$H;W$$$^$9!#!K(B</div><div><br></div><div>$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B</div><div><br><br><div class="gmail_quote">2009/03/23 8:15 <span dir="ltr"><<a href="mailto:yone@abby.co.jp">yone@abby.co.jp</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
$BJFNS$G$9!#(B<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
KumuValidatorConf$B$G@_Dj$7$?%P%j%G!<%7%g%s$,<B9T$5$l$k%?%$%_%s%0$O!"!J%5%V%_%C%H;~$G$O$J$/!K3F9`L\$KCM$,F~NO$5$l$?%?%$%_%s%0!J!)!K$HG'<1$7$F$$$^$9!#(B<br>
</blockquote>
<br>
$B8=:_!"%P%j%G!<%7%g%s$,<B9T$5$l$k%?%$%_%s%0$O(B<br>
validate.js$BFb$N(B_regist$B4X?tFb$G0J2<$N$h$&$K@_Dj$5$l$F$$$^$9!#(B<br>
-checkbox/radio$B$O(Bclick$B;~(B<br>
-password/text/textarea$B$O(Bkeyup$B;~(B<br>
-select-one/select-multiple$B$O(Bchange$B;~(B<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$BNc$($P0J2<$N$h$&$J$3$H$O2DG=$G$7$g$&$+!)(B<br>
$B!&F~NO$7$?9`L\$@$1$r%P%j%G!<%7%g%s%A%'%C%/<B9T$9$k!#(B<br>
$B$b$7$/$O(B<br>
$B!&%5%V%_%C%H;~$K%P%j%G!<%7%g%s%A%'%C%/<B9T$9$k!#(B<br>
</blockquote>
<br>
$BF~NO9`L\$@$1$r%P%j%G!<%7%g%s%A%'%C%/$9$k$N$G$"$l$P(B<br>
$BFH<+%P%j%G!<%?$r<+:n$7$FF~NO$,$"$k>l9g$N$_%P%j%G!<%7%g%s$r(B<br>
$B<B9T$9$l$PNI$$$H;W$$$^$9!#(B<br>
$B0J2<$N(BValidator$B$N<+:n;2>H(B<br>
<a href="http://teeda.seasar.org/ja/kumu_validate.html" target="_blank">http://teeda.seasar.org/ja/kumu_validate.html</a><br>
$BNc!KF~NO$,$"$C$?>l9g$N$_<B9T(B<br>
Kumu.Validator.FooValidator = function(){<br>
this.validate = function(v){<br>
if(v == null || v.length == 0){<br>
return true;<br>
}else{<br>
var re = /^[-]?\d*$/;<br>
var v = v.toString();<br>
if(!v.match(re)){<br>
return false;<br>
}else{<br>
return true;<br>
}<br>
}<br>
}<br>
}<br>
Kumu.Validator.FooValidator.prototype = new Kumu.Validator.ValidatorBase();<br>
KumuValidatorConf = {<br>
test : ['Foo'],<br>
}<br>
<br>
$B$^$?!"$"$k%\%?%s$r%/%j%C%/$7$?:]$K$@$1%P%j%G!<%7%g%s$rE,MQ$9$k$K$O(B<br>
_regist$B4X?t$r0J2<$N$h$&$K$9$l$P$$$1$k$H;W$$$^$9!#(B<br>
<br>
_regist : function(validateConf){<br>
this._parse(validateConf);<br>
Kumu.Event.addEvent(document.$B%U%)!<%`MWAG(B.$B%\%?%sMWAG(B, 'click',<br>
this._validate.bindScopeAsEventListener(this));<br>
}<br>
<br>
$BHFMQE*$JBP1~$K$J$C$F$$$^$;$s$,!"(Bvalidate.js$B$r%+%9%?%^%$%:$9$l$P(B<br>
$BBP1~$O2DG=$@$H;W$$$^$9!#(B<br>
<br>
$B$^$?@uLn$5$s$,:n@.$5$l$F$$$k(Balert$B$,I=<($5$l$k$b$N$N4JC1$J(B<br>
$B%5%s%W%k$r8+$;$FD:$1$k$H2?$+$7$iJ}K!$,Ds<(=PMh$k$+$b$7$l$^$;$s!#(B<br>
<br>
<br>
$B59$7$/$*4j$$$7$^$9!#(B<br>
<br>
----- Original Message ----- From: "$B@uLn8n(B" <<a href="mailto:asano1225@gmail.com" target="_blank">asano1225@gmail.com</a>><div><div></div><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$B@uLn$G$9!#$*@$OC$K$J$j$^$9!#(B<br>
<br>
$BJV?.$"$j$,$H$&$4$6$$$^$7$?!#(B<br>
<br>
$B7k6I!"%/%i%$%"%s%HB&$G$b%P%j%G!<%7%g%s$r9T$&$3$H$r8!F$$7$F$$$k$N$G$9$,!"(BKumu$B$N(BValidator$B$NF0:n$K$D$$$F65$($F$/$@$5$$!#(B<br>
KumuValidatorConf$B$G@_Dj$7$?%P%j%G!<%7%g%s$,<B9T$5$l$k%?%$%_%s%0$O!"!J%5%V%_%C%H;~$G$O$J$/!K3F9`L\$KCM$,F~NO$5$l$?%?%$%_%s%0!J!)!K$HG'<1$7$F$$$^$9!#(B<br>
$B%P%j%G!<%7%g%s$N%3!<%k%P%C%/4X?t$r@_Dj$7!"%(%i!<;~$K$O(Balert$BJ8$G!"%(%i!<%a%C%;!<%8$rI=<($7$h$&$H$7$?$N$G$9$,!"#1$D$N%P%j%G!<%7%g%s%A%'%C%/$,<B9T$5$l$k$H!"$^$@L$F~NO$NB>$N9`L\$N%P%j%G!<%7%g%s%A%'%C%/$b<B9T$5$l$^$9!#(B<br>
$B$h$C$F!"$^$@L$F~NO9`L\$N%(%i!<%a%C%;!<%8%@%$%"%m%0$bI=<($5$l$F$7$^$&$N$G!"$3$N2sHr:v$rD4::$7$F$$$^$9!#(B<br>
<br>
$BNc$($P0J2<$N$h$&$J$3$H$O2DG=$G$7$g$&$+!)(B<br>
$B!&F~NO$7$?9`L\$@$1$r%P%j%G!<%7%g%s%A%'%C%/<B9T$9$k!#(B<br>
$B$b$7$/$O(B<br>
$B!&%5%V%_%C%H;~$K%P%j%G!<%7%g%s%A%'%C%/<B9T$9$k!#(B<br>
<br>
$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B<br>
<br>
<br>
2009/03/19 16:00 Koichi Kobayashi <<a href="mailto:koichik@gmail.com" target="_blank">koichik@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
$B>.NS(B (koichik) $B$G$9!%(B<br>
<br>
Date: Thu, 19 Mar 2009 12:04:53 +0900<br>
From: $B@uLn8n(B <<a href="mailto:asano1225@gmail.com" target="_blank">asano1225@gmail.com</a>><br>
To: <a href="mailto:seasar-user@ml.seasar.org" target="_blank">seasar-user@ml.seasar.org</a><br>
Subject: [Seasar-user:17079]<br>
[Teeda]xxxItems$B$K(BJavaScript$B$G9TDI2C8e!"%P%j%G!<%7%g%s%(%i!<$,H/@8$9$k$HDI2C$7$?9T$,$J$/$J$k(B<br>
<br>
><br>
$B0lMw$KI=<($5$l$F$$$k(BxxxItems$B$KBP$7!"(BJavaScript$B$G9TDI2C$7$?8e!"EPO?$J$I$N(Bdo$B%a%=%C%I$G%P%j%G!<%7%g%s%(%i!<$,H/@8$9$k$H!"(BxxxItems$B$N%5%$%:$O85$N>uBV$KLa$j$^$9!#(B<br>
<br>
do$B!A(B() $B%a%=%C%I$,8F$P$l$?>l9g!$(BTeeda $B$H$7$F$O(B<br>
$B%P%j%G!<%7%g%s$O=*$o$C$F$*$j!$$=$N8e$NIA2h$OF~NO;~$N(B<br>
$B>uBV$G$O$J$/!$%Z!<%8%/%i%9$N>uBV$GIA2h$5$l$^$9!%(B<br>
<br>
><br>
$BNc$($P!"%F%-%9%H%U%#!<%k%I$J$I$KCM$rF~NO$7!"%P%j%G!<%7%g%s%(%i!<$,H/@8$7$F$b!"F~NO$7$?CM$OJ];}$5$l$F:FIA2h$5$l$k$N$G!"(BxxxItems$B$bJQ99$,J];}$5$l$k$N$+$H;W$C$F$$$?$N$G$9$,!"$3$l$O;EMM$G$7$g$&$+!)(B<br>
<br>
$B<B:]$K$O!$(BxxxItems $B$O%5%V%_%C%H;~$N>uBV$r0];}$7$F$$$^$9!%(B<br>
$B%5%V%_%C%H;~$N>uBV$H$$$&$N$O!$(BxxxItemsSave $B$K$h$C$F(B<br>
$BJ];}$5$l$F$$$kCM$G$"$j!$(BJavaScript $B$GDI2C$5$l$?(B<br>
$B>pJs$OH?1G$5$l$F$$$^$;$s!%(B<br>
JavaScript $B$,DI2C$9$k(B <input> $B$d(B <select> $BEy$O(B<br>
xxxItems $B$=$N$b$N$G$O$J$$$3$H$KCm0U$7$F$/$@$5$$!%(B<br>
$B$=$l$i$O(B xxxItems $B$N;R%3%s%]!<%M%s%H$KH?1G$5$l$^$9!%(B<br>
<br>
xxxItems $B<+BN$K(B JavaScript $B$GDI2C$5$l$?>pJs$,(B<br>
$BH?1G$5$l$k$N$O(B UPDATE_MODEL_VALUES $B%U%'!<%:$G$"$j!$(B<br>
$B$3$l$O%P%j%G!<%7%g%s%(%i!<$,H/@8$9$k$H<B9T$5$l$^$;$s!%(B<br>
<br>
<a href="http://teeda.seasar.org/ja/extension/concept/lifecycle.html#JSF" target="_blank">http://teeda.seasar.org/ja/extension/concept/lifecycle.html#JSF</a>$B%i%$%U%5%$%/%k$H$N4X78(B<br>
<br>
$B$3$N$?$a!$(BxxxItems $B$O%5%V%_%C%H;~$N>uBV$9$J$o$A(B<br>
$BA0$NIA2h;~$N>uBV(B (JavaScript $B$K$h$jDI2C$5$l$k(B<br>
$B9T$r4^$^$J$$>uBV(B) $B$N$^$^$H$J$j$^$9!%(B<br>
<br>
> $B;EMM$N>l9g$O!"(BxxxItems$B$NJQ99$rJ];}$9$kJ}K!$O$J$$$G$7$g$&$+!)(B<br>
<br>
$B<B:]$K$O%P%j%G!<%7%g%s$G%(%i!<$K$J$C$?>l9g$G$b(B<br>
xxxItems $B$K(B JavaScript $B$K$h$kJQ99$rH?1G$5$;$kJ}K!$H(B<br>
$B$$$&$3$H$K$J$j$^$9$,!$$$$$J}K!$,;W$$$D$-$^$;$s!%(B<br>
$BB>$NJ}$O$I$&$d$C$F$k$s$G$7$g$&$M!)(B<br>
<br>
<br>
$BL5M}LpM}$J0F$H$7$F$O!$(BxxxItems $B$N%5%$%:$r$"$i$+$8$a(B<br>
$BA}$d$7$F$*$/$H$$$&$N$,9M$($i$l$^$9!%(B<br>
$B>/!9LLE]$G$9$,!$(BxxxItems $B$NMWAG$G$"$k(B Dto $B$K(B<br>
$BM-8z!?L58z$rI=$9%U%i%0$r;}$?$;$F!$(B<br>
# $B%Z!<%8%/%i%9$K$bI,MW$G$9!%(B<br>
<br>
public class XxxDto {<br>
public boolean enable;<br>
...<br>
}<br>
<br>
xxxItems $B$O<B:]$KDI2C$5$l$&$k>e8B$N%5%$%:$K$J$k$h$&$K(B<br>
$BM=Hw$N(B XxxDto $B$r;}$?$;$^$9!%(B<br>
$BNc$($P:GBg(B 100 $B7o$^$GA}$d$;$k$J$i!$IA2h;~$K$O(B<br>
10 $B7o$7$+$J$/$F$b(B xxxItems $B$NMWAG?t$O(B 100 $B$K(B<br>
$B$J$k$h$&$K!$M=Hw$N(B XxxDto $B$rF~$l$F$*$-$^$9!%(B<br>
$B$?$@$7!$M=Hw$N(B XxxDto $B$N(B enable $B%U%i%0$O(B false $B$K$7$^$9!%(B<br>
<br>
HTML $B$G$O!$(Benable $B$,(B false $B$N>l9g$OIA2h$7$J$$$h$&$K(B<br>
$B$7$^$9!%(B<br>
$B$^$?!$(Benable $B$r1#$7%U%#!<%k%I$K;}$?$;$^$9!%(B<br>
<br>
<input type="hidden" id="xxxItemsSave" /><br>
<div id="xxxItems"><br>
<input type="hidden" id="enable" /><br>
<div id="isEnable"><br>
...<br>
</div><br>
</div><br>
<br>
JavaScript $B$G9T$rDI2C$9$k:]!$(Benable $B$N(B value $B$O(B<br>
true $B$K$7$^$9!%(B<br>
<br>
$B$3$l$G%P%j%G!<%7%g%s%(%i!<$,H/@8$7$?>l9g$G$b(B<br>
xxxItems $B$O>e8BJ,$N%5%$%:$r;}$C$F$$$k$N$G!$(B<br>
$BDI2C$5$l$?9T$NJ,$bIA2h$5$l$^$9!%$?$V$s!%(B<br>
$B<B:]$K$O;n$7$F$$$J$$$N$G$^$:$$$H$3$m$,$"$k$+$b(B<br>
$B$7$l$^$;$s$,!%(B<br>
<br>
<br>
$B<B:]$N0F7o$G;H$C$F$k?M$NJ}$,$$$$0F$r;}$C$F$k$+$b(B<br>
$B$7$l$^$;$s!%$J$K$+$"$l$P<+J,$bCN$j$?$$$G$9!%(B<br>
<br>
<br>
--<br>
<component name="koichik"><br>
<property name="fullName">"Koichi Kobayashi"</property><br>
<property name="email">"<a href="mailto:koichik@gmail.com" target="_blank">koichik@gmail.com</a>"</property><br>
<property name="blog">"<a href="http://d.hatena.ne.jp/koichik" target="_blank">http://d.hatena.ne.jp/koichik</a>"</property><br>
</component><br>
</blockquote></blockquote>
<br></div></div>
---<br>
$BJFNS(B $B@5L@(B<br>
<a href="http://www.abby.co.jp" target="_blank">http://www.abby.co.jp</a> <br><div><div></div><div class="h5">
_______________________________________________<br>
Seasar-user mailing list<br>
<a href="mailto:Seasar-user@ml.seasar.org" target="_blank">Seasar-user@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
</div></div></blockquote></div><br></div>