0 Replies Latest reply on Nov 21, 2012 3:39 PM by JasonLLee

    html5smartimage hasData() is false?

    JasonLLee

      Hi all:

       

      I'd have a dialog with two tabs (cq:Widget); tab1, tab2

      tab1 and tab2 have xtype html5smartimage

       

      What I want to do is ensure if there is no image in tab1 disable tab2

       

       

      my dialog has a listener on beforeshow that calls the following function in my clientlib:

       

      MyTabs.initButtonImageTabs = function(tabPanel) {

       

      var mainImageTab = tabPanel.getComponent('tab1');

      var hoverImageTab = tabPanel.getComponent('tab2');

      if (mainImageTab.hasData()) {

         hoverImageTab.enable();

      } else {

         hoverImageTab.disable();

      }

         tabPanel.doLayout();

      };


      I've confirmed that the xtype for mainImageTab is html5smartimage.


      The problem I am running into is that even when there is an image added in tab 1, my hasData() check above always returns false!?!

      Actually, hasReferencedData() and hasUploadedData() also return false too. 

       

      Which makes me think that I am not referencing the actual image?

       

      Can anyone tell me what I am missing, please?

       

      tab1_properties.png

       

      tab_structure.png