this might work - <html:form action="SaveMappingElement"> <html:hidden property="actionStr" name="MappingElement"/> <html:hidden property="dataSourceUri" name="MappingElement"/> <html:hidden property="dataElementUri" name="MappingElement"/>
> -----Original Message----- > From: Michael Oliver [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 22, 2005 4:37 AM > To: 'Struts Users Mailing List' > Subject: Bean association with form > > > I have an Form called MappingElement, > > From struts-config.xml > > <form-bean name="MappingElement" > type="com.alarius.datasource.forms.MappingElement"/> > > I have an Action that opens a jsp page with a form on it and populates the > MappingElement bean with data. > > From EditMappingElement.java > > public ActionForward execute(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse > response) > throws Exception { > ActionForward forward = mapping.findForward(FORWARD_mappingElement); > MappingElement me = (MappingElement) form; > > DataSourceServices dss = new DataSourceServices(); > AccessToken token = new AccessToken(ajcc); > ServiceResponse sr = dss.RetrieveMappingElement(token, me > .getDataElementUri()); > form = me = (MappingElement) sr.getMappingElement(); > request.setAttribute("MappingElement", me); > > return forward; > } > > From Struts-config.xml > > <action name="MappingElement" path="/EditMappingElement" > type="com.alariusj.verdx.actions.EditMappingElement"> > <forward name="mappingElementForm" > path="/pages/MappingElementForm.jsp"/> > </action> > > From MappingElementForm.jsp > > <logic:present name="MappingElement">MappingElement present<br> > <bean:write name="MappingElement" property="dataSourceUri"/><br> > <bean:write name="MappingElement" property="dataElementName"/><br> > </logic:present> > > <html:form action="SaveMappingElement"> > <html:hidden property="actionStr"/> > <html:hidden property="dataSourceUri"/> > <html:hidden property="dataElementUri"/> > > When I run it the SaveMappingElement form is not populated but the > MappingElement bean is present and the bean:writes show the data that is > populated. > > Why doesn't the html:form tag pick up the MappingElement bean? > > Ollie > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]