How to trap dojo.rpc.JsonService request

2009-05-06 Thread Manish Kumar Wadhwa
Hello Guys, I am using Struts2 and dojo plug-in for dojo 1.3 for one of my application. I have an interceptor for user authentication. On every request for an struts action, It validates the user accounts as per our business needs. If the validation fails it breaks the request and throws the us

[S2] how to use multiple resource files in struts2

2009-05-06 Thread Sonu S
Hi, I am trying to use two or more resource files in struts2, like this struts.custom.i18n.resources=Resources1 struts.custom.i18n.resources=Resources2 but it is not working (in JSP pages only values from Resource2 are being displayed and for keys are being displayed from resource1) please tell

Re: [S2] how to use multiple resource files in struts2

2009-05-06 Thread Terry Gardner
Set multiple resource per line in your struts.xml file, separated by commas, for example: value="globalMessages,Resources1,Resources2" /> On May 6, 2009, at 4:53 AM, Sonu S wrote: Hi, I am trying to use two or more resource files in struts2, like this struts.custom.i18n.resources=Resou

Re: [S2] how to use multiple resource files in struts2

2009-05-06 Thread Rodrigo Lins
You need to use two differet file for your messages. One for one value and another for other file. See internacionalization in struts. Rodrigo. On Wed, May 6, 2009 at 5:53 AM, Sonu S wrote: > Hi, > > I am trying to use two or more resource files in struts2, like this > > struts.custom.i18n.reso

Struts 2 - Dispatch Action

2009-05-06 Thread cm132005
In Struts 1 dispatch action, a request parameter can be set either as a form attribute or as a request attribute from within any action class or through URL and the correct dispatch method in the action gets invoked. Is there a way to do this in Struts 2? We are migrating our Struts 1.x applicat

Date/time formatting

2009-05-06 Thread Jon Pearson
If I wanted to output a date/time value in the user's locale, is there a simple way to do that? I see there is a tag which would be helpful for getting the date format correct without manually specifying it, but what about a similar tag? Am I going to need to manually specify the standard date fo

Re: Date/time formatting

2009-05-06 Thread Terry Gardner
java.text.SimpleDateFormat formats a java.util.Date according to a locale and a patter specified by the client. On May 6, 2009, at 1:10 PM, Jon Pearson wrote: If I wanted to output a date/time value in the user's locale, is there a simple way to do that? I see there is a tag which would be

RE: Date/time formatting

2009-05-06 Thread Martin Gainty
you can also use the Struts date tag <%...@taglib prefix="s" uri="/struts-tags" %> if no format is specified format defaults to DateFormat.MEDIUM (in US = MMM d, )http://struts.apache.org/2.0.14/docs/date.html HTH Martin __ Disclaimer and Confide

RE: Date/time formatting

2009-05-06 Thread Jon Pearson
Right, but I don't want to specify the format explicitely, since it should depend on the localization of the browser. But when I don't specify it, I don't get the time included in the output. Is there a way to get both? > -Original Message- > From: Martin Gainty [mailto:mgai...@hotmail

Struts 2 – changing method signature

2009-05-06 Thread cm132005
In Struts 2, is DefaultActionInvocation invokeAction responsible for invoking the action methods and what would be a good approach to change all action method signature to have a fixed number of parameters? For regular actions, I implemented a BaseAction class with an abstract method and having

RE: Struts 2 – chang ing method signature

2009-05-06 Thread Martin Gainty
take a look at com.opensymphony.xwork2.interceptor.ParametersInterceptor This interceptor gets all parameters from ActionContext.getParameters() and sets them on the value stack by calling ValueStack.setValue(String, Object), typically resulting in the values submitted in a form request bein

Struts 2.1.6 ajax submit with datetimepicker

2009-05-06 Thread Raffek
Hi guys. I faced such a problem today. I have created jsp, which looks like this: //file.jsp// ... //struts.xml/ /pages/actions/pracuj

S2 - s:submit method="value" has to be hard-coded?

2009-05-06 Thread cm132005
There is a scenario where the same submit button needs to handle three different method calls in a dispatch action. To avoid coding the same button three times, I tried java.lang.NoSuchMethodException: com.abc.xyz.struts.ExampleDispatchAction.() org.apache.jasper.JasperException: /jsp/exampl

RE: S2 - s:submit method="value" has to be hard-coded?

2009-05-06 Thread Martin Gainty
I would try populating the method with a splitting of the actionname for applicable method Here, a reference to "editCrud" will call the edit method on an instance of the Crud Action class. Likewise, a reference to "deleteCrud" will call the delete method instead. http://struts.apache.org/2

Re: Struts 2.1.6 ajax submit with datetimepicker

2009-05-06 Thread Raffek
Raffek wrote: > > Hi guys. > I faced such a problem today. I have created jsp, which looks like this: > > //file.jsp// > > ... > id="niemaczasu_form"> > name="kolejnaProbaDate" > ty

Struts-2 Validation

2009-05-06 Thread NR031
Hi, I am having 2 doubts : 1) How to validate a Date format in Struts 2 I have my -validation.xml like this : Please enter your Date of birth 2) How to compare two fields I am having password and confirm password fileds. If both the filed values