struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Nelson" <eric.nel...@unishippers.com>
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="currentRow.id"/>

You could also try:

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

--Eric

-----Original Message-----
From: Márcio Gurgel [mailto:marcio.rga@gmail.com] 
Sent: Sunday, April 06, 2008 6:20 PM
To: user@struts.apache.org
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="${currentRow.id}"/> inside a displayTag iterator.

I read this link https://issues.apache.org/struts/browse/WW-2107 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="${
item.id}" theme="simple" onclick="confirmAllChecked()" />
</display>

*Exception*
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message