Pagination with struts 2.x

2009-03-18 Thread mahanare
Hi, What is the best approach to display database table content page wise using struts 2? We used display tag few years back, but there seems another taglib pager taglib. Is pager tag lib a better option or is there any inherent support in struts 2 for paging? Thanks harinath -- View this m

[S2] encode attribute of : correct encoding?

2009-03-18 Thread Pierre Thibaudeau
I fail to understand how to use the "encode" attribute of the . Here's an example that puzzles me... Let's try, alternately, to set "encode" to "true" and "false". Here goes:    Élizabeth yields:     /myAction?entityName=%C3%83%C2%89lizabeth while    Élizabeth yields     /myAction?entityNa

Re: Type conversion exceptions

2009-03-18 Thread musomesa
I got your code to run (paseted below). Just so I am sure I am doing what you are trying to do: 1. I made no changes to Setter or SetterList so that I don't break your design. Only to the action and the jsp 2. I assume what you want is to be able to display and edit and create the settings (I

Jetty 6.x vs Tomcat 6.x

2009-03-18 Thread stanlick
Guys -- I have a loaded (Hibernate, Spring, Tiles) S2.1.6 application running on TC 6 and I want to speed up the development cycle. I have exhausted the trials to get TC 6.x to dynamically reload modified class changes and have reached the point where I have installed Jetty 6.x. My application

Re: File upload, validation and Preparable

2009-03-18 Thread Greg Lindholm
BTW That's Struts 2.1.6 and Tomcat 5.5. Greg Lindholm wrote: > > Got a couple questions about file uploading. > > I've discovered that in the standard interceptor stack "fileUpload" is > after "prepare" interceptor. This means that the upload File, ContentType, > and FileName setters have not

File upload, validation and Preparable

2009-03-18 Thread Greg Lindholm
Got a couple questions about file uploading. I've discovered that in the standard interceptor stack "fileUpload" is after "prepare" interceptor. This means that the upload File, ContentType, and FileName setters have not been called before prepare() method runs.  Is there a good reason for this

Re: struts 2.1.6 verbose logging

2009-03-18 Thread Musachy Barroso
When a property is not found, it is logged, which causes all those warnings, as for myself I find them very annoying. I have a patch somewhere collecting dust, that throws exceptions when a property is not found, or there is an error evaluating an expression in a tag. I think we should take that ro

struts 2.1.6 verbose logging

2009-03-18 Thread hernan gonzalez
"Struts 2.1 introduces more verbose logging than Struts 2.0. While extremely valuable, some users may find these annoying." http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html The extremely annoying thing is that struts 2.1 emits those warnings (apparently) f

Re: [S2] Struts 2 + Spring 2 + JPA example uses @PersistenceContext - is this a "bad thing"??

2009-03-18 Thread Burton Rhodes
Many thanks for your efforts. I do have everyting in appcontext file. I am using @Transactional and I am not using jpasupport. Let me know what you find out and if jpasupport is necessary. On 3/18/09, Wes Wannemacher wrote: > I haven't read that blog post, but I do know that Spring treats > @Pers

Re: struts 2.1.6 jar sizes

2009-03-18 Thread Musachy Barroso
fixed in xwork trunk. http://jira.opensymphony.com/browse/XW-684. The size is 713 kb now. thanks for reporting musachy On Wed, Mar 18, 2009 at 1:50 PM, Musachy Barroso wrote: > That is a good catch. I don't think we need it and it is there because > the groupid is wrong in the maven shade config

Re: [S2] Struts 2 + Spring 2 + JPA example uses @PersistenceContext - is this a "bad thing"??

2009-03-18 Thread Wes Wannemacher
I haven't read that blog post, but I do know that Spring treats @PersistenceContext differently than an EJB container. If you've configured everything within applicationContext.xml, rather than in the AppServer, and if you are extending JpaDaoSupport then I would think it should work properly. I wi

Re: [S2] Struts 2 + Spring 2 + JPA example uses @PersistenceContext - is this a "bad thing"??

2009-03-18 Thread Musachy Barroso
I have no idea :) musachy On Wed, Mar 18, 2009 at 1:52 PM, Burton Rhodes wrote: > Any thoughts on how this would affect the > OpenEntityManagerInViewFilter?  I assume if you create a new EM for > each service/dao operation, the objects would become detached after > each method thus giving you a

Re: [S2] Struts 2 + Spring 2 + JPA example uses @PersistenceContext - is this a "bad thing"??

2009-03-18 Thread Burton Rhodes
Any thoughts on how this would affect the OpenEntityManagerInViewFilter? I assume if you create a new EM for each service/dao operation, the objects would become detached after each method thus giving you a lazy exception for anything in the view - rendering the OpenEntityManagerInViewFilter usele

Re: struts 2.1.6 jar sizes

2009-03-18 Thread Musachy Barroso
That is a good catch. I don't think we need it and it is there because the groupid is wrong in the maven shade config: aspectj:aspectjrt aspectj:aspectjweaver it should be: org.aspectj:aspectjrt org.aspectj:aspectjweaver musachy On Wed, Mar 18, 2009 at 1:33 PM, hernan gonzalez wro

Re: [S2] Struts 2 + Spring 2 + JPA example uses @PersistenceContext - is this a "bad thing"??

2009-03-18 Thread Musachy Barroso
I had no idea it was not thread safe, in that case it is probably a good idea to get factory and create an entity manager every time. musachy On Wed, Mar 18, 2009 at 1:30 PM, Burton Rhodes wrote: > I set up the example for "Struts 2 + Spring 2 + JPA + AJAX" using the > OpenEntityManagerInViewFil

struts 2.1.6 jar sizes

2009-03-18 Thread hernan gonzalez
I've just upgraded from 2.0.14 to 2.1.6. Everything smooth so far. I'm a little concerned about the jar sizes. Previuosly, we had a huge struts2-core-2.0.14.jar, 2.21 MB, most of it from the static/ folder (for dojo); now that dojo has been factored out from the core (wise move) struts2-core-2.1.

[S2] Struts 2 + Spring 2 + JPA example uses @PersistenceContext - is this a "bad thing"??

2009-03-18 Thread Burton Rhodes
I set up the example for "Struts 2 + Spring 2 + JPA + AJAX" using the OpenEntityManagerInViewFilter from the Struts website and all works well. (http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html). It appears this example uses the @PersistenceContext annotation to inject the Enti

RE: Required field only works with text fields?

2009-03-18 Thread Griffith, Michael *
Dave, Thanks for the suggestion, I changed the validator to read as: @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch=FetchType.EAGER) @JoinColumn(name = "STATUS") @FieldExpressionValidator(message = "Default message", key="validate.status", expression = "status != null") publ

Re: Sitemesh 2.4 and Struts 2.0.14

2009-03-18 Thread Musachy Barroso
I don't think anyone is, if you find a fix, we would appreciate a patch :) musachy On Wed, Mar 18, 2009 at 10:32 AM, Dan Slack wrote: > Hi, > > > > First, I apologize if this has already been mentioned, but I recently > attempted to upgrade to Sitemesh 2.4 to bad results.  I guess in Sitemesh >

Re: redirect parameters lost when using convention plugin 2.1.6

2009-03-18 Thread Musachy Barroso
Fixed in trunk. Jira ticket: https://issues.apache.org/struts/browse/WW-3046 thanks for reporting musachy On Wed, Mar 18, 2009 at 9:42 AM, Musachy Barroso wrote: > The problem is that "redirect" does not not use "params", only > "redirect-action" does. So to use redirect, you need to do somethin

Sitemesh 2.4 and Struts 2.0.14

2009-03-18 Thread Dan Slack
Hi, First, I apologize if this has already been mentioned, but I recently attempted to upgrade to Sitemesh 2.4 to bad results. I guess in Sitemesh 2.4, the "PageFilter" was deprecated, and all code has been removed. This means that "applyDecorators" method is not being called anymore, which m

Re: Type conversion exceptions

2009-03-18 Thread ryangr
Here is the converter code: http://pastie.org/419709 Obviously it isn't doing anything other than outputting the values being passed in, but none of the values contain anything yet as the parameters are getting lost somewhere so there's no point in processing them yet. musomesa wrote: > > I h

Re: redirect parameters lost when using convention plugin 2.1.6

2009-03-18 Thread Musachy Barroso
The problem is that "redirect" does not not use "params", only "redirect-action" does. So to use redirect, you need to do something like(or set "location" in the annotation): /someurl.action?myparam=%{somevalue} and yeah, the documentation is wrong, and this is not consistent. I will update redir

Re: Type conversion exceptions

2009-03-18 Thread musomesa
I have downloaded your code and will study it so that I don't misunderstand. Can you also post the converter? If I see it I might?suggestions that fit what you are doing better. Chris -Original Message- From: Lukasz Lenart To: Struts Users Mailing List Sent: Wed, 18 Mar 2009 6:10 pm

Re: Type conversion exceptions

2009-03-18 Thread Lukasz Lenart
2009/3/18 : > But then how do you plan to write a converter to convert a String[] to a > SettingList? It's already done, just to the configuration has to be adjusted > Also why is aggregation a bad design? It isn't but exposing directly internal field (ArrayList) it is. Regards -- Lukasz ht

Re: Type conversion exceptions

2009-03-18 Thread musomesa
But then how do you plan to write a converter to convert a String[] to a SettingList? Also why is aggregation a bad design? Regards Chris M -Original Message- From: Lukasz Lenart To: Struts Users Mailing List Sent: Wed, 18 Mar 2009 5:50 pm Subject: Re: Type conversion exceptions 200

Re: Type conversion exceptions

2009-03-18 Thread Lukasz Lenart
2009/3/18 : > My bad -- I didn't realize SettingList extends ArrayList. Suggestion: make it > aggregation so that SettingList has a property of type ArrayList and > your type conversion problems will go away. In such case SettingList is useless, it will be bad design Regards -- Lukasz http:/

Re: Type conversion exceptions

2009-03-18 Thread musomesa
My bad -- I didn't realize SettingList extends ArrayList. Suggestion: make it aggregation so that SettingList has a property of type ArrayList and your type conversion problems will go away. Chris -Original Message- From: ryangr To: user@struts.apache.org Sent: Wed, 18 Mar 2009 6

Re: Type conversion exceptions

2009-03-18 Thread Lukasz Lenart
2009/3/17 ryangr : > [xwork-conversion.properties] > Element_settings=com.rjssoft.webdocs.setting.Setting That's ok but your SettingList is not full List implementation and you have to specified how to convert array to SettingList that's why you have to specified also converter for SettingList abo

Re: Type conversion exceptions

2009-03-18 Thread musomesa
This line is the problem: com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter You only need to define the converter for a Setting object and not for SettingList Also, spaces around the '=' sign are mandatory Cheers Chris M? > >> com.rjssoft.webdocs.s

Theme Selection Options

2009-03-18 Thread Muthu Velappan
Hi, I have a jsp with a custom theme set on my form tag like this . "myxhtml" is our custom theme extends xhtml theme. I extended the Struts2 basic TextFieldTag to toggle it based on the custom visible property. Everything is working fine but I end up getting a empty row b/w two controls if th