ICEfaces
  1. ICEfaces
  2. ICE-1177

New Accordion Panel component (now called ice:panelCollapsible)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.6DR#4, 1.6
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Add support for org.apache.myfaces.custom.accordion.HtmlAccordionPanel or build
      an equivalent.

        Issue Links

          Activity

          Hide
          Philip Breau added a comment -

          wishlist requirements from the forum:
          http://www.icefaces.org/JForum/posts/list/0/3376.page

          1. I'd like that the accordeon component can be fill dynamically.

          2. I'd like create any tab of the accordeon with information that i get of a
          data base,

          3. I'd like too that the label of any tab can be a link

          4. I'd like that inside the content of any tab wil be posible put components
          like tree or others, it can be seemed to a panel tab, but obviously with a
          behavior diferent.

          Show
          Philip Breau added a comment - wishlist requirements from the forum: http://www.icefaces.org/JForum/posts/list/0/3376.page 1. I'd like that the accordeon component can be fill dynamically. 2. I'd like create any tab of the accordeon with information that i get of a data base, 3. I'd like too that the label of any tab can be a link 4. I'd like that inside the content of any tab wil be posible put components like tree or others, it can be seemed to a panel tab, but obviously with a behavior diferent.
          Hide
          Rob Mayhew added a comment -

          Here is the MyFaces accordion example. It uses fixed content (Like tab panel)

          <s:accordionPanel id="test1" layout="accordion">
          <t:panelTab label="Content 1">
          <h:outputText value="Content 1"/>
          <h:inputText value="" onchange="this.form.submit();"/>
          </t:panelTab>
          <t:panelTab label="Content 2">
          <h:outputText value="Content 1"/>
          <h:inputText value="" onchange="this.form.submit();"/>
          </t:panelTab>
          </s:accordionPanel>

          From user input the Ice Accordion component is going to be dynamic with the same
          template used to generate each panel.

          <ice:accordion value="#

          {bean.list}

          " var="var">
          <f:facet name="header">
          <h:outputText value="#

          {var.title}

          "/>
          </f:facet>
          <ice:panelGroup>
          <h:outputText value="#

          {var.body}

          "/>
          </ice:panelGroup>
          </ice:accordion>

          Show
          Rob Mayhew added a comment - Here is the MyFaces accordion example. It uses fixed content (Like tab panel) <s:accordionPanel id="test1" layout="accordion"> <t:panelTab label="Content 1"> <h:outputText value="Content 1"/> <h:inputText value="" onchange="this.form.submit();"/> </t:panelTab> <t:panelTab label="Content 2"> <h:outputText value="Content 1"/> <h:inputText value="" onchange="this.form.submit();"/> </t:panelTab> </s:accordionPanel> From user input the Ice Accordion component is going to be dynamic with the same template used to generate each panel. <ice:accordion value="# {bean.list} " var="var"> <f:facet name="header"> <h:outputText value="# {var.title} "/> </f:facet> <ice:panelGroup> <h:outputText value="# {var.body} "/> </ice:panelGroup> </ice:accordion>
          Hide
          Rob Mayhew added a comment -

          Prototype attached, with example.

          1. I'd like that the accordeon component can be fill dynamically.
          Placing the accordion panel in a series panel will do this.

          2. I'd like create any tab of the accordeon with information that i get of a
          data base,
          See #1

          3. I'd like too that the label of any tab can be a link

          Currently its just a text div that can be clicked to open or close the panel.

          4. I'd like that inside the content of any tab wil be posible put components
          like tree or others, it can be seemed to a panel tab, but obviously with a
          behavior diferent.

          You can place anything inside an accordion panel (In theroy)

          Show
          Rob Mayhew added a comment - Prototype attached, with example. 1. I'd like that the accordeon component can be fill dynamically. Placing the accordion panel in a series panel will do this. 2. I'd like create any tab of the accordeon with information that i get of a data base, See #1 3. I'd like too that the label of any tab can be a link Currently its just a text div that can be clicked to open or close the panel. 4. I'd like that inside the content of any tab wil be posible put components like tree or others, it can be seemed to a panel tab, but obviously with a behavior diferent. You can place anything inside an accordion panel (In theroy)
          Hide
          Rob Mayhew added a comment -

          The accordion panel has been checked into trunk. Still need to create a component showcase example.

          Show
          Rob Mayhew added a comment - The accordion panel has been checked into trunk. Still need to create a component showcase example.
          Hide
          Rob Mayhew added a comment -

          Resolved fixed

          Show
          Rob Mayhew added a comment - Resolved fixed
          Hide
          Patrick Corless added a comment -

          The component showcase example has been implemented. Here are some issue that I had with the current implementation:

          • no TLD documentation, what does the "open" attribute do?
          • would be nice to have a property change listener on collapse/expand interactions
          • effect does not appear to be configurable, even via binding the dataModel?
          • instead of using a label attribute could we have a facet that would allow for the definition of header content. This would allow for the addition of buttons that indicate expansion state, similar to panelPopup implementation.
          • disabled, disabledOnUserRole and renderedOnUserRole attributes are missing for this component. Really important for apps that have a security manager.

          Seems to work well otherwise.

          Show
          Patrick Corless added a comment - The component showcase example has been implemented. Here are some issue that I had with the current implementation: no TLD documentation, what does the "open" attribute do? would be nice to have a property change listener on collapse/expand interactions effect does not appear to be configurable, even via binding the dataModel? instead of using a label attribute could we have a facet that would allow for the definition of header content. This would allow for the addition of buttons that indicate expansion state, similar to panelPopup implementation. disabled, disabledOnUserRole and renderedOnUserRole attributes are missing for this component. Really important for apps that have a security manager. Seems to work well otherwise.
          Hide
          Rob Mayhew added a comment -

          To do:

          • Add tld documentation
          • Change open attribute to expanded
          • Remove label, add in a header facet
          • Fire Property Change event when expanded or collapsed.
          • Add toggleOnClick attribute, when header facet is clicked, panel will expand or contract.
          Show
          Rob Mayhew added a comment - To do: Add tld documentation Change open attribute to expanded Remove label, add in a header facet Fire Property Change event when expanded or collapsed. Add toggleOnClick attribute, when header facet is clicked, panel will expand or contract.
          Hide
          Ken Fyten added a comment -

          Another thing to add is the CSS classes for header facet (enabled + disabled + expanded + collapsed)

          Show
          Ken Fyten added a comment - Another thing to add is the CSS classes for header facet (enabled + disabled + expanded + collapsed)
          Hide
          Ken Fyten added a comment -

          Should be valueChangeListener instead of propertyChangeListener.

          Show
          Ken Fyten added a comment - Should be valueChangeListener instead of propertyChangeListener.
          Hide
          Rob Mayhew added a comment -

          Checked in r13646

          Show
          Rob Mayhew added a comment - Checked in r13646
          Hide
          Patrick Corless added a comment -

          Assigning to Mark;

          I'll update this bug with a summary of style issues related to this component.

          Show
          Patrick Corless added a comment - Assigning to Mark; I'll update this bug with a summary of style issues related to this component.
          Hide
          Patrick Corless added a comment -

          Here is a list of nice to have feature for the beta release. I can implement the CSS styles for xp and royale once the style names have been straitened out.

          General TLD issue.

          • The style attribute is not in the TLD
          • Style attribute does not appear to work either, attributes are not passed through to the renderer.

          Style Issues.

          • Rob defined the following class hierarchy but didn't not name a default ice specific theme what would be used/rendered by default.
          • If a user sets the styleClass attribute to "accordion" then the following will be rendered.

          Default State

          • accordionHeader
          • accordionContent
          • accordionContainer

          Closed

          • accordionHeader_collapsed
          • accordionContent_collapsed
          • accordionContainer_collapsed

          Open and disabled

          • accordionHeader_dis
          • accordionContent_dis
          • accordionContainer_dis

          Closed and disabled

          • accordionHeader_collapsed_dis
          • accordionContent_collapsed_dis
          • accordionContainer_collapsed_dis
          Show
          Patrick Corless added a comment - Here is a list of nice to have feature for the beta release. I can implement the CSS styles for xp and royale once the style names have been straitened out. General TLD issue. The style attribute is not in the TLD Style attribute does not appear to work either, attributes are not passed through to the renderer. Style Issues. Rob defined the following class hierarchy but didn't not name a default ice specific theme what would be used/rendered by default. If a user sets the styleClass attribute to "accordion" then the following will be rendered. Default State accordionHeader accordionContent accordionContainer Closed accordionHeader_collapsed accordionContent_collapsed accordionContainer_collapsed Open and disabled accordionHeader_dis accordionContent_dis accordionContainer_dis Closed and disabled accordionHeader_collapsed_dis accordionContent_collapsed_dis accordionContainer_collapsed_dis
          Hide
          Patrick Corless added a comment -

          The suffixes seem to correctly applied when the component is rendered. To comply with the default "ICE" themes the default root tyle name should probably be "iceAccordion" and the following default CSS classes could be created.

          /*
          ----------- panelAccordion ----------
          */

          /* opened accordion styles */
          .iceAccordionHeader, .iceAccordionContent, .iceAccordionContainer{
          }
          /* Closed */
          .iceAccordionHeader_collapsed, .iceAccordionContent_collapsed,
          .iceAccordionContainer_collapsed{
          }

          /* Open and disabled */
          .iceAccordionHeader_dis, .iceAccordionContent_dis, .iceAccordionContainer_dis{
          }

          /* Closed and disabled */
          .iceAccordionHeader_collapsed_dis, .iceAccordionContent_collapsed_dis,
          .iceAccordionContainer_collapsed_dis{
          }

          Show
          Patrick Corless added a comment - The suffixes seem to correctly applied when the component is rendered. To comply with the default "ICE" themes the default root tyle name should probably be "iceAccordion" and the following default CSS classes could be created. /* ----------- panelAccordion ---------- */ /* opened accordion styles */ .iceAccordionHeader, .iceAccordionContent, .iceAccordionContainer{ } /* Closed */ .iceAccordionHeader_collapsed, .iceAccordionContent_collapsed, .iceAccordionContainer_collapsed{ } /* Open and disabled */ .iceAccordionHeader_dis, .iceAccordionContent_dis, .iceAccordionContainer_dis{ } /* Closed and disabled */ .iceAccordionHeader_collapsed_dis, .iceAccordionContent_collapsed_dis, .iceAccordionContainer_collapsed_dis{ }
          Hide
          Mark Collette added a comment -

          Made it use the default style class (that xp.css and royale.css provide), and the styleClass component property, together. This means that if you provide a styleClass, then it will set the DOM element's class attribute to both the default style class and the styleClass one, allowing fine grained overriding of styles. Still have to add support for the style attribute.

          Subversion 13733
          icefaces\component\src\com\icesoft\faces\component\accordion\PanelAccordionRenderer.java
          icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java

          Show
          Mark Collette added a comment - Made it use the default style class (that xp.css and royale.css provide), and the styleClass component property, together. This means that if you provide a styleClass, then it will set the DOM element's class attribute to both the default style class and the styleClass one, allowing fine grained overriding of styles. Still have to add support for the style attribute. Subversion 13733 icefaces\component\src\com\icesoft\faces\component\accordion\PanelAccordionRenderer.java icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java
          Hide
          Mark Collette added a comment -

          Added the style attribute.

          Subversion 13742
          icefaces\component\src\com\icesoft\faces\component\accordion\PanelAccordion.java
          icefaces\component\src\com\icesoft\faces\component\accordion\PanelAccordionRenderer.java

          Show
          Mark Collette added a comment - Added the style attribute. Subversion 13742 icefaces\component\src\com\icesoft\faces\component\accordion\PanelAccordion.java icefaces\component\src\com\icesoft\faces\component\accordion\PanelAccordionRenderer.java
          Hide
          Mark Collette added a comment -

          Tweaks to the component-showcase, and to xp.css
          Subversion 13769

          Added style attribute to component-metadata
          Subversion 13770
          icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-accordion-props.xml

          Show
          Mark Collette added a comment - Tweaks to the component-showcase, and to xp.css Subversion 13769 Added style attribute to component-metadata Subversion 13770 icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-accordion-props.xml
          Hide
          Mark Collette added a comment -

          Tested, and the documentation shows up in the component-showcase, as expected.

          Subversion 14289
          icefaces\component\doc\panelCollapsibleDoc.html [added]
          icefaces\component\doc\accordionPanelDoc.html [deleted]

          Show
          Mark Collette added a comment - Tested, and the documentation shows up in the component-showcase, as expected. Subversion 14289 icefaces\component\doc\panelCollapsibleDoc.html [added] icefaces\component\doc\accordionPanelDoc.html [deleted]
          Hide
          Mark Collette added a comment -

          Made the component docs index page refer to the new panelCollapsible page.

          Subversion 14375
          icefaces\component\doc\Frame_TOC.htm

          Show
          Mark Collette added a comment - Made the component docs index page refer to the new panelCollapsible page. Subversion 14375 icefaces\component\doc\Frame_TOC.htm

            People

            • Assignee:
              Unassigned
              Reporter:
              Rob Mayhew
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: