ICEfaces
  1. ICEfaces
  2. ICE-3863

MenuItems doesn't work with standardRequestScope=true

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.7.2 SP1, 1.8DR#1
    • Fix Version/s: 2.0.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      standardRequestScope=true
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)
    • Workaround Exists:
      Yes
    • Workaround Description:
      Always use explicit ids with the MenuItem components you create for your ice:menuItems. And try to make them in your constructor, and just return them in the List getter method.

      Description

      The ice:menuItems component sets-up the parenting of the List<MenuItem> right before rendering. It assumes that the same List<MenuItem> will be returned from the bean upon decode, with the parenting still setup. But with standardRequestScope="true", it will be a new bean, with a new List<MenuItem>, so the decode will fail. If the MenuItem component did the reparenting on the decode, then it might work.

      BUT, if the MenuItem components in the List<MenuItem> use generated ids, that will change each time the new List<MenuItem> is gotten, then they'll still fail to decode properly, because the click will be going to a stale clientId. So, even when this bug is fixed, special care will have to be taken with ice:menuItems and standardRequestScope="true".

        Issue Links

          Activity

          Hide
          yip.ng added a comment -

          May be related to fix for regression in ICE-2231. (svn revision 18059, com.icesoft.faces.component.menubar.MenuItems) Fix there may solve this problem as well.

          Show
          yip.ng added a comment - May be related to fix for regression in ICE-2231 . (svn revision 18059, com.icesoft.faces.component.menubar.MenuItems) Fix there may solve this problem as well.
          Hide
          Mark Collette added a comment -

          Basically, always use explicit ids with the MenuItem components you create with your ice:menuItems tag.

          Show
          Mark Collette added a comment - Basically, always use explicit ids with the MenuItem components you create with your ice:menuItems tag.
          Hide
          Mark Collette added a comment -

          Use the work-around technique. It's just the proper way of doing it.

          Show
          Mark Collette added a comment - Use the work-around technique. It's just the proper way of doing it.

            People

            • Assignee:
              Unassigned
              Reporter:
              Mark Collette
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: