<div>Can't get params..</div>
<div> </div>
<div>When i use "params.get("form:date") != null", it throws params is null.</div>
<div> </div>
<div>Is there anything else i should do?</div>
<div> </div>
<div>If i define <form id="TestForm" >, i should write "params.get("TestForm:date") != null)" ?</div>
<div> </div>
<div>Thanks Very Much!<br><br> </div>
<div><span class="gmail_quote">2007/10/10, Yasuo Higa <<a href="mailto:higa@isid.co.jp">higa@isid.co.jp</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi, all.<br>><br>> <input type="text" id="number" /><br>><br>> <input type="submit" value="¥¦¥ß¥æJ" class="button" id="doApprovalConfirm" /
<br>><br>><br>> public Validator getDateValidator() {<br>> ValidatorChain chain = new ValidatorChain();<br>> TRequiredValidator validator = new TRequiredValidator();<br>> if (number != 0) { chain.add(validator); }
<br>> return chain;<br>> }<br>><br>> I can'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
("form:date") != null) {<br><br> chain.add(validator);<br><br>}<br><br>return chain;<br><br>}<br><br>"form" 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>