'parent' was not such a bad idea, but you have to get at actual object 
instances, not the class objects. here is a general way of accessing 
live objects in the "parent" application:

parent.qx.core.Init.getInstance().getApplication().viewer

(because if you look at the code, the DemoBrowser instance was added to 
the Application instance as the 'viewer' member). this also implies that 
you need some reference from your application object to access other 
objects. i think you get the pattern.

this uses 'relative' addressing with 'parent'. there is also an 
'absolute' addressing scheme using 'window':

window.top.qx.core.Init.getInstance().getApplication().viewer

see what works best for you.

thomas


kanugula wrote:
> Hi,
>
> My application is built on Demo Browser. For simplicity, I am using Demo
> Browser terminalogy.
>
> I want to pass the Demo Browser Tree node name "example" to Atom_1.html to
> enable/disable buttons based on Node Name and Role. For that, I defined a
> property called "selectedNodeName" inside DemoBroweser.js and initialize it
> as follows. And the Node Name sets correctly!
>   /*
>  
> *****************************************************************************
>      PROPERTIES
>  
> *****************************************************************************
>   */
>   properties :
>   {   
>    selectedNodeName :
>    {        
>       nullable : false
>    }                                      
>   },
>
> members :
>     treeGetSelection : function(e)
>     {
>       if (!this.tree.getSelectedElement())
>       {  // this is a kludge!
>         return;
>       }
>       
>       //set the selected Node name. We need to access it in the IFrame html
> page to set the Roles.
>       if (e.getData().length > 0) {
>          
> this.setSelectedNodeName(e.getData()[0].getLabelObject().getText());      
>       }
> }
>
> I need to check this Node Name inside Atom_1.html to enable/disable buttons
> based on user role settings. My User Role settings is a map of Demo Browser
> Node  Names/Roles retrieved from a database when user logs in as follows.
> qx.core.Security.role =
> {"example":"Write","test":"ReadOnly","performance":"ReadOnly"};
>
> Could you tell me if there is a way to access demobrowser.DemoBrowser
> instance inside Atom_1.html?
>
> I tried something like using parent.
> parent.demobrowser.DemoBrowser.getSelectedNodeName(). It doesn't work.
> Because it is not an instance.
>
> Thank you.
> Kanugula.
>   


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to