ICEmobile
  1. ICEmobile
  2. MOBI-611

accordion doesn't submit if only a single contentPane is child

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Final
    • Fix Version/s: 1.3 Beta, EE 1.2
    • Component/s: Faces
    • Labels:
      None
    • Environment:
      icemobile

      Description

      accordion component assumed > 1 panel, so submit was done when panel changed. WIth a single panel that is not the case, so modify component such that if a single contentPane is part of the accordion, then the submit always happens (unless client="true" in which case no submit happens).
      1. accordionDiff
        0.6 kB
        Judy Guglielmin

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32993 Tue Jan 08 14:11:02 MST 2013 judy.guglielmin MOBI-611 to svn trunk with test page for mobitest
        Files Changed
        Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/accordion/accordionSingleContentPane.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layoutComponents.html
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.accordion/accordion.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32999 Tue Jan 08 16:30:29 MST 2013 judy.guglielmin MOBI-611 see jura as slight issue still remaining regarding first time the view is loaded and the panel may have to be toggled twice to reopen (only with single contentPane as child though).
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/component/resources/org.icefaces.component.accordion/accordion.js
        Commit graph ADD /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/accordion/accordionSingleContentPane.xhtml
        Commit graph MODIFY /icemobile/branches/icemobile-1.2.0-191212/icemobile/jsf/components/tests/mobitest/src/main/webapp/layoutComponents.html
        Judy Guglielmin created issue -
        Judy Guglielmin made changes -
        Field Original Value New Value
        Component/s Spring [ 10063 ]
        Judy Guglielmin made changes -
        Assignee Steve Maryka [ steve.maryka ] Judy Guglielmin [ judy.guglielmin ]
        Hide
        Judy Guglielmin added a comment -

        since component does not submit itself in jsp this is for jsf version of component only.

        Show
        Judy Guglielmin added a comment - since component does not submit itself in jsp this is for jsf version of component only.
        Hide
        Judy Guglielmin added a comment -

        diff between rev 32993 (fixed checkin) and 1.2 Final

        Show
        Judy Guglielmin added a comment - diff between rev 32993 (fixed checkin) and 1.2 Final
        Judy Guglielmin made changes -
        Attachment accordionDiff [ 15321 ]
        Hide
        Judy Guglielmin added a comment -

        slight problem still in that the first time the page loads (see mobitest/layout/accordion/accordionSingleContentPane.jsf)
        the panel closes fine but takes 2 clicks to reopen the first time you try to reopen it. After that it works fine each and every time.
        Complications arise from renderer always placing the "close" style on the section element. THIs was done in order to make the updates as small as possible with DOMDiff. If the renderer starts to mess around with the section markup, then the entire accordion gets updated. updateProperties should be able to set the style correctly, but for some reason, the first update occurs three times (so updateProperties gets run three times after the view is submitted). After that it just occurs once.
        Still going to place rev 32993 fix into 1.2 EE Branch as at least the accordion will open (when it would not before when using a single contentPane).

        Show
        Judy Guglielmin added a comment - slight problem still in that the first time the page loads (see mobitest/layout/accordion/accordionSingleContentPane.jsf) the panel closes fine but takes 2 clicks to reopen the first time you try to reopen it. After that it works fine each and every time. Complications arise from renderer always placing the "close" style on the section element. THIs was done in order to make the updates as small as possible with DOMDiff. If the renderer starts to mess around with the section markup, then the entire accordion gets updated. updateProperties should be able to set the style correctly, but for some reason, the first update occurs three times (so updateProperties gets run three times after the view is submitted). After that it just occurs once. Still going to place rev 32993 fix into 1.2 EE Branch as at least the accordion will open (when it would not before when using a single contentPane).
        Hide
        Judy Guglielmin added a comment -

        rev 32935 for 1.2 EE branch for same fix as 32993.

        Show
        Judy Guglielmin added a comment - rev 32935 for 1.2 EE branch for same fix as 32993.
        Hide
        Judy Guglielmin added a comment -

        — accordion.js (revision 32993)
        +++ accordion.js (working copy)
        @@ -183,6 +183,10 @@
        } else {
        //contents may have changed so get new ones or may be single pane MOBI-611
        if (cached!=true)

        { + cntr= cntr + 1; + //try to keep correct pane open despite caching + var submitted = subString +","+cntr; + updateHidden(clientId,submitted); ice.se(null, clientId); }

        openPane( openElem, fixedHeight);
        @@ -209,6 +213,18 @@
        }
        }
        },

        with this diff, the server is updated even though the selected id does not change, however the actionListener is not queued and a new selected id is not set (since it didn't change after all), however, the hash code is regenerated to trigger update properties.
        toggle, works as it should and the panel is opened.
        Renderer code puts class to "closed" to minimize size of updates.
        updateProperties should then ensure the correct panel is opened. (sets class to "open"). this does give a bit of a flicker though, so have to come up with something better for 1.3 Beta.

        Show
        Judy Guglielmin added a comment - — accordion.js (revision 32993) +++ accordion.js (working copy) @@ -183,6 +183,10 @@ } else { //contents may have changed so get new ones or may be single pane MOBI-611 if (cached!=true) { + cntr= cntr + 1; + //try to keep correct pane open despite caching + var submitted = subString +","+cntr; + updateHidden(clientId,submitted); ice.se(null, clientId); } openPane( openElem, fixedHeight); @@ -209,6 +213,18 @@ } } }, with this diff, the server is updated even though the selected id does not change, however the actionListener is not queued and a new selected id is not set (since it didn't change after all), however, the hash code is regenerated to trigger update properties. toggle, works as it should and the panel is opened. Renderer code puts class to "closed" to minimize size of updates. updateProperties should then ensure the correct panel is opened. (sets class to "open"). this does give a bit of a flicker though, so have to come up with something better for 1.3 Beta.
        Judy Guglielmin made changes -
        Fix Version/s 1.3 Beta [ 10373 ]
        Judy Guglielmin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2 EE [ 10372 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: