The moose likes JSF and the fly likes jsf lifecycle issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf lifecycle issue" Watch "jsf lifecycle issue" New topic

jsf lifecycle issue

Kumar Gaurav
Ranch Hand

Joined: Apr 08, 2008
Posts: 108
Hi All,

I have an xhtml page which has

a) <h:selectOneRadio id="NT" onfocus="changeColor(this)"
value="#{sessMgr.windowsAuthentication}" tabindex="1">
<f:selectItem id="item1" itemValue="Yes" itemLabel="Yes"
itemDisabled="false" />
<f:selectItem id="item2" itemValue="No" itemLabel="No" />
<a4j:support event="onclick" ajaxSingle="true"

b) <h:commandButton value="Login"
image="/images/marhaba/submit.jpg" action="#{sessMgr.login}"
tabindex="5" />

both are enclosed in h:form.

Issue is whenever there are two browser instance rendering the same page at same time, neither the valuechangelistener of radio button nor command button working. if i close both browser and access this page in new browser, both of them are working fine.

Any pointer to issue and solution is highly apprecitaed.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15949

Standard warning: writing your own login processor is a bad idea. J2EE has a much more secure processor built into the J2EE specification which integrates into the J2EE APIs and the appserver.

It would be a lot easier to read your sample definitions if you would http://www.coderanch.com/how-to/java/UseCodeTags, though.

I'm afraid that I can't tell anything by looking at your samples. They are hard to read, but seem to be basically correct. Although I'm not sure that you realize that the valueChangeListener doesn't fire until the "Login" button is clicked. Listeners do not fire AJAX events. Or any other kind of asynchronous event. In fact, they don't fire events, period - they listen to events.

Customer surveys are for companies who didn't pay proper attention to begin with.
It is sorta covered in the JavaRanch Style Guide.
subject: jsf lifecycle issue
Similar Threads
validation in radio buttons
listbox help needed
How to make one of the Radio button default selected
How to create Hyperlink for SelectItem