Works like a charm. Thanks a lot. My guess is that my problem could be due to the fact that anything within attributes like styleid etc. are just parsed as a string.
Harsh. -----Original Message----- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 27, 2007 12:50 PM To: Struts Users Mailing List Cc: Struts Users Mailing List Subject: RE: Scriptlets in Struts tag I believe your running into something I ran into the other day, something I didn't know... if you have an attribute: someAttribute="123<%=someVar%>" ...the value of someVar isn't inserted. However, if you do: <% someVar = "123" + someVar %> someAttribute="<%=someVar%>" ...that works. The combination of static text and a scriplet seems to not work. Give it a shot, see if that does the trick for you... Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of "Practical Ajax Projects With Java Technology" (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Tue, February 27, 2007 1:40 pm, Chaudhary, Harsh wrote: > I tried that. But in the HTML rendered, the id attribute is rendered as: > > id='BLABLA<%=indexVal.intValue()%>' > > Harsh. > > -----Original Message----- > From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 27, 2007 6:09 PM > To: Struts Users Mailing List > Subject: Re: Scriptlets in Struts tag > > > hi, > > try this code. > > <%=indexVal.intValue()%> > > Regards, > > Nuwan. > > ----- Original Message ----- > From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <user@struts.apache.org> > Sent: Tuesday, February 27, 2007 6:22 PM > Subject: Scriptlets in Struts tag > > > My code: > > <logic:iterate name="FDA3Form" property="dependentsInfoAl" id="element" > indexId="indexVal"> > <html:text name="element" property="dependentName" size="20" > maxlength="35" indexed="true" style="display:block;" > styleId='BLABLABLA----->>><%= indexVal %><<<-----'/> > </logic:iterate> > > The code within the ----->>> and <<<----- is not working. I think it > might be due to the way the tag is parsed in the JSP but does anyone > know of a way to do this. > > Basically, I would like to have id='BLA1', id='BLA2' ...... in the > rendered HTML. > > Harsh. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]