Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Understanding of state saving in JSF  RSS feed

 
shivam verma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to JSF and I am using JSF Custom components in my application.
My backingbean is in View Scope.Everytime I am getting new instance of my components.
Sometimes I am getting two multiple instances for single component as siblings causing error as

SEVERE: JSF1007: Duplicate component ID Button1 found in view.
Sep 5, 2013 8:57:45 AM com.sun.faces.util.Util checkIdUniqueness

If I put bean in Session scope then it will cause performance issue.
Please suggest.What to do?

Please guide or help me on this issue.
 
shivam verma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF Version we are using is 2.1
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session scope doesn't cause performance issues. View Scope is session scope that automatically deletes itself when you navigate to a different View. Not a performance thing as such, but it keeps the user's web session from being cluttered up by "dead" backing beans. And ensures that the full construction process is invoked each time you navigate to that View.

Your error message is strange and it makes me wonder if you are doing View navigation properly, but it's impossible to tell without more information.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivam verma, please BeForthrightWhenCrossPostingToOtherSites <- link
http://www.java-forums.org/javaserver-faces-jsf/81350-understanding-state-saving-jsf.html
 
shivam verma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Identified the case we are getting this issue when executing ajax call through any mode such as f:ajax/jsf.ajax.request or mojarra.ab
 
shivam verma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Issue Identified and resolved

Below given the links:

https://java.net/jira/browse/JAVASERVERFACES-1492

http://www.icesoft.org/JForum/posts/list/19182.page
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!