Hello all,

I'm creating popup table objects using Table.model.Simple, linked to
user entry in a corresponding text field.  Eventually, the textfield
values are going to cause the tables to get populated with appropriate
data as the user types, but for now I'm just trying to get them to
display and hide appropriately.  I'm incorporating these widgets into my
page using the "Inline" method and corresponding DIV containers.

The table is displayed correctly whenever I type in the textfield (using
the "input" event), but it remains visible when I remove focus from the
textfield.

In the demobrowser example for popups, it uses Atom objects displayed
through a button click event, and the popup objects disappear when the
focus is removed from BOTH the button and the popup, but not before.
I've examined the js code in this demo, and I don't see anything special
there to control the auto-hide of the popup.

I finally added a "focusout" event listener on the textfield to hide the
popup, and it works fine unless I want to click on something in the
popup table.  In this case, the click in the table object is interpreted
as a loss of focus on the textfield and the table closes.  I think this
is because it's not a child of the textfield even though it's displayed
by the textfield event.  I don't think I can add the popup table as a
child of the textfield to prevent this because it is already added to
the popup object.  It would not make sense to "add" an object to two
different containers, right?

How do I get the tables to close whenever I click outside of the
textfield or table, but remain as long as I'm "focused" on one of these
two objects.

Here's the popup code I'm using:

      // Create popup order table
      var ordertableModel = new qx.ui.table.model.Simple();
      ordertableModel.setColumns([ "Order", "Customer", "Date" ]);
      var ordertable = new qx.ui.table.Table(ordertableModel);
      ordertable.set({width: 400, height: 400, decorator: null});

      // Now create the popup container for ordernumbertable
      var onpopup = new qx.ui.popup.Popup(new qx.ui.layout.Basic());
      onpopup.add(ordertable);

      // Add a popup listener
      orderno.addListener("input", function(e) {
        onpopup.placeToWidget(orderno, true);
        onpopup.show();
      }, this);

      // Add a popup listener
      orderno.addListener("focusout", function(e) {
        onpopup.hide();
      });

BTW, I've added two different textfield/table pairs in my page, and when
I click on the second textfield, the popup table from the first
textfield remains visible, even when the popup table from the second
textfield is displayed, but if I click within the second popup table,
THEN the first popup table goes away.

Am I missing something basic in the popup object settings?  Is this
because I'm using the Inline method instead of an application method?
Or is something not working as it should?

Thanks,

  Gene Amtower
  PC Backup
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to