You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Mann <rm...@latencyzero.com> on 2003/11/29 09:37:29 UTC

Nested tags always break

I have a situation where I can use <nested:root name="ac">, 
<nested:iterate id="foo">, and then *must* use <nested:write name="foo" 
property="bar">, rather than omitting the name attribute. If I do, I 
get an exception "No getter method for property foo[0].bar of bean ac".

Now, this code was working fine, but I made some changes to the bean 
(I'm using torque). I know it's not (or at least, it shouldn't be) a 
problem in the beans, becuase of the fact that it works fine if I 
include the name attribute pointing to the id of the enclosing iterate 
tag.

Also, why is it that I can get the struts-digest posting but can't post 
to the struts list?

-- 
Rick


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Nested tags always break

Posted by Arron Bates <st...@keyboardmonkey.com>.
Rick,

You still having this problem?... can I see the tag markup that's causing the
problems?...

If the root tag is picking up the name of a valid bean, and the iterate tag
has it's property attribute properly set, then I assure you that you don't
need the name attribute in the write tag.

I'm hoping that there's more to the iterate tag than just the Id. to get
"foo[i].bar" you'd need...

<nested:root name="someBean">
  <nested:iterate property="foo">
    <nested:write property="bar />
  </nested:write>
</nested:root>

I haven't really used the id attribute in struts apps since I built the
original tags a couple of years ago. So I'm no absolute authority on whether
or not the base tags are managing it correctly or what... :P


Arron.


PS: Love the "nested tags always break" subject, too.


> I have a situation where I can use <nested:root name="ac">, 
> <nested:iterate id="foo">, and then *must* use <nested:write 
> name="foo" property="bar">, rather than omitting the name attribute. 
> If I do, I get an exception "No getter method for property 
> foo[0].bar of bean ac".
> 
> Now, this code was working fine, but I made some changes to the bean 
> (I'm using torque). I know it's not (or at least, it shouldn't be) a 
> problem in the beans, becuase of the fact that it works fine if I 
> include the name attribute pointing to the id of the enclosing 
> iterate tag.
> 
> Also, why is it that I can get the struts-digest posting but can't 
> post to the struts list?
> 
> -- 
> Rick



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org