3 Replies Latest reply on Nov 17, 2010 11:23 AM by radulf

    Retrieve ExtendedDatatable Javascript Object.

    radulf

      My english is not so good, so I apologize for any bad grammar.

       

       

      My problem is as follow: I style mypage using jQuery ui-layout (http://layout.jquery-dev.net/index.cfm). The pane is consisted of panels that can be expanded/collapsed and one of them have a extended data table. The problem is when I expand/collapse one of the panels, the layout of the table is not recalculated as it is only updated when there is a window resize. I could force the call of the window resize, but I would like better to get the extended data table object and call the appropriate methods (well, assuming that for know it would be OnWindowResize method, but preferable than calling a jQuery(window).resize() for now).

       

      Is there a way a can I do this?

       

      Thanks in advance for any help.

        • 1. Re: Retrieve ExtendedDatatable Javascript Object.
          radulf

          Someone? At least I would like to know if that is not possible.

          • 2. Re: Retrieve ExtendedDatatable Javascript Object.
            ilya_shaikovsky

            try #{rich:component('edtId')}.OnWindowResize()

             

            b.t.w. client API for that component was not tested as component - community contributed.. so if will be some problems - better probably to use workaround.

            • 3. Re: Retrieve ExtendedDatatable Javascript Object.
              radulf

              It worked as charm, but i did it a little diferently. Not the best approach, but I need to retrieve the object from a .js file, where I couldn't use the EL function. So, to workaround this, i used the prototype function $$ to retrieve everything with 'extdt-maindiv' class and got its components (the part that was missing for me ). The function that is called when the panels are resized looks like this now:

               

              function westLayoutPanelResized() {
                  // only have one table.
                  var element = $$('.extdt-maindiv')[0];
                  
                  if (element != null) {
                      var extDt = element.component;
                      extDt.OnWindowResize();
                  }
              };
              

               

               

              Thanks a bunch.