ICEfaces
  1. ICEfaces
  2. ICE-11197

Make 'containment' functionality work with ACE container components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      supported browsers
    • Assignee Priority:
      P2

      Description

      Visual components that can potentially be resized should have the resizable functionality built in instead of relying on the external ace:resizable component. This will ensure that the corect markup is modified when the size of the component is changed. The ace:resizable component currently changes the size of the component root element without taking into consideration the inner markup of the component (such as header, footer, content, and control buttons), a very crude approach that breaks the layout of the more complex components.

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Description Visual components that potentially can be resized in should have the resizable functionality built in instead of relying on the external _ace:resizable_ component. This will ensure that the corect markup is modified when the size of the component is changed. The _ace:resizable_ component currently changes the size of the component root element without taking into consideration the inner markup of the component (such as header, footer, content, and control buttons), a very crude approach that breaks the layout of the more complex components. Visual components that potentially can be resized in should have the resizable functionality built in instead of relying on the external ace:resizable component. This will ensure that the corect markup is modified when the size of the component is changed. The ace:resizable component currently changes the size of the component root element without taking into consideration the inner markup of the component (such as header, footer, content, and control buttons), a very crude approach that breaks the layout of the more complex components.
        Hide
        Mircea Toma added a comment - - edited

        To avoid polluting the component's tag with the resizable related attributes we could have them defined on a facet or client behaviour tag, declared within the component's tag. For example:

        <ace:panel header="Header ..." closable="true" toggleable="true" collapsed="#{panelBean.collapsed}">
                        <ace:resizable animate="true" ghost="false" containment="true"/>
                        .....
                        panel content
                        .....
        </ace:panel>
        

        Implementation wise the resizable feature can be implemented server side as a ClientBehaviour just like the ace:ajax behaviour while the client side will need to invoke the jQuery resizable functionality in the component initialization.

        Show
        Mircea Toma added a comment - - edited To avoid polluting the component's tag with the resizable related attributes we could have them defined on a facet or client behaviour tag, declared within the component's tag. For example: <ace:panel header= "Header ..." closable= " true " toggleable= " true " collapsed= "#{panelBean.collapsed}" > <ace:resizable animate= " true " ghost= " false " containment= " true " /> ..... panel content ..... </ace:panel> Implementation wise the resizable feature can be implemented server side as a ClientBehaviour just like the ace:ajax behaviour while the client side will need to invoke the jQuery resizable functionality in the component initialization.
        Hide
        Mircea Toma added a comment -

        This issue is a follow up for ICE-10583.

        Show
        Mircea Toma added a comment - This issue is a follow up for ICE-10583 .
        Mircea Toma made changes -
        Description Visual components that potentially can be resized in should have the resizable functionality built in instead of relying on the external ace:resizable component. This will ensure that the corect markup is modified when the size of the component is changed. The ace:resizable component currently changes the size of the component root element without taking into consideration the inner markup of the component (such as header, footer, content, and control buttons), a very crude approach that breaks the layout of the more complex components. Visual components that can potentially be resized should have the resizable functionality built in instead of relying on the external ace:resizable component. This will ensure that the corect markup is modified when the size of the component is changed. The ace:resizable component currently changes the size of the component root element without taking into consideration the inner markup of the component (such as header, footer, content, and control buttons), a very crude approach that breaks the layout of the more complex components.
        Ken Fyten made changes -
        Fix Version/s 4.2 [ 12870 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Assignee Priority P2 [ 10011 ]
        Hide
        Mircea Toma added a comment -

        Modified jQuery's resizeable code to take into accout the margins as well when calculating the constraining box for the resized element. Add 'box-sizing' CSS rule to the ace:panel's content element to fill the inner space (without padding and margin) of the parent element. Modified resizable renderer to use the parent element not the root element of the parent component as the element constraining the containment.

        Show
        Mircea Toma added a comment - Modified jQuery's resizeable code to take into accout the margins as well when calculating the constraining box for the resized element. Add 'box-sizing' CSS rule to the ace:panel's content element to fill the inner space (without padding and margin) of the parent element. Modified resizable renderer to use the parent element not the root element of the parent component as the element constraining the containment.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49780 Wed Jan 04 13:45:47 MST 2017 mircea.toma ICE-11197 Modified jquey-ui to take into accout the margins as well when calculating the constraining box for the resized element. Add 'box-sizing' CSS rule to the ace:panel's content element to fill the inner space (without padding and margin) of the parent element. Modified resizable renderer to use the parent element not the root element of the parent component as the element constraining the containment.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/jquery/ui/jquery-ui.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/panel/panel.css
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableRenderer.java
        Hide
        Mircea Toma added a comment -

        Add 'box-sizing' CSS rule to the tabset's and accordion's content element so that the resizable component will fill the inner space (without padding and margin) of the parent element.

        Show
        Mircea Toma added a comment - Add 'box-sizing' CSS rule to the tabset's and accordion's content element so that the resizable component will fill the inner space (without padding and margin) of the parent element.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mircea Toma made changes -
        Summary Internalize 'resizable' functionality into the components that can be resized. Make 'containment' functionality work with ace:* container components
        Mircea Toma made changes -
        Summary Make 'containment' functionality work with ace:* container components Make 'containment' functionality work with ACE container components
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49781 Wed Jan 04 15:28:03 MST 2017 mircea.toma ICE-11197 Add 'box-sizing' CSS rule to the content element so that the resizable component will fill the inner space (without padding and margin) of the parent element.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/jquery/ui/jquery-ui.css
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/tabset/tabset.css
        Hide
        Mircea Toma added a comment -

        Wow, you are reading my mind. I was about to suggest that all our container component should be verified with an included resizable component.

        There is ace:panelStack remaining to be tested.

        Show
        Mircea Toma added a comment - Wow, you are reading my mind. I was about to suggest that all our container component should be verified with an included resizable component. There is ace:panelStack remaining to be tested.
        Hide
        Carmen Cristurean added a comment -

        The ace:panelStack with resizable causes a JS error when the test page is loaded.

        QA test application: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/resizable
        Test page: /resizableContainerComp.jsf

        FF49:
        TypeError: b is null
        http://localhost:8080/resizable/javax.faces.resource/bridge.js.jsf?ln=ice.core&v=4_2_0_170105
        Line 41

        MsEdge38:
        SCRIPT5007: Unable to get property 'enctype' of undefined or null reference
        bridge.js.jsf (41,127)

        Chrome:
        Uncaught TypeError: Cannot read property 'enctype' of null
        at Object.f.captureSubmit (bridge.js.jsf?ln=ice.core&v=4_2_0_170105:41)
        at resizableContainerComp.jsf:32

        Show
        Carmen Cristurean added a comment - The ace:panelStack with resizable causes a JS error when the test page is loaded. QA test application: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/resizable Test page: /resizableContainerComp.jsf FF49: TypeError: b is null http://localhost:8080/resizable/javax.faces.resource/bridge.js.jsf?ln=ice.core&v=4_2_0_170105 Line 41 MsEdge38: SCRIPT5007: Unable to get property 'enctype' of undefined or null reference bridge.js.jsf (41,127) Chrome: Uncaught TypeError: Cannot read property 'enctype' of null at Object.f.captureSubmit (bridge.js.jsf?ln=ice.core&v=4_2_0_170105:41) at resizableContainerComp.jsf:32
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Modified test page to test the inclusion of resizable component in the ACE container components.

        Show
        Mircea Toma added a comment - Modified test page to test the inclusion of resizable component in the ACE container components.
        Hide
        Mircea Toma added a comment - - edited

        Fixed parent lookup for the containment feature in ResizableRenderer. Add try/catch for the error thrown when the resized component is not rendered (and thus not found).

        Show
        Mircea Toma added a comment - - edited Fixed parent lookup for the containment feature in ResizableRenderer . Add try/catch for the error thrown when the resized component is not rendered (and thus not found).
        Hide
        Mircea Toma added a comment -

        Add panel stack CSS rules to fix containment. Made StackPaneRenderer render its 'style' attribute.

        Show
        Mircea Toma added a comment - Add panel stack CSS rules to fix containment. Made StackPaneRenderer render its 'style' attribute.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49965 Tue Jan 10 13:16:39 MST 2017 mircea.toma ICE-11197 Fix parent lookup for the containment feature. Add try/catch for the resizable client code in case the resized component is not rendered.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/stackPane/stackpane.css
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49966 Tue Jan 10 13:22:08 MST 2017 mircea.toma ICE-11197 Stop rendering redundant DIV element.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/accordion/AccordionRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49967 Tue Jan 10 13:24:12 MST 2017 mircea.toma ICE-11197 Add CSS rules to fix containment. Make StackPaneRenderer render its 'style' attribute.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/stackpane/StackPane.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/panelstack/PanelStackRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/stackpane/StackPaneRenderer.java
        Hide
        Mircea Toma added a comment -

        Introduced system event listener that decorates the resized component with a child component responsible for rendering (within the component) the client setup code for the resizable feature. This fix gets rid of the try/catch from the previous fix since the setup code is rendered only when the component to be resized is also rendered.

        Show
        Mircea Toma added a comment - Introduced system event listener that decorates the resized component with a child component responsible for rendering (within the component) the client setup code for the resizable feature. This fix gets rid of the try/catch from the previous fix since the setup code is rendered only when the component to be resized is also rendered.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49979 Tue Jan 10 14:57:05 MST 2017 mircea.toma ICE-11197 Introduce system event listener that decorates the resized component with a child component repsonsible for rendering (within the component) the client setup code for the resizable feature.
        Files Changed
        Commit graph ADD /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableListener.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/Resizable.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableRenderer.java
        Hide
        Carmen Cristurean added a comment -

        Verified ICEfaces4 trunk r 49979 on IE11, IE8, MsEdge, Chrome55, FF49. The JS errors from above comment can no longer be reproduced.
        As per Ken's request, added also test pages with multiple instances of the same container component with resizable:

        • /containment/resizablePanels.jsf
        • /containment/resizableAccordions.jsf
        • /containment/resizableTabSets.jsf
        • /containment/resizablePanelStacks.jsf
        Show
        Carmen Cristurean added a comment - Verified ICEfaces4 trunk r 49979 on IE11, IE8, MsEdge, Chrome55, FF49. The JS errors from above comment can no longer be reproduced. As per Ken's request, added also test pages with multiple instances of the same container component with resizable: /containment/resizablePanels.jsf /containment/resizableAccordions.jsf /containment/resizableTabSets.jsf /containment/resizablePanelStacks.jsf
        Carmen Cristurean made changes -
        Attachment resize.PNG [ 22419 ]
        Hide
        Mircea Toma added a comment -

        Updated tabset's CSS rules to have the tab's content container occupy its entire allowed area and consequentely the enclosed resizable component.

        Show
        Mircea Toma added a comment - Updated tabset's CSS rules to have the tab's content container occupy its entire allowed area and consequentely the enclosed resizable component.
        Hide
        Mircea Toma added a comment -

        Any container component can be resized as in attached image, by decreasing the size beyond the contained outputText limit. Is this an issue?

        No, it is not. The resized component can choose to hide or add scroll bars for the overflowed content (by using just CSS).

        Show
        Mircea Toma added a comment - Any container component can be resized as in attached image, by decreasing the size beyond the contained outputText limit. Is this an issue? No, it is not. The resized component can choose to hide or add scroll bars for the overflowed content (by using just CSS).
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49995 Wed Jan 11 15:33:20 MST 2017 mircea.toma ICE-11197 Updated tabset's CSS rules to have the tab's content container occupy its entire allowed area and consequentely the enclosed resizable component.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/tabset/tabset.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/tabset/tabset.css
        Hide
        Carmen Cristurean added a comment -

        Re-tested ace:resizable QA Ajax test with IF4 trunk r 50000, and all ajax tests fail in all browsers. This is not an issue with r. 49811.
        QA app: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/resizable
        Test: /resizableAjax.jsf

        Show
        Carmen Cristurean added a comment - Re-tested ace:resizable QA Ajax test with IF4 trunk r 50000, and all ajax tests fail in all browsers. This is not an issue with r. 49811. QA app: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/resizable Test: /resizableAjax.jsf
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Add back the the behaviour encoding for the resizable component.

        Show
        Mircea Toma added a comment - Add back the the behaviour encoding for the resizable component.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #50011 Thu Jan 12 14:35:38 MST 2017 mircea.toma ICE-11197 Encode behaviours.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/Resizable.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableRenderer.java
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        I reviewed the ajax test for ace:resizable and it is working as expected. I didn't miss any commit. Commit #50011 fixed the ajax test.

        Show
        Mircea Toma added a comment - I reviewed the ajax test for ace:resizable and it is working as expected. I didn't miss any commit. Commit #50011 fixed the ajax test.
        Hide
        Mircea Toma added a comment -

        Added back the ResizableRenderer.decode method.

        Show
        Mircea Toma added a comment - Added back the ResizableRenderer.decode method.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #50153 Tue Jan 17 08:53:17 MST 2017 mircea.toma ICE-11197 Add the decode method back.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/Resizable.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableRenderer.java
        Hide
        Carmen Cristurean added a comment - - edited

        ICEfaces4 trunk r50153 /IE11, MsEdge, Chrome55, FF49: the ajax tests have been fixed, however the ace:resizable with MandatoryResourceConfig still fails.
        All resizable graphicImage tests are missing the handle and the graphic images cannot be resized. This is an issue on all browsers.
        This was not an issue with ICEfaces 4.2.BETA libraries.

        Show
        Carmen Cristurean added a comment - - edited ICEfaces4 trunk r50153 /IE11, MsEdge, Chrome55, FF49: the ajax tests have been fixed, however the ace:resizable with MandatoryResourceConfig still fails. All resizable graphicImage tests are missing the handle and the graphic images cannot be resized. This is an issue on all browsers. This was not an issue with ICEfaces 4.2.BETA libraries.
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        I don't see that. The resize handle is there and when clicking 'Submit' button the width and height of the image is shown. I believe that is the expected behavior?! Are you sure that you are running with the latest code?

        Show
        Mircea Toma added a comment - I don't see that. The resize handle is there and when clicking 'Submit' button the width and height of the image is shown. I believe that is the expected behavior?! Are you sure that you are running with the latest code?
        Hide
        Carmen Cristurean added a comment -

        I was testing with ICEfaces4 trunk r50153, and indeed, the ace:resizable with MandatoryResourceConfig passes.
        However, all the other tests for GraphicImage don't render the handle. As example:
        /resizableOnly.jsf
        /graphicImage/resizableDynAttribute.jsf
        On other tests, the handle becomes visible after a form submit, as example:

        • after adding a row on /graphicImage/resizableTableTop.jsf
        • after switching tabs on /graphicImage/resizableSparkleTabset.jsf
          This is only an issue for the tests with the graphicImage and not for the resizable ACE container components.
        Show
        Carmen Cristurean added a comment - I was testing with ICEfaces4 trunk r50153, and indeed, the ace:resizable with MandatoryResourceConfig passes. However, all the other tests for GraphicImage don't render the handle. As example: /resizableOnly.jsf /graphicImage/resizableDynAttribute.jsf On other tests, the handle becomes visible after a form submit, as example: after adding a row on /graphicImage/resizableTableTop.jsf after switching tabs on /graphicImage/resizableSparkleTabset.jsf This is only an issue for the tests with the graphicImage and not for the resizable ACE container components.
        Hide
        Mircea Toma added a comment -

        Modified Resizable.Setup to render the setup script as child of the target component only if it already has children.

        Show
        Mircea Toma added a comment - Modified Resizable.Setup to render the setup script as child of the target component only if it already has children.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #50155 Tue Jan 17 17:11:46 MST 2017 mircea.toma ICE-11197 Render the setup script as child of the target component only if it has already children.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/Resizable.java
        Hide
        Mircea Toma added a comment -

        Hopefully the issue is resolved now.

        Show
        Mircea Toma added a comment - Hopefully the issue is resolved now.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: