ICEfaces
  1. ICEfaces
  2. ICE-731

Create new menuPopup component

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.7DR#2, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      This component would implement a menuPopup (context menu) component.

      When the user clicked the context-menu mouse button on their browser/platform, the menuPopup component would display at the mouse coordinates. Users could then use the mouse to navigate through the menus and select a menu item. Pressing ESC or click off the menu, or the menu losing focus should close the menu.

      Additional reqs.:

      - menu must position based on the mouse coord. where the button was pressed.

      - menu could move its position and even the direction that sub-menus open
      depending on proximity to top/bottom/left/right edges of the window (nice-to-have).

      - Originally we thought that the menuPopup should support an event that fires when it is about to be displayed, which would allow the application to dynamically alter the state/contents of the menuPoup immediately prior to it's display, if desired. But, since the existing menuBar does not do a server round-trip to show its sub-level menuitems, we're not going to make menuPopup do that either.

      - The clientId of the component that triggered the menuPoup should be included in the event parameters, so that when the menuitem is selected and a form submission occurs, the menuPopup's decode could know that clientId, possibly to include in an event.

      - For a component to be able to have a menuPopup, that component's rendered html would need to include certain attributes that call Javascript functions. That means that menuPopup support has to be added on a component by component basis. Each supporting component would have an attribute like >> menuPopup="menuPopupComponentId" <<. So, there's no need to place a menuPopup component in any special place in the component hierarchy (except in a FORM, like a regular menuBar requires), since the menuPopup doesn't dictate the relationship, but rather each component with a menuPopup attribute does.


      A recommended approach to implementing this feature is to create a new ice:menuPopup component that either extends or uses an ice:menuBar. This component would support the exact same menu sub-components used by the ice:menuBar component (ice:menuItem and ice:menuSeparator, etc.) to define a context menu. The differences between the popupMenu and the menuBar are that the popupMenu would support:

      - Only a vertical orientation, that is, the top-level menuItems and menuSeparators would appear vertically stacked.

      - We were think about constricting the styling so that top-level menuitems and sub-level menuitems would use the same style classes, but decided to just leave in the existing rendering behaviours, and just make the two CSS classes have the same content.

        Issue Links

          Activity

          Hide
          Mark Collette added a comment -

          I've added the basic ice:menuPopup component, which extends ice:menuBar, and maintains most of that behaviour. As well, there's a new attribute on ice:panelGroup, called menuPopup, which can be set to the id of an ice:menuPopup, so that if you do a context-click inside that ice:panelGroup, it will trigger the specified ice:menuPopup.

          There is a preliminary attempt at an appropriate set of style classes in xp.css, which has to be fixed up, and replicated to the other CSS files.

          The menuBar demo in the component-showcase has been modified to also show off the menuPopup, for internal testing only. It should be changed before being released externally.

          Subversion 14955

          Modified
          icefaces\bridge\component\menu.js
          icefaces\component-metadata\src\main\java\com\icesoft\metadata\generators\TagLibraryGenerator.java
          icefaces\component-metadata\src\main\java\com\icesoft\metadata\generators\TLDGenerator.java
          icefaces\component-metadata\src\main\resources\conf\extended-faces-config.xml
          icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-panelGroup-props.xml
          icefaces\component\conf\META-INF\facelet\icefaces.taglib.xml
          icefaces\component\conf\META-INF\faces-config.xml
          icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java
          icefaces\component\src\com\icesoft\faces\component\ext\HtmlPanelGroup.java
          icefaces\component\src\com\icesoft\faces\component\ext\renderkit\GroupRenderer.java
          icefaces\component\src\com\icesoft\faces\component\menubar\MenuBar.java
          icefaces\component\src\com\icesoft\faces\component\menubar\MenuBarRenderer.java
          icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\HTML.java
          icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css
          icefaces\samples\component-showcase\src\com\icesoft\icefaces\samples\showcase\components\menuBar\MenuBarBean.java
          icefaces\samples\component-showcase\web\inc\components\menuBar.jspx

          Added
          icefaces\component-metadata\src\main\resources\conf\custom\menuPopup-component.xml
          icefaces\component-metadata\src\main\resources\conf\custom\menuPopup-renderer.xml
          icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-menuPopup-props.xml
          icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-att-menuPopup-props.xml
          icefaces\component\src\com\icesoft\faces\component\menupopup\MenuPopup.java
          icefaces\component\src\com\icesoft\faces\component\menupopup\MenuPopupRenderer.java

          Show
          Mark Collette added a comment - I've added the basic ice:menuPopup component, which extends ice:menuBar, and maintains most of that behaviour. As well, there's a new attribute on ice:panelGroup, called menuPopup, which can be set to the id of an ice:menuPopup, so that if you do a context-click inside that ice:panelGroup, it will trigger the specified ice:menuPopup. There is a preliminary attempt at an appropriate set of style classes in xp.css, which has to be fixed up, and replicated to the other CSS files. The menuBar demo in the component-showcase has been modified to also show off the menuPopup, for internal testing only. It should be changed before being released externally. Subversion 14955 Modified icefaces\bridge\component\menu.js icefaces\component-metadata\src\main\java\com\icesoft\metadata\generators\TagLibraryGenerator.java icefaces\component-metadata\src\main\java\com\icesoft\metadata\generators\TLDGenerator.java icefaces\component-metadata\src\main\resources\conf\extended-faces-config.xml icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-panelGroup-props.xml icefaces\component\conf\META-INF\facelet\icefaces.taglib.xml icefaces\component\conf\META-INF\faces-config.xml icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java icefaces\component\src\com\icesoft\faces\component\ext\HtmlPanelGroup.java icefaces\component\src\com\icesoft\faces\component\ext\renderkit\GroupRenderer.java icefaces\component\src\com\icesoft\faces\component\menubar\MenuBar.java icefaces\component\src\com\icesoft\faces\component\menubar\MenuBarRenderer.java icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\HTML.java icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css icefaces\samples\component-showcase\src\com\icesoft\icefaces\samples\showcase\components\menuBar\MenuBarBean.java icefaces\samples\component-showcase\web\inc\components\menuBar.jspx Added icefaces\component-metadata\src\main\resources\conf\custom\menuPopup-component.xml icefaces\component-metadata\src\main\resources\conf\custom\menuPopup-renderer.xml icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-menuPopup-props.xml icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-att-menuPopup-props.xml icefaces\component\src\com\icesoft\faces\component\menupopup\MenuPopup.java icefaces\component\src\com\icesoft\faces\component\menupopup\MenuPopupRenderer.java
          Hide
          yip.ng added a comment -

          Fixe alignment problem of "File" menu item:
          Added calls to resolve URL for menu item image source path.
          Changed width of menu item image to match the width of blank icon.

          Modified:
          svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java
          svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css
          revision: 14957

          Show
          yip.ng added a comment - Fixe alignment problem of "File" menu item: Added calls to resolve URL for menu item image source path. Changed width of menu item image to match the width of blank icon. Modified: svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css revision: 14957
          Hide
          yip.ng added a comment -

          Fixed bug which caused overlapping of top level menu div and second level menu div.
          Fixed alignment of menu item image, menu item label and submenu indicator arrow.
          Fixed positioning of submenu indicator arrow in the top level menu div.

          Modified:
          svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java
          svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css
          revision: 14970

          Show
          yip.ng added a comment - Fixed bug which caused overlapping of top level menu div and second level menu div. Fixed alignment of menu item image, menu item label and submenu indicator arrow. Fixed positioning of submenu indicator arrow in the top level menu div. Modified: svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\menubar\MenuItemRenderer.java svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css revision: 14970
          Hide
          yip.ng added a comment -

          Ported stylesheet changes to royale theme and portlet theme.

          Modified: svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\royale\royale.css
          Modified: svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp-portlet.css
          revision: 14971

          Show
          yip.ng added a comment - Ported stylesheet changes to royale theme and portlet theme. Modified: svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\royale\royale.css Modified: svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp-portlet.css revision: 14971
          Hide
          Jacky Leong added a comment -

          "Pressing ESC or click off the menu, or the menu losing focus should close the menu. "

          I am having problem closing the menu in FireFox 3 and IE 6. or it has never been implemented?

          Show
          Jacky Leong added a comment - "Pressing ESC or click off the menu, or the menu losing focus should close the menu. " I am having problem closing the menu in FireFox 3 and IE 6. or it has never been implemented?

            People

            • Assignee:
              Unassigned
              Reporter:
              Ken Fyten
            • Votes:
              20 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: