Re: How to set checkbox label value in a iterator

2007-07-10 Thread TonyD

Thanks that's what I needed.
I'am sure it's a powerful language but the success of a language is also how
easy it is to find what you need, the documentation is poor of examples and
it's hard to someone that's new with this type of language.
Hope in your collaboration in future. Thanks.


DNewfield wrote:
 
 TonyD wrote:
 Well I found out what index is (index=count +1)
 
 Bzzt.  Index is a zero-based iteration count, count is a one-based 
 iteration count, so index+1=count.
 
 but a need something that tells me how much iterations are there
 before reaching the end of  interation.
 
 That has nothing to do with the iterator.  It's a simple number you want 
 added to the output of the jsp.  We tend to do that with the s:property
 tag.
 
 So if your iterator is
 s:iterator value=%{foo} status=iterStatus.../s:iterator
 what you're looking for is just
 s:property value=%{foo.size}/
 
 Read up on ognl.  It's a very powerful language that you're using 
 whether you realize it or not.
 
 -Dale
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-checkbox-label-value-in-a-iterator-tf4035305.html#a11516246
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: How to set checkbox label value in a iterator

2007-07-09 Thread TonyD

Well I found out what index is (index=count +1), but a need something that
tells me how much iterations are there before reaching the end of
interation.

Example: 

Emplooyes: 2350 (I need to know this value before iterations)

Emplooyes data 1 
Emplooyes data 2 
.
Emplooyes data 2350 

Thanks.



DNewfield wrote:
 
 TonyD wrote:
 label=%{reports[#reportStatus.count -1]}
 
 Where could I find all status properties (first, last, odd, even, count,
 etc.)
 
 http://struts.apache.org/2.0.8/struts2-core/apidocs/org/apache/struts2/views/jsp/IteratorStatus.html
 
 Looks like what you want is index.
 
 -Dale
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-checkbox-label-value-in-a-iterator-tf4035305.html#a11500040
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: How to set checkbox label value in a iterator

2007-07-09 Thread Dale Newfield

TonyD wrote:

Well I found out what index is (index=count +1)


Bzzt.  Index is a zero-based iteration count, count is a one-based 
iteration count, so index+1=count.



but a need something that tells me how much iterations are there
before reaching the end of  interation.


That has nothing to do with the iterator.  It's a simple number you want 
added to the output of the jsp.  We tend to do that with the s:property tag.


So if your iterator is
s:iterator value=%{foo} status=iterStatus.../s:iterator
what you're looking for is just
s:property value=%{foo.size}/

Read up on ognl.  It's a very powerful language that you're using 
whether you realize it or not.


-Dale


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



How to set checkbox label value in a iterator

2007-07-06 Thread TonyD

I have a iterator where each value is the label of a checkbox.
How could I set each value into the checkbox label? 

This is code:

s:iterator id=reports value=reports  status=reportStatus

   tr
  td   
 s:checkbox name=reports label=%{reports} value=false/
  /td 
   /tr
/s:iterator

label=%{reports} sets all values of the iterator. 

Where could I find all status properties (first, last, odd, even, count,
etc.)

Thanks in advance.
Tony
-- 
View this message in context: 
http://www.nabble.com/How-to-set-checkbox-label-value-in-a-iterator-tf4035305.html#a11463698
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: How to set checkbox label value in a iterator

2007-07-06 Thread TonyD

:clap:
FOUND:
label=%{reports[#reportStatus.count -1]}

Where could I find all status properties (first, last, odd, even, count,
etc.)


TonyD wrote:
 
 I have a iterator where each value is the label of a checkbox.
 How could I set each value into the checkbox label? 
 
 This is code:
 
 s:iterator id=reports value=reports  status=reportStatus  
 
tr
   td 
  s:checkbox name=reports label=%{reports} value=false/
   /td 
/tr  
 /s:iterator
 
 label=%{reports} sets all values of the iterator. 
 
 Where could I find all status properties (first, last, odd, even, count,
 etc.)
 
 Thanks in advance.
 Tony
 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-checkbox-label-value-in-a-iterator-tf4035305.html#a11463841
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: How to set checkbox label value in a iterator

2007-07-06 Thread Dale Newfield

TonyD wrote:

label=%{reports[#reportStatus.count -1]}

Where could I find all status properties (first, last, odd, even, count,
etc.)


http://struts.apache.org/2.0.8/struts2-core/apidocs/org/apache/struts2/views/jsp/IteratorStatus.html

Looks like what you want is index.

-Dale

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