• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
doinigly jaquel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
doinigly jaquel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your answer
and could you suggest me a solution for this problem ?
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic