Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 25792
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 25792
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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");"
 
reply
    Bookmark Topic Watch Topic
  • New Topic