You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sachin <sa...@paradyne.co.in> on 2004/11/29 07:25:54 UTC
Help : creating dynamic styleId inside Logic:iterate
I have a jsp page in which i have a loop and a text field inside it.
Now to create a dynamic styleid i have used the following code..
but when this code executes , it does not print the actual value of itrator .
It should give styleId="sp0" , styleId="sp1" , styleId="sp2" likewise ..
but it prints simply ' styleId="sp<% = itrator %>" ' for all the fields .
can someone provide a solution to create dynamic styleId ... ?
<% int itrator=0; %>
<logic:iterate id="iType" property="investorTypeList" name="sharePatternBean">
<html:text name="iType" styleId="sp<% = itrator %>" property="sharesPer"
readonly="true" />
<%itrator++;%>
</logic:iterate>
Regards,
Sachin Hegde,
Software Developer,
Paradyne Infotech Limited,
Mumbai
022-38546711
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Help : creating dynamic styleId inside Logic:iterate
Posted by Derek Broughton <de...@pointerstop.ca>.
On Monday 29 November 2004 14:27, Aidas Semezys wrote:
> It is not allowed to have just part of attribute value as JSP expression.
> Here is the correct solution:
> <html:text name="iType" styleId="<%="sp" + iterator%>"
> property="sharesPer"/>
Thanks! That solved a problem I was about to ask ...
--
derek
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Help : creating dynamic styleId inside Logic:iterate
Posted by Aidas Semezys <ai...@gmail.com>.
It is not allowed to have just part of attribute value as JSP expression.
Here is the correct solution:
<html:text name="iType" styleId="<%="sp" + iterator%>" property="sharesPer"/>
Peace,
Aidas
sachin <sa...@paradyne.co.in> wrote:
> I have a jsp page in which i have a loop and a text field inside it.
> Now to create a dynamic styleid i have used the following code..
>
> but when this code executes , it does not print the actual value of itrator .
> It should give styleId="sp0" , styleId="sp1" , styleId="sp2" likewise ..
> but it prints simply ' styleId="sp<% = itrator %>" ' for all the fields .
>
> can someone provide a solution to create dynamic styleId ... ?
>
> <% int itrator=0; %>
> <logic:iterate id="iType" property="investorTypeList" name="sharePatternBean">
> <html:text name="iType" styleId="sp<% = itrator %>" property="sharesPer"
> readonly="true" />
> <%itrator++;%>
> </logic:iterate>
>
> Regards,
> Sachin Hegde,
> Software Developer,
> Paradyne Infotech Limited,
> Mumbai
> 022-38546711
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org