On Tuesday 06 February 2007 23:30, you wrote:
> Just to satisfy my curiosity, why do you 'need' to use an html table? I
> stopped using them years ago in favor of DIV's and CSS. What do you think
> an html table gives you that a qooxdoo control or plain div's can't give
> you?
>
> Jim

Well, I have very special task to generate form layouts depending on given 
configuration. I've attached the file with the sample configuration and 
layout algorithm (view it with the fixed font size plz to get the idea).

And html table meets the described requirements and doesn't make me to do any 
calculations, etc. It is the easiest way to get it work.

Perhaps, anyone could suggest more elegant solution of this problem?

Thanks,
        Alexei Golovko


> On 2/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi Sebastian,
> >
> > I see, but I really need this functionality working, since I need the
> > html table, which has great positioning abilities.
> >
> > Thanks,
> >         Alexei Golovko
> >
> > > This should work. But this is really not a thing qooxdoo supports.
> > > The element property can be seen as protected - even if not declared
> > > as this currently.
> > >
> > > Sebastian
> > >
> > > Am 06.02.2007 um 21:45 schrieb [EMAIL PROTECTED]:
> > > > Thanks for your help, Derrell.
> > > > I have one more question - will this code work:
> > > >
> > > > var test = document.getElementById('test');
> > > > var btnRun = new qx.ui.form.Button('Run!');
> > > > btnRun.set({...});
> > > > qx.ui.core.Widget.flushGlobalQueues();
> > > >
> > > > test.appendChild(btnRun.getElement());
> > > >
> > > >>> And one more related question. Here is the piece of code:
> > > >>>
> > > >>> var test = document.getElementById('test');
> > > >>> var btnRun = new qx.ui.form.Button('Run!');
> > > >>> btnRun.set({...});
> > > >>>
> > > >>> // how could I add btnRun to test?
> > > >>> // something like test.add(btnRun);
> > > >>>
> > > >>> Perhaps, some low-level hack could help?
> > > >>
> > > >> I think you may be trying to use qooxdoo when qooxdoo isn't
> > > >> appropriate, or
> > > >> trying to use raw DOM when it isn't appropriate.  The two don't
> > > >> mix well
> > > >> because qooxdoo keeps lots of stuff in queues and renders it all
> > > >> at the
> > > >> same time (some time later than you creating the widget).  It's
> > > >> therefore
> > > >> difficult (impossible) to get the rendered elements at the point
> > > >> in the
> > > >> code that you're trying to do it,since they haven't been rendered
> > > >> yet.
> > > >> It's probably worth rethinking what you're trying to do here.
> > > >>
> > > >> You should be able to get at the actual DOM element created for
> > > >> btnRun with
> > > >> btnRun.getElement().  However, that's not available until btnRun
> > > >> has been
> > > >> rendered, which apparently isn't what you want.
> > > >>
> > > >> Derrell
> > > >
> > > > Thanks,
> > > >     Alexei Golovko
> > > >
> > > > ---------------------------------------------------------------------
> > > >- ---
> > > > Using Tomcat but need to do more? Need to support web services,
> > > > security?
> > > > Get stuff done quickly with pre-integrated technology to make your
> > > > job easier.
> > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > > > Geronimo
> > > > http://sel.as-us.falkag.net/sel?
> > > > cmd=lnk&kid=120709&bid=263057&dat=121642
> > > > _______________________________________________
> > > > qooxdoo-devel mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier.
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
The layout mechanism basically associates each field with a coordinate,
Xn:Ym where X/Y are letters and designates the staring/ending, and n/m
are numbers and designate the row.  If :Ym is omitted, it is assumed
that the field starts and ends in the same cell.

For example, let's talk about the columns of employee plus restricted_info
as presented together in a single layout.

  empl_code: { coordinate: 'A1', label: 'Code' }
  email: { coordinates: 'B1, label: 'Email' }
  is_contractor: { coordinates: 'C1' }
  full_name: { coordinates 'A2:C2', label: 'Full Name' }
  reports_to: { coordinates: 'A3', label: 'Manager' }
  restricted_info.tax_id: { coordinates: 'B3:C3', label='Tax Id' }
  billing_rate: { coordinates: 'A4', label: 'Rate' }
  birth_date: { coordinates: 'A5', label: 'DOB' }
  memo: { coordinates: 'B4:C5', label: 'Memo' }

Ok.  The first part of the analysis would calculate C4 as the right-most
corner, even though C4 is unoccupied.   The next phase determines that
columns A and B have a label (but column C does not, since no fields
start in column C and also have a label.  Hence, we have 5 colums total,
A*, A, B*, B, C  where A* and B* are the label columns for A and B.

At this point, we calculate the width of A* and B* via character analys
on the maximum label width for those cells.  Labels in A* are: 'Code',
'Full Name', 'Rate'.  So the width is 9 characters, plus one more
character for the colon ":", making 10.  For B* we have 'Email','Tax
Id', 'DOB', for a width of 6+1 characters.  Using high level algebra and
topology, we discover that labels are 17 characters total. given a 78
column screen (and 4*3 dividers and 2*2 = 16 spacing characters), this
leaves 45 characters ot be shared by 3 data columns, 15 characters each.

4*3+2*2=

| -- A* ---- | ------ A ------ | - B* -- | ------ B ------ | ------ C ------ |
123456789012345678901234567890123456789012345678901234567890123456789012345678
+----------------------------------------------------------------------------+
|      Code: | [empl_code....] |  EMail: | [email........] | [is_contractor] |
| Full Name: | [full_name..................................................] |
|   Manager: | [reports_to...] | Tax Id: | [tax_id.........................] |
|      Rate: | [rate.........] |   Memo: | [................................ |
|       DOB: | [birth_date...] |           [...............................] |
------------------------------------------------------------------------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to