I use such approach:

    
    ...
    "%{'form.cvgcode' + #i}"
    ...
    "%{'form.cvglimit' + #i}"
    ...



hisameer wrote:
> 
> hello everyone,
> 
> I need to change the s:select name parameter's value depending on the
> index of the list.
> 
> I have the following code :
> 
> <%! int i=1; %>
>    0">
>       
> 
>       

>               
>          
>               <%= i %> name="%     
>               {'form.cvgcode'+i}" onchange="this.form.submit()"
> headerKey="0" headerValue="Please Select" 
>               required="true" list="cvgCode"  cssStyle="width:150px" />
>               name="%{'form.cvglimit'+i}" 
>             onchange="this.form.submit()" headerKey="0"
> headerValue="Please Select" required="true" 
>             list="cvglimit"  cssStyle="width:150px" />
> 
>          <% i++; %>
>       
>        
>     
> 
> All I want is if the list is in the first level the name should be
> form.cvgcode1 and so on. I tried using declaring a variable i and
> incrementing it everytime but its not working. The value always being set
> is form.cvgcodenull. Please advise me what should I do?
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-runtime-variable-names-tp25761232p25762245.html
Sent from the Struts - User mailing list archive at Nabble.com.

Reply via email to