Warning message when setting BigDecimal to list of bean

2009-09-08 Thread Steven Yang
Hi I have a bean like public class Account { private String type; private String name; private BigDecimal value1; private BigDecimal value2; private BigDecimal value3; //getter, setters } in my action i have public class TestAction extends ActionSupport { private List ac

Re: how to get the result of a form inside of a sx:tabbedpanel div?

2009-09-08 Thread Ignacio Enriquez
I could run the project with maven and I am looking here http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html and trying to something similar. I show a list of files (each one with a id) in a table. also each one has a EDIT button, which is supposed to show more detailed info and c

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Musachy Barroso
I stand corrected. For some (unknown) reason I always thought that interceptors and results where created by Class.forName(...) musachy On Tue, Sep 8, 2009 at 6:37 PM, Musachy Barroso wrote: > nope. > > On Tue, Sep 8, 2009 at 6:32 PM, James Carr wrote: >> Couldn't I just make it ApplicationContex

Re: [Struts 1.2]Validation and multiple struts-config files

2009-09-08 Thread Ashish Kulkarni
HiAny ideas? On Fri, Aug 28, 2009 at 11:42 AM, Ashish Kulkarni < ashish.kulkarn...@gmail.com> wrote: > HiIf i have 2 struts-config.xml file can i have ValidatorPlugIn tag in > both struts-config.xml file, will this work?? > > I ran into some issue trying to do so, i was getting could not find >

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Wes Wannemacher
On Tuesday 08 September 2009 09:32:19 pm James Carr wrote: > Couldn't I just make it ApplicationContextAware? > > On Tue, Sep 8, 2009 at 8:27 PM, Musachy Barroso wrote: > > WebApplicationContextUtils.getRequiredWebApplicationContext(ServletAction > >Context.getServletContext()); You *can* make it

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Musachy Barroso
nope. On Tue, Sep 8, 2009 at 6:32 PM, James Carr wrote: > Couldn't I just make it ApplicationContextAware? > > On Tue, Sep 8, 2009 at 8:27 PM, Musachy Barroso wrote: >> WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); >> >> On Tue, Sep 8, 2009

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
Couldn't I just make it ApplicationContextAware? On Tue, Sep 8, 2009 at 8:27 PM, Musachy Barroso wrote: > WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); > > On Tue, Sep 8, 2009 at 6:12 PM, James Carr wrote: >> I can try it out... how can I ma

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Musachy Barroso
WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); On Tue, Sep 8, 2009 at 6:12 PM, James Carr wrote: > I can try it out... how can I make the bean factory available to my > interceptor? > > Thanks, > James > > On Tue, Sep 8, 2009 at 6:12 PM, Wes

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
I can try it out... how can I make the bean factory available to my interceptor? Thanks, James On Tue, Sep 8, 2009 at 6:12 PM, Wes Wannemacher wrote: > I guess I sort of misunderstood your problem. Another approach would > be to retrieve the beans in an interceptor and push them onto the > value

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Wes Wannemacher
I guess I sort of misunderstood your problem. Another approach would be to retrieve the beans in an interceptor and push them onto the value stack. As long as you give them a name they should be available from the view. This approach will keep you from changing any of the action code. If you want t

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
Eh, that's the more complicated way... struts2 autowires by name, no need to implement ApplicationContextAware. I think people are missing the point. I got it working just fine by adding 10 properties to my action with appropriate getters and setters, but I'm trying to sneak around having to add t

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Marty Milligan
On Tue, Sep 8, 2009 at 5:55 PM, James Carr wrote: > Yeah, I was looking for a way around it... these are simple hash maps > that are used to display select options. I wound up with an action > with 5 Maps in it :( If it were me, this is what I would do. First,use a Spring object factory in your S

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
Yeah, I was looking for a way around it... these are simple hash maps that are used to display select options. I wound up with an action with 5 Maps in it :( Thanks, James On Tue, Sep 8, 2009 at 4:26 PM, Wes Wannemacher wrote: > You could use the @Autowire annotation directly on a property... But

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread Wes Wannemacher
You could use the @Autowire annotation directly on a property... But I don't really see how that is better than using setter-based injection. Just because the beans are singletons doesn't mean anything special, you still need a reference to them in your struts action. -Wes On Tue, Sep 8, 2009 at

Re: [S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
I suppose I may use this: http://wiki.opensymphony.com/display/ABLE/Expose+Spring+Beans+in+JSP But I really wish/hope that struts2 has something built in. Thanks, James On Tue, Sep 8, 2009 at 4:13 PM, James Carr wrote: > I have several singleton based beans defined in my > applicationContext.xml

[S2] Accessing objects in the Spring context?

2009-09-08 Thread James Carr
I have several singleton based beans defined in my applicationContext.xml and I'd like to just use these rather than being forced to set them on my action. is there any way to accomplish this? Thanks, James - To unsubscribe, e-ma

Re: [S2] DEBUG NPE

2009-09-08 Thread doug Shi
Hi Ken, I encountered the same problem. Did you find the solution yet? Thanks Doug - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Problem with empty values

2009-09-08 Thread Dale Newfield
Mileidys Gonzalez Prieto wrote: ${relation.address[st.index].extraInfo} This sets a value in a map that goes along with the valuestack. maxlength="20" size="15"> This is not how you fetch that value. use %{#value} to get the value set with s:set. -Dale -

Re: how to get the result of a form inside of a sx:tabbedpanel div?

2009-09-08 Thread Ignacio Enriquez
Thanks Dave I actually found a very useful sample project from here http://cwiki.apache.org/S2WIKI/struts-2-spring-2-jpa-ajax.html or http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html There, the apache people seems to be using s:a tag "targets" attribute to put the result in the

Struts2Builder 0.3.0 has been released

2009-09-08 Thread Thomas Sattler
Greetings all. I have posted a new release of Struts2Builder over at SourceForge. Struts2Builder is a Java code generation system. It will log into an existing Postgres or MySql database, examine the metadata, and automatically generate a real, live, functioning Struts2 / Spring / Hibernate CRUD

Re: how to get the result of a form inside of a sx:tabbedpanel div?

2009-09-08 Thread Dave Newton
Ignacio Enriquez wrote: Martin, Could you be more specific? *sigh* I think that what I need is not update is actually reload a new content inside the div. (this content is not static, it depends > on the initial form input) You don't show the form at all. Did you try using the form submit

Re: struts newbie validate

2009-09-08 Thread Dave Newton
acastanheira2001 wrote: Any ideas? Don't validate before the form is submitted. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

RE: Struts2 - ScopedModelDriven - Unable to update the model and set the latest Model data in session

2009-09-08 Thread Raghuveer.V
This is working after using correct jar file, "struts2-core-2.1.6" jar. _ From: Raghuveer.V [mailto:raghuve...@infotechsw.com] Sent: Wednesday, August 19, 2009 6:55 PM To: 'user@struts.apache.org' Subject: Struts2 - ScopedModelDriven - Unable to update the model and set the latest Mod

Re: [S2] i18n for lists/maps

2009-09-08 Thread Zoran Avtarovski
I just want to get a couple things straight: 1. Your state names are in localised properties files 2. The properties files are available to struts2 either via struts.custom.i18n.resources or convention (read don’t ask) If you app satisfies these two points then the method I mentioned will work fi

Re: struts newbie validate

2009-09-08 Thread acastanheira2001
Hi, Any ideas? acastanheira2001 wrote: > > Hi, > > I have to server-side validate user input data in a production system. > > Here are some code snippets: > > struts-config.xml > > > > type="MyClassAction" > validate="false" > parameter="method" >

Struts2 FTL tag attributes

2009-09-08 Thread strutstwouser
The documentation at http://struts.apache.org/2.x/docs/freemarker-tags.html says we can have arbitary parameters like <@s.url value="somePage" personId="${personId}"/> . I tried this for s:select tag and am able to access the parameters within select.ftl (since i needed to do some custom processin