RE: [Nested Tags] Nested vs logic tags..
Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? -Original Message- From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Sent: Monday, October 28, 2002 8:03 AM To: [EMAIL PROTECTED] Subject: [Nested Tags] Nested vs logic tags.. Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal but had to change the equals to: logic:equal name=listIndex value=0 /logic:equal 2002-10-28 09:52:49 jsp: init 2002-10-28 09:52:49 ApplicationDispatcher[/ar] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:173) at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:195) at org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(Nes tedPropertyHelper.java:242) at org.apache.struts.taglib.nested.logic.NestedEqualTag.doStartTag(NestedEqualT ag.java:91) at org.apache.jsp.CustomerMeshMainForm$jsp._jspService(CustomerMeshMainForm$jsp .java:475) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Nested Tags] Nested vs logic tags..
No I have not. I could be wrong but I am under the assumptiion that the name attribute is used to look for a bean. The documents state that the nested versions of the tags will work the same but allow you exclude specific references to parent tags. I have done this many times: logic:iterate name=myFormBean property=meshList id=myObject indexId=listIndex type=com.nlg.ar.SomeVo logic:equal name=listIndex value=0XXX/logic:iterate bean:write name=myObject property=legalName / /logic:iterate I like the nested version.. nested:iterate property=meshList indexId=listIndex nested:equal name=listIndex value=0XXX/nested:iterate nested:write property=legalName / /nested:iterate It is not the end of the world, but I in order to use the indexId I have to use the logic:equal (note the equal tag) nested:iterate property=meshList indexId=listIndex logic:equal name=listIndex value=0XXX/logic:iterate nested:write property=legalName / /nested:iterate Taylor, Jason [EMAIL PROTECTED] on 10/28/2002 02:38:33 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: [Nested Tags] Nested vs logic tags.. Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? -Original Message- From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Sent: Monday, October 28, 2002 8:03 AM To: [EMAIL PROTECTED] Subject: [Nested Tags] Nested vs logic tags.. Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal but had to change the equals to: logic:equal name=listIndex value=0 /logic:equal 2002-10-28 09:52:49 jsp: init 2002-10-28 09:52:49 ApplicationDispatcher[/ar] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:173) at org.apache.struts.taglib.nested.NestedPropertyHelper.getNestedProperty(Neste dPropertyHelper.java:195) at org.apache.struts.taglib.nested.NestedPropertyHelper.setNestedProperties(Nes tedPropertyHelper.java:242) at org.apache.struts.taglib.nested.logic.NestedEqualTag.doStartTag(NestedEqualT ag.java:91) at org.apache.jsp.CustomerMeshMainForm$jsp. _jspService(CustomerMeshMainForm$jsp .java:475) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: [Nested Tags] Nested vs logic tags..
Just a hunch-- have you tried specifying a 'name' for the nested:iterate tag? The nested tags don't need it, and if it's provided they will ignore it. Why?... because all the tags are working off the same bean structure, and this is defined for us by the form tag. The nested tags will fetch this bean. Because of this, all the nested tags within the form bean don't need the name property to be set. From: [EMAIL PROTECTED] [mailto:Jeff_Mychasiw;nlgroup.ca] Greetings: I am almost exclusively using nested tags. Every now and then I run into a problem and have to switch over the corresponding logic or bean version. Can anyony tell me if this is a bug? I am using 1.1b2 I tried this with nested:equal but got a NullPointerException (listed below) nested:iterate property=meshList indexId=listIndex tr td %-- Show this only for the first item--% nested:equal name=listIndex value=0 /nested:equal Try remove the name property (for reasons explained above), and try aiming the property property at it. It looks like you're trying to get the current object of the iterate tag, so this may work... nested:iterate property=meshList tr td nested:equal property=this/ value=0 [...] /nested:equal /td /tr /nested:iterate ...the this/ or ./ simply refers to the current parent object level just like using ./ on a command line. If it's not the current object you're after, point the property at one of it's relative properties. See if that works. Arron. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org