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

        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
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: