1. #1
    Ext User
    Join Date
    Jul 2009
    Posts
    7
    Vote Rating
    0
    kai_tea is on a distinguished road

      0  

    Default Similar function as Ext.getCmp for Ext Gwt Application

    Similar function as Ext.getCmp for Ext Gwt Application


    Hi Everyone,

    Does anyone know if there is a similar "window.Ext.getCmp" (for Ext JS App) type of a call I can make on a Ext GWT application. I tried this function call but it does not work for a Ext GWT application. Your help will be greatly appreciated.

    Thanks.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You can use the componentmanager for this.

  3. #3
    Ext User
    Join Date
    Jul 2009
    Posts
    7
    Vote Rating
    0
    kai_tea is on a distinguished road

      0  

    Default


    Thank you for the prompt reply.

    I don't see the componentmanager in the DOM with Firebug. Is this exposed in the DOM?
    What I am trying to do is something similar to this that can be done with ExtJS:
    window.Ext.getCmp(’login-window’)

    I want to execute some similar javascript as above with my test framework so that I can get back the id of the component and easily interact with it.

    Thanks for your help.

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You can expose componentmanager to javascript, but you really dont want to do this. If you need to do it, you should think about if it is correct what you are trying to do.

  5. #5
    Ext User
    Join Date
    Jul 2009
    Posts
    7
    Vote Rating
    0
    kai_tea is on a distinguished road

      0  

    Default


    Hi,

    The reason I want to get a handle on the ComponentManager or something is similar is so I can execute some similar javascript code like this: "window.Ext.getCmp(’change-password-window’)"

    I am using a testing framework called Selenium and want to execute the above Javascript with Selenium so that I can get the ID of the component and easily interact with it. Right now, writing xpaths to accomplish this makes the test case very brittle.

    Is there a function that Ext GWT provides that will allow me to execute some javascript to get reference to the ExtGWT component and easily get its ID?

    Thanks.

  6. #6
    Ext User
    Join Date
    Feb 2008
    Posts
    145
    Vote Rating
    1
    cabster is on a distinguished road

      0  

    Default


    Quote Originally Posted by kai_tea View Post
    Hi Everyone,

    Does anyone know if there is a similar "window.Ext.getCmp" (for Ext JS App) type of a call I can make on a Ext GWT application. I tried this function call but it does not work for a Ext GWT application. Your help will be greatly appreciated.

    Thanks.
    Does anybody know the answer? I need a component id to see if it already exists.
    fGwNetworks.nl Rich Internet Application development

  7. #7
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,241
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Components are not accessible via external JavaScript as GWT compiles the Java code into JavaScript. You can expose methods to external JavaScript with GWT. See http://code.google.com/webtoolkit/do...I.html#calling.

  8. #8
    Ext User
    Join Date
    Feb 2008
    Posts
    145
    Vote Rating
    1
    cabster is on a distinguished road

      0  

    Default


    The getCmp function helped me to see if a component already existed.

    something like:

    Code:
    if(window.getCmp(id).exist()){
      -> close window
    }
    Thats what i'm trying to do. Maybe there is an other method that can help me with this.
    fGwNetworks.nl Rich Internet Application development

  9. #9
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    If the window is attached (shown) you can use the componentmanager. If not, you simple keep a reference to it somewhere.

  10. #10
    Ext User
    Join Date
    Feb 2008
    Posts
    145
    Vote Rating
    1
    cabster is on a distinguished road

      0  

    Default


    Thank you very much. That worked out
    fGwNetworks.nl Rich Internet Application development

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar