Re: Dynamic Message
Hi All, I am using struts2 for my application. However I am stuck at a place. Guys Please Help me out. I have three buttons in my jsp page and I have defined separate action for each button and using my struts.xml I have mapped these actions to respective methods. Now my question is that when I click any of these buttons then if I recieve success from my action class I should display a message of successful completion of that action on the same page where these three buttons are. Could anyone guide me that how could I do this? Do I need to add some script in action class? -- View this message in context: http://old.nabble.com/Dynamic-Message-tp26373865p26387171.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dynamic Message
I think you want to try something like addActionMessage(Yay it worked) in the action. And then in the jsp use s:actionmessage/ to display it. Quoting vikrant S shimpi.vikr...@gmail.com: Hi All, I am using struts2 for my application. However I am stuck at a place. Guys Please Help me out. I have three buttons in my jsp page and I have defined separate action for each button and using my struts.xml I have mapped these actions to respective methods. Now my question is that when I click any of these buttons then if I recieve success from my action class I should display a message of successful completion of that action on the same page where these three buttons are. Could anyone guide me that how could I do this? Do I need to add some script in action class? -- View this message in context: http://old.nabble.com/Dynamic-Message-tp26373865p26387171.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dynamic Message
Thanks buddy It is working -- View this message in context: http://old.nabble.com/Dynamic-Message-tp26373865p26388558.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Dynamic Message
Hi ALL, In my Struts2/jsp form I have three buttons. When any of these buttons are clicked and once the action is successfull I want to dynamically show a message on the same page where these buttons are . Any Suggestions please in order to handle such case.And also the message should be different for each button. Thanks in advance -- View this message in context: http://old.nabble.com/Dynamic-Message-tp26373865p26373865.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dynamic Message
Put each button in it's own form, and assign a hidden variable in each form with a different value for each button/form. In your action class, check the value of the parameter, set a generic message string based on the parameter value, then redisplay the page with the forms on it. -- View this message in context: http://old.nabble.com/Dynamic-Message-tp26373865p26379701.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dynamic Message
I already have defined three different actions for each button. The thing which I want is that when I click any of this button and the action class returns a success then there should be a dynamic message on the same page where the buttons are , that the action has been successfull. How can I do it ?? Please suggest me.. -- View this message in context: http://old.nabble.com/Dynamic-Message-tp26373865p26384268.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org