Hi All,

On 14 Dec 2007 at 10:04, Rob Hills wrote:

> Nathan Anderson wrote:
> > Hmm... that's a bit of a mystery.  I don't really have any answers, but 
> > maybe if I ask some questions it will help :shrug:
> >
> > >From what I can tell, the buildTonnageGrid() method is a local method in 
> > >the action that sets up some local or session values and returns nothing.  
> > >Is that correct?  Other than that I'm not sure where else to look :/
> >   
> Yes, that is a local method that builds up some data to display on the 
> form.  I don't think that's causing the problem as I have a breakpoint 
> on that method call and it never gets triggered.

I've done a bit more sleuthing on this, with some very strange results.  When I 
run my ActionTest, it all runs OK, the data object 
is built up properly and the list() method on the action is called OK.

However, as mentioned before, when I run it in Tomcat, the list() method never 
seems to be called.  Stepping through tonight in 
debug mode I noticed a very curious thing - when paused on the first line of 
the executeResult() method in 
com.opensymphony.xwork2.DefaultActionInvocation, I looked at my Action class 
variable there in the debugger and there was 
no "list()" method there, so I guess that explains why it's never called!!!

I went back and double-checked visibility etc.  It's just a standard "public 
String list() {..." method, identical AFAICT to the one in 
all my other Action classes.  This now-you-see-it-now-you-don't list() method 
also works when invoked by my Action test.

How can this be?

> > ----- "Rob Hills" <[EMAIL PROTECTED]> wrote:
> >> Nathan Anderson wrote:
> >>> Shouldn't that Struts XML snippet look like this?
> >>>
> >>> <action name="deliveryTonnage" 
> >>> class="au.com.myapp.webapp.action.DeliveryTonnageAction"
> >>> method="list">
> >>>     <result name="success">/WEB-INF/pages/shiftList.jsp</result>
> >>> <!--
> >>>     <result>/WEB-INF/pages/deliveryTonnageList.jsp</result>
> >>> -->
> >>> </action>
> >>>
> >>> Also I think all of my actions have at least 2 <result> tags, the
> >>>       
> >> other one being "input".
> >>     
> >>>   
> >>>       
> >> This one is modeled on several others (that are working) that were 
> >> originally taken from the example in the Struts2 tutorial:
> >>
> >> http://www.appfuse.org/display/APF/Using+Struts+2#UsingStruts2-listview
> >>
> >> (the struts.xml snippet is a page below the anchor that the above URL
> >>
> >> takes you to).
> >>
> >> The page will be a "view only" page, so AFAICT, I will only need to 
> >> define the default result. That said, I've previously tried
> >> specifically 
> >> naming it "success" exactly as you have suggested and got exactly the
> >>
> >> same error.  When I read back through the relevant part of the
> >> tutorial 
> >> (around the URL above) I realised that I only needed to supply a
> >> default 
> >> (unnamed) result as I have done in my other "view" actions that work.

Cheers,
Rob Hills
Waikiki, Western Australia
Mobile +61 (412) 904-357
Fax: +61 (8) 9529-2137

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to