Re: how to get a component to rerender upon receiving an event

2014-03-17 Thread Lance Java
Hi John, can you give a bigger picture of what you're trying to achieve? I'm guessing it will likely involve wrapping a zone around the block you want re-rendered and either returning a block or calling AjaxResponseRenderer.addRender(...)

Re: display zone, jquery dialog or message after onValidate success

2014-03-17 Thread Thiago H de Paula Figueiredo
On Sun, 16 Mar 2014 15:53:48 -0300, John j...@quivinco.com wrote: Would there be a way to reveal a zone/jquery dialog that calls the form.submit after response rendering on the client? Just use a normal zone update. Up to Tapestry 5.3.x, which you're probably using now, the HTML element

How to handle form warnings?

2014-03-17 Thread George Christman
Hi Guys, A new requirement has come up where I need to provide validation warnings to the end user on form submission. As long as the user clicks okay to the warning, they can continue on with the save. My current design is as followed. 1. Submit ajax form timesheet object 2. Handle form

Re: How to handle form warnings?

2014-03-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Mar 2014 11:18:50 -0300, George Christman gchrist...@cardaddy.com wrote: Hi Guys, Hi! Although in theory his should work, I continue to get the following hibernate exception. a different object with the same identifier value was already associated with the session This is

Re: How to handle form warnings?

2014-03-17 Thread George Christman
Hi Thiago, I'm aware the hibernate piece is unrelated, however what I'm asking is storing my object in the user session the correct approach? I'm really wondering if I'm using Tapestry properly to produce warnings. I don't want to just patch the issue with hibernate .merge if I'm not doing

Re: How to handle form warnings?

2014-03-17 Thread Lance Java
Have you considered having 2 forms? If form1 succeeds without warnings, the save happens If form1 submits with warnings, form2 is shown (fields are hidden / disabled). Form2 does not check for warnings when it is saved.

Re: How to handle form warnings?

2014-03-17 Thread George Christman
If I'm understanding you correctly, that is exactly how I'm doing it. I'm using two forms inside a single zone. If warnings exist when form 1 is submitted, I persist the timesheet object and show form 2 in a modal box. When form 2 is submitted assuming no errors, I'm returning the onSuccess method

Re: How to handle form warnings?

2014-03-17 Thread Lance Java
As always, I try to avoid persist. I was suggesting hidden (or disabled) fields in form2 so the values are passed in both submits (thus eliminating the need for @Persist) Form2 is not displayed initially, it is displayed when showing the warnings

Re: How to handle form warnings?

2014-03-17 Thread George Christman
I agree, I try to avoid it as much as I can. I'm not sure I understand what you are doing, are you saying when form 2 is displayed and the submit action is clicked, you would then resubmit form 1 along with form 2? On Mon, Mar 17, 2014 at 1:49 PM, Lance Java lance.j...@googlemail.comwrote: As

Re: How to handle form warnings?

2014-03-17 Thread Lance Java
No :) Form1 contains the fields. Warnings cause form1's submit to FAIL. Form2 is displayed when showing the errors/warnings from form1. Form2 has a hidden section with ALL of the fields (and values) from form1. Form2's submit button is likely to be labelled accept. Clicking the accept button

Re: How to handle form warnings?

2014-03-17 Thread George Christman
I see, so form 2 is essentially a replica of form 1 accept all the fields are hidden? If that is the case, two final questions, 1 is there a simpler way to setup all them fields? This is a time sheet with probably 50/75 fields. Lastly, when you return form 2, how do you return the object without

Re: How to handle form warnings?

2014-03-17 Thread Lance Java
1. If you use a block you can use a delegate to render it in the 2 scenarios. 2. Tapestry does not redirect after post for errors, it forwards instead. So anything you've done in your validate is available in your render. On 17 Mar 2014 18:35, George Christman gchrist...@cardaddy.com wrote: I

Re: How to handle form warnings?

2014-03-17 Thread Bob Harner
I believe Lance's #2 is only true for 5.4 (since https://issues.apache.org/jira/browse/TAP5-1808) On Mon, Mar 17, 2014 at 2:45 PM, Lance Java lance.j...@googlemail.com wrote: 1. If you use a block you can use a delegate to render it in the 2 scenarios. 2. Tapestry does not redirect after post

Re: How to handle form warnings?

2014-03-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Mar 2014 12:31:31 -0300, George Christman gchrist...@cardaddy.com wrote: Hi Thiago, I'm aware the hibernate piece is unrelated, however what I'm asking is storing my object in the user session the correct approach? I wouldn't say it's the ideal solution, but I'd consider it a

Re: How to handle form warnings?

2014-03-17 Thread Lance Java
I believe Lance's #2 is only true for 5.4 Yes, good point. George has mentioned previously that he's using 5.4 so should be OK.

Reg: Grid DataSources

2014-03-17 Thread srikaanth
Hi all, Am working on a tapestry project. Am using grid to show table using hibernate. I was able to show single table structure . But here i need to join two table and show it in single table . Am using tapestry 5.3. Is there any way to do or any addon avaliable or i need to created a new

stale link redirect to page

2014-03-17 Thread Haiming Zhang
Hi all, I am using tapestry 4. I have For inside a Form, when I add new element to a list, I got the Stale Link popup error. And get messages like You have clicked on a stale link. You may continue by returning to the application's home page. Then when I click the home page link, it

Re: Reg: Grid DataSources

2014-03-17 Thread Andreas Ernst
Am 18.03.14 05:39, schrieb srikaanth: Hi all, Am working on a tapestry project. Am using grid to show table using hibernate. I was able to show single table structure . But here i need to join two table and show it in single table . Am using tapestry 5.3. Is there any way to do or any addon