Results 1 to 7 of 7
  1. #1
    minakshi is offline Member
    Join Date
    Sep 2013
    Posts
    7
    Rep Power
    0

    Default Understanding of state saving in JSF

    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.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,065
    Rep Power
    6

    Default Re: Understanding of state saving in JSF

    But you don't even mention the version of JSF you're using.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    minakshi is offline Member
    Join Date
    Sep 2013
    Posts
    7
    Rep Power
    0

    Default Re: Understanding of state saving in JSF

    I am sorry. We are using JSF 2.1 version

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,065
    Rep Power
    6

    Default Re: Understanding of state saving in JSF

    Okay, but your question is still very unclear. You mention custom components, state saving and using different scopes. What in all that is the actual problem you are experiencing. I don't think you have one specific one, I think you have multiple problems that all stem from not understanding entirely how JSF ticks. And that is a hard requirement before you can actually properly use JSF - you need to technically understand how it does the things it does, very well. Its one of the major downsides I tag to the framework and why I don't advise it to beginners.

    Duplicate IDs for example can have multiple sources. Sometimes it is caused by Ajax rerendering actions, sometimes it is caused by improper use of JSTL tags, sometimes it is caused by two components in fact getting the same ID and it will "randomly" show up when you conditionally render both of them. There is no clear cut reason and solution to that, you have to keep looking for something that -may- be wrong in your application and then prove that it is in fact wrong. When you have found that you have reached the point where you can start asking for help because then you have something to show.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,065
    Rep Power
    6

    Default Re: Understanding of state saving in JSF

    blegh, crossposter who doesn't say he is crossposting.

    Understanding of state saving in JSF (JSF forum at JavaRanch)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    minakshi is offline Member
    Join Date
    Sep 2013
    Posts
    7
    Rep Power
    0

    Default Re: Understanding of state saving in JSF

    Issue Identified and resolved

    Below given the links:

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

    Component binding and SessionScope

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,065
    Rep Power
    6

    Default Re: Understanding of state saving in JSF

    So you were using component bindings? Because you never cared to mention that.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 2
    Last Post: 02-14-2011, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •