user
[Prev] Thread [Next] | [Prev] Date [Next]
Dynamic value supplied s:text name in struts 2 gdown Thu Jun 25 14:01:10 2009
With Struts1 the following would work: JSP: <% String productType = [get the productType from the form] String productTypeI18nKey = "product.type.list." + productType; %> <html:text property="<%=productTypeI18nKey%>"/> With the Struts2, how would I do the same. I've tried: JSP: <% String productTypeI18nKey = "product.type.list." + productType; %> <s:text name="<%=productTypeI18nKey%>"/> When I execute the above JSP, I get the following error "According to TLD or attribute directive in tag file, attribute name does not accept any expressions" How do I supply a dynamic value as a key for the s:text tag? Thanks in advance, Graham --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]