Thank You to Fritz, Derrell and Simon!  It took a bit of playing with in the 
sandbox, but I finally got a working solution.

Here is what I finally came up with:

Application.js:
qx.Class.define("h4.Application",
{
  extend : qx.application.Standalone,

  members :
  {
    main : function()
    {
      // Call super class
      this.base(arguments);

      // Enable logging in debug variant
      if (qx.core.Environment.get("qx.debug"))
      {
        // support native logging capabilities, e.g. Firebug for Firefox
        qx.log.appender.Native;
        // support additional cross-browser console. Press F7 to toggle 
visibility
        qx.log.appender.Console;
      }

      var scroller = new qx.ui.container.Scroll();

      var container = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
      container.setPadding(20);
      container.setAllowStretchX(false);

      scroller.add(container);

      this.getRoot().add(scroller, {edge : 0});

      container.add(this.getTabView1());
    },

    getTabView1 : function()
    {
      var tabView = new qx.ui.tabview.TabView();
      tabView.setWidth(500);


      ////////////////// TEST PAGE 1 ////////////////////
      var page1 = new qx.ui.tabview.Page("Layout", 
"icon/16/apps/utilities-terminal.png");
      page1.setLayout(new qx.ui.layout.VBox());
      page1.add(new qx.ui.basic.Label("Layout-Settings"));
      tabView.add(page1);

      ////////////////// TEST PAGE 5 ////////////////////

      var page5 = new h4.view.Twitter();

      tabView.add(page5);

      return tabView;
    }
  }
});

view/Twitter.js:
qx.Class.define("h4.view.Twitter",
{
 extend : qx.ui.tabview.Page,

 construct : function()
 {
   this.base(arguments, "Twitter");

   // hide the window buttons
   this.setShowCloseButton(false);
  this.add(new qx.ui.basic.Label("Twitter view"));

   // adjust size
   this.setWidth(250);
   this.setHeight(300);
 }

});

Thanks again!

Harlan...

----- Original Message -----
From: "Simon White" <[email protected]>
To: [email protected]
Sent: Thursday, February 2, 2012 8:07:25 AM
Subject: Re: [qooxdoo-devel] Pages in separate files/classes for TabView

Hi

I do this all the time. I create a TabView or what I am use to calling a 
pageFrame (pgfStd) and the pages.  Then on each page I set the property 
dcClass to the class name that will be loaded when the tabPage is activated.


this.add(this.__pgfStd,{top: "0%", left: "0%", width: "100%",height: 
"100%"});
this.__pgStd1 = new dcbase.pgStd({set: {label: "Customers"},dcClass: 
kardpoll.conBP3rdParty_Customers});
this.__pgfStd.addAt(this.__pgStd1,0);
this.__pgStd2 = new dcbase.pgStd({set: {label: "Cards"},dcClass: 
kardpoll.conBP3rdParty_Cards})
this.__pgfStd.addAt(this.__pgStd2,1);
this.__pgStd3 = new dcbase.pgStd({set: {label: "Transactions"},dcClass: 
kardpoll.conBP3rdParty_Transactions})
this.__pgfStd.addAt(this.__pgStd3,2);

The in the constructor of the tabPage I had a listener for the 
activation of the page which checks to see if it has any children.  If 
not it then loads the class specified in the dcClass property.

qx.Class.define("dcbase.pgStd",
{
        extend : qx.ui.tabview.Page,
        construct : function (tmConfig)
        {
                this.base(arguments);

         this.setPaddingTop(0);
         this.setLayout(new dcbase.layCanvas())
         this.getChildControl("button").addListener("activate",function(e){
             if (!this.hasChildren())
             {
                 this.__conPresObj = new tmConfig.dcClass();
/*
     Alternate method for getting the Presentation Object's class name

                 var lcWin = 
qx.core.Init.getApplication().getDesktop().getActiveWindow().classname;
                 var clazz = 
qx.Class.getByName(lcWin.substr(0,lcWin.indexOf("."))+".con"+lcWin.substr(lcWin.indexOf(".")+4)+"_"+this.getChildControl("button").getLabel());
                 this.__conPresObj  = new clazz();
*/
                 this.add(this.__conPresObj,{width: "100%",height: "100%"});
             }
         },this)

         if (tmConfig != undefined && tmConfig.set != null)
             this.set(tmConfig.set);
        }
});

Hope this helps.

Simon






On 01/02/2012 8:30 PM, Harlan H. Bloom wrote:
> Hello,
> I'm trying to use TabView and to define the pages in separate
> files/classes. The only examples I've seen are where the pages are
> in-line with the TabView.
>
> Anyone have any idea where I can find an example where the TabView is
> separate from its pages?
>
> Thanks,
>
> Harlan...
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to