Sounds like you need some documentation... try this:

http://struts.apache.org/userGuide/struts-logic.html

This tells you how to use those <logic:... and <html:... and <bean:... tag 
libraries along 
with a few others.

Basically the use of the <logic:iterate...> tag should identify the attribute 
name of the 
collection and assign a new attribute name to be used for accessing each item 
within 
the collection.  

Inside the iteration you then access values from the current item using the 
newly 
assigned attribute name.  Next specify a "property" to retrieve the value from 
this item.

For example:

Collection stored in request has an attribute name of "myCards", it is a type 
that 
implements Collection (maybe ArrayList or something).

<logic:iterate name="myCards" id="aCard">

The collection of cards is now retrieved and the first card from the collection 
is now 
stored in some scope (maybe page) with the name "aCard".  Within the confines 
of the 
logic:iterate begin and end tags I can now refer to this card in all my tags.

This card num is: <jsp:getProperty name="aCard" property="cardNumber"/>
<logic:equal name="aCard" property="cardNumber"  value="7">
 This is card number seven!
</logic:equal>

</logic:iterate>

Next question, where does the value come from that you are trying to test this 
card 
number against.   If <%= card.cardNumber %> going to retrieve the value are are 
wanting to test?  Can you tell us more about where this value is coming from?

Kind regards
mc



On 1 Oct 2005 at 14:45, Mick Knutson wrote:

> I am not having luck here.
> 
> I have a collection of cards (Card class)  that I am iterating through.
> Then, I also have a form that has a cardValidatorForm (DynaForm).
> 
> cardForm.cardNumber is going to be equal to one of the card.cardNumber's
> When I create the logic tag like you stated:
> <logic:equal property="cardNumber" value="<%= card.cardNumber %>">...
> 
> I get an error about missing a parameter/header/name
> 
> What am I missing?
> 
> 
> 
> Murray Collingwood wrote:
> 
> > Will the following work?
> >
> > <html:form ...>
> > <logic:iterate...through collection>
> >  <logic:equal property="foo" value="bar">
> >    <html:text ...display in form fields/>
> >    <html:submit .../>
> >  </logic:equal>
> >  <logic:notEqual property="foo" value="bar">
> >    <jsp:getProperty property="foo"/>
> >  </logic:notEqual>
> > </logic:iterate>
> > </html:form>
> >
> > Kind regards
> > mc
> >
> >
> > On 29 Sep 2005 at 15:41, Mick Knutson wrote:
> >
> > > I have a collection of cards. and I want to create a table fo thos
> > > cards, but if I get to a card where foo=bar, then I want to paint that
> > > row as a form with updateable fields and 1 submit for just that row.
> > > How would I do this please?
> > >
> > > --
> > >
> > > Thanks
> > > Mick Knutson
> > > (925) 951-4126
> > > HP Consulting Services
> > > Safeway (Blackhawk Fastword Project)
> > > J2EE Architect
> > > ---
> > >
> > >
> > >
> > > "MMS <safeway.com>" made the following annotations.
> > > ------------------------------------------------------------------------------
> > > Warning:
> > > All e-mail sent to this address will be received by the Safeway corporate 
> > > e-mail
> > system, and is subject to archival and review by someone other than the 
> > recipient.  
This
> > e-mail may contain information proprietary to Safeway and is intended only 
> > for the 
use
> > of the intended recipient(s).  If the reader of this message is not the 
> > intended
> > recipient(s), you are notified that you have received this message in error 
> > and that 
any
> > review, dissemination, distribution or copying of this message is strictly 
> > prohibited.  
If
> > you have received this message in error, please notify the sender 
> > immediately.
> > >
> > >
> > 
=================================================================
> > =============
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > --
> > > No virus found in this incoming message.
> > > Checked by AVG Anti-Virus.
> > > Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 29/09/2005
> > >
> >
> > FOCUS Computing
> > Mob: 0415 24 26 24
> > [EMAIL PROTECTED]
> > http://www.focus-computing.com.au
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 29/09/2005
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> 
> Thanks
> Mick Knutson
> (925) 951-4126
> HP Consulting Services
> Safeway (Blackhawk Fastword Project)
> J2EE Architect
> ---
> 
> 
> 
> "MMS <safeway.com>" made the following annotations.
> ------------------------------------------------------------------------------
> Warning: 
> All e-mail sent to this address will be received by the Safeway corporate 
> e-mail 
system, and is subject to archival and review by someone other than the 
recipient.  This 
e-mail may contain information proprietary to Safeway and is intended only for 
the use 
of the intended recipient(s).  If the reader of this message is not the 
intended 
recipient(s), you are notified that you have received this message in error and 
that any 
review, dissemination, distribution or copying of this message is strictly 
prohibited.  If 
you have received this message in error, please notify the sender immediately. 
>   
> 
=================================================================
=============
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 29/09/2005
> 



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 29/09/2005


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

Reply via email to