I have a Collection in my ActionForm, and want to access just the
first object in that Collection.
How can I do this?
--
Thanks
Mick Knutson
(925) 951-4126
HP Consulting Services
Safeway (Blackhawk Fastword Project)
J2EE Architect
---
MMS safeway.com made the following annotations.
From: Mick Knutson [EMAIL PROTECTED]
I have a Collection in my ActionForm, and want to access just the
first object in that Collection.
How about...
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:out value=${form.property[0]}/
--
Wendy Smoak
Wel, I catually have something like form.cards[0].cardNumber, but it is
also not an array. It is a collection.
Doesn't matter, it works for both as long as you got a getCardNumber() in
there.
Wendy Smoak wrote:
From: Mick Knutson [EMAIL PROTECTED]
I have a Collection in my ActionForm,
Mick-
Or you could use map entry..
c:forEach var=entry items=${QUERYRESULT[FormName]}
c:out value=${entry.key}/ -
c:forEach var=eo items='${entry.value}'
${eo.name.value}
/c:forEach
/c:forEach
HTH,
Martin-
- Original Message -
From: Mick Knutson [EMAIL PROTECTED]
To: Struts Users
Worked. Thanks..
Zarar Siddiqi wrote:
Wel, I catually have something like form.cards[0].cardNumber, but it is
also not an array. It is a collection.
Doesn't matter, it works for both as long as you got a getCardNumber() in
there.
Wendy Smoak wrote:
From: Mick Knutson [EMAIL
5 matches
Mail list logo