• 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

Selective Rendering: Click twice first time on link???

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm using visual jsf on netbeans 6.1.

I have a panelgrid that contains static text or text fields depending on a backing bean field (true|false). This works. However I have an Edit link which calls the following method in the Bbean:

public void setUserDetailToEdit() {

if (getEditUserDetail().equals("true")) {

log("Set EditUserDetail false");
getSessionBean().setEditUserDetail("false");
} else {

log("Set EditUserDetail true");
getSessionBean().setEditUserDetail("true");
}
}

This method sets a field on the sessionbean.EditUserDetail to either value and in the backing bean I reference this value in the constructor as:

setEditUserDetail(getSessionBean().getEditUserDetail());

Each time the page is refreshed it checks the current sessionbean value and sets the BB value to this saved value.

The problem is my Edit link needs to be clicked twice to get the static text to change to text fields the first time. AFter this it flicks between the two witha single click. I'm not sure why this would be the case.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic