Hi all,

some code would help:

<nested:form ....>
    <nested:iterate property="itemList">
           <nested:text property="name"/>
           <nested:select property="UserId">
                <nested:options collection="userList" property="idValue"
labelProperty="displayValue"/>
           </nested:select>
    </nested:iterate>
</nested:form>

As you can see I have a form that has a reference to an ArrayList "itemList"
and each item on this list has an ArrayList "userList" that holds idValue
and displayValue attributes.

Currently I am getting to my JSP through an action class.  The code above
gives me a NullPointerException. And I figured out that it complains,  not
because userList is empty, but because of property="idValue"
labelProperty="displayValue". In fact I can do this:
   <nested:iterate property="userList">
        Stuff
   </nested:iterate>

and the word "Stuff" will be printed out.  So you might think it's because
the attribute idValue and displayValue are null.

Well, when I put the userList on the request attribute and do this: (where
"things" is my userList)
  <jsp:useBean id="things" type="java.util.ArrayList" scope="request"/>
      <logic:iterate id="all" type="...." collection="<%=things%>">
         <bean:write name="all" property="idValue"/>
        <bean:write name="all" property="displayValue"/>
  </logic:iterate>

the displayValue and idValue is printed out fine.

I was wondering why  <nested:options> was not able to pick up the proper
idValue and displayValue? Can some point me to the direction as to how to go
about solving this? thanks.

Your time is appreciated,

- ej

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

Reply via email to