You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jcleve <je...@gmail.com> on 2008/02/20 16:09:26 UTC

Re: Update from 2.0.9 to 2.0.11

I undestand the issue, but missed the clue, I'm a bit rookie on Struts2.

If EL is forbidden, should OGNL be used, or is there a cleaner solution ?

It might be a stupid question, but
what would be the correct way of writing <s:if
test="${chapter!='Library'}>${chapter}</s:if> without EL.

I translated it to : <s:if test="%{#request.chapter== Library">

Have I to use % and #request or other context everywhere, and can't I simply
use the valueStack ?

Is there a good webpage, tuto or whatever, on EL / OGNL syntax ?



>> https://issues.apache.org/struts/browse/WW-2107
>>
>> You can still use OGNL though:
>>
>> <s:if test="%{value_here}">
>>
>> Eric Rank
>> -------------
>> Senior Web App Engineer
>> www.referencevault.com
>>
>> On Jan 3, 2008, at 3:39 AM, Michał Letyński wrote:
>>
>>> Hi, I did an update from version 9 to 11. And after that i got a lot 
>>> of errors in jsp:
>>>
>>> /"According to TLD or attribute directive in tag file, attribute test 
>>> does not accept any expressions"
>>>
>>> /I have many expressions in s:if test=${value_here}, s:submit 
>>> src="${imgPath}/save_attachment.gif"" etc.
>>> From version 11 is not possible to put expression into tags ?!?!?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
> 

-- 
View this message in context: http://www.nabble.com/Update-from-2.0.9-to-2.0.11-tp14594912p15590474.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Update from 2.0.9 to 2.0.11

Posted by Dave Newton <ne...@yahoo.com>.
--- Randy Burgess <RB...@nuvox.com> wrote:
> Yeah I apologize for the bad advice, I whipped that out too fast. 

Premature explication; it happens. I get email about that all the time.

> It should be:
> <s:if test="chapter == 'Library'">

Dave


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


Re: Update from 2.0.9 to 2.0.11

Posted by Randy Burgess <RB...@nuvox.com>.
Yeah I apologize for the bad advice, I whipped that out too fast. It should
be:

<s:if test="chapter == 'Library'">

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Dave Newton <ne...@yahoo.com>
> Reply-To: Struts Users Mailing List <us...@struts.apache.org>
> Date: Wed, 20 Feb 2008 07:55:24 -0800 (PST)
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: Re: Update from 2.0.9 to 2.0.11
> 
> --- Randy Burgess <RB...@nuvox.com> wrote:
>> If you have a getter for 'chapter' in your action then this should work.
>> 
>> <s:if test="%{#chapter == 'Library'}">
> 
> IIRC the "#" is only for named objects in the stack context (like #request,
> #attr, etc.) so I'm not sure that will work. For example, if I have a
> property "foo" on my action I can't access it with <s:property
> value="#foo"/>.
> 
> Dave
> 
>> Randy Burgess
>> Sr. Web Applications Developer
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

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


Re: Update from 2.0.9 to 2.0.11

Posted by Dave Newton <ne...@yahoo.com>.
--- Randy Burgess <RB...@nuvox.com> wrote:
> If you have a getter for 'chapter' in your action then this should work.
> 
> <s:if test="%{#chapter == 'Library'}">

IIRC the "#" is only for named objects in the stack context (like #request,
#attr, etc.) so I'm not sure that will work. For example, if I have a
property "foo" on my action I can't access it with <s:property
value="#foo"/>.

Dave

> Randy Burgess
> Sr. Web Applications Developer


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


Re: Update from 2.0.9 to 2.0.11

Posted by Randy Burgess <RB...@nuvox.com>.
If you have a getter for 'chapter' in your action then this should work.

<s:if test="%{#chapter == 'Library'}">

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: jcleve <je...@gmail.com>
> Reply-To: Struts Users Mailing List <us...@struts.apache.org>
> Date: Wed, 20 Feb 2008 07:09:26 -0800 (PST)
> To: <us...@struts.apache.org>
> Subject: Re: Update from 2.0.9 to 2.0.11
> 
> 
> I undestand the issue, but missed the clue, I'm a bit rookie on Struts2.
> 
> If EL is forbidden, should OGNL be used, or is there a cleaner solution ?
> 
> It might be a stupid question, but
> what would be the correct way of writing <s:if
> test="${chapter!='Library'}>${chapter}</s:if> without EL.
> 
> I translated it to : <s:if test="%{#request.chapter== Library">
> 
> Have I to use % and #request or other context everywhere, and can't I simply
> use the valueStack ?
> 
> Is there a good webpage, tuto or whatever, on EL / OGNL syntax ?
> 
> 
> 
>>> https://issues.apache.org/struts/browse/WW-2107
>>> 
>>> You can still use OGNL though:
>>> 
>>> <s:if test="%{value_here}">
>>> 
>>> Eric Rank
>>> -------------
>>> Senior Web App Engineer
>>> www.referencevault.com
>>> 
>>> On Jan 3, 2008, at 3:39 AM, Michał Letyński wrote:
>>> 
>>>> Hi, I did an update from version 9 to 11. And after that i got a lot
>>>> of errors in jsp:
>>>> 
>>>> /"According to TLD or attribute directive in tag file, attribute test
>>>> does not accept any expressions"
>>>> 
>>>> /I have many expressions in s:if test=${value_here}, s:submit
>>>> src="${imgPath}/save_attachment.gif"" etc.
>>>> From version 11 is not possible to put expression into tags ?!?!?
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Update-from-2.0.9-to-2.0.11-tp14594912p15590474.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

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