<select>
<bean:define id="user" name="user" property="originatingHost">
<logic:iterate id="host" name="user">
<option value="1">
<bean:write name="host" property="hostName"/>
</option>
</logic:iterate>
</bean:define>
</select>
-----Original Message-----
From: Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 10, 2004 4:45 PM
To: Struts Users Mailing List
Subject: Re: Bean:define : Newbie Question
Hi Peng.
Please tell me what how exactly should I do it? Should I define bean
user then define bean originatingHost which is an attr of user object?
On Wed, 10 Nov 2004 17:52:54 +0800, Peng Tuck <[EMAIL PROTECTED]>
wrote:
> So in <logic:iterate> you should refer to the bean you defined, using
> <bean:define> right ?
>
>
>
> Richard wrote:
>
> >yes its an arraylist
> >
> >
> >On Wed, 10 Nov 2004 15:50:36 +0800, Peng Tuck
<[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi Richard,
> >> You use <bean:define> to define a bean with a id of user but
> >>yet in <logic:iterate> you refer to originatingHost ?
> >> I think it should be refering to user instead for
<logic:iterate>.
> >>Also is originatingHost a collection ?
> >>
> >>
> >>
> >>
> >>Richard wrote:
> >>
> >>
> >>
> >>>Hello Guys,
> >>>
> >>>Please help I have to display the contents of my arraylist object
> >>>
> >>>I have this code on my jsp....
> >>>
> >>> <select>
> >>> <bean:define id="user" name="user"
> >>>property="originatingHost">
> >>> <logic:iterate id="host"
> >>>name="originatingHost">
> >>> <option
> >>>value="1"><bean:write name="host" property="hostName"/></option>
> >>> </logic:iterate>
> >>> </bean:define>
> >>> </select>
> >>>
> >>>And I am having an error of ....
> >>>
> >>>2004-11-10 14:27:37 StandardWrapperValve[action]: Servlet.service()
> >>>for servlet action threw exception
> >>>javax.servlet.jsp.JspException: Cannot find bean originatingHost in
> >>>any scope
> >>>
> >>>I have a user object stored in session and this obj have a
> >>>originatingHost attribute of type ArrayList.
> >>>
> >>>Thanks in advance
> >>>Richard
> >>>
> >>>-------------------------------------------------------------------
> >>>-- To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--------------------------------------------------------------------
> >>- To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
>
>
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]