Re: opinion on modal dialog

2011-08-13 Thread Vangel V. Ajanovski

On 08/13/2011 10:35 AM, Christian Köberl wrote:
I may be wrong but I think when you have the zone="gridZone" on the 
form and there are (server-side) validation failures, you won't see 
them because only the grid is refreshed, not the form.
OK, thanks I will check if this is the case. I thought I would solve all 
this with separating the zones completely.





smime.p7s
Description: S/MIME Cryptographic Signature


Re: opinion on modal dialog

2011-08-13 Thread Christian Köberl

2011-08-12 23:52, Vangel V. Ajanovski:

Hi Christian, I looked into this in more detail, but I don't really
understand what kind of validation problems are you preventing with the
two zones (so efectively you have surrounded the form with three extra
divs, and I have just two.







I may be wrong but I think when you have the zone="gridZone" on the form 
and there are (server-side) validation failures, you won't see them 
because only the grid is refreshed, not the form.


That's why i pack my form in a separate zone. The other thing is that I 
prefer to create a component for the dialog.


So the structure is:

   

With dialog component consisting of
  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: opinion on modal dialog

2011-08-12 Thread Vangel V. Ajanovski

On 08/09/2011 07:47 PM, Christian Köberl wrote:
Another difference is that we use a different zone for the form in the 
dialog to prevent problems with server-side validation.


Hi Christian, I looked into this in more detail, but I don't really 
understand what kind of validation problems are you preventing with the 
two zones (so efectively you have surrounded the form with three extra 
divs, and I have just two.









smime.p7s
Description: S/MIME Cryptographic Signature


Re: opinion on modal dialog

2011-08-09 Thread Christian Köberl

2011-08-07 14:18, Vangel V. Ajanovski:

In the past I have used the modal window from ChenilleKit, and recently
I read the post from Taha on Java Magic blog, but I wanted to create
something simpler, preferably without additional custom JavaScript code
- just CSS and Tapestry zones.


I think that's a good idea - we're doing something similar.

The difference is that we're always creating a separate component for 
the dialog - for this dialogs we have a DialogLayout component that 
guarantees the layout and css.


Another difference is that we use a different zone for the form in the 
dialog to prevent problems with server-side validation.


Here are some parts of our code, here for a new button:

Page.tml:
${message:button.newProvider}






-- here goes the grid with the data

Page.java
@Component(parameters = {"zone=dialogZone"})
private EventLink newProvider;

@OnEvent("newProvider")
Object newProvider()
{
return newProviderDialog;
}

NewProviderDialog.tml







${message:button.save}




NewProviderDialog.java
@OnEvent("success")
Object saveNewProvider()
{
// backen call
orderFacade.createNewProvider(provider);

// return page to refresh whole page
return componentResources.getPage();
}

--
Chris

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org