Re: Struts2: Ajax Pagination using JQuery

2008-06-27 Thread David Durham, Jr.
On Fri, Jun 27, 2008 at 1:43 PM, Raghu <[EMAIL PROTECTED]> wrote: > Hi, I want to implement ajax pagination on my struts2 page but I am not sure > how to implement that. I am not very good in javascript and jquery but > learning them.. > You might be interested in something like this: http://webp

Re: Submitting a collection to Struts action

2008-06-27 Thread Milan Milanovic
Hi, you have multiple options. First, if you store your users in database, then in your execute method you can retrieve them from database, or you can store them in user session scope: http://www.roseindia.net/struts/struts2/struts2ajax/struts2-session.shtml Session scope -- Regards, Milan

Struts2: Ajax Pagination using JQuery

2008-06-27 Thread Raghu
Hi, I want to implement ajax pagination on my struts2 page but I am not sure how to implement that. I am not very good in javascript and jquery but learning them.. I have a table which will show 10 user comments at a time and there will be pagination links for fetching next set of comments using A

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
> I think that this solution should be added somewhere in that Struts 2 + > Spring 2 + JPA + AJAX application example, because a lot of people will have > the same problem. The right order is already in the example, you made simple mistypo ;-) Best regards -- Lukasz http://www.lenart.org.pl/ -

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, I moved it and now it works!! Great man, thank you very very much! I hope that everything else will work good with this pattern ;-). No, my Acegi is not using JPA, it uses just basic (applicationContext-acegy-security.xml) configuration. I think that this solution should be added som

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
Move OpenEntityManagerInViewFilter mapping before Struts2 mapping like below Spring OpenEntityManagerInViewFilter /* struts2 /* If Acegi also use JPA. move OpenEntityManagerInViewFilter to the top. Regards -- Lukasz http://www.lenart.org.pl/ --

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, this is my web.xml http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> Person contextConfigLocation

Re: [s2] Whats the most strutsy way of doing....

2008-06-27 Thread Al Sutton
Hi Jeromy, Thanks for the comments. I'm trying to steer away from javascript for the solution in order to maximise browser compatibility (this app may be used on older mobile phones). I'm hoping that AES encryption isn't cracked ;), and by the inclusion of some random noise in the propertie

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, sorry about this amount of messages. I actually do this (because of deleting): Person person= service.getEntityManager().getReference(Person.class, id); and then, when I do this: session.lock( person, LockMode.NONE); I get: org.hibernate.SessionException: Session is closed!

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > great, thanks! > > Yes, I put this new mapping to my web.xml and now my application works. But > again when I retrieve > person from database with: person = service.find(...); and call > person.getJobs() I again get: > > > org.hibern

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, I even tried to do this: org.hibernate.Session session = ((org.hibernate.ejb.HibernateEntityManager) service.getEntityManager()).getSession(); session.lock( persoon.getJobs(), LockMode.NONE); But, it is the same :-(. -- Thx, Milan Milan Milanovic wrote: > > Hi Lukasz, > > grea

RE: How to read data from nested list elements

2008-06-27 Thread Reddy, Ramachandra (IS Consultant)
Guys found the solution Check the usage of nested tags that can handle any levels. http://www.learntechnology.net/content/struts/struts_nested.jsp Warm Regards Ramachandra Reddy -Original Message- From: Reddy, Ramachandra (IS Consultant) Sent: Thursday, June 26, 2008 12:44 PM To:

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, great, thanks! Yes, I put this new mapping to my web.xml and now my application works. But again when I retrieve person from database with: person = service.find(...); and call person.getJobs() I again get: org.hibernate.LazyInitializationException: could not initialize proxy - no S

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > AFAIK I just need to define sessionFactory bean in my applicationContext.xml > to work with my JPA-enabled classes (just like in the Person example) ? How > can I do that ? Sorry!! My big mistake ;-) Right now I discovered that you

Re: - how to provide an understandable error message to the enduser?

2008-06-27 Thread xianwinwin
GOT IT thanks Dave! newton.dave wrote: > > --- On Fri, 6/27/08, xianwinwin <[EMAIL PROTECTED]> wrote: >> removed - so the conversionError is not working. ok, how can >> I provide my own errors now? > > Doesn't your existing validation handle the results of a failed > conversion? i.e., th

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, AFAIK I just need to define sessionFactory bean in my applicationContext.xml to work with my JPA-enabled classes (just like in the Person example) ? How can I do that ? -- Thx, Milan Milan Milanovic wrote: > > Hi Lukasz, > > I tried to define web.xml as you give here, but when I

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
Hi, 2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > I tried to define web.xml as you give here, but when I deploy my application > I get this exception: Just look to the doc, link I've sent you, there is such note: Looks up the SessionFactory in Spring's root web application co

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, I tried to define web.xml as you give here, but when I deploy my application I get this exception: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi Lukasz, > > I wrote this in my first post in this thread, I need to read > person.getJobs() when person object is loaded in my action class for this > Struts + AJAX+ Spring + Hibernate example provided in Struts docs, that's > it. Just add that

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, thank you on this example. One question, is this going to work with this Struts 2 + Spring 2 + JPA + AJAX application from Struts 2 docs, i.e., I don't need to change code ? -- Thx, Milan Lukasz Lenart wrote: > >> I see that I can use OpenSessionInViewFilter, just I now need some >

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi Lukasz, I wrote this in my first post in this thread, I need to read person.getJobs() when person object is loaded in my action class for this Struts + AJAX+ Spring + Hibernate example provided in Struts docs, that's it. -- Thx, Milan Lukasz Lenart wrote: > > 2008/6/27 Milan Milanovic <[EM

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
> I see that I can use OpenSessionInViewFilter, just I now need some example > for this kind of application. Example: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
2008/6/27 Milan Milanovic <[EMAIL PROTECTED]>: > > Hi, > > thank you. Do you know for any example of using this filter for application > like I mentioned ? I'm not quite sure what you need, but this is the common why, how to solve such problem with web applications. Regards -- Lukasz http://www

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
newton.dave wrote: > > --- On Fri, 6/27/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >>> I now that Hibernate session is closed, I've tried with >>> Hibernate.initialize(person.getJobs()), but it is the same! >> >>... wouldn't the session still be closed? > >>http://www.hibernate.org/hib_doc

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi, thank you. Do you know for any example of using this filter for application like I mentioned ? Lukasz Lenart wrote: > > Hi, > > Add OpenSessionInViewFilter [1] filter to your web.xml > > [1] > http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/sup

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: > I now that Hibernate session is closed, I've tried with > Hibernate.initialize(person.getJobs()), but it is the same! ... wouldn't the session still be closed? http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Hibernate.html#i

Re: - how to provide an understandable error message to the enduser?

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, xianwinwin <[EMAIL PROTECTED]> wrote: > removed - so the conversionError is not working. ok, how can > I provide my own errors now? Doesn't your existing validation handle the results of a failed conversion? i.e., the property would be null (or whatever)? Dave ---

Re: - how to provide an understandable error message to the enduser?

2008-06-27 Thread xianwinwin
removed - so the conversionError is not working. ok, how can I provide my own errors now? - is it possible using notation for that? thanks Dave newton.dave wrote: > > --- On Fri, 6/27/08, xianwinwin <[EMAIL PROTECTED]> wrote: >> I'm not sure I fully understand your reply; >> I found the inte

Re: LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Lukasz Lenart
Hi, Add OpenSessionInViewFilter [1] filter to your web.xml [1] http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html Regards -- Lukasz http://www.lenart.org.pl/ -

LazyInitializationException with Struts 2 + Spring 2 + JPA + AJAX application

2008-06-27 Thread Milan Milanovic
Hi, I'm using your template application http://struts.apache.org/2.0.11.1/docs/struts-2-spring-2-jpa-ajax.html http://struts.apache.org/2.0.11.1/docs/struts-2-spring-2-jpa-ajax.html . The difference is that in my application class Person have a Set jobs. But, when I try to load person with pers

Re: - how to provide an understandable error message to the enduser?

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, xianwinwin <[EMAIL PROTECTED]> wrote: > I'm not sure I fully understand your reply; > I found the interceptor validatoin > > assuming I remove it, as you suggested, what should come > instead and how can I configure the error messages. > newton.dave wrote: >> Among the opt

Re: - how to provide an understandable error message to the enduser?

2008-06-27 Thread xianwinwin
Hi Dave, I'm not sure I fully understand your reply; I found the interceptor validatoin assuming I remove it, as you suggested, what should come instead and how can I configure the error messages. thank you newton.dave wrote: > > Type conversion errors are added separately

Re: [S2] TypeConversion and generics

2008-06-27 Thread Pierre Thibaudeau
2008/6/27 Lukasz Lenart <[EMAIL PROTECTED]>: > Right now, I don't have any other suggestions, I will try to test > something like you during weekend, maybe then I will come back to you > with some idea ;-) > Thanks Lukasz! What I just did---and it worked---was to remove the abstract property set

Re: OT: Tiles and Tags

2008-06-27 Thread Antonio Petrelli
2008/6/27 Marc Eckart <[EMAIL PROTECTED]>: > Sorry :-) > I want to set the attributes of the menu tag like menuBar or > menuItemKey from a tiles.xml Please ask the Tiles Users mailing list: http://tiles.apache.org/mail.html Antonio

Re: Jasypt and Struts2/Spring/JPA(Hibernate)

2008-06-27 Thread Dave Newton
I did, of course, forget to include the link to the S2/Spring/JPA example :( It's at: http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html Dave --- On Fri, 6/27/08, Esteve Camps Chust <[EMAIL PROTECTED]> wrote: > From: Esteve Camps Chust <[EMAIL PROTECTED]> > Subject: Re: Jasypt a

Re: Jasypt and Struts2/Spring/JPA(Hibernate)

2008-06-27 Thread Esteve Camps Chust
ok Dave, for the moment I had no found what I was looking for, but it's true sometime's we ask to lists before accessing the docs. I will take a look at Jasypt website again. Thanks and sorry to bother you ;) Esteve 2008/6/27 Dave Newton <[EMAIL PROTECTED]>: > --- On Fri, 6/27/08, Esteve Camps

Submitting a collection to Struts action

2008-06-27 Thread gokul balasubramanian
Hello,I have a page with a collection of users. So I populate the form bean before displaying it and pass it to the view action. I use the tag to display them. These users can be modified. When I submit the form I am unable to iterate over the collection and found that it had a

Re: OT: Tiles and Tags

2008-06-27 Thread Marc Eckart
Sorry :-) I want to set the attributes of the menu tag like menuBar or menuItemKey from a tiles.xml I tried to set the attribute with: " menuItemKey="menu.item.customersearch" /> I get then /> in the menuBar member. I think nesting tiles tags in custom tags does not work? But how can I d

Re: Jasypt and Struts2/Spring/JPA(Hibernate)

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, Esteve Camps Chust <[EMAIL PROTECTED]> wrote: > has anyone coded this? May you send any example? The encryption library? What would an example look like? I'm not sure how this is related to Struts, unless you're asking about the S2/Spring/JPA, of which there is an example at

Re: Multiple action declarations with the same Action class

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, Marc Ende <[EMAIL PROTECTED]> wrote: > Chandramouli P schrieb: > > Hi,This is my first post to the user list.We have > started working in struts recently.Is it possible to use > one Action class for multiple action declarations in the > struts-config.xml?Consider the code below

Re: Struts Themes Problem - help

2008-06-27 Thread Dave Newton
--- On Fri, 6/27/08, Narayana S <[EMAIL PROTECTED]> wrote: > but here it introduced one more problem, with the xhtml > theme we get the field level validation error messages below > the individual control, but the simple theme is not giving any > validation error messages. to get the errors i us

Jasypt and Struts2/Spring/JPA(Hibernate)

2008-06-27 Thread Esteve Camps Chust
Hi, has anyone coded this? May you send any example? Thanks to all ;) Esteve

Re: OT: Tiles and Tags

2008-06-27 Thread Antonio Petrelli
2008/6/27 Marc Eckart <[EMAIL PROTECTED]>: > Now we want to make the attributes of the menu tag configurable with tiles. > I have no clue how to do this. What are you trying to accomplish? Be clearer please. Antonio - To unsubsc

OT: Tiles and Tags

2008-06-27 Thread Marc Eckart
Hi, we use struts2 with tiles. We have a main layout with a custom tag: Now we want to make the attributes of the menu tag configurable with tiles. I have no clue how to do this. Or is there an other way with freemarker or something else? Thanks in advance. Best regards, Marc -

Re: Strange problem with content disposition

2008-06-27 Thread Paranoid_Fabio
Yes. You're right. Thank you very much. Paranoid_Fabio wrote: > > Hello. I've a very strange problem using content disposition in stream > result: > > < result name="success" type="stream" > > < param name="contentType">${contentType}< /param> > < param name="inputName">downloadStream< /param

Re: [S2] TypeConversion and generics

2008-06-27 Thread Lukasz Lenart
Hi, Right now, I don't have any other suggestions, I will try to test something like you during weekend, maybe then I will come back to you with some idea ;-) Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mai

Re: Unit Testing - change ObjectFactory - override config

2008-06-27 Thread Lukasz Lenart
Hi, How do you start your unit testing? If with Ant, you should prepare separate struts.xml just for testing and setup it when you starting junit task. The same you have by convention when you use maven. Regards -- Lukasz http://www.lenart.org.pl/ --

Re: Multiple action declarations with the same Action class

2008-06-27 Thread Marc Ende
Hello Chandramouli P schrieb: Hi,This is my first post to the user list.We have started working in struts recently.Is it possible to use one Action class for multiple action declarations in the struts-config.xml?Consider the code below:Thanks & Regards,Chandramouli P Of cou