struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Nelson" <>
Subject RE: Ognl expressions in Struts 2.1
Date Mon, 07 Apr 2008 17:45:52 GMT
I ran into this too once I upgraded to 2.0.11.  I understand their concern for allowing expressions,
but I know that I'm using them correctly and so I decided to modify the TLD and allow all
expressions, then just re-jared everything up and all is working fine.  That's one solution.
 The other is to avoid EL expressions.  The value field in <s:checkbox> can be set off
the value stack, so this should work:

<s:checkBox value=""/>

You could also try:

<s:checkBox value="%{}"/>


-----Original Message-----
From: Márcio Gurgel [] 
Sent: Sunday, April 06, 2008 6:20 PM
Subject: Ognl expressions in Struts 2.1

Hi all,

I was using struts 2.0.9, then I resolved to upgrade to 2.1.0.
I was setting a value in a checkbox like this:
<s:checkBox value="${}"/> inside a displayTag iterator.

I read this link and
understood the situation.
But, is there another way to set a value in my checkBox?

<display:table requestURI="/usuario/pesquisar.action" name="listUsuPesquisa"
list="listUsuPesquisa" export="false" class="list" pagesize="15" uid="item">

<display:column title='<input type="checkbox" name="selectAll"
id="selectAll" value="" onclick="checkAll()"/>'>
<s:checkbox name="checkBox" id="checkBox" value="cdUsuario" fieldValue="${}" theme="simple" onclick="confirmAllChecked()" />

According to TLD or attribute directive in tag file, attribute fieldValue
does not accept any expressions

Tanks a lot!
Have a nice week!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message