Re: Validation doubt

2008-06-30 Thread Narayana S
Hi Jeromy and Lukasz, Thanks for your reply, the information provided by you is really helpful. i could understand well about validation framework with your explanation. Thanks a lot. On Mon, Jun 30, 2008 at 1:45 PM, Jeromy Evans < [EMAIL PROTECTED]> wrote: > Narayana S wrote: > >>

Re: [S2] Pre-populating Checkboxes

2008-06-30 Thread Nuwan Chandrasoma
Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to display in as check box values. eg:- private List skills; public List getSkills() { return skills; } public void prepare() throws E

Re: [S2] and the scripts paths

2008-06-30 Thread Pierre Thibaudeau
2008/6/30 Musachy Barroso <[EMAIL PROTECTED]>: > "struts" maps to a folder inside the struts-core jar. Those files are > used for validation and are not related to dojo (nothing to do with > "head" tag) > Thank you, Musachy, for the "head's up"! Though I must add that, within that setup, javascr

Re: [S2] and the scripts paths

2008-06-30 Thread Musachy Barroso
"struts" maps to a folder inside the struts-core jar. Those files are used for validation and are not related to dojo (nothing to do with "head" tag) musachy On Mon, Jun 30, 2008 at 10:01 PM, Pierre Thibaudeau <[EMAIL PROTECTED]> wrote: > I am playing with Struts 2.1.2. (I have seen several oth

[S2] and the scripts paths

2008-06-30 Thread Pierre Thibaudeau
I am playing with Struts 2.1.2. (I have seen several other related topics on this mailing list but nothing quite explicitely about what follows.) I add the following tag inside the : Unsurprisingly, this yields the following in the html: // Dojo configuration djConfig = { isDebug: true, bin

Re: [struts] Slow performance with Struts2

2008-06-30 Thread DNewfield
yorlick kilroy wrote: > thx! you made my day :-) that did the trick! > replacing freemarker 2.3.8 with 2.3.13 speeded up my application by almost > 100% Could you re-run your OGNL 2.6.11 vs. 2.7.2 tests with freemarker 2.3.13 in place, and see if the "upgrade" is still a performance "downgrade" a

[S2] Pre-populating Checkboxes

2008-06-30 Thread David Ogasawara
Hello, I'm new to Struts 2 and I was wondering how to pre-populate checkboxes with values from a database (or even hard-coded values). I am iterating through an arraylist of hashmaps (description, type_cd) to create the checkboxes in the form. I then create a string array with the values from a

Re: Where are the @Result,@Results annotations in Struts 2.1.2

2008-06-30 Thread Musachy Barroso
Yes, you are missing struts2-codebehind-plugin. musachy On Mon, Jun 30, 2008 at 5:28 PM, olivne <[EMAIL PROTECTED]> wrote: > > Dear Al, > > I know about this url, but it doesn't work for me. Am I missing a maven > dependency? Here are my struts dependencies in my maven pom.xml : > > ... >

Re: Where are the @Result,@Results annotations in Struts 2.1.2

2008-06-30 Thread olivne
Dear Al, I know about this url, but it doesn't work for me. Am I missing a maven dependency? Here are my struts dependencies in my maven pom.xml : ... org.apache.struts struts2-core 2.1.2

Unit Testing Struts 2 Actions

2008-06-30 Thread Greg Lindholm
I've spent a lot of time in the debugger over the last few days trying to figure out how to unit test struts 2 actions with the Interceptor stack so that validation and results configuration etc. were also tested. I wrote a unit test helper class and posted it and a description here Unit Testin

RE: Struts 2 - Repopulate controls when validation fails

2008-06-30 Thread bob fuller
Setting the s:action's ignoreContextParams to true partially resolves the issue I am having. Here's my pseudo jsp now... s:form name="myAction" s:textfield name="foo0"/ s:action name="languages" ignoreContextParams="true" executeResult="true"/ s:textfield name="foo1"/ s:submit/ /s:form Now, the

Re: Struts 2 + Ajax and Back Button

2008-06-30 Thread cree
Owen Berry wrote: > > Dojo 0.4 back button support: > > http://dojotoolkit.org/book/dojo-book-0-4/part-7-utilities/back-button-and-bookmarking > > What version of Dojo is included with Struts 2.0.11? Is it 0.4? > > >From my readings it supported 0.4.x, dave mentioned possibly 0.4.5. Thank

Re: Struts 2 + Ajax and Back Button

2008-06-30 Thread Owen Berry
Dojo 0.4 back button support: http://dojotoolkit.org/book/dojo-book-0-4/part-7-utilities/back-button-and-bookmarking What version of Dojo is included with Struts 2.0.11? Is it 0.4? On Mon, Jun 30, 2008 at 2:15 PM, cree <[EMAIL PROTECTED]> wrote: > > Thank you all for your replies. > > I guess at

Re: Struts 2 + Ajax and Back Button

2008-06-30 Thread cree
Thank you all for your replies. I guess at this point I would ask if there is any back button fix at all under struts 2? Or should I go with: Musachy Barroso wrote: > > Just to confirm what Dave said, do not mix Dojo versions. If you need > Dojo 1.x, you are better off not using the s2 ajax t

Re: action param-element not working ?

2008-06-30 Thread Lukasz Lenart
2008/6/30 Hanson Char <[EMAIL PROTECTED]>: > On the other hand, if a param-element is specified in an action, shouldn't > it just work as expected ? What is the rationale behind requiring the user > to further configure a staticParams interceptor in order to get the > param-element to work ? Or i

Re: Struts 2 + Ajax and Back Button

2008-06-30 Thread Musachy Barroso
Just to confirm what Dave said, do not mix Dojo versions. If you need Dojo 1.x, you are better off not using the s2 ajax tags at all. musachy On Mon, Jun 30, 2008 at 1:23 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Mon, 6/30/08, cree <[EMAIL PROTECTED]> wrote: >> I guess in short I am loo

Re: Struts 2 + Ajax and Back Button

2008-06-30 Thread Dave Newton
--- On Mon, 6/30/08, cree <[EMAIL PROTECTED]> wrote: > I guess in short I am looking to see if there is any way > that I can utilize the back.js in the other jsp or throughout > the two jsp's or if there is support in struts 2.0.11's dojo toolkit. S2 currently uses Dojo 0.4.3 (give or take). I'd

Struts 2 + Ajax and Back Button

2008-06-30 Thread cree
Hello All, I am attempting to resolve the ajax back button problem and have gotten into a situation. I am using struts v 2.0.11 and I know it comes with its own dojotoolkit. However I cannot find any support for the back button. I looked throughout and found dojotoolkit v1.1 and downloaded it.

Re: action param-element not working ?

2008-06-30 Thread Hanson Char
On the other hand, if a param-element is specified in an action, shouldn't it just work as expected ? What is the rationale behind requiring the user to further configure a staticParams interceptor in order to get the param-element to work ? Or is this just an accidental/convenient decision ? Ha

Re: action param-element not working ?

2008-06-30 Thread Hanson Char
That works! Thanks :) On Mon, Jun 30, 2008 at 1:16 AM, Lukasz Lenart <[EMAIL PROTECTED]> wrote: > Hi, > > Did you use stack with > class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/> > ? > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > --

Re: Where are the @Result,@Results annotations in Struts 2.1.2

2008-06-30 Thread Al Sutton
http://struts.apache.org/2.1.2/docs/result-annotation.html Oren Livne wrote: Dear All, I am trying to use @Result and @Results with struts 2.1.2 (configured via maven dependencies). I can't find it anywhere. Has it been moved or deprecated? Is there a link with more info on that? Thanks, Oren

Re: Retrieve an hashtable entry within a jsp using struts tag and a bean as the key

2008-06-30 Thread Paolo Niccolò Giubelli
I'm sorry, but I'm still unable to do that. Ciro Montanino ha scritto: Try to use jstl tag library to read HashTable contents. On Mon, Jun 30, 2008 at 4:29 PM, Paolo Niccolò Giubelli < [EMAIL PROTECTED]> wrote: - To unsubscrib

[s] Validity of user session

2008-06-30 Thread Milan Milanovic
Hi, I have an SessionAware-based action class, where I put some variables into session when user came to the page which is backed up with that action class. I'm wondering what is validity of that session object, because I'm not sure if I have possibility to clear user session ? So I need to know

[S2] adding serialVersionUID to actions

2008-06-30 Thread Gabriel Belingueres
Hi, Is there any value in adding the serialVersionUID to all our actions? My idea is just to add a @SupressWarning("serial") to each action. AFAIK, the actions are newly created in each request and are never put into session or application scope (by Struts itself at least). Any ideas of why the

Re: Retrieve an hashtable entry within a jsp using struts tag and a bean as the key

2008-06-30 Thread Ciro Montanino
Try to use jstl tag library to read HashTable contents. On Mon, Jun 30, 2008 at 4:29 PM, Paolo Niccolò Giubelli < [EMAIL PROTECTED]> wrote: > Hi! > I need a little help. I'm writing a jsp using struts tags and in my > ActionForm class I put an Hashtable containing keys and values (both are > pojo

Where are the @Result,@Results annotations in Struts 2.1.2

2008-06-30 Thread Oren Livne
Dear All, I am trying to use @Result and @Results with struts 2.1.2 (configured via maven dependencies). I can't find it anywhere. Has it been moved or deprecated? Is there a link with more info on that? Thanks, Oren -- ==

Re: [S2] adding interceptor to all my actions

2008-06-30 Thread Paweł Wielgus
Hello Vanja, i'm aware of such solution, but as You sad it's a dirty hack and as for hacks - they tend to work only for a few next releases. So You have to keep in mind that it will fail in let's say 2.1.4 because of some changes to the stack or interceptors and thats exactly why we din't make it

JAZN Exception when posting form with ecntype="multipart/form-data"

2008-06-30 Thread Dimitris Mouchritsas
Hi all, we've recently upgraded our j2ee application to use struts 1.3.8 and we're getting a weird exception when trying to upload a file. Here's the jsp: testFileUpload.jsp = <%@ page contentType="t

RE: Struts2 + applicationContext.xml

2008-06-30 Thread Brad A Cupit
Lukasz Lenart wrote: > Exactly, first, Struts (default object factory) will > create action object and then it will *ask* Spring > to inject depended beans, base on applicationConfig.xml. > I'm just wondering, if there any drawbacks for this? The only one I can think of is that your actions wouldn

Retrieve an hashtable entry within a jsp using struts tag and a bean as the key

2008-06-30 Thread Paolo Niccolò Giubelli
Hi! I need a little help. I'm writing a jsp using struts tags and in my ActionForm class I put an Hashtable containing keys and values (both are pojos). I can get my hashtable in this way: The key is also a bean, obtained through a (working) logic:iterate: How can I retrieve a value from h

Re: [S2] adding interceptor to all my actions

2008-06-30 Thread Vanja Petreski
Hello Paweł, I have workaround: 1) Delete struts-default.xml from struts2 core jar 2) Move them to your application classpath 3) Rename existing struts-default to struts-default-original 4) At the end define your own package and call it struts-default: and put all your settings here (define y

Re: Where does o.a.s2.spring.interceptor.SessionContextAutowiringInterceptor live?

2008-06-30 Thread Musachy Barroso
First time I hear about it, it should be in the spring plugin in any case. musachy On Mon, Jun 30, 2008 at 8:41 AM, Dave Newton <[EMAIL PROTECTED]> wrote: > It's referenced in the Spring plugin config but I don't see it anywhere. > > Thanks, > Dave > > > --

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Alberto A. Flores
Have you considered using the @Controller annotation (stereotype) on all Struts2 Actions (this way, Spring knows the bean id name). You can always control the scoping of the object @Controller("fooAction") @Scope("request") public class MyFooAction { } I found this a cleaner (and easier) way

Re: Spring Security and Struts2 Using tiles

2008-06-30 Thread Alberto A. Flores
I had to put those efforts on the side as it was in a prototype and proof of concept phase. However, I have just began (today) to officially make serious effort into making it work (if at all possible) for our project. I should have a better answer by the end of the day... but any feedback woul

Where does o.a.s2.spring.interceptor.SessionContextAutowiringInterceptor live?

2008-06-30 Thread Dave Newton
It's referenced in the Spring plugin config but I don't see it anywhere. Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Frans Thamura
> I'm not sure what you're asking, but actions not defined in the Spring config > file will still be injected by beans that *are* in the Spring config file. > i think the idea to make the action package inside spring i have experience, writing action is another bored repeated job -

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Lukasz Lenart
>> But in such way, first action will be created by Struts and >> then Spring will inject dependency to it, does it? > I'm not sure what you're asking, but actions not defined in the Spring config > file will still be injected by beans that *are* in the Spring config file. Exactly, first, Struts

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Dave Newton
--- On Mon, 6/30/08, Lukasz Lenart wrote: > I said: >> Actually, you don't. If you're using Spring as >> the object factory and are auto-wiring by name >> (which can, on occasion, lead to spectacular >> debugging opportunities) it's not necessary to >> define the actions, AFAICT. > > But in such

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Lukasz Lenart
> Actually, you don't. If you're using Spring as the object factory and are > auto-wiring by name (which can, on occasion, lead to spectacular debugging > opportunities) it's not necessary to define the actions, AFAICT. But in such way, first action will be created by Struts and then Spring will

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Dave Newton
--- On Mon, 6/30/08, Lukasz Lenart wrote: >> Do I have to defined EVERY action in applicationContext.xml ? > Yes if you want to create them by Spring and remember to > use name defined in applicationContext.xml as class in struts.xml Actually, you don't. If you're using Spring as the object factor

Re: Struts2 + applicationContext.xml

2008-06-30 Thread Lukasz Lenart
> Do I have to defined EVERY action in applicationContext.xml ? Yes if you want to create them by Spring and remember to use name defined in applicationContext.xml as class in struts.xml Regards -- Lukasz http://www.lenart.org.pl/ ---

Struts2 + applicationContext.xml

2008-06-30 Thread Kibo
Hi konference I use Struts2 + Spring. I deployed the "Struts 2 - Maven Archetype - Starter" In file applicationContext.xml is defined bean - helloWorldAction. I read that Struts2 expects that each action is a new instance. Therefore is there : singleton="false" Do I have to de

Re: action param-element not working ?

2008-06-30 Thread Lukasz Lenart
Hi, Did you use stack with ? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Validation doubt

2008-06-30 Thread Jeromy Evans
Narayana S wrote: Hi, as per my understanding, we can implement validations in struts 2 in the following ways... 1. overriding validate() method in Action class Use the validate() method for complex validation that cannot be implement anywhere else. You want to avoid duplicating valid

Re: Validation doubt

2008-06-30 Thread Lukasz Lenart
Hi, > what is the clear difference between these 3 approaches? Annotations and XML allow you to only use defined validators, with validate() method you can do anything you want, base your validation on more complicated business rules. > and how can i implement client side validations in struts

Re: for review - split content type handler manager in REST plugin

2008-06-30 Thread Jeromy Evans
Jeromy Evans wrote: Could someone with an interest in the REST plugin please glance at the changes I've committed for WW-2641 oops, that was meant for struts-dev. I'll cross-post there. - To unsubscribe, e-mail: [EMAIL PROTE

Re: Struts2 - OGNL Calling static method

2008-06-30 Thread Jeromy Evans
Ramanathan RV wrote: Hello I wish to call a static method from the view and make the results available to my view. I believed I would have to do something like this to achieve that : The above piece of code indeed calls the method. But the result doesnt get set on the variable as expected. Am

for review - split content type handler manager in REST plugin

2008-06-30 Thread Jeromy Evans
Could someone with an interest in the REST plugin please glance at the changes I've committed for WW-2641 The change allows a different content-type in the request than the response. This was added specifically to allow a x-www-form-urlencoded request with a response in a different content-ty

Struts2 - OGNL Calling static method

2008-06-30 Thread Ramanathan RV
Hello I wish to call a static method from the view and make the results available to my view. I believed I would have to do something like this to achieve that : The above piece of code indeed calls the method. But the result doesnt get set on the variable as expected. Am I missing something he

Validation doubt

2008-06-30 Thread Narayana S
Hi, as per my understanding, we can implement validations in struts 2 in the following ways... 1. overriding validate() method in Action class 2. writing ActionClass-validation.xml file 3. using validator annotations validate method implements declarative security, ActionClass-valication.xml

action param-element not working ?

2008-06-30 Thread Hanson Char
Hi, I tried to inject some values to an action via the param-element, but it doesn't seem to be working. See example config below. I set a breakpoint with a debugger, and the setter methods of the two properties (minValue and maxDecimalPlaces) don't ever get invoke, even though the "myMethod" di