ICEfaces
  1. ICEfaces
  2. ICE-6534

ace:tabSet Unresponsive After Programatically Setting selectedIndex

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      JSF 2.03 ICEfaces 2

      Description

      An actionListener on a separate component is setting the selectedIndex on my ace:tabSet as follows:

          <ace:tabSet id="tabSet"
                      clientSide="true"
                      orientation="bottom"
                      selectedIndex="#{tabset.visibleTab}"
                      rendered="#{not empty tabset.tabs}" >

      After setting this to a new value, the browser shows the selected style on the correct tab - however, the tab content does not change to reflect the new selected tab and you can no longer manually select tabs, the tabs become unresponsive in the browser.

        Activity

        Hide
        Judy Guglielmin added a comment -

        I will eventually attach my example (which does work for changing indices), but have found that the screen 3 has some permission issues:-
        decodeAIEvents is not defined

        Line 3

        try

        {updateInteractionTrace("mouse click event "+b.substr(1)+" t= "+t+" l="+l)}

        catch(e){}var trString=t+'/'+b.substr(1);var escapeTrString=escape(trString);return escapeTrString}else if(b){try

        {var eventName=decodeAIEvents(w);updateInteractionTrace(eventName)}

        catch(e){}if(/,ua/.test(b)&&d["ua"]==1&&d["tc"])b+=',acua';l=adx_tri.length

        Permission denied for <http://ad.doubleclick.net> to call method Location.toString on <http://localhost:8080>.

        Line 0

        As I said, this is particular to the iframe in screen3 (some ad permission thing in javascript). Might want to switch out the screen 3 to some other link (icefaces.org??). and see if that helps anything.

        Show
        Judy Guglielmin added a comment - I will eventually attach my example (which does work for changing indices), but have found that the screen 3 has some permission issues:- decodeAIEvents is not defined Line 3 try {updateInteractionTrace("mouse click event "+b.substr(1)+" t= "+t+" l="+l)} catch(e){}var trString=t+'/'+b.substr(1);var escapeTrString=escape(trString);return escapeTrString}else if(b){try {var eventName=decodeAIEvents(w);updateInteractionTrace(eventName)} catch(e){}if(/,ua/.test(b)&&d ["ua"] ==1&&d ["tc"] )b+=',acua';l=adx_tri.length Permission denied for < http://ad.doubleclick.net > to call method Location.toString on < http://localhost:8080 >. Line 0 As I said, this is particular to the iframe in screen3 (some ad permission thing in javascript). Might want to switch out the screen 3 to some other link (icefaces.org??). and see if that helps anything.
        Hide
        Judy Guglielmin added a comment - - edited

        workaround is to use a currentTab on the server side that is updated whenever anything is submitted to change the index (so mirror the index with a current TabPane object). Since services expects all attributes to use value binding, it looks like the selectedIndex is updated in updateProperties() in javascript, but the pane is not matched to it (similar to mark's work in use of dynamic updates not resolving certain attributes that are set in the initialize fn of our ace components.
        Will create separate example for value binding only, and TODO= modify tabSet component similar to Mark's newer version of slider so dynamic change of index will show correct pane.

        Show
        Judy Guglielmin added a comment - - edited workaround is to use a currentTab on the server side that is updated whenever anything is submitted to change the index (so mirror the index with a current TabPane object). Since services expects all attributes to use value binding, it looks like the selectedIndex is updated in updateProperties() in javascript, but the pane is not matched to it (similar to mark's work in use of dynamic updates not resolving certain attributes that are set in the initialize fn of our ace components. Will create separate example for value binding only, and TODO= modify tabSet component similar to Mark's newer version of slider so dynamic change of index will show correct pane.
        Hide
        Judy Guglielmin added a comment -

        In order to ensure value binding works when pushing tabIndex value, then the check for isClientSide should not be done in renderTabBody method of TabSetRenderer. Otherwise, the markup will always reflect the last server side selected Pane which was submitted by the actual component. Yui takes the markup and recreates a new tabview, so not sure this is the most efficient way to do this. However, the markup should always reflect the last submission, so no matter whether server or client-side, the tabIndex should be updated to whatever the last value-bound variable suggests.

        Show
        Judy Guglielmin added a comment - In order to ensure value binding works when pushing tabIndex value, then the check for isClientSide should not be done in renderTabBody method of TabSetRenderer. Otherwise, the markup will always reflect the last server side selected Pane which was submitted by the actual component. Yui takes the markup and recreates a new tabview, so not sure this is the most efficient way to do this. However, the markup should always reflect the last submission, so no matter whether server or client-side, the tabIndex should be updated to whatever the last value-bound variable suggests.
        Hide
        Judy Guglielmin added a comment -

        Brad....can you please test checkin revision 23960 for this to see if it resolves your particular application?

        Show
        Judy Guglielmin added a comment - Brad....can you please test checkin revision 23960 for this to see if it resolves your particular application?
        Hide
        Judy Guglielmin added a comment -

        do we need to do additional error checking to ensure that the index that is submitted (pushed from another component via value-binding) is valid first?

        Show
        Judy Guglielmin added a comment - do we need to do additional error checking to ensure that the index that is submitted (pushed from another component via value-binding) is valid first?
        Hide
        Brad Kroeger added a comment -

        Built the icefaces-ace.jar from the trunk and tested, working in my application.

        Show
        Brad Kroeger added a comment - Built the icefaces-ace.jar from the trunk and tested, working in my application.

          People

          • Assignee:
            Ken Fyten
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: