[Seasar-user:7384] Re: メソッドごとのValidationについて(S2Struts)

Ogino Yosihko [E-MAIL ADDRESS DELETED]
2007年 4月 23日 (月) 11:04:39 JST


$B$*@$OC$K$J$C$F$*$j$^$9!#(B
$B2.Ln$G$9!#(B

$B$42sEz$"$j$,$H$&$4$6$$$9!#(B
$BBgJQ=u$+$j$^$9!#(B

>$B8e$KDj5A$5$l$?(Bsubmit$B%?%0$N(Baction$[E-MAIL ADDRESS DELETED]$N$_$,M-8z$H$J$j!"(B
>$B4|BT$7$?F0$-$H$O0[$J$k$3$H$K$J$k$H;W$$$^$9!#(B

$B$J$k$[$I!#(B
$B%\%?%sL>$rF1$8$K$7$?>l9g$O!"(B
$B8e$K5-=R$7$?J}$N%a%=%C%I$7$+8F$S=P$5$l$^$;$s$G$7$?!#(B
$B5$$r$D$1$kI,MW$,$"$j$=$&$G$9$M!#(B


$B$"$j$,$H$&$4$6$$$^$7$?!#(B


#$B%a!<%j%s%0%j%9%H$NJ]B8=q8K$G8+$k$HJ8;z2=$1$7$F$$$k$N$G$9$,!"(B
$B2?8N$J$N$G$7$g$&$+!)!)!)(B




>From: "Katsuhiko Nagashima" <[E-MAIL ADDRESS DELETED]>
>Reply-To: [E-MAIL ADDRESS DELETED]
>To: [E-MAIL ADDRESS DELETED]
>Subject: [Seasar-user:7345] Re:$B%a%=%C%I$4$H$N(BValidation$B$K$D$$$F!J(BS2Struts$B!K(B

>Date: Thu, 19 Apr 2007 08:43:28 +0900
>
>$B1JEg$G$9!#(B
>
>>$B$3$NJ}K!$G>-MhE*$KLdBj$,$"$j$=$&$G$7$?$i!"65$($F$$$?$@$1$J$$$G$7$g$&$+!#(B
>>$BFC$K(Bs2struts:submit$B%?%0$N(Bproperty$[E-MAIL ADDRESS DELETED]$r;XDj$7$F$$$k$N$G$9$,!"(B
>>$BLdBj$J$$$7$g$&$+!#(B
>
>$B:#2s$NMxMQJ}K!$G$OLdBj$"$j$^$;$s!#(B
>
>submit$B%?%0$G<B9T$9$k(Baction$B$O!"(BS2Struts$BFb$G4IM}$7$F$^$9!#(B
>submit$B%?%0$G(Bproperty$[E-MAIL ADDRESS DELETED]$r;XDj$9$k>l9g!"(B
>   form$B%?%0Fb$G;XDj$7$?(BActionMapping$BL>(B + property$[E-MAIL ADDRESS DELETED]$NCM(B + 
>value$B$H$J$kCM(B
>$B$r(BKey$B$H$7$F<B9T$9$k(Baction$B$H7k$SIU$1$F4IM}$7$F$$$^$9!#(B
>$B$G$9$N$G!"(B
>1$B$D$N(Bform$B%?%0Fb$G(Bsubmit$B%?%0$N(Bproperty$[E-MAIL ADDRESS DELETED]$H(Bvalue$B$H$J$kCM$,(B
>$BF1$8$G(Baction$[E-MAIL ADDRESS DELETED]$,0[$J$k>l9g$O!"(B
>$B8e$KDj5A$5$l$?(Bsubmit$B%?%0$N(Baction$[E-MAIL ADDRESS DELETED]$N$_$,M-8z$H$J$j!"(B
>$B4|BT$7$?F0$-$H$O0[$J$k$3$H$K$J$k$H;W$$$^$9!#(B
>$BNc$($P!"0J2<$N$h$&$J>l9g$G$9!#(B
>---
><html:form action="/department">
>   <s2struts:submit action="#{departmentAction.goSearch}"
>       property="command" >go</s2struts:submit>
>   <s2struts:submit action="#{departmentAction.goUpdate}"
>       property="command" >go</s2struts:submit>
></html:form>
>---
>
>$B$?$@!":#2s$NMxMQJ}K!$G$O!">e5-$N$h$&$JNc$N$D$/$j$K$O(B
>$B$J$i$J$$$N$G$O$J$$$+$H;W$$$^$9$N$G!"LdBj$J$/MxMQ$G$-$^$9!#(B
>
>
>>$BJ8;z2=$1$7$F$$$?$h$&$J$N$G!"(B
>>$B:FEY%a!<%k$5$;$F$$$?$@$$$F$$$k$N$G$9$,!"(B
>>$B$^$?2=$1$F$$$?$i!"?=$7Lu$4$6$$$^$;$s!#(B
>
>$BA02s$N$b;d$N4D6-$G$OJ8;z2=$1$;$:$K8+$k$3$H$,$G$-$^$7$?!#(B
>$BJV?.$,CY$/$J$j$9$_$^$;$s!#(Bm(_ _)m
>
>$B0J>e$G$9!#(B
>
>07/04/18 $B$K(B Ogino Yosihko<[E-MAIL ADDRESS DELETED]> $B$5$s$O=q$-$^$7$?(B:
>>$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#(B
>>$B2.Ln$H?=$7$^$9!#(B
>>
>>$B2?EY$b?=$7Lu$4$6$$$^$;$s!#(B
>>$BJ8;z2=$1$7$F$$$?$h$&$J$N$G!"(B
>>$B:FEY%a!<%k$5$;$F$$$?$@$$$F$$$k$N$G$9$,!"(B
>>$B$^$?2=$1$F$$$?$i!"?=$7Lu$4$6$$$^$;$s!#(B
>>
>>
>>s2Struts$B%?%0!"(BStruts$B$N(Bvalidation.xml$B$r;H$C$F!"(B
>>$B%a%=%C%I$4$H$N(BValidation$B$r9T$*$&$H$7$F$$$^$9!#(B
>>
>>$B0J2<$NJ}K!$G!"$G$-$?$N$G$9$,!"LdBj$J$$$G$7$g$&$+!#(B
>>
>>$B#1!%(BActionForm
>>$B-!(Borg.apache.struts.validator.ValidatorForm 
>>$B$r7Q>5$7$?(BActionForm$B$r:[E-MAIL ADDRESS DELETED](B
>>$B-"(Bcommand$B%W%m%Q%F%#$rDj5A(B
>>$B-#(BgetValidationKey()$B%a%=%C%I$NDI2C(B
>>
>>public class DepartmentForm extends ValidatorForm{
>>$B!&!&!&!&!&(B      protected String command;
>>    public String getCommand() {
>>        return command;
>>    }
>>    public void setCommand(String command)
>>    {
>>        this.command = command;
>>    }
>>    public String getValidationKey(ActionMapping mapping, 
>>HttpServletRequest
>>request) {
>>       return super.getValidationKey(mapping, request) + "_" + 
>>this.command;
>>
>>    }
>>
>>$B#2!%(BAction$BDj?t%"%N%F!<%7%g%s$[E-MAIL ADDRESS DELETED](B
>>
>>public static final String ACTION = "name=departmentForm,
>>  scope=request,   parameter=command, validate=true ,
>>input=error.jsp ";
>>
>>$B#3!%(Bvalidation.xml$B$[E-MAIL ADDRESS DELETED](B
>>Form$BL>$N8e$K%\%?%sL>$[E-MAIL ADDRESS DELETED](B
>>
>><form name="departmentForm_Search">
>>        <field  property="deptId" depends="required">
>>            <arg0 key="$BIt=p(BID" resource="false" />
>>        </field>
>></form>
>><form name="departmentForm_Update">
>>        <field  property="deptId"  depends="mask">
>>            <arg0 key="$BIt=p(BID" resource="false" />
>>            <var>
>>                <var-name>mask</var-name>
>>                <var-value>^[0-9a-zA-Z]*$</var-value>
>>            </var>
>>    </field>
>></form>
>>
>>$B#4!%(BJSP
>><s2struts:submit action="#{departmentAction.goSearch}"
>>property="command" >
>>Search</s2struts:submit>
>><s2struts:submit action="#{departmentAction.goUpdate}"
>>property="command" >
>>Update</s2struts:submit>
>>
>>
>>$B$3$NJ}K!$G>-MhE*$KLdBj$,$"$j$=$&$G$7$?$i!"65$($F$$$?$@$1$J$$$G$7$g$&$+!#(B
>>$BFC$K(Bs2struts:submit$B%?%0$N(Bproperty$[E-MAIL ADDRESS DELETED]$r;XDj$7$F$$$k$N$G$9$,!"(B
>>$BLdBj$J$$$7$g$&$+!#(B
>>
>>$BB>$K$*A&$a$9$kJ}K!$,$"$j$^$7$?$i!"(B
>>$B$465<x$$$?$@$1$k$H!"$"$j$,$?$$$G$9!#(B
>>
>>$B$*<j?t$G$9$,!"$h$m$7$/$*4j$$CW$7$^$9!#(B
>>
>>_________________________________________________________________
>>$B%a%C%;%s%8%c!<H/%"%$%I%k$H$N%3%i%\<L??=8$r%A%'%C%/(B
>>http://campaign.live.jp/dizon/
>>
>>
>>_______________________________________________
>>Seasar-user mailing list
>>[E-MAIL ADDRESS DELETED]
>>https://ml.seasar.org/mailman/listinfo/seasar-user
>>
>>
>
>
>--
>Katsuhiko Nagashima


>_______________________________________________
>Seasar-user mailing list
>[E-MAIL ADDRESS DELETED]
>https://ml.seasar.org/mailman/listinfo/seasar-user

_________________________________________________________________
$B!VNY$N%*%U%#%9$N(BOffice$B%9%H!<%j!<!W(B2007 Office system $B$G%W%m%8%'%/%H$[E-MAIL ADDRESS DELETED]$K(B
$BF3$/(B http://www.microsoft.com/japan/office/2007/story/ 



Seasar-user メーリングリストの案内