You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Anissina ." <an...@hotmail.com> on 2001/03/18 08:43:41 UTC

Why won't these tag's work?

Could someone please point out what I am doing wrong here? This is my code:

<struts-logic:iterate name="conditions" id="condition">
  <struts-html:multibox name="condition"
             property="<%= condition.getConditionId() %>"/>
</struts-logic:iterate>

It complains that condition is a non-existent entity. Shouldn't struts 
recognise that it is wrapped by the iterate tag and retrive the value 
through the same id?

Just to clarify, "conditions" is a collection of Condition objects, which 
have a conditionId property.

If anyone can help out, that would be great!
Thanks!
Aaron.


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: Why won't these tag's work?

Posted by Ben Souther <bs...@redtrain.com>.
<logic:iterate name="conditions" id="condition"   />









----- Original Message -----
From: "Anissina ." <an...@hotmail.com>
To: <st...@jakarta.apache.org>
Sent: Sunday, March 18, 2001 2:43 AM
Subject: Why won't these tag's work?


> Could someone please point out what I am doing wrong here? This is my
code:
>
> <struts-logic:iterate name="conditions" id="condition">
>   <struts-html:multibox name="condition"
>              property="<%= condition.getConditionId() %>"/>
> </struts-logic:iterate>
>
> It complains that condition is a non-existent entity. Shouldn't struts
> recognise that it is wrapped by the iterate tag and retrive the value
> through the same id?
>
> Just to clarify, "conditions" is a collection of Condition objects, which
> have a conditionId property.
>
> If anyone can help out, that would be great!
> Thanks!
> Aaron.
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>


Re: Why won't these tag's work?

Posted by Ken Beyer <ka...@metatec.com>.
Try adding in scope="session" (or wherever your 'conditions' bean
resides) and possibly type="blah.blah.SomeConditionCollection"
(if you need that) to your iterate tag.   I'm kind of new, so not sure if
that's the real problem or not.

Ken

"Anissina ." wrote:

> Could someone please point out what I am doing wrong here? This is my code:
>
> <struts-logic:iterate name="conditions" id="condition">
>   <struts-html:multibox name="condition"
>              property="<%= condition.getConditionId() %>"/>
> </struts-logic:iterate>
>
> It complains that condition is a non-existent entity. Shouldn't struts
> recognise that it is wrapped by the iterate tag and retrive the value
> through the same id?
>
> Just to clarify, "conditions" is a collection of Condition objects, which
> have a conditionId property.
>
> If anyone can help out, that would be great!
> Thanks!
> Aaron.
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
Ken Beyer
Metatec Internet Products Group
kab@metatec.com  |  http://www.metatec.com/
"The box said 'Requires Windows 95 or better.' - so I installed Linux."




Re: Why won't these tag's work?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sun, 18 Mar 2001, Anissina . wrote:

> Could someone please point out what I am doing wrong here? This is my code:
> 
> <struts-logic:iterate name="conditions" id="condition">
>   <struts-html:multibox name="condition"
>              property="<%= condition.getConditionId() %>"/>
> </struts-logic:iterate>
> 

There was an old bug where the iteration variable ("condition" in your
example) was not being exposed.  It was fixed by the time beta 1 came
out.  How old is your copy of Struts?

> It complains that condition is a non-existent entity. Shouldn't struts 
> recognise that it is wrapped by the iterate tag and retrive the value 
> through the same id?
> 
> Just to clarify, "conditions" is a collection of Condition objects, which 
> have a conditionId property.
> 

Haven't tried it yet, but if your Condition class as a
"conditionId" property, you should be able to say:

<logic:iterate name="conditions" id="condition">
  <html:multibox name="condition" property="conditionId"/>
</logic:iterate>


> If anyone can help out, that would be great!
> Thanks!
> Aaron.
> 
> 

Craig