The first thing that jumps out is that you have the html:select and the
html:options tags bound to the same form bean property (eng_name).
That's almost certainly not what you want to do, although I don't think
it explains the problem you're asking about.
What's the 'action' attribute set to for the form in the first page? Is
it set up to submit to the /setupAssignUserSystem action? And what does
the SetupAssignUserSystemAction class look like?
It would help if you posted all the relevant code and configuration so
we can see all the pieces in context.
L.
PC Leung wrote:
<bean:write name="userForm" property="eng_name"/>
The above line returns blank. Where goes wrong?
In previous page as below, the combo box has values.
<td>
<html:select name="userForm" property="eng_name">
<html:options collection="userList"
property="eng_name"/>
</html:select>
</td>
struts-config.xml is
<action path="/setupSelectUser"
input="user.selectUser"
name="userForm"
scope="session"
validate="false"
type="com.user.struts.action.SetupSelectUserAction">
<forward name="success" path="user.selectUser" />
</action>
<action path="/setupAssignUserSystem"
input="user.assignUserSystem"
name="userSystemForm"
scope="session"
validate="false"
type="com.user.struts.action.SetupAssignUserSystemAction">
<forward name="success" path="user.assignUserSystem" />
</action>
public final class SetupSelectUserAction extends Action {
private Log log =
LogFactory.getFactory().getInstance(this.getClass().getName());
public ActionForward execute (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
UserProfileService service = new UserProfileService();
Collection userList = service.getUserProfileList(null);
HttpSession session = request.getSession();
session.setAttribute( "userList", userList );
UserForm userForm = (UserForm)form;
userForm.setMethod("create");
log.info("SetupSelectUserAction:" + userForm.getMethod());
return mapping.findForward("success");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]