ICEfaces
  1. ICEfaces
  2. ICE-2411

Component not rendered under condition in renderOnUserRole shouldn't render its children

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7DR#3, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Windows XP SP2,
      Weblogic 9.2,
      FireFox 2.0.0.9

      Description

      When I add renderOnUserRole tag to my ice:menuItem, and it is not rendered (actually border of it is rendered), all ice:menuItem nested within this ice:menuItem are rendered (selecting of border, causes showing of this nested ice:menuItem).
      Probably in other components which allows nesting another components it is brokent too.

      I've investigated it, and here are more detailed info:
      When user don't have roles specified in renderOnUserRole this div is rendered to output:
      <div id="someId" class="iceMnuBarSubMenu" style="display: none;" name="SUBMENU"/>

      But if iceMnuBarSubMenu CSS class contains non 0px border width it is rendered like in attached menu.jpg.

      Probably when in FF I select this border some onmouseover javascript is triggering rendering of submenu containded by this menu.
      (I saw this javascript code using FireBug).

      To fix this bug don't render any component when user don't have roles specified in renderOnUserRole.

      Alsa when I set rendered property to false, and removed renderOnUserRole it behaves the same.

      This behavior is not present in IE.

        Activity

        Hide
        Mark Collette added a comment -

        Added the appropriate checks for MenuItem.isRendered(), which uses MenuItem.getRenderedOnUserRole().

        Subversion 15288
        icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java

        Show
        Mark Collette added a comment - Added the appropriate checks for MenuItem.isRendered(), which uses MenuItem.getRenderedOnUserRole(). Subversion 15288 icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java
        Hide
        Marcin Dabrowski added a comment -

        Did you check it against 'rendered' property? Because it behaves the same.
        Maybe you should consider to add checking if parent tag is rendered, and if not do not render its children.

        Show
        Marcin Dabrowski added a comment - Did you check it against 'rendered' property? Because it behaves the same. Maybe you should consider to add checking if parent tag is rendered, and if not do not render its children.
        Hide
        Mark Collette added a comment -

        Are you saying, that with the changes in Subversion 15288, that this still does not do what you need? If so, can you post, in here, a code snippet for a test case? I ran through three different test cases for my fix, but I'm always open to help

        Show
        Mark Collette added a comment - Are you saying, that with the changes in Subversion 15288, that this still does not do what you need? If so, can you post, in here, a code snippet for a test case? I ran through three different test cases for my fix, but I'm always open to help
        Hide
        Marcin Dabrowski added a comment -

        No. I said that before your change it was behaving the same for rendered and renderedOnUserRole.
        Now I see that you check both of them.
        Sorry.

        Show
        Marcin Dabrowski added a comment - No. I said that before your change it was behaving the same for rendered and renderedOnUserRole. Now I see that you check both of them. Sorry.
        Hide
        Mark Collette added a comment -

        No worries. As long as it's fixed, and you're happy, that's all that matters

        Show
        Mark Collette added a comment - No worries. As long as it's fixed, and you're happy, that's all that matters

          People

          • Assignee:
            Unassigned
            Reporter:
            Marcin Dabrowski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: