File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Selective Rendering: Click twice first time on link??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Selective Rendering: Click twice first time on link???" Watch "Selective Rendering: Click twice first time on link???" New topic
Author

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

matthew simcox
Greenhorn

Joined: Aug 20, 2008
Posts: 7
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Selective Rendering: Click twice first time on link???