elements in a form cannot be assigned to Action properties.
ascat <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <16187742.1148864707948.JavaMail.os-j2ee@opensymphony01.managed.contegix.com> |
in action1,a property named user is used to do something,then the control is dispatched to page2,here,every element of user is re-assigned and submitted to action2.In action2,there is also a property named user,with the same type.and the related code piece comes here:
private User user;
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public String newuser() throws Exception{
if(user == null) return INPUT; // input is page2
...
The 1st time I access action2,user is null,and page2 is shown:
<ww:action id="AllBranches" executeResult="false" name="baseinfo" namespace="/pub"/>
<ww:form action="newuser" namespace="/pub">
<ww:token/>
<ww:textfield label="ID" name="user.userid" required="true"/>
<ww:textfield label="name" name="user.username" required="true"/>
<ww:password label="pass" name="user.password" required="true"/>
<ww:select label="branch" name="user.blbranch" list="#attr.AllBranches.branches" listKey="branch" listValue="branch" required="true"/>
<ww:submit value="bew user"/>
</ww:form>
But after I filled every elements and submit this form,property"user" is not null,but its every field is null.No form element is assigned to this property.Why???
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=32616&messageID=63179#63179
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]