[Seasar-user:10939] Re: dynamic validator

=?GB2312?B?wO7A1g==?= [E-MAIL ADDRESS DELETED]
2007年 10月 10日 (水) 16:55:43 JST


Œê¤·¤Þ¤·¤¿¡£¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹£¡¤Ï¤Ï¤Ï¡£¡£¡£

2007/10/10, Yasuo Higa <[E-MAIL ADDRESS DELETED]>:
>
> Hi, guys.
> >
> > Can't get params..
> >
> > When i use "params.get("form:date") != null", it throws params is null.
> >
> > Is there anything else i should do?
> >
> Sorry, I was wrong. m(_ _)m
> "param" is correct.
> So, you should define your page class as follows:
>
> private Map param;
>
> public Map getParam() {
> return param;
> }
>
> public void setParam(Map param) {
> this.param = param;
> }
>
> public Validator getDateValidator() {
> ValidatorChain chain = new ValidatorChain();
> TRequiredValidator validator = new TRequiredValidator();
> if (param.get("TestForm:date") != null) {
>    chain.add(validator);
> }
> return chain;
> }
>
> --
> Yasuo Higa
> [E-MAIL ADDRESS DELETED]
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: http://ml.seasar.org/archives/seasar-user/attachments/20071010/bffe74f4/attachment.html 


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