Hi, i wonder if the validation framework has been changed in the recent
time, say 1-2 weeks ago?
I wonder for my test validation page doesn't longer work for me, it work ok
for about 2 weeks :/ I got the validation file, interceptor ref, and the
action's validation xml file is included as well under the class catalogue.
xwork------------------
<action name="demoStep1" class="com.tradedoubler.ui.test.DemoAction"
method="doStep1">
<result name="success"
type="dispatcher">/test/demo/DemoFormStep2.jsp</result>
<result name="input"
type="dispatcher">/test/demo/DemoFormStep1.jsp</result>
<interceptor-ref name="component"/>
<interceptor-ref name="static-params"/>
<interceptor-ref name="params"/>
<interceptor-ref name="validation"/>
</action>
the action has a check on errors.
public class DemoAction extends ActionSupport implements DemoAware {
.....
public DemoTransport getDemo() {
return demo;
}
public void setDemo(DemoTransport demo) {
this.demo = demo;
}
public String doStep1() throws Exception {
if(hasErrors()){
return INPUT;
}else{
return SUCCESS;
}
}
...
}
validation-------------
DemoAction-doStep1-validation.xml
<!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.dtd">
<validators>
<field name="demo.message">
<field-validator type="requiredstring">
<message>You must fill in a message!.</message>
</field-validator>
</field>
<field name="demo.countryId">
<field-validator type="requiredstring">
<message>You must choose a country!.</message>
</field-validator>
</field>
</validators>
JSP---------------------------------
...
<body>
<ww:include page="/include/errorDisplay.jsp" />
<table>
<ww:form action="'demoStep1.action'" method="'post'" name="'frm'">
<tr>
<ww:select label="'Country'" name="'demo.countryId'"
list="demo.countries" listKey="key" listValue="value" multiple="true"
size="8" />
</tr>
<tr>
<ww:textarea label="'Skriv ett meddelande'" name="'demo.message'"
cols="'10'" rows="'5'" value="''" />
</tr>
<tr>
<ww:submit value="'Skicka'" />
</tr>
</ww:form>
</table>
</body>
....
--------------------------------------------------
What else do you need ... I get no errors, only a dispatch to the second
page.
/Mathias
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork