Use PreResultListener with validate to load data if error

2011-05-28 Thread JOSE L MARTINEZ-AVIAL
Hi, I'm using Struts 2.1.8.1. I have some Actions that use validate() to check the values in a form, and I'm using Preparable to load some data in case the validation fails and it goes back to the original page. The issue is that prepare is always invoked, so I load the data even if the

Access to ActionContext.getContext().getName() using OGNL

2011-05-28 Thread JOSE L MARTINEZ-AVIAL
Hi, I've been looking for a while, but haven't found anything, so I'm asking here. How can I get the name of the action from a Struts2 Tag? IOW, I would like to do something like ActionContext.getContext().getName(), but using s:property value=name/. I haven't found any information on how to do

RE: Access to ActionContext.getContext().getName() using OGNL

2011-05-28 Thread Jason Pyeron
-Original Message- From: JOSE L MARTINEZ-AVIAL [mailto:jlm...@gmail.com] Sent: Saturday, May 28, 2011 16:53 To: Struts Users Mailing List Subject: Access to ActionContext.getContext().getName() using OGNL Hi, I've been looking for a while, but haven't found anything, so I'm

Re: Access to ActionContext.getContext().getName() using OGNL

2011-05-28 Thread jlmagc
The reason is that I have JSP which contains a form that it's used for the creation and modificatio of records. Depending on the name of the action, it is a creation (in which certains field should be modifiable) or a modification (in which those certains fields should be radonly). I was

Re: Access to ActionContext.getContext().getName() using OGNL

2011-05-28 Thread Steven Yang
like Jason said they way i do it is writing a getter method in my action say getActionName() then in it i do ActionContext.getContext().getName() dunno if there is a better way because i have been doing this since the beginning of Struts2 or even Webwork time On Sun, May 29, 2011 at 10:48 AM,