Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf lifecycle issue

 
Kumar Gaurav
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18009
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic