You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brandon Goodin <ma...@phase.ws> on 2003/02/01 02:24:43 UTC
Struts EL
I looked everywhere to find this answer and couldn't so.... :-D
If I have the following:
<c:forEach var="x" start="1" end="10">
<html:hidden proper="thisObject[${x}].text"
value="${pass.this.value.as.is}"/>
</c:forEach>
And I am using the struts html el taglib
And I want pass the value of ${pass.this.value.as.is} to the back-end
unprocessed.
In other words.. I literall want "${pass.this.value.as.is}" to be passed to
the back.
How would I do this and keep the el from processing the value?
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Struts EL
Posted by Brandon Goodin <ma...@phase.ws>.
Thanks David! That's some excellent information.
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws
-----Original Message-----
From: David M. Karr [mailto:dmkarr@earthlink.net]
Sent: Friday, January 31, 2003 8:54 PM
To: struts-user@jakarta.apache.org
Subject: Re: Struts EL
>>>>> "Brandon" == Brandon Goodin <ma...@phase.ws> writes:
Brandon> I looked everywhere to find this answer and couldn't so.... :-D
Brandon> If I have the following:
Brandon> <c:forEach var="x" start="1" end="10">
Brandon> <html:hidden proper="thisObject[${x}].text"
Brandon> value="${pass.this.value.as.is}"/>
Brandon> </c:forEach>
Brandon> And I am using the struts html el taglib
Brandon> And I want pass the value of ${pass.this.value.as.is} to the
back-end
Brandon> unprocessed.
Brandon> In other words.. I literall want "${pass.this.value.as.is}" to
be passed to
Brandon> the back.
Brandon> How would I do this and keep the el from processing the value?
The only way to get close to this is to change the string slightly, so the
EL
will process it, but the resulting value will be what you wanted.
>From section A.2.1 of the specification, you could change it to this:
value="${'${'}pass.this.value.as.is}"
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net ; SCJP; SCWCD
---------------------------------------------------------------------
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
Re: Struts EL
Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Brandon" == Brandon Goodin <ma...@phase.ws> writes:
Brandon> I looked everywhere to find this answer and couldn't so.... :-D
Brandon> If I have the following:
Brandon> <c:forEach var="x" start="1" end="10">
Brandon> <html:hidden proper="thisObject[${x}].text"
Brandon> value="${pass.this.value.as.is}"/>
Brandon> </c:forEach>
Brandon> And I am using the struts html el taglib
Brandon> And I want pass the value of ${pass.this.value.as.is} to the back-end
Brandon> unprocessed.
Brandon> In other words.. I literall want "${pass.this.value.as.is}" to be passed to
Brandon> the back.
Brandon> How would I do this and keep the el from processing the value?
The only way to get close to this is to change the string slightly, so the EL
will process it, but the resulting value will be what you wanted.
>From section A.2.1 of the specification, you could change it to this:
value="${'${'}pass.this.value.as.is}"
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net ; SCJP; SCWCD
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Struts EL
Posted by Brandon Goodin <ma...@phase.ws>.
Excellent, you picked up on exactly what I am doing. I love it when I get a
good answer. Thanks a ton :-)
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws
-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Friday, January 31, 2003 7:53 PM
To: Struts Users Mailing List
Subject: Re: Struts EL
On Fri, 31 Jan 2003, Brandon Goodin wrote:
> Date: Fri, 31 Jan 2003 18:24:43 -0700
> From: Brandon Goodin <ma...@phase.ws>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts User List <st...@jakarta.apache.org>
> Subject: Struts EL
>
> I looked everywhere to find this answer and couldn't so.... :-D
>
> If I have the following:
> <c:forEach var="x" start="1" end="10">
> <html:hidden proper="thisObject[${x}].text"
> value="${pass.this.value.as.is}"/>
> </c:forEach>
>
> And I am using the struts html el taglib
> And I want pass the value of ${pass.this.value.as.is} to the back-end
> unprocessed.
>
> In other words.. I literall want "${pass.this.value.as.is}" to be passed
to
> the back.
>
> How would I do this and keep the el from processing the value?
>
I don't believe there's any mechanism to do that in the current struts-el
tags. Further, in a JSP 2.0 container (such as Tomcat 5), the JSP page
compiler is going to compile them anyway -- unless you disable EL
expressions globally on your page.
If you've played with the EA release of JavaServer Faces, you'll find that
we did something pretty similar to what you're doing with the
"modelReference" attribute. Our current workaround is to instruct the
user to omit the delimiters "${" and "}" on their attribute values, and
attach them (if needed) with processing logic -- although, in our case, we
just made the expression evaluator work with or without delimiters.
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
Craig
---------------------------------------------------------------------
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
Re: Struts EL
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 31 Jan 2003, Brandon Goodin wrote:
> Date: Fri, 31 Jan 2003 18:24:43 -0700
> From: Brandon Goodin <ma...@phase.ws>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts User List <st...@jakarta.apache.org>
> Subject: Struts EL
>
> I looked everywhere to find this answer and couldn't so.... :-D
>
> If I have the following:
> <c:forEach var="x" start="1" end="10">
> <html:hidden proper="thisObject[${x}].text"
> value="${pass.this.value.as.is}"/>
> </c:forEach>
>
> And I am using the struts html el taglib
> And I want pass the value of ${pass.this.value.as.is} to the back-end
> unprocessed.
>
> In other words.. I literall want "${pass.this.value.as.is}" to be passed to
> the back.
>
> How would I do this and keep the el from processing the value?
>
I don't believe there's any mechanism to do that in the current struts-el
tags. Further, in a JSP 2.0 container (such as Tomcat 5), the JSP page
compiler is going to compile them anyway -- unless you disable EL
expressions globally on your page.
If you've played with the EA release of JavaServer Faces, you'll find that
we did something pretty similar to what you're doing with the
"modelReference" attribute. Our current workaround is to instruct the
user to omit the delimiters "${" and "}" on their attribute values, and
attach them (if needed) with processing logic -- although, in our case, we
just made the expression evaluator work with or without delimiters.
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Struts EL
Posted by Brandon Goodin <ma...@phase.ws>.
Please, I have good reason for what I need to do. All I need to know is if
it is possible to delimit the el so that the value gets passed to the back
unprocessed. If not, I have other solutions. But, I would prefer to use the
${...} notation.
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws
-----Original Message-----
From: Scott Barr [mailto:sbarr@chariot.net.au]
Sent: Friday, January 31, 2003 7:16 PM
To: Struts User List
Subject: Re: Struts EL
Hi Brandon
If these values are required by the backend, why not do this in an
Action?
Scott Barr
On Sat, 2003-02-01 at 11:54, Brandon Goodin wrote:
> I looked everywhere to find this answer and couldn't so.... :-D
>
> If I have the following:
> <c:forEach var="x" start="1" end="10">
> <html:hidden proper="thisObject[${x}].text"
> value="${pass.this.value.as.is}"/>
> </c:forEach>
>
> And I am using the struts html el taglib
> And I want pass the value of ${pass.this.value.as.is} to the back-end
> unprocessed.
>
> In other words.. I literall want "${pass.this.value.as.is}" to be passed
to
> the back.
>
> How would I do this and keep the el from processing the value?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
>
>
> ---------------------------------------------------------------------
> 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
Re: Struts EL
Posted by Scott Barr <sb...@chariot.net.au>.
Hi Brandon
If these values are required by the backend, why not do this in an
Action?
Scott Barr
On Sat, 2003-02-01 at 11:54, Brandon Goodin wrote:
> I looked everywhere to find this answer and couldn't so.... :-D
>
> If I have the following:
> <c:forEach var="x" start="1" end="10">
> <html:hidden proper="thisObject[${x}].text"
> value="${pass.this.value.as.is}"/>
> </c:forEach>
>
> And I am using the struts html el taglib
> And I want pass the value of ${pass.this.value.as.is} to the back-end
> unprocessed.
>
> In other words.. I literall want "${pass.this.value.as.is}" to be passed to
> the back.
>
> How would I do this and keep the el from processing the value?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org