<div>Can&#39;t get params..</div>
<div>&nbsp;</div>
<div>When i use &quot;params.get(&quot;form:date&quot;) != null&quot;, it throws params is null.</div>
<div>&nbsp;</div>
<div>Is there anything else i should do?</div>
<div>&nbsp;</div>
<div>If i define &lt;form id=&quot;TestForm&quot; &gt;, i should write &quot;params.get(&quot;TestForm:date&quot;) != null)&quot; ?</div>
<div>&nbsp;</div>
<div>Thanks Very Much!<br><br>&nbsp;</div>
<div><span class="gmail_quote">2007/10/10, Yasuo Higa &lt;<a href="mailto:higa@isid.co.jp">higa@isid.co.jp</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi, all.<br>&gt;<br>&gt; &lt;input type=&quot;text&quot; id=&quot;number&quot; /&gt;<br>&gt;<br>&gt; &lt;input type=&quot;submit&quot; value=&quot;¥¦¥ß¥æJ&quot; class=&quot;button&quot; id=&quot;doApprovalConfirm&quot; /
<br>&gt;<br>&gt;<br>&gt; public Validator getDateValidator() {<br>&gt; ValidatorChain chain = new ValidatorChain();<br>&gt; TRequiredValidator validator = new TRequiredValidator();<br>&gt; if (number != 0) { chain.add(validator); }
<br>&gt; return chain;<br>&gt; }<br>&gt;<br>&gt; I can&#39;t get the input value of number . Why?<br><br>You should get the input value via request parameter,<br>because Teeda sets property value after validation phase.<br>
<br>Please define param property in your page class as follows:<br><br>private Map params;<br><br>public Map getParams() {<br>return params;<br>}<br><br>public void setParam(Map param) {<br>this.param = param;<br>}<br><br>
So, you can check the input value as follows:<br><br>public Validator getDateValidator() {<br><br>ValidatorChain chain = new ValidatorChain();<br><br>TRequiredValidator validator = new TRequiredValidator();<br><br>if (param.get
(&quot;form:date&quot;) != null) {<br><br>&nbsp;&nbsp; chain.add(validator);<br><br>}<br><br>return chain;<br><br>}<br><br>&quot;form&quot; means id element of form tag.<br><br>--<br>Yasuo Higa<br><a href="mailto:higa@isid.co.jp">higa@isid.co.jp
</a><br>_______________________________________________<br>Seasar-user mailing list<br><a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br><a href="https://ml.seasar.org/mailman/listinfo/seasar-user">
https://ml.seasar.org/mailman/listinfo/seasar-user</a><br></blockquote></div><br>