You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Lipofsky <da...@bricsnet.com> on 2004/02/25 01:24:11 UTC
expanding <%=...%>
In the JSP below, <%=p1%> will expand the way I expect.
But <%=p2> does not. Does anyone know why and how to
fix it? Using HTML-EL is not a good option because my
real case uses custom tags that extend the HTML taglib.
<%@ taglib uri="struts-html" prefix="html" %>
<html:form action="/TransactionListLoad">
<% String foobar = "FooBar", p1 = "popupSrcForm", p2 = "Form"; %>
<html:text property="<%=p1%>" value="<%=foobar%>"/>
<html:text property="popupSrc<%=p2%>" value="<%=foobar%>"/>
</html:form>
Thanks,
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: expanding <%=...%>
Posted by Max Cooper <ma...@maxcooper.com>.
You can't mix static text and a <%= %> in the same attribute value.
Here is the solution:
property="<%= "popupSrc" + p2 %>"
-Max
----- Original Message -----
From: "Daniel Lipofsky" <da...@bricsnet.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, February 24, 2004 4:24 PM
Subject: expanding <%=...%>
In the JSP below, <%=p1%> will expand the way I expect.
But <%=p2> does not. Does anyone know why and how to
fix it? Using HTML-EL is not a good option because my
real case uses custom tags that extend the HTML taglib.
<%@ taglib uri="struts-html" prefix="html" %>
<html:form action="/TransactionListLoad">
<% String foobar = "FooBar", p1 = "popupSrcForm", p2 = "Form"; %>
<html:text property="<%=p1%>" value="<%=foobar%>"/>
<html:text property="popupSrc<%=p2%>" value="<%=foobar%>"/>
</html:form>
Thanks,
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org