Re: How to use pattern matching wild-card in action names?

2008-10-10 Thread Binil Thomas
To answer my own question - wildcards do not seem to work if the namespace is /. I tried adding a namespace and it works. Can someone explain why this is so? struts constant name=struts.enable.SlashesInActionNames value=true/ constant name=struts.action.extension value=/

Re: Loading Action dynamically

2008-10-10 Thread Lukasz Lenart
2008/10/10 Frans Thamura [EMAIL PROTECTED]: i want to make struts app as modular as struts2 plugins So, than just write your app modules as a Struts2 plugins, each has it's own struts-plugin.xml which is the same as struts.xml. Regards -- Lukasz http://www.lenart.org.pl/

Alternatives to DisplayTag

2008-10-10 Thread Pat
Hi All, I'm just wandering if anybody here has some experience with some 'grid tags'. I've been always using DisplayTag - it's very good table tag with paging, sorting and export features built-in. Has anybody got some more experience with some other tags? Any recommendations? Thanks, Pat

Re: Struts 2 CRUD Question

2008-10-10 Thread stanlick
No. Hibernate will not affect Struts's action creation. You don't by chance have your action is Spring do you? If so, make sure the scope is prototype or you will see the same action instance over and over. Scott On Fri, Oct 10, 2008 at 6:49 AM, Gawain Hammond [EMAIL PROTECTED]wrote:

Re: Struts 2 CRUD Question

2008-10-10 Thread Alberto Flores
Don't you mean scope=request and not prototype? [EMAIL PROTECTED] wrote: No. Hibernate will not affect Struts's action creation. You don't by chance have your action is Spring do you? If so, make sure the scope is prototype or you will see the same action instance over and over. Scott On

Re: Struts 2 CRUD Question

2008-10-10 Thread Dave Newton
--- On Fri, 10/10/08, Alberto Flores [EMAIL PROTECTED] wrote: Don't you mean scope=request and not prototype? No, prototype is the correct scope for action beans. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Struts CRUD

2008-10-10 Thread jd1000
I cannot work the CRUD right. I have a UserAction with action methods ( createUser, updateUser...) and a User (id, name ...) object. The action contains an id, a user object and a ListUser object, implements Preparable and ModelDrivenUser Listing all users works ONLY when i put my users list to

Re: Struts 2 CRUD Question

2008-10-10 Thread Alberto Flores
So, from the Spring documentation: prototype: Scopes a single bean definition to any number of object instances. request: Scopes a single bean definition to the lifecycle of a single HTTP request; that is each and every HTTP request will have its own instance of a bean created off the back

RE: Struts 2 CRUD Question

2008-10-10 Thread Gawain Hammond
Strange, In the logs I can see a new Action instance being created for every request. However, for a given form object getting set on the Action, I'm seeing the same object instance is being set for every request. The only way I can get the expected behaviour is if I shut down tomcat between each

i18n Problem - properties not resolved at subsequent posts to the form if declared in package.properties

2008-10-10 Thread Torsten Krah
Hi, i've got a simple JSP displaying some i18n text: s:form method=post namespace=rules action=index s:text name=rule.name/ s:submit method=save cssClass=bg07 title=%{getText('button.save')} value=%{getText('button.save')} / /s:form struts.xml: package name=rules extends=view

Re: How to use pattern matching wild-card in action names?

2008-10-10 Thread Lukasz Lenart
Hi, If Struts2 couldn't find action in given namespace (/) it will try to find it in default namespace (/ is not default namespace), remove namespace declaration and try once again. Regards -- Lukasz http://www.lenart.org.pl/

Re: How to use pattern matching wild-card in action names?

2008-10-10 Thread Dave Newton
--- On Thu, 10/9/08, Binil Thomas wrote: I think I have not been able to coax Struts to have slashes in the name of action. Have you set the struts.enable.SlashesInActionNames property to true? Dave - To unsubscribe, e-mail:

RE: Session problem unidentified

2008-10-10 Thread Kawczynski, David
How does your action class get populated with a User object (or whatever it is that is saved incorrectly)? Does Spring have any role in the creation of that object? If so, what scope is that bean defined? What's the value of the key for this object when it is saved incorrectly? -Original

Re: Loading Action dynamically

2008-10-10 Thread Frans Thamura
On Fri, Oct 10, 2008 at 4:18 PM, Lukasz Lenart [EMAIL PROTECTED] wrote: 2008/10/10 Frans Thamura [EMAIL PROTECTED]: i want to make struts app as modular as struts2 plugins So, than just write your app modules as a Struts2 plugins, each has it's own struts-plugin.xml which is the same as

Re: any struts 2 unit testers out there?

2008-10-10 Thread Adam Hardy (struts)
I am unit testing my MVC layer and looking for the best way to override ActionSupport.getText() cleanly and efficiently for testing purposes (from a developer time point of view). Rather than reinventing the wheel, is there anything out there now that people are willing to share? (Did I miss it

Re: Loading Action dynamically

2008-10-10 Thread Lukasz Lenart
2008/10/10 Frans Thamura [EMAIL PROTECTED]: still dont get what is the different between plugins and develop based on Action Support No difference, plugins are predefined part of your application, that's all Regards -- Lukasz http://www.lenart.org.pl/

Issue using struts2 richtext editor

2008-10-10 Thread sheva j
Hi, I am using struts 2.0.11. In jsp I have written s:head theme=ajax debug = true/ s:textarea name=message theme=ajax/ All other options(Bold, italic etc.,) are working fine except format combo box. Whenever I change format option from 'normal' to anyother option such as fixedFont, in the

Re: Global-exception handler

2008-10-10 Thread stanlick
How about this instead -- Is the ActionContext exposed to a JSP other than using the static getContext() method? stanlick wrote: I have a global exception handler registered, which is itself an action mapping. I am trying to ascertain what happened by accessing

s:checkBox - (Un)Setting works, but ParametersInterceptor still issues an Error (Exception)

2008-10-10 Thread Torsten Krah
Using s:checkbox id=active name=currentRule.active / where my currentRule bean gots a boolean active with getter + setter. Setting, unsetting works but i am still getting this error: 17:24:55,198 ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor] ParametersInterceptor -

Re: Struts 2 CRUD Question

2008-10-10 Thread Dave Newton
--- On Fri, 10/10/08, Alberto Flores wrote: prototype: Scopes a single bean definition to any number of object instances. request: Scopes a single bean definition to the lifecycle of a single HTTP request; that is each and every HTTP request will have its own instance of a bean created off

Re: s:checkBox - (Un)Setting works, but ParametersInterceptor still issues an Error (Exception)

2008-10-10 Thread Dave Newton
Do you have the checkbox interceptor in your stack? Is it before your params interceptor? --- On Fri, 10/10/08, Torsten Krah [EMAIL PROTECTED] wrote: From: Torsten Krah [EMAIL PROTECTED] Subject: s:checkBox - (Un)Setting works, but ParametersInterceptor still issues an Error (Exception)

Re: s:checkBox - (Un)Setting works, but ParametersInterceptor still issues an Error (Exception)

2008-10-10 Thread Torsten Krah
Am Freitag, 10. Oktober 2008 17:37:44 schrieb Dave Newton: Do you have the checkbox interceptor in your stack? Is it before your params interceptor? I am using the included paramsPrepareParamsStack. There the first params interceptor is defined before the checkbox one and after the second

Re: Struts2 startup service/action

2008-10-10 Thread dchicks
Ron, this is a great tip! Thanks! I do have one question, though. Any idea how one might go about getting the Spring web context using this method? Normally, I would have extended ContextLoaderServlet. Our experience, so far, has been that it's nearly impossible to get another servlet to

duplicate tiles listener

2008-10-10 Thread Gianluca Musella
My web.sml seems ok, but the tomcat log trace this: 10-ott-2008 16.29.19 org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener org.apache.struts2.tiles.StrutsTilesListener is already configured for this context. The duplicate definition has been ignored. Someone can

RE: Struts2 startup service/action

2008-10-10 Thread Brad A Cupit
From: dchicks [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2008 1:03 PM Our experience, so far, has been that it's nearly impossible to get another servlet to play nice with Struts, though. You could try Spring's org.springframework.web.context.ContextLoaderListener instead of the

Re: s:checkBox - (Un)Setting works, but ParametersInterceptor still issues an Error (Exception)

2008-10-10 Thread Dave Newton
There shouldn't be any problems, but there's no real problems w/o the interceptor move or adding another one, either--it's just a higher-than-necessary log level. Dave --- On Fri, 10/10/08, Torsten Krah [EMAIL PROTECTED] wrote: From: Torsten Krah [EMAIL PROTECTED] Subject: Re: s:checkBox -

Re: Struts2 startup service/action

2008-10-10 Thread David C. Hicks
I've been working with ContextLoaderListener for a while this afternoon, but I think I have a problem with dependencies. The latest API docs on Spring indicate that you can get the current web application context from a static method on ContextLoader, but I'm stuck with version 2.0.3 due to

Re: Struts2 startup service/action

2008-10-10 Thread Ron Chan
I've not used Spring for a while so I can't answer your question directly. But all I'm trying to do is get access to something that would have been correctly initialized had I been under struts. i.e. my QuartzService example was already working under struts, I just wanted to make the scheduler

Re: Struts2 startup service/action

2008-10-10 Thread David C. Hicks
I see. Thanks for the feedback. Ron Chan wrote: I've not used Spring for a while so I can't answer your question directly. But all I'm trying to do is get access to something that would have been correctly initialized had I been under struts. i.e. my QuartzService example was already working

RE: Struts2 startup service/action

2008-10-10 Thread Brad A Cupit
David C. Hicks [mailto:[EMAIL PROTECTED] wrote I'm stuck with version 2.0.3 due to dependencies - I think because spring-jpa hasn't caught up Looks like spring-jpa has moved to spring-orm in 2.5 org.springframework spring-orm The ContextLoaderListener should work in Spring 2.0.x though. Have

Re: session based pojo as form variables

2008-10-10 Thread 928572663
Hello again. Still having problems with this one. The page displays the default values, but when I submit, the updated values aren't getting copied into the session form bean. If I remove the s:push tag and just reference each field independently it works ok. But when s:push is added

Re: session based pojo as form variables

2008-10-10 Thread Gabriel Belingueres
Because the textfield name is actually firstName, and because you don't have a setFirstName(String) method in your action, the parameter is never set. Either you have to: 1) write s:textfield name=formBean.firstName label=First Name size=16 / without the s:push, or 2) if you are more comfortable

Re: How to use pattern matching wild-card in action names?

2008-10-10 Thread Binil Thomas
Thanks Lukasz, using: package name=default extends=struts-default namespace= .. /package worked! Lukasz Lenart wrote: Hi, If Struts2 couldn't find action in given namespace (/) it will try to find it in default namespace (/ is not default namespace), remove namespace declaration and