Sorry for not reading the original post more clearly.  Obviously, the index
is very important to you.

Are you trying to do some sort of odd/even presentation logic for the list?

e.


> -----Original Message-----
> From: Schneider, Eric 
> Sent: Tuesday, January 14, 2003 11:54 AM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [Tapestry-developer] Foreach where value is another
> component
> 
> 
> Hey marc!
> 
> Glad to see your post to the list.
> 
> Try bagging the index binding for now.  I'm not sure if you need it.
> 
> Try something like this:
> 
> //In your .java 
> 
> private List htmlBoxesAsStringsList;
> private String component; // dropped the 's', this is an 
> iterator object
> 
> ...add getters and setters.
> 
> <component id="foreachCustomer" type="Foreach">
>     <binding name="source" expression="htmlBoxesAsStringsList"/>
>     <binding name="value" expression="component"/>
> </component>
> 
> <component id="textDisplayed" type="Insert">
>     <binding name="value" expression="component" />
> </component>
> 
> See if that helps.
> 
> Cheers,
> Eric - go devils!
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 14, 2003 11:47 AM
> > To: [EMAIL PROTECTED]
> > Subject: [Tapestry-developer] Foreach where value is 
> another component
> > 
> > 
> > Newbie to Tapestry, any help would be much appreciated.
> > I have a Foreach component, and want the value binding to 
> be bound to
> > another component on the same page.
> > Here's what i want to achieve:
> >       <component id="boxesList" type="Foreach">
> >             <binding name="source" value="htmlBoxesAsStringsList" />
> >             <binding name="value" 
> value="components.textDisplayed" />
> >             <binding name="index" value="boxesIndex" />
> >       </component>
> >       .....
> >       .....
> >       <component id="textDisplayed" type="Insert">
> >             <binding name="value" expression="insertText" />
> >       </component>
> > 
> > Currently, getInsertText() in my code returns the same String 
> > every time,
> > BUT my goal is return something different based on the 
> > Foreach's index.
> > AND, my ultimate goal is to not use an "Insert" component, 
> > but a much more
> > complex custom component that still bases its actions on 
> the Foreach's
> > index.
> > 
> > The exception being thrown is a 
> > net.sf.tapestry.ReadOnlyBindingException
> > which seems somewhat *reasonable*.......
> > I feel the answer is right under my nose, and i'll kick 
> > myself later for
> > this, but any advice would be greatly appreciated.
> > 
> > Thanks,
> > marc
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
> > are you planning your Web Server Security? Click here to get a FREE
> > Thawte SSL guide and find the answers to all your  SSL 
> > security issues.
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
> > _______________________________________________
> > Tapestry-developer mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/tapestry-developer
> > 
> 
> 
> **********************************************************************
> This message, including any attachments, contains 
> confidential information intended for a specific individual 
> and purpose, and is protected by law.  If you are not the 
> intended recipient, please contact sender immediately by 
> reply e-mail and destroy all copies.  You are hereby notified 
> that any disclosure, copying, or distribution of this 
> message, or the taking of any action based on it, is strictly 
> prohibited.
> TIAA-CREF
> **********************************************************************
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
> are you planning your Web Server Security? Click here to get a FREE
> Thawte SSL guide and find the answers to all your  SSL 
> security issues.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
> 


**********************************************************************
This message, including any attachments, contains confidential information intended 
for a specific individual and purpose, and is protected by law.  If you are not the 
intended recipient, please contact sender immediately by reply e-mail and destroy all 
copies.  You are hereby notified that any disclosure, copying, or distribution of this 
message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**********************************************************************


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to