Thanks for the clarification Laurie.  It does make perfect sense.

On 22 Sep 2005 at 19:40, Laurie Harper wrote:

> As long as you have your mappings setup correctly (and use the right 
> attribute name if you push the form bean into the request/session 
> yourself), the <html:form> tag locates the appropriate form bean 
> automatically and the name attribute is redundant.
> 
> L.
> 
> Murray Collingwood wrote:
> > Laurie is right, you need the extra action mapping in your config file.
> > 
> > I have also been adding the attribute name to the form elements as in:
> >      <html:hidden name="MappingElement" property="actionStr"/>
> > 
> > Is this necessary?  It works but I'm wondering if it is redundant?
> > 
> > Kind regards
> > mc
> > 
> > 
> > On 22 Sep 2005 at 15:44, Laurie Harper wrote:
> > 
> > 
> >>You have your action path set to /EditMappingElement but your form 
> >>action is SaveMappingElement. There's no link between the form and the 
> >>form-bean. You need to make sure you have an action mapping for 
> >>SaveMappingElement, and that it has name="MappingElement" set.
> >>
> >>L.
> >>
> >>Michael Oliver wrote:
> >>
> >>>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]
> >>
> >>
> >>
> >>-- 
> >>No virus found in this incoming message.
> >>Checked by AVG Anti-Virus.
> >>Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 21/09/2005
> >>
> > 
> > 
> > 
> > 
> > FOCUS Computing
> > Mob: 0415 24 26 24
> > [EMAIL PROTECTED]
> > http://www.focus-computing.com.au
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 21/09/2005
> 



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 21/09/2005


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to