• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Render a panelconfirmation conditionally

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to show a confirmation dialog on click of by Create commandlink but only when a particular condition is satisfied based on value enetered by the user in a text field. So I evaluate this condition inside the validator of that field and set the panelconfirmation only if that condition is satisfied:

HtmlCommandLink cmd = (HtmlCommandLink) FacesContext.getCurrentInstance().getViewRoot().findComponent(
"CreateCostForm:id_submitButtonCreateComm");
cmd.setPanelConfirmation("confirmCreateUpdate");


However, there's a loophole. If I enter something in the text field and directly click on Create link without losing focus from the field, the panelconfirmation is not set and the confirmation dialog doesnot appear.
Any workaround anybody?

 
Neha Mahajan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any ideas???
reply
    Bookmark Topic Watch Topic
  • New Topic