On Wed, Aug 27, 2008 at 10:47 AM, Amit Rana <[EMAIL PROTECTED]> wrote:

>
>

>
>    1. I am facing a formatting issue while using Qooxdoo framework. I have
>    3 atoms (called Filter Bar, Table and Navigation Bar) which in turn hold
>    complex widgets inside them. These atoms are placed one below the other
>    (using Vertical Boxlayout). But, when I make my Table widget as resizable,
>    then as soon as my webpage loads up, the table starts as  a small box and
>    slowly expands horizontally and never stops, even after going out of the
>    screen.
>
>            The code snippet is :
>
>               *qx.Class.define("spagobi.ui.PagedTable", {
>                      extend : qx.ui.layout.VerticalBoxLayout,
>                       members : {
>                                          _filterBar: undefined,
>                                         _navigationBar: undefined,
>                                           _table: undefined
>                                          },
>
>                        construct : function(controller, data)  {
>                   //controller is the parent object which calls the
>
>                                         PagedTable class and data is the
> table's data
>                                      this.base(arguments);
>                                      this._filterBar = new
> spagobi.ui.FilterBar();          // a horizontalbox Layout widget containing
>
>
>                                              some text boxes and combo boxes
>
>                                      this._table = new 
> spagobi.ui.Table(controller,
> data);     // creates a table with some data
>
>                                      this._navigationBar = new
> spagobi.ui.NavigationBar();   // a Toolbar containing a Horizontal
>
>                                                     Boxlayout which itself
> contains some
>
> buttons
>                         }
>                     });
>
> *
>
>         Code snippet of *spagobi.ui.Table* :
>
>        * this._tableModel = new qx.ui.table.model.Simple();
>         this.base(arguments, this._tableModel,    {
>
> tableColumnModel : function(obj) {
>
>       return new qx.ui.table.columnmodel.Resize(obj);
>                                                                       }
>         });
>        var columnModel = this.getTableColumnModel();
>        var resizeBehavior = columnModel.getBehavior();
>        this._tableModel.setDataAsMapArray(data.rows, true);
> //data.rows contains the data of the tabl*e
>
>
>     So, currently I am calling *spagobi.ui.PagedTable *class which in turn
> calls *spagobi.ui.Table *and this causes the table to keep on expanding*.
> *
> But, if I directly call *spagobi.ui.Table, *then the table gets displayed
> properly. So, how do I solve it ?
>

The Resize column model uses the table's width in order to resize columns.
Since you're not specifying any particular column widths, they are all
assumed to be equal width, with the total width being the width of the
table.  And therein lies the problem.  What is the width of your table?  You
haven't specified it.  That puts the resizer into an infinite loop as it
resizes, but the width of the table has grown due to the resizing so it
resizes, but the width of the table has grown due to the resizing so it
resizes...

You should be able to fix this problem by just specifying a width for the
table:

  *this._table = new spagobi.ui.Table(controller, data);     // creates a
table with some data
  this._table.set(
    {
      width : 600
    });

*Then your table will have a width and the resizing will operate properly.

You should, I think, also be able to give it a width of "100%" and then give
your VerticalBoxLayout a width.

Cheers,

Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to