You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tom Ansley <to...@linuxtimes.net> on 2005/07/17 23:08:50 UTC

html-el:text styleId attribute issue

Hi all,

I am getting the following error:

[ServletException in:/jsp/camper/searchCriteriaCamperContent.jsp] 
/jsp/common/search/search_entities.jsp(160,6) According to TLD or
attribute directive in tag file, attribute styleId does not accept any
expressions'

for the following piece of jsp

<html-el:text size="50" styleId="<%= "date[" + date_num + "]" %>"
property="<% searchItem[${num}].value %>"/>

I need both property and styleId to be dynamic.  Does anybody have any
idea how I could go about doing this? I have tried html:text but I have
issues with that as well.

Thanks
Tom


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


Re: html-el:text styleId attribute issue

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Tom Ansley" <to...@linuxtimes.net>

> I am getting the following error:
>
> [ServletException in:/jsp/camper/searchCriteriaCamperContent.jsp]
> /jsp/common/search/search_entities.jsp(160,6) According to TLD or
> attribute directive in tag file, attribute styleId does not accept any
> expressions'
>
> for the following piece of jsp
>
> <html-el:text size="50" styleId="<%= "date[" + date_num + "]" %>"
> property="<% searchItem[${num}].value %>"/>

Either switch back to the <html:text> tag and use runtime <%= expressions 
%>, or (my preference) use <html-el:text> and the JSTL ${EL}.  I don't think 
they mix well...

I'm guessing, but your styleId and property might look something like...
   styleId="date[${date_num}]"
   property="${searchItem[num].value}"
Those are probably wrong, but might give you an idea of the syntax.  Move 
the ${} around and see what works.

If you still need help, post a little more of the JSP code so we can see 
what you're doing.  I assume this is inside of a <c:forEach> loop, for 
example, but I don't know which vars belong to what.  Also, let us know what 
container/Servlet/JSP versions you're using.

-- 
Wendy Smoak 



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