Hi, I am doing just that. Hope it works. Thanks. bye, Mohan -----Original Message----- From: Dave Derry [mailto:dderry@;acm.org] Sent: Monday, October 21, 2002 4:52 PM To: Struts Users Mailing List Subject: Re: How to add a pre-action
In addition to Phil's advice, if I understand you correctly you are asking how you can differentiate two different behaviors in the same action class. When action is /mainscreen then ReportParameterAction should do one thing (or nothing) but when action is /report then ReportParameterAction should do something differently. If this is correct then you can accomplish this with the 'parameter' attribute. In your action mapping specify 'parameter=someParameter'. In ReportParameterAction test for that parameter and determine the behavior accordingly (ie. if( mapping.getParameter().equals( 'someParameter' ) ) { doSomethingSpecial(); } ). Dave Derry ----- Original Message ----- From: "Mohan Radhakrishnan" <[EMAIL PROTECTED]> > Hi, > > Flow : > login.jsp -> mainscreen.jsp[ jsp:includes a left panel showing report > parameters] > > The parameters are chosen by the user. Forward to the same > mainscreen.jsp which is shown again with the left panel hidden (uses layers) > and the report shown in the center of the screen. > > 1. Pre-population of the left panel with report parameters. > > Action mapping used is. > > <action path="/mainscreen" > type="com.hcl.smartmanage.web.action.ReportParameterAction" > --> Doesn't do anything right now. > name="reportParameterForm" > validate="false" > scope="session" > input="/mainscreen.jsp"> > </action> > > Form tag used is <html:form action="mainscreen.action" .... > > > After the parameters are shown the user clicks the 'submit' button inside > the above form tag and the parameters should be processed and a report > fetched. But the 'action' of the form tag should be differentiated so that > this action mapping takes effect. How do you do that? > > <action path="/report" > type="com.hcl.smartmanage.web.action.ReportSelectionAction" > name="reportParameterForm" > validate="false" > scope="session" > input="/mainscreen.jsp"> > </action> > > > > bye, > Mohan > > >
This message and any attachments have been scanned for viruses during transmission from HCL Comnet.
-- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>