Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

action method not called by <s:if>

Gabriel Belingueres

2008-09-17

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

I came across which I believe is a weird OGNL behavior:

I have an action B which extends from action A which extends from
ActionSupport (executing using the defaultStack)

In my struts.xml file I have an action defined this way:

<action name="listing" class="B">
<result name="success">listing.jsp</result>
</action>

my listing.jsp:

...
<s:if test="hasPending()">
...
</if>

Now, hasPanding is a method defined in B:

public boolean hasPending() {
System.out.println("call me");
return true;
}

The surprising thing is it is NEVER called (which I believe OGNL can
not resolve it)

HOWEVER, if I pull up the hasPending() method to class A, then OGNL
found it and call it OK.

I tested it against S2.1.2 and a current S2.1.3 snapshot.

Any advice?

Gabriel

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.