Re: binding paramters in struts2 without the form

2010-12-01 Thread maven apache
Thank you very much. I found the ModelDriven is very useful. With it I donot have to add the parametes to the action as the fields. :) 2010/11/29 Maurizio Cucchiara maurizio.cucchi...@gmail.com If you don't want dot notation, I should consider using ModelDriven interface. Take a look at

Re: Incorporating action interceptor configuration parameters into a message

2010-12-01 Thread stanlick
Thanks Li -- I saw what the interceptor was doing and decided that was not going to work. Would you mind posting the simple technique to extract the parameter from the interceptor configuration. I'll admit I'm not a Guice pro and studying the container build sent me straight to the bar last

Re: AJAX file upload

2010-12-01 Thread piyush kumar
Yeah you are right, dojo is there in struts2, but that is all i know :-( On Wed, Dec 1, 2010 at 2:29 AM, Harsh C hchau...@gmail.com wrote: How can I setup a AJAX-ified file upload page using Struts 2? If there is some integration with Dojo, it would be even better i.e. not use the OS specific

Re: AJAX file upload

2010-12-01 Thread Dave Newton
On Wed, Dec 1, 2010 at 8:33 AM, piyush kumar alivelove2...@gmail.comwrote: Yeah you are right, dojo is there in struts2, but that is all i know :-( ... In any case, it's deprecated, and uses an ancient version of Dojo. Don't use it. Dave

RE: AJAX file upload

2010-12-01 Thread Peter Nguyen
Dave, This seems to be a recurring piece of advice with regards to the use of the struts 2 dojo plugin. Out of curiosity, is there any reason why the plugin is still included in the latest releases? Peter. -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent:

Re: AJAX file upload

2010-12-01 Thread Robert Graf-Waczenski
Am 30.11.2010 21:59, schrieb Harsh C: How can I setup a AJAX-ified file upload page using Struts 2? If there is some integration with Dojo, it would be even better i.e. not use the OS specific file upload button etc. There are various resources floating around in the net regarding AJAX file

Re: AJAX file upload

2010-12-01 Thread Dave Newton
On Wed, Dec 1, 2010 at 8:52 AM, Peter Nguyen wrote: This seems to be a recurring piece of advice with regards to the use of the struts 2 dojo plugin. Out of curiosity, is there any reason why the plugin is still included in the latest releases? Yes, because it's deprecated, not removed.

Re: AJAX file upload

2010-12-01 Thread piyush kumar
thanks dave!! On Wed, Dec 1, 2010 at 7:09 PM, Dave Newton davelnew...@gmail.com wrote: On Wed, Dec 1, 2010 at 8:33 AM, piyush kumar alivelove2...@gmail.com wrote: Yeah you are right, dojo is there in struts2, but that is all i know :-( ... In any case, it's deprecated, and uses an

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Anjib Mulepati
Li When you say sending response using JSON what does that mean? I have been sending result between view and action class by putting in request object as request.setAttribute(result,resultFrom); and request.getAttribute(result) What can be better approach than this? Thanks Anjib On

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
2010/12/1 Anjib Mulepati anji...@hotmail.com: Li When you say sending response using JSON what does that mean? I mean, send a string in JSON format as response. If your response is simple, for example, just a OK or ERROR flag, you can use plain text. But when you need send a complex data

Re: AJAX file upload

2010-12-01 Thread Frank W. Zammetti
On 12/1/2010 9:00 AM, Robert Graf-Waczenski wrote: Am 30.11.2010 21:59, schrieb Harsh C: How can I setup a AJAX-ified file upload page using Struts 2? If there is some integration with Dojo, it would be even better i.e. not use the OS specific file upload button etc. There are various

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Anjib Mulepati
Can you please write me simple example of this JSON? I have never used this. Anjib On 12/1/2010 10:13 AM, Li Ying wrote: 2010/12/1 Anjib Mulepatianji...@hotmail.com: Li When you say sending response using JSON what does that mean? I mean, send a string in JSON format as response. If your

Re: Incorporating action interceptor configuration parameters into a message

2010-12-01 Thread Li Ying
I have read the source code of FileUploadInterceptor. I think it do the message getting in it's private method, and dose not use the maximumSize as a message format param. So I believe there is no simple way to extract interceptor interceptor param. The simplest way I known is, hard coding the

RE: Calling Struts Action from JavaScript

2010-12-01 Thread Biesbrock, Kevin
Example: http://www.json.org/example.html All the information you could want and so much more: http://www.google.com/search?q=json Beez -Original Message- From: Anjib Mulepati [mailto:anji...@hotmail.com] Sent: Wednesday, December 01, 2010 10:24 AM To: Struts Users Mailing List

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
I recommend JSON when you need exchange complex data strut between client and server. Because it is very friendly to JavaScript, so you can easily handle complex data strut in your client side JavaScript code. Sample for JSON can be find in the web site Biesbrock has told you. The idea of JSON is

Re: Incorporating action interceptor configuration parameters into a message

2010-12-01 Thread stanlick
Thanks Li -- This is what I was afraid of, but wanted to make sure I wasn't overlooking something a little more straightforward. Before duplicating the max size someplace else, I'll likely get into the Container build which reads the xml files. Somewhere in the back of my mind, it feels like I

Re: Incorporating action interceptor configuration parameters into a message

2010-12-01 Thread Dave Newton
Nothing up my sleeve this time. It seems like a global property/constant would be usable, but I've never tried to @Inject a value into both interceptors and actions, so I have no idea if it'd work. Could be useful for a few usecases, though. Dave On Wed, Dec 1, 2010 at 11:38 AM,

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Anjib Mulepati
Ok JSON seems to be easy way to represent the complex result. But I am still confuse whether I should use JSON or not? My result are set of records from the database so it have tabular form. For that reason I am using Arraylist of Object and putting those result in arraylist. Is this a

RE: Calling Struts Action from JavaScript

2010-12-01 Thread Biesbrock, Kevin
I think you should use JSON for that usecase. Object arrayLists in JSON are simple enough to use. JSON: rows = [ {id:1,name:'field1'}, {id:2,name:'field2'} ];

Calling OGNL static method with date issue

2010-12-01 Thread Ken McWilliams
In my jsp I have two dates (today and expiryDate) the following works in the JSP: s:date name=today format=-MM-dd / s:date name=expiryDate format=-MM-dd / Now I created two static methods (In a Class called dateUtils.DateRange): /* Calling the following from my JSP:

execute javascript after action's html renders

2010-12-01 Thread Colin Freas
On Struts 2.1.6, Dojo and JSON plugins. I want to execute some JavaScript after an action's HTML finishes loading. I can't figure out how to make this happen consistently. The action that I'm trying to modify is as part of another action. When I access the child action directly, the script

Re: Calling OGNL static method with date issue

2010-12-01 Thread Dave Newton
What doesn't work? Anything in the logs? Dave On Tue, Nov 30, 2010 at 2:19 PM, Ken McWilliams ken.mcwilli...@gmail.comwrote: In my jsp I have two dates (today and expiryDate) the following works in the JSP: s:date name=today format=-MM-dd / s:date name=expiryDate

Internationalization with REST/Convention plug-ins

2010-12-01 Thread stanlick
I had a guy ask me why his internationalized properties were not accessible in his Struts app that was using both the REST and Convention plug-ins. My first action was to read the docs which did not suggest anything out of the ordinary, so I through a core app together using this configuration

Re: execute javascript after action's html renders

2010-12-01 Thread Dave Newton
How is the JavaScript implemented in the child action? And do you mean that an s:action.../ tag is being used (from a JSP? FM?) to load an action (the child from above)? Dave On Tue, Nov 30, 2010 at 4:50 PM, Colin Freas cffil...@gmail.com wrote: On Struts 2.1.6, Dojo and JSON plugins. I

Re: Internationalization with REST/Convention plug-ins

2010-12-01 Thread Dave Newton
I got caught out by thinking the packages were created in a different package than I assumed they were, but I don't recall if it was my fault or if there was a configuration parameter I had forgotten to set or what. But just in case it helps, I'll throw it out there. Man, I've forgotten a lot of

Re: Internationalization with REST/Convention plug-ins

2010-12-01 Thread stanlick
de-rust? That's awesome. I personally am afraid to see what might be lurking under all my rust. There is a struts.convention.package.locators set to the top-level folder in the class hierarchy. One thing that I found interesting though, I added the struts2-config-browser-plugin hoping to get

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
OR, You can send a whole HTML code of the table as response. In this case, your server side view will be simple, just like any normal JSP. The client side will receive the HTML code, and you can insert this HTML piece into your page. But it will be difficult to manipulate, because what you get

Re: Calling OGNL static method with date issue

2010-12-01 Thread Zoran Avtarovski
I have a feeling you have to use s:property value=@dateutils.datera...@datetest(#today)/ is set with a s:date tag Or s:property value=@dateutils.datera...@datetest(#attr.today)/ if set with a c:set tag. The other option, which I know works, is to expose a method on your action which you can then

Issues in Struts 2 and WASCE

2010-12-01 Thread Swapnil Raverkar
Hi, We are observing issues in our Struts 2 based application, when deployed on WAS-CE server. Details are as follow:- Struts 2 version : 2.0.11.1 Platform : Suse Linux App. Server : WAS-CE 2.1.1.4 We are observing a behaviour that the request paramaters (i.e http post/get params) are not