ICEfaces
  1. ICEfaces
  2. ICE-7627

ace:tabPane - dynamically changing disabled attribute doesn't allow selection of tab

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.GA, 3.0.RC1, 3.0.RC2
    • Fix Version/s: 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces EE 2.0, ICEfaces 3.0RC
    • Assignee Priority:
      P1

      Description

      Dynamically changing the disabled attribute on the ace:tabPane component does not allow the tab to be selected after it is activated. The tab is shown as being selectable but selection does not happen. If the browser is refreshed then the tabs can now be selected.

        Activity

        Hide
        Nils Lundquist added a comment -

        The styling issues I mention above aren't of concern. The fixed version looks fine.

        However the on-construction selection of the selectedIndex that occurs before our JS can apply the disabled property, will be very problematic. I don't see how this could be avoided without large modifications to the YUI code, or fixing the larger issue using yet some other technique.

        The issue is we want to initialize the tabs with the disabled style class so the YUI construction won't do an initial selection. However later when we remove that disabled style class and enable the tab, we don't want an update (that kills our events), or that update has to somehow play nice with YUI, and rebind the new DOM element.

        Show
        Nils Lundquist added a comment - The styling issues I mention above aren't of concern. The fixed version looks fine. However the on-construction selection of the selectedIndex that occurs before our JS can apply the disabled property, will be very problematic. I don't see how this could be avoided without large modifications to the YUI code, or fixing the larger issue using yet some other technique. The issue is we want to initialize the tabs with the disabled style class so the YUI construction won't do an initial selection. However later when we remove that disabled style class and enable the tab, we don't want an update (that kills our events), or that update has to somehow play nice with YUI, and rebind the new DOM element.
        Hide
        Nils Lundquist added a comment -

        ICE-7627 - Partial fix for dynamic tabpane disabled issues. Using JS-managed state as DOM update ruined the existing Tab object, and I could not find a way to rebind the Tab object to the new DOM element; and removing the now DOM-less Tab from the TabView caused an error, so a newly created Tab object could not be added in its place. This change to JS initialized state however has introduced another problematic behaviour, that the selectedIndex is always loaded at tabset creation even though it is disabled by further constructor calls shortly after. Either the disabling will need to occur at Tab creation, during TabSet creation, or eventually the old technique will need to be used, and must elegantly update or replace the existing Tab object, rather than breaking it.

        Show
        Nils Lundquist added a comment - ICE-7627 - Partial fix for dynamic tabpane disabled issues. Using JS-managed state as DOM update ruined the existing Tab object, and I could not find a way to rebind the Tab object to the new DOM element; and removing the now DOM-less Tab from the TabView caused an error, so a newly created Tab object could not be added in its place. This change to JS initialized state however has introduced another problematic behaviour, that the selectedIndex is always loaded at tabset creation even though it is disabled by further constructor calls shortly after. Either the disabling will need to occur at Tab creation, during TabSet creation, or eventually the old technique will need to be used, and must elegantly update or replace the existing Tab object, rather than breaking it.
        Hide
        Nils Lundquist added a comment - - edited

        Reassigning to Mark for eventual revision to fix selectedIndex initialization.

        More extensive YUI knowledge will be required to gracefully update/replace the Tab object that has been destroyed by the DOM update, or modify the TabView construction so that my technique of JS disabled initialization occurs soon enough to prevent the invalid initial selection.

        Show
        Nils Lundquist added a comment - - edited Reassigning to Mark for eventual revision to fix selectedIndex initialization. More extensive YUI knowledge will be required to gracefully update/replace the Tab object that has been destroyed by the DOM update, or modify the TabView construction so that my technique of JS disabled initialization occurs soon enough to prevent the invalid initial selection.
        Hide
        Nils Lundquist added a comment -

        Added custom styling and backported change to 2.X EE maintenance.

        Show
        Nils Lundquist added a comment - Added custom styling and backported change to 2.X EE maintenance.
        Hide
        Nils Lundquist added a comment -

        Fixed again in this other branch.

        Revision #27275
        ICE-7627 - Backporting tabset dynamic disabled attribute fix.

        Show
        Nils Lundquist added a comment - Fixed again in this other branch. Revision #27275 ICE-7627 - Backporting tabset dynamic disabled attribute fix.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: