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 jsf lifecycle issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf lifecycle issue" Watch "jsf lifecycle issue" New topic
Author

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)"
onblur="changeBack(this)"
valueChangeListener="#{sessMgr.ntLoginChangeListener}"
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"
reRender="userNameLabel,userNameText,passwordLabel,passwordText"></a4j:support>
</h:selectOneRadio>

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.


Regards,
Gaurav
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsf lifecycle issue