struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff_Mycha...@nlgroup.ca
Subject RE: [Nested Tags] Nested vs logic tags..
Date Mon, 28 Oct 2002 22:12:56 GMT

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="0">XXX</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="0">XXX</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="0">XXX</logic:iterate>
    <nested:write property="legalName" />
  </nested:iterate>







"Taylor, Jason" <jtaylor@cobaltgroup.com> on 10/28/2002 02:38:33 PM

Please respond to "Struts Users Mailing List"
       <struts-user@jakarta.apache.org>

To:    "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
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: Jeff_Mychasiw@nlgroup.ca [mailto:Jeff_Mychasiw@nlgroup.ca]
Sent: Monday, October 28, 2002 8:03 AM
To: struts-user@jakarta.apache.org
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>


Mime
View raw message