RE: Nested properties of form bean not being updated !
You can root your nesting using the nested:root tag. For example: nested:root name=some-bean !-- All the nested references -- /nested:root Alternatively, if all your nesting is within a nested:form, and the action mapping for the given action has a ActionForm (form-bean) associated with it, that bean will be used. nested:form action=fooAction !-- All the nested references -- /nested:form Here, if the mapping for action 'fooAction' specifies a bean named 'fooBean' (in your struts-config), then that is what will be used. In your case, (I trust you are using a nested:form action=updateEPR in your top-level JSP) voEPR is your form-bean. To get to voEngagementDetails, you *would* (in 64_eng_del) have nested:nest property=voEngagementDetails !-- etc -- /nested:nest as you have shown, however for this to work you *must* have the nested:form as I explained above. Why? Because all nested tags keep track of the current scope and all property references are relative to the scope. So if the scope is the form bean voEPR, then a call for property=voEngagementDetails results in a call to voEPR.getEngagementDetails(). BTW there is an added wrinkle if you are tryging to nest collections. For the version of the Nested extension used with Struts 1.0.2, when working with Collections, you are forced (due to a limitation in BeanUtils) to provide an Object array. For example, to use eprGoals in voEPR you will either have to modify your getter to return eprGoals.toArray() or create another getter that does the needful. HTH Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Wednesday, November 06, 2002 2:16 AM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri I've got the keyboardmonkey installed into my app. Just a quickie - how do you tell the nested tag what form bean you're dealing with. Before we specified the name attribute in the write tag to indicate which bean we were referring to. In 64_eng_del I've now got a portion that looks like this: nested:nest property=voEngagementDetails %-- Engagement Client--% td class=tbl_2 height=25* engagement client/td td class=tbllefttext width=257 colspan=2 nested:text size=50 property=engagementClient/ /nested:nest ... but there's nowhere to say where this 'voEngagementDetails' is coming from. (ie attached to which bean) I get a nullpointer when trying to run this. org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:174 Is this the correct way to use this tag. Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:26 PM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Giles: I am sorry. Going from the subject line I assumed you were trying to use the nesting extension. I am using Struts 1.0.2 along with the nesting extension from Arron Bates site www.keyboardmonkey.com/next/index.jsp. This is not beta-ware so you should be able to use it. All the dot notation and everything advertised works. So, you can and *should* use the nesting extension. Spend the hour or so learning how to use it -- it will save you a lot of work/worry/hassle. Wherever I have a nested hierarchy to deal with, especially with iterations, I use the extension. Hope you are able to work with it. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Monday, November 04, 2002 8:28 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri I've made the small change to the included file - 64_eng_del.jsp - didn't help much I'm afraid. We are not using the nested tags because at the moment struts 1.1-b2 is still in beta (Is this the only version with the nested tag ???) My company has made the firm decision that we cannot use beta software in the production environment. I was under the impression that the benefit of the nested tags didn't offer much more additional functionality from the dot notation of struts 1.0.2, i.e. it is just a way of structuring your code in a better manner. (could be way wrong here too!) I suppose the question I need to ask Sri, is : Is what I am trying to do possible in my version of struts? Is the dot notation fully functional in 1.0.2? I know it's returning the correct stuff from the server, it's just not updating it. Does this functionality work in Struts1.02? Was it EVER possible to do this before nested tags came out? If the nested tag is my only option, do you have any idea when struts1.1 will become production stable? I've seen there was a code freeze in august, but haven't seen anything since. Other than that, know anything else I might be able to try ??? Cheers Giles -Original
RE: Nested properties of form bean not being updated !
Hi Sri I've got the keyboardmonkey installed into my app. Just a quickie - how do you tell the nested tag what form bean you're dealing with. Before we specified the name attribute in the write tag to indicate which bean we were referring to. In 64_eng_del I've now got a portion that looks like this: nested:nest property=voEngagementDetails %-- Engagement Client--% td class=tbl_2 height=25* engagement client/td td class=tbllefttext width=257 colspan=2 nested:text size=50 property=engagementClient/ /nested:nest ... but there's nowhere to say where this 'voEngagementDetails' is coming from. (ie attached to which bean) I get a nullpointer when trying to run this. org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:174 Is this the correct way to use this tag. Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:26 PM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Giles: I am sorry. Going from the subject line I assumed you were trying to use the nesting extension. I am using Struts 1.0.2 along with the nesting extension from Arron Bates site www.keyboardmonkey.com/next/index.jsp. This is not beta-ware so you should be able to use it. All the dot notation and everything advertised works. So, you can and *should* use the nesting extension. Spend the hour or so learning how to use it -- it will save you a lot of work/worry/hassle. Wherever I have a nested hierarchy to deal with, especially with iterations, I use the extension. Hope you are able to work with it. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Monday, November 04, 2002 8:28 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri I've made the small change to the included file - 64_eng_del.jsp - didn't help much I'm afraid. We are not using the nested tags because at the moment struts 1.1-b2 is still in beta (Is this the only version with the nested tag ???) My company has made the firm decision that we cannot use beta software in the production environment. I was under the impression that the benefit of the nested tags didn't offer much more additional functionality from the dot notation of struts 1.0.2, i.e. it is just a way of structuring your code in a better manner. (could be way wrong here too!) I suppose the question I need to ask Sri, is : Is what I am trying to do possible in my version of struts? Is the dot notation fully functional in 1.0.2? I know it's returning the correct stuff from the server, it's just not updating it. Does this functionality work in Struts1.02? Was it EVER possible to do this before nested tags came out? If the nested tag is my only option, do you have any idea when struts1.1 will become production stable? I've seen there was a code freeze in august, but haven't seen anything since. Other than that, know anything else I might be able to try ??? Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:12 AM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Holy cow! Yes, you gave enough details.. Looking at JSPs a few things jump out: * You aren't using any of the nested tags. To take advantage of the nested extension, you have to use the nested:xyz equivalent of the usual tags. So, instead of html:form you should use nested:form, instead of html:text you should use nested:text. Of course, make sure you have the necessary taglib statement for the nested tags. This should fix a lot of your problems * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably don't want to leave that for the *includer* -- your top-level JSP. Remember the top-level has an open form tag that it closes at the end of all includes Give this a shot. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Sunday, November 03, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri Thanks for getting back to me. I've included 1. A portion of my struts config: - My form bean definition - And the action mapping 2. My action class 3. My JSPs, which are comprised of - - My top level jsp... that contains the form bean definition, and the forwarding action name - The include '64_eng_del.jsp' contains the nested bean 4. The two Value objects - VOEPR, (which contains VOEngagementDetails) and - VOEngagementDetails As i said before all the top level attributes of the VOEPR are fine ... i can update them. It's the VOEngagement Details where things fall over. Nothing seems to be get
RE: Nested properties of form bean not being updated !
Holy cow! Yes, you gave enough details.. Looking at JSPs a few things jump out: * You aren't using any of the nested tags. To take advantage of the nested extension, you have to use the nested:xyz equivalent of the usual tags. So, instead of html:form you should use nested:form, instead of html:text you should use nested:text. Of course, make sure you have the necessary taglib statement for the nested tags. This should fix a lot of your problems * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably don't want to leave that for the *includer* -- your top-level JSP. Remember the top-level has an open form tag that it closes at the end of all includes Give this a shot. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Sunday, November 03, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri Thanks for getting back to me. I've included 1. A portion of my struts config: - My form bean definition - And the action mapping 2. My action class 3. My JSPs, which are comprised of - - My top level jsp... that contains the form bean definition, and the forwarding action name - The include '64_eng_del.jsp' contains the nested bean 4. The two Value objects - VOEPR, (which contains VOEngagementDetails) and - VOEngagementDetails As i said before all the top level attributes of the VOEPR are fine ... i can update them. It's the VOEngagement Details where things fall over. Nothing seems to be get set here. When i trace through into my action - the 'form' object doesn't seem to contain these nested attributes. Sri .. any help would be great. Cheers Giles PS: Hope this is enough info this time :) # 1) Struts config # !-- == Start Form Bean Definitions == -- form-beans !-- VOEPR form bean -- form-bean name=voEPR type=au.com.eclipsegroup.egem.valueObject.VOEPR/ !-- == End of Form Bean Definitions -- !-- == Start Action Mapping Definitions === -- actionpath=/updateEPR name=voEPR type=au.com.eclipsegroup.egem.actions.cde.UpdateEPRAction scope=session validate=false forward name=success path=/preCounseleeTaskList/ forward name=failure path=/jsp/errors.jsp/ /action !-- == End Action Mapping Definitions -- # 2) Heres the relevant portions of my action class: # blaa blaaa.. // Get the Plan off the session if (theSession.getAttribute(voCDE) != null) { voCDE = (VOEPR) theSession.getAttribute(voCDE); log.debug(The EPR obtained from session was - + voCDE.getEPRID()); voCDE = (VOEPR) form; } else { log.error(The EPR Details have been lost on the session); throw new ServletException(The EPR Details have been lost on the session); } // Create the facade try { EJBHomeFactory.init(); AssessmentFacadeHome facadeHome = (AssessmentFacadeHome)EJBHomeFactory.lookUpHome(AssessmentFacadeHome.class); AssessmentFacade facade = facadeHome.create(); /** Lets try and update ... wot the hell * Pass in the employeeID so we know whether it was the counselee or the * counsellor updating the EPR. */ facade.updateCDE(voCDE, employeeID); } catch(CreateException ce) { log.error(Failed to create facade, ce); throw new ServletException(Unable to conatct application facade.); } catch (IncorrectVersionException e) { log.error(Someone has updated an element of your Plan while your were editing. Please redo , e); throw new ServletException(Someone has updated an element of your Plan while your were editing. Please redo
RE: Nested properties of form bean not being updated !
Oops! My second bullet should begin as: * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably want to leave that for the *includer* -- your top-level JSP -Original Message- From: Sri Sankaran Sent: Monday, November 04, 2002 10:12 AM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Holy cow! Yes, you gave enough details.. Looking at JSPs a few things jump out: * You aren't using any of the nested tags. To take advantage of the nested extension, you have to use the nested:xyz equivalent of the usual tags. So, instead of html:form you should use nested:form, instead of html:text you should use nested:text. Of course, make sure you have the necessary taglib statement for the nested tags. This should fix a lot of your problems * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably don't want to leave that for the *includer* -- your top-level JSP. Remember the top-level has an open form tag that it closes at the end of all includes Give this a shot. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Sunday, November 03, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri Thanks for getting back to me. I've included 1. A portion of my struts config: - My form bean definition - And the action mapping 2. My action class 3. My JSPs, which are comprised of - - My top level jsp... that contains the form bean definition, and the forwarding action name - The include '64_eng_del.jsp' contains the nested bean 4. The two Value objects - VOEPR, (which contains VOEngagementDetails) and - VOEngagementDetails As i said before all the top level attributes of the VOEPR are fine ... i can update them. It's the VOEngagement Details where things fall over. Nothing seems to be get set here. When i trace through into my action - the 'form' object doesn't seem to contain these nested attributes. Sri .. any help would be great. Cheers Giles PS: Hope this is enough info this time :) # 1) Struts config # !-- == Start Form Bean Definitions == -- form-beans !-- VOEPR form bean -- form-bean name=voEPR type=au.com.eclipsegroup.egem.valueObject.VOEPR/ !-- == End of Form Bean Definitions -- !-- == Start Action Mapping Definitions === -- actionpath=/updateEPR name=voEPR type=au.com.eclipsegroup.egem.actions.cde.UpdateEPRAction scope=session validate=false forward name=success path=/preCounseleeTaskList/ forward name=failure path=/jsp/errors.jsp/ /action !-- == End Action Mapping Definitions -- # 2) Heres the relevant portions of my action class: # blaa blaaa.. // Get the Plan off the session if (theSession.getAttribute(voCDE) != null) { voCDE = (VOEPR) theSession.getAttribute(voCDE); log.debug(The EPR obtained from session was - + voCDE.getEPRID()); voCDE = (VOEPR) form; } else { log.error(The EPR Details have been lost on the session); throw new ServletException(The EPR Details have been lost on the session); } // Create the facade try { EJBHomeFactory.init(); AssessmentFacadeHome facadeHome = (AssessmentFacadeHome)EJBHomeFactory.lookUpHome(AssessmentFacadeHome.class); AssessmentFacade facade = facadeHome.create(); /** Lets try and update ... wot the hell * Pass in the employeeID so we know whether it was the counselee or the * counsellor updating the EPR. */ facade.updateCDE(voCDE, employeeID); } catch(CreateException ce) { log.error(Failed to create facade, ce); throw new ServletException(Unable
RE: Nested properties of form bean not being updated !
Hi Sri I've made the small change to the included file - 64_eng_del.jsp - didn't help much I'm afraid. We are not using the nested tags because at the moment struts 1.1-b2 is still in beta (Is this the only version with the nested tag ???) My company has made the firm decision that we cannot use beta software in the production environment. I was under the impression that the benefit of the nested tags didn't offer much more additional functionality from the dot notation of struts 1.0.2, i.e. it is just a way of structuring your code in a better manner. (could be way wrong here too!) I suppose the question I need to ask Sri, is : Is what I am trying to do possible in my version of struts? Is the dot notation fully functional in 1.0.2? I know it's returning the correct stuff from the server, it's just not updating it. Does this functionality work in Struts1.02? Was it EVER possible to do this before nested tags came out? If the nested tag is my only option, do you have any idea when struts1.1 will become production stable? I've seen there was a code freeze in august, but haven't seen anything since. Other than that, know anything else I might be able to try ??? Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:12 AM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Holy cow! Yes, you gave enough details.. Looking at JSPs a few things jump out: * You aren't using any of the nested tags. To take advantage of the nested extension, you have to use the nested:xyz equivalent of the usual tags. So, instead of html:form you should use nested:form, instead of html:text you should use nested:text. Of course, make sure you have the necessary taglib statement for the nested tags. This should fix a lot of your problems * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably don't want to leave that for the *includer* -- your top-level JSP. Remember the top-level has an open form tag that it closes at the end of all includes Give this a shot. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Sunday, November 03, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri Thanks for getting back to me. I've included 1. A portion of my struts config: - My form bean definition - And the action mapping 2. My action class 3. My JSPs, which are comprised of - - My top level jsp... that contains the form bean definition, and the forwarding action name - The include '64_eng_del.jsp' contains the nested bean 4. The two Value objects - VOEPR, (which contains VOEngagementDetails) and - VOEngagementDetails As i said before all the top level attributes of the VOEPR are fine ... i can update them. It's the VOEngagement Details where things fall over. Nothing seems to be get set here. When i trace through into my action - the 'form' object doesn't seem to contain these nested attributes. Sri .. any help would be great. Cheers Giles PS: Hope this is enough info this time :) # 1) Struts config # !-- == Start Form Bean Definitions == -- form-beans !-- VOEPR form bean -- form-bean name=voEPR type=au.com.eclipsegroup.egem.valueObject.VOEPR/ !-- == End of Form Bean Definitions -- !-- == Start Action Mapping Definitions === -- actionpath=/updateEPR name=voEPR type=au.com.eclipsegroup.egem.actions.cde.UpdateEPRAction scope=session validate=false forward name=success path=/preCounseleeTaskList/ forward name=failure path=/jsp/errors.jsp/ /action !-- == End Action Mapping Definitions -- # 2) Heres the relevant portions of my action class: # blaa blaaa.. // Get the Plan off the session if (theSession.getAttribute(voCDE) != null) { voCDE = (VOEPR) theSession.getAttribute(voCDE); log.debug(The EPR obtained from session was - + voCDE.getEPRID()); voCDE = (VOEPR) form; } else { log.error(The EPR Details have been lost on the session
RE: Nested properties of form bean not being updated !
Giles: I am sorry. Going from the subject line I assumed you were trying to use the nesting extension. I am using Struts 1.0.2 along with the nesting extension from Arron Bates site www.keyboardmonkey.com/next/index.jsp. This is not beta-ware so you should be able to use it. All the dot notation and everything advertised works. So, you can and *should* use the nesting extension. Spend the hour or so learning how to use it -- it will save you a lot of work/worry/hassle. Wherever I have a nested hierarchy to deal with, especially with iterations, I use the extension. Hope you are able to work with it. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Monday, November 04, 2002 8:28 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri I've made the small change to the included file - 64_eng_del.jsp - didn't help much I'm afraid. We are not using the nested tags because at the moment struts 1.1-b2 is still in beta (Is this the only version with the nested tag ???) My company has made the firm decision that we cannot use beta software in the production environment. I was under the impression that the benefit of the nested tags didn't offer much more additional functionality from the dot notation of struts 1.0.2, i.e. it is just a way of structuring your code in a better manner. (could be way wrong here too!) I suppose the question I need to ask Sri, is : Is what I am trying to do possible in my version of struts? Is the dot notation fully functional in 1.0.2? I know it's returning the correct stuff from the server, it's just not updating it. Does this functionality work in Struts1.02? Was it EVER possible to do this before nested tags came out? If the nested tag is my only option, do you have any idea when struts1.1 will become production stable? I've seen there was a code freeze in august, but haven't seen anything since. Other than that, know anything else I might be able to try ??? Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:12 AM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Holy cow! Yes, you gave enough details.. Looking at JSPs a few things jump out: * You aren't using any of the nested tags. To take advantage of the nested extension, you have to use the nested:xyz equivalent of the usual tags. So, instead of html:form you should use nested:form, instead of html:text you should use nested:text. Of course, make sure you have the necessary taglib statement for the nested tags. This should fix a lot of your problems * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably don't want to leave that for the *includer* -- your top-level JSP. Remember the top-level has an open form tag that it closes at the end of all includes Give this a shot. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Sunday, November 03, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri Thanks for getting back to me. I've included 1. A portion of my struts config: - My form bean definition - And the action mapping 2. My action class 3. My JSPs, which are comprised of - - My top level jsp... that contains the form bean definition, and the forwarding action name - The include '64_eng_del.jsp' contains the nested bean 4. The two Value objects - VOEPR, (which contains VOEngagementDetails) and - VOEngagementDetails As i said before all the top level attributes of the VOEPR are fine ... i can update them. It's the VOEngagement Details where things fall over. Nothing seems to be get set here. When i trace through into my action - the 'form' object doesn't seem to contain these nested attributes. Sri .. any help would be great. Cheers Giles PS: Hope this is enough info this time :) # 1) Struts config # !-- == Start Form Bean Definitions == -- form-beans !-- VOEPR form bean -- form-bean name=voEPR type=au.com.eclipsegroup.egem.valueObject.VOEPR/ !-- == End of Form Bean Definitions -- !-- == Start Action Mapping Definitions === -- actionpath=/updateEPR name=voEPR type=au.com.eclipsegroup.egem.actions.cde.UpdateEPRAction scope=session validate=false forward name=success path=/preCounseleeTaskList/ forward name
RE: Nested properties of form bean not being updated !
Thanks Sri I've looked at the monkey stuff before, but thought it was just an extension of the struts beta stuff. So... I'll give that a go. Thanks for you Help. Will let you know the results, Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:26 PM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Giles: I am sorry. Going from the subject line I assumed you were trying to use the nesting extension. I am using Struts 1.0.2 along with the nesting extension from Arron Bates site www.keyboardmonkey.com/next/index.jsp. This is not beta-ware so you should be able to use it. All the dot notation and everything advertised works. So, you can and *should* use the nesting extension. Spend the hour or so learning how to use it -- it will save you a lot of work/worry/hassle. Wherever I have a nested hierarchy to deal with, especially with iterations, I use the extension. Hope you are able to work with it. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Monday, November 04, 2002 8:28 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri I've made the small change to the included file - 64_eng_del.jsp - didn't help much I'm afraid. We are not using the nested tags because at the moment struts 1.1-b2 is still in beta (Is this the only version with the nested tag ???) My company has made the firm decision that we cannot use beta software in the production environment. I was under the impression that the benefit of the nested tags didn't offer much more additional functionality from the dot notation of struts 1.0.2, i.e. it is just a way of structuring your code in a better manner. (could be way wrong here too!) I suppose the question I need to ask Sri, is : Is what I am trying to do possible in my version of struts? Is the dot notation fully functional in 1.0.2? I know it's returning the correct stuff from the server, it's just not updating it. Does this functionality work in Struts1.02? Was it EVER possible to do this before nested tags came out? If the nested tag is my only option, do you have any idea when struts1.1 will become production stable? I've seen there was a code freeze in august, but haven't seen anything since. Other than that, know anything else I might be able to try ??? Cheers Giles -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Tuesday, 5 November 2002 2:12 AM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! Holy cow! Yes, you gave enough details.. Looking at JSPs a few things jump out: * You aren't using any of the nested tags. To take advantage of the nested extension, you have to use the nested:xyz equivalent of the usual tags. So, instead of html:form you should use nested:form, instead of html:text you should use nested:text. Of course, make sure you have the necessary taglib statement for the nested tags. This should fix a lot of your problems * Even though 64_eng_del.jsp is an included file, it ends with a /body/html. You probably don't want to leave that for the *includer* -- your top-level JSP. Remember the top-level has an open form tag that it closes at the end of all includes Give this a shot. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Sunday, November 03, 2002 6:02 PM To: 'Struts Users Mailing List' Subject: RE: Nested properties of form bean not being updated ! Hi Sri Thanks for getting back to me. I've included 1. A portion of my struts config: - My form bean definition - And the action mapping 2. My action class 3. My JSPs, which are comprised of - - My top level jsp... that contains the form bean definition, and the forwarding action name - The include '64_eng_del.jsp' contains the nested bean 4. The two Value objects - VOEPR, (which contains VOEngagementDetails) and - VOEngagementDetails As i said before all the top level attributes of the VOEPR are fine ... i can update them. It's the VOEngagement Details where things fall over. Nothing seems to be get set here. When i trace through into my action - the 'form' object doesn't seem to contain these nested attributes. Sri .. any help would be great. Cheers Giles PS: Hope this is enough info this time :) # 1) Struts config # !-- == Start Form Bean Definitions == -- form-beans !-- VOEPR form bean -- form-bean name=voEPR type=au.com.eclipsegroup.egem.valueObject.VOEPR/ !-- == End of Form Bean Definitions
RE: Nested properties of form bean not being updated !
. * @return Date */ public Date getEngagementPeriodTo() { return engagementPeriodTo; } /** * Returns the engagementRefNo. * @return String */ public String getEngagementRefNo() { return engagementRefNo; } /** * Returns the roleOnEngagement. * @return String */ public String getRoleOnEngagement() { return roleOnEngagement; } /** * Returns the version. * @return String */ public String getVersion() { return version; } /** * Sets the engagementClient. * @param engagementClient The engagementClient to set */ public void setEngagementClient(String engagementClient) { this.engagementClient = engagementClient; } /** * Sets the engagementName. * @param engagementName The engagementName to set */ public void setEngagementName(String engagementName) { this.engagementName = engagementName; } /** * Sets the engagementPeriodFrom. * @param engagementPeriodFrom The engagementPeriodFrom to set */ public void setEngagementPeriodFrom(Date engagementPeriodFrom) { this.engagementPeriodFrom = engagementPeriodFrom; } /** * Sets the engagementPeriodTo. * @param engagementPeriodTo The engagementPeriodTo to set */ public void setEngagementPeriodTo(Date engagementPeriodTo) { this.engagementPeriodTo = engagementPeriodTo; } /** * Sets the engagementRefNo. * @param engagementRefNo The engagementRefNo to set */ public void setEngagementRefNo(String engagementRefNo) { this.engagementRefNo = engagementRefNo; } /** * Sets the roleOnEngagement. * @param roleOnEngagement The roleOnEngagement to set */ public void setRoleOnEngagement(String roleOnEngagement) { this.roleOnEngagement = roleOnEngagement; } /** * Sets the version. * @param version The version to set */ public void setVersion(String version) { this.version = version; } /** * Returns the engagementReviewerID. * @return Integer */ public Integer getEngagementReviewerID() { return engagementReviewerID; } /** * Returns the engagementReviewerName. * @return String */ public String getEngagementReviewerName() { return engagementReviewerName; } /** * Sets the engagementReviewerID. * @param engagementReviewerID The engagementReviewerID to set */ public void setEngagementReviewerID(Integer engagementReviewerID) { this.engagementReviewerID = engagementReviewerID; } /** * Sets the engagementReviewerName. * @param engagementReviewerName The engagementReviewerName to set */ public void setEngagementReviewerName(String engagementReviewerName) { this.engagementReviewerName = engagementReviewerName; } # # THE END ! - hope ya still with me ! # # -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: Saturday, 2 November 2002 12:47 AM To: Struts Users Mailing List Subject: RE: Nested properties of form bean not being updated ! You have a clear description of what you are trying to accomplish but I don't know *how* you are going about it. Need a look-see at your code. In particular, how are your struts-config and JSP set up? Show the pertinent form-bean and action mapping from your config and a portion (at least) or your html:form in the JSP. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Friday, November 01, 2002 12:04 AM To: '[EMAIL PROTECTED]' Subject: Nested properties of form bean not being updated ! Hi I'm having problems updating the nested properties of an action form bean can anyone help ? I have a nested bean, say Address that lives within another bean, say Person. Both are value objects, which extend action form bean. I have the correct getters and setters set-up for both these beans. When I retrieve these values from the server
RE: Nested properties of form bean not being updated !
You have a clear description of what you are trying to accomplish but I don't know *how* you are going about it. Need a look-see at your code. In particular, how are your struts-config and JSP set up? Show the pertinent form-bean and action mapping from your config and a portion (at least) or your html:form in the JSP. Sri -Original Message- From: Parnell, Giles (AU - Sydney) [mailto:g.parnell;eclipsegroup.com.au] Sent: Friday, November 01, 2002 12:04 AM To: '[EMAIL PROTECTED]' Subject: Nested properties of form bean not being updated ! Hi I'm having problems updating the nested properties of an action form bean can anyone help ? I have a nested bean, say Address that lives within another bean, say Person. Both are value objects, which extend action form bean. I have the correct getters and setters set-up for both these beans. When I retrieve these values from the server, and populate my value objects I get all the fields displaying as should be i.e. both the Person and Address VOs contain and display my expected data. However, when I try and do an update on Person and do a submit, the form attribute in my action contains only the updated values of Person, and not the updated values of the nested bean - Address. I'm using struts1.0.2 and have looked at the nested tag of the beta version of struts 1.1-b2 From what I can gather the beta doesn't really provide any additional functionality for my needs other than providing a cleaner and more manageable interface. (I can't use the beta as it's not production yet, and my company won't take that step.) Can anyone shed some light??? Regards Giles Giles Parnell |ECLIPSEGROUP | 02 9322 5124 | Mobile 0403 768656 Level 9, 190 George Street, Sydney, NSW 2000, Fax: 02 9322 5121 INTERACTIVE STRATEGY + DESIGN + INTEGRATION The Eclipse Group is a wholly owned subsidiary of Deloitte Touche Tohmatsu www.eclipsegroup.com.au This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this email, you must not disseminate, copy or otherwise use this information. If you have received this email in error, please notify Eclipse Group immediately. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org