Re: Change grid on "onSuccess"

2016-04-28 Thread Thiago H de Paula Figueiredo
On Mon, 25 Apr 2016 07:07:48 -0300, Nathan Quirynen wrote: Hey, Hi! By returning "this" in the onSuccess event, a redirect happens resulting in a new request. If you want to preserve data between requests, you will have to save it into the http session. If you add http session persistenc

Re: Change grid on "onSuccess"

2016-04-27 Thread Barry Books
Chris is correct you need some kind of type coachers to store Street in the url but in this case I don't think you need street/streets in the url only the variables in the form. I don't do much ajax so I like to use setupRender but perhaps the best way to get the set of streets is with a method lik

Re: Change grid on "onSuccess"

2016-04-27 Thread Chris Poulsen
When you need to persist non-trivial state (and not want to put it in the session, like standard @Persist does), you need to help tapestry figure out how to map between a String and the persistent state. There are some coercers for the most trivial types and projects like tapestry-hibernate/jpa al

Re: Change grid on "onSuccess"

2016-04-26 Thread Morgan Hautman
Hi, I didn't managed to get it work with @ActivationRequestParameter. I tried everything out and the last try was with @Persist and it worked, so I'm keeping that because nothing else works.. Thank you all. Regards, Morgan 2016-04-26 13:06 GMT+02:00 Barry Books : > Sorry my previous response a

Re: Change grid on "onSuccess"

2016-04-26 Thread Barry Books
Sorry my previous response a bit short. I was on my phone. Something like this hibernate example should work. It's better to store the query parameters in the URL instead of the session. If you use the session returning to the page will rerun the last query which seems a bit weird for a web app. Al

Re: Change grid on "onSuccess"

2016-04-26 Thread Morgan Hautman
Hi, The problem was that I had no get/setters in my Bean I displayed.. Now it renders well on the first page but when I click on the second page I have: Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not find a coercion from type java.lang.String to type java.util.Set. I

Re: Change grid on "onSuccess"

2016-04-25 Thread Barry Books
Use @pageactvation context and put what's in your onSucess method in setupRender On Monday, April 25, 2016, Morgan Hautman wrote: > Hi, > > Thank you guys. > I first tried the fix stated by Felix (@PageActivationContext) but it > doesn't work. > I then tried the ajax way Nathan provided and I ha

Re: Change grid on "onSuccess"

2016-04-25 Thread Morgan Hautman
Hi, Thank you guys. I first tried the fix stated by Felix (@PageActivationContext) but it doesn't work. I then tried the ajax way Nathan provided and I have better results but my grid shows 4 pages/links but I don't see any data. I added *[Grid here

Re: Change grid on "onSuccess"

2016-04-25 Thread Nathan Quirynen
Hey, By returning "this" in the onSuccess event, a redirect happens resulting in a new request. If you want to preserve data between requests, you will have to save it into the http session. If you add http session persistence, the data will be available after a new request.

Re: Change grid on "onSuccess"

2016-04-25 Thread Felix Gonschorek
Hi, you have to store the results (or preferable the search parameters) because tapestry redirects the browser after the form POST: https://tapestry.apache.org/component-events-faq.html To store the state you can add @Persist annotations to the fields that store your search parameters and move t

Change grid on "onSuccess"

2016-04-25 Thread Morgan Hautman
Hi, I'm trying to make a make grid update when submitting a form within the same page. Here is the code: https://gist.github.com/mhautman/e178fdcca46331e1f4932b1cd7074de7 The page gets refreshed but the table/source doesn't seem to be updated. Any help is greatly appreciated. Regards, Morgan