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AH$_$rA*Br$G(B
$B$-(B
>> $B$k!#(B
>>
>> $B!&8!>Z%a%=%C%I$rJ#?t;XDj$G$-$k!#(B
>
>$B2DG=$G$9$,!"$I$&$$$&%1!<%9$G;H$$$?$$$N$+3NG'$7$F$bNI$$$G$7$g$&$+!#(B
>
>$B$h$m$7$/$*4j$$$7$^$9!#(B
>
$B6qBNE*$J%1!<%9$[E-MAIL ADDRESS DELETED]@$;$:$K!"<:Ni$$$?$7$^$7$?!#(B
$B$^$@<B0F7o$G$O$J$/8!>Z$N%l%Y%k$G$9$,!"%7%9%F%`$KBP$9$k%"%/%;%9G'>Z$r(B
$B%l%k%`G'>Z$G$O$J$/FH<+$K<BAu$7$F!"%m%0%$%s$7$?%f!<%6!<$N%m!<%k$b%;%C%7%g%s(B
$B>e$J$I$K(B
$B;}$C$F$$$k$b$N$H$7$^$9!#(B
$B$3$N:]!";}$C$F$$$k%m!<%k$K$h$C$F$N%"%/%7%g%s$N%a%=%C%I<B9T$N@)8f$r!"8!>Z%a(B
$B%=%C%I$r;H$C$F(B
$B<BAu$7$h$&$H9M$($F$*$j$^$9!#(B
$B$?$H$($P<!$N$h$&$K$J$C$F$$$^$9!#(B
@Required
public String name;
@Execute(validate="checkRole",input="edit.jsp")
public String update()
{
...
return "result.jsp";
}
public ActionMessages checkRole()
{
ActionMessages messages = new ActionMessages();
... // $B%m!<%k$N%A%'%C%/(B
return messages;
}
$B%m!<%k$r;}$C$F$$$J$$%f!<%6!<$,(Bupdate$B%a%=%C%I$r<B9T$7$h$&$H$7$?$H$-$O(B
checkRole$B$G(B
$B$R$C$+$+$j$^$9$,!"%W%m%Q%F%#$N(Bname$B$,6u$N>l9g!"@h$K!V(Bname$B$,I,?\$G$9!W$HI=<((B
$B$5$l!"(B
name$B%W%m%Q%F%#$KCM$,F~$C$F$$$k$H8!>Z%a%=%C%I$K$h$k%A%'%C%/$,F~$j$^$9!#(B
$B$3$N>l9g$O!"%P%j%G!<%?$h$j$b8!>Z%a%=%C%I$rM%@h$5$;$?$$$H;W$C$F$$$^$9!#(B
$B!J5U$N%1!<%9$b$"$k$+$b$7$l$^$;$s!#$I$A$i$rM%@h$5$;$k$+$rL@<(E*$K;XDj$G$-$k(B
$B$H$&$l$7$$$G$9!#!K(B
$B$^$?8!>Z%a%=%C%I$rJ#?t;XDj$7$?$$$H$$$&7o$G$9$,!">e5-$K2C$($F<!$N$h$&$J<B9T(B
$B%a%=%C%I$H8!>Z%a%=%C%I$,(B
$B$"$C$?$H$7$^$9!#(B
@Execute(validator=false,validate="validateUpdateAll",input="list.jsp")
public String updateAll()
{
...
return "list.jsp";
}
public ActionMessages validateUpdateAll()
{
ActionMessages messages = new ActionMessages();
... // $BJ#;($J8!>Z(B
return messages;
}
validateUpdateAll$B%a%=%C%I$OJ#;($J8!>Z$r9T$&%a%=%C%I$G!"%m!<%k$N%A%'%C%/$O9T(B
$B$o$J$$$b$N$H$7$?$$$N$G$9$,!"(B
updateAll$B%a%=%C%I$O%m!<%k$K$h$k@)8f$b9T$$$?$$$H$7$^$9!#(B
$B$?$H$($P<!$N$h$&$K;XDj$G$-$k$H$&$l$7$$$G$9!#!J(BcheckRole$B$[E-MAIL ADDRESS DELETED]$K;XDj$7$F$$$k$N(B
$B$G!"$3$A$i$[E-MAIL ADDRESS DELETED]$K%A%'%C%/$5$l$k!K(B
@Execute(validator=false,validate="checkRole,validateUpdateAll",input="list.jsp")
public String updateAll()
{
...
$BD9!9$H=q$$$F$7$^$$62=L$G$9$,!"$48!F$$$$?$@$1$?$i9,$$$G$9!#(B
$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B
$B0J>e(B
Seasar-user メーリングリストの案内