You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by senderj <se...@hotmail.com> on 2009/09/03 08:53:43 UTC

logic:iterate

If I have a text input in my jsp named scoreNdays, I know I should declare my
variable scoreNdays in the struts formbean with getter and setter like
getScoreNdays(). Then it will work with the jsp. Now I have an iternation in
my jsp like 

<logic:iterate name="MainControlForm" property="scoreItems" id="score">
<html:checkbox name="score" property="scoreChkBox" indexed="true"/>
<html:text name="score" property="scoreNdays" size="2" readonly="true"
indexed="true"/>
.....

Since the two input are indexed, they generate a web form that post with
parameter like score[1].scoreNdays. Then I don't know how I should declare
the corresponding variables and getter setter in the formbean. Please help.

-- 
View this message in context: http://www.nabble.com/logic%3Aiterate-tp25270728p25270728.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: logic:iterate

Posted by Rusty Wright <ru...@gmail.com>.
Oops, sorry; I didn't realize this was a struts 1 question.


Rusty Wright wrote:
> http://struts.apache.org/2.1.6/docs/ognl-basics.html
> 
> 
> senderj wrote:
>> If I have a text input in my jsp named scoreNdays, I know I should 
>> declare my
>> variable scoreNdays in the struts formbean with getter and setter like
>> getScoreNdays(). Then it will work with the jsp. Now I have an 
>> iternation in
>> my jsp like
>> <logic:iterate name="MainControlForm" property="scoreItems" id="score">
>> <html:checkbox name="score" property="scoreChkBox" indexed="true"/>
>> <html:text name="score" property="scoreNdays" size="2" readonly="true"
>> indexed="true"/>
>> .....
>>
>> Since the two input are indexed, they generate a web form that post with
>> parameter like score[1].scoreNdays. Then I don't know how I should 
>> declare
>> the corresponding variables and getter setter in the formbean. Please 
>> help.
>>

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


Re: logic:iterate

Posted by Rusty Wright <ru...@gmail.com>.
http://struts.apache.org/2.1.6/docs/ognl-basics.html


senderj wrote:
> If I have a text input in my jsp named scoreNdays, I know I should declare my
> variable scoreNdays in the struts formbean with getter and setter like
> getScoreNdays(). Then it will work with the jsp. Now I have an iternation in
> my jsp like 
> 
> <logic:iterate name="MainControlForm" property="scoreItems" id="score">
> <html:checkbox name="score" property="scoreChkBox" indexed="true"/>
> <html:text name="score" property="scoreNdays" size="2" readonly="true"
> indexed="true"/>
> .....
> 
> Since the two input are indexed, they generate a web form that post with
> parameter like score[1].scoreNdays. Then I don't know how I should declare
> the corresponding variables and getter setter in the formbean. Please help.
> 

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