john lee wrote:
in strut 1.X,
<logic:present name="XXXX">
<logic:iterator name="XXXX">.....
</logic:present>
<logic:notPresent name="XXXX">
search result not exist
</logic:present>
but, in struts 2,
how can i use the same method to check <s:iterator is not empty? in other
> words, i did not find equivalent <s:present to achive the same effect as
> struts 1.x at above.
<s:if test="%{XXXX == null}">
will check for a null in the action property. If you are the type that
likes to not have null checks/NPEs all over:
<s:if test="%{XXXX.length() > 0}">
(or size(), I can never remember what it is in Java.)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org