Thanks so much for your explanation. I changed my statement to
<s:if test="%{#request.resultSize>0}" >
That works. I don't want to move result size to value stack yet since I
need to move on and see what other problems might exist for the upgrade.
Now I got a similar problem. My result is displayed in a displaytag
table.
<display:table name="acrs" class="its" id="acr" pagesize="${pageSize}"
report="true" ..
One of the column is a checkbox.
<display:column>
<s:checkbox name="selectedItems" fieldValue="${acr.id}"
value="itemsSelected[${acr_rowNum}-1]" />
</display:column>
I got this error
org.apache.jasper.JasperException: /jsp/content/findAcrResults.jsp(17,2)
According to TLD or attribute directive in tag file, attribute
fieldValue does not accept any expressions
How can I get the value of acr.id?
Thanks,
Jane
-----Original Message-----
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 21, 2007 11:06 AM
To: Struts Users Mailing List
Subject: Re: [S2] s:if in 2.0.11
You're trying to mix expression languages.
%{resultSize > 0} assumes that resultSize is on the
value stack, most likely exposed via a public getter
on your action. This is arguably a better practice
anyway.
If the list itself is available on the stack then you
can call the size() method on the list in your <s:if
test="..."> OGNL expression and do away with the
request attribute altogether, which is arguably
cleaner anyway.
d.
--- "Jiang, Jane (NIH/NCI) [C]" <[EMAIL PROTECTED]>
wrote:
> I am upgrading to 2.0.11 from 2.0.9 and got this
> error
>
> SEVERE: Servlet.service() for servlet jsp threw
> exception
> org.apache.jasper.JasperException:
> /jsp/content/findAcrResults.jsp(6,0)
> According to TLD or attribute directive in tag file,
> attribute test does
> not accept any expressions
>
> for this line in my jsp
>
> <s:if test="${resultSize} > 0">
>
> I changed it to
> <s:if test="%{resultSize>0}" >
> Now the error went away. But the statement never
> evaluated true. I
> took out the s:if statement, the result showed up
> corrected. resultSize
> is a request attribute.
>
> Please advice,
>
> Jane
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]