aspose file tools*
The moose likes JSF and the fly likes synchronization validation and display of dialog in a primeface JSF2.0 form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "synchronization validation and display of dialog in a primeface JSF2.0 form" Watch "synchronization validation and display of dialog in a primeface JSF2.0 form" New topic
Author

synchronization validation and display of dialog in a primeface JSF2.0 form

doinigly jaquel
Greenhorn

Joined: Aug 08, 2012
Posts: 6
hello
I have a form with jsf2 and primefaces that contains a submit button that managed two things: First: form validation with the update attribute and second launching a confirmation dialog box when validation succeeded and all of this are managed by:

so my problem is that when I click into the button validation: if validation don't succeeded : validation messages are displayed in the form : ok but if the validation succeeded I must click a second time to display dialog box

anyone know how to solve this problem there?

and here the method to launch the dialog



thank you in advance
doinigly jaquel
Greenhorn

Joined: Aug 08, 2012
Posts: 6
I think that I didn't explain the probleme well,
in brief : I have this button :

in the attribute update : myfieldset correspond to the fieldset (componentprimeface) : it allow to validate all input contained in this fieldset
and "display" correspond to the dialog that I want it appear when validation is succeeded
the problem is even if validation succeded I must make a second click into this button to appear this dialog

do you have any idea

thank you in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16055
    
  21

The EL code in your onclick attribute is evaluated at RENDER time, not when the client clicks on the button.

JSF backing beans are Models, not Controllers.


Customer surveys are for companies who didn't pay proper attention to begin with.
doinigly jaquel
Greenhorn

Joined: Aug 08, 2012
Posts: 6
thank you for your answer
and could you suggest me a solution for this problem ?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16055
    
  21

I'm not an Icefaces expert, but in any event, I don't pop up a confirmation dialog myself (for one thing, it's just one more thing to have to click on). Instead I make the update action method add a an information message to the JSF messages object. I have a special utility class that contains the JSF-specific code, so the action method simply calls "JSFUtils.addInfoMessage("Data updated OK");"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: synchronization validation and display of dialog in a primeface JSF2.0 form