1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    17
    Vote Rating
    0
    pellyadolfo is on a distinguished road

      0  

    Default Unanswered: Chrome/Firefox Plugins made with GXT

    Unanswered: Chrome/Firefox Plugins made with GXT


    Hi, I was planning to create either some Chrome or Firefox plugins. I was wondering if there is any experience in migrating an existing extGWT application as a Chrome/FF plugin or maybe creating it from scratch with extGWT. Maybe any related tutorial could be enough?

    What about ExtJS?

    Any thoughts?

    Thanks.

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    17
    Vote Rating
    0
    pellyadolfo is on a distinguished road

      0  

    Default example of client side working

    example of client side working


    Here is a good example where the client side works out of the box for the GWT sample app created by Eclipse GWT plugin.

    http://hello-its-crazy.blogspot.com/...using-gwt.html



    It would be great to know what is needed to add in the manifest.json to make also work the GWT RPC and therefore the server side.


    Does anyone know what permission is needed in the manifest for this task?
    Would you expect any difference to make it work for GXT?



    Thanks.

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Posts
    17
    Vote Rating
    0
    pellyadolfo is on a distinguished road

      0  

    Default remove the iframe

    remove the iframe


    My last findings on this here:

    https://groups.google.com/a/chromium...ns/DNvKvVRLHBk

    it looks that a small template application is needed to run GXT/GWT apps as Chrome extensions.

    The only requirement looks to get rid of the iframe created on the template app by Eclipse plugins.

    Possibilities looks great to create GXT enabled Chrome extensions. Any help?

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Answers
    109
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Are you asking how to remove that iframe from the template? I'd just make another template that doesn't have it. The iframe is optional anyway, esp since a browser plugin is not going to have back/forward buttons to need that kind of history management.

    From the linked blog post at http://hello-its-crazy.blogspot.com/...using-gwt.html there is a discussion on using the sso linker to avoid the second iframe - I suspect the xs linker will also work, in place of the sso linker.

    Once any GWT app works as a browser extension, I would be surprised to find that including GXT adds any difficulty at all. All GXT code just uses existing ideas from GWT and extends them to build its components and tools.

  5. #5
    Sencha User
    Join Date
    Feb 2011
    Posts
    17
    Vote Rating
    0
    pellyadolfo is on a distinguished road

      0  

    Default no an iframe issue

    no an iframe issue


    Hi Colin, yes, thanks, you are correct. The iframe is an optional, element just for the history functionality.

    I also tried by adding:

    <add-linker name="xs" />

    to the XXXX.gwt.xml file apart from the

    <add-linker name="sso" />

    Right now is not throwing any exception but it does not either connect to server side. The issue is still open.

    Is a pitty because I can imagine great GXT Chrome extensions, but a template app, as a pattern, would be still needed. Not sure if currently is yet possible because the link and changes done by Chromium team. I will update the thread when I find out more information.

    Thanks.

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Answers
    109
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    What server side should it be connecting to? Are Chrome extensions not subject to the Same Origin Policy that normal websites are? If the page loads from one domain (i.e. the local folder where the extension is stored) and connects to a remote site (the 'server'), that may not be allowed under the S.O.P.

    Other options to consider include JSONP and CORS if that is the problem.

  7. #7
    Sencha User
    Join Date
    Feb 2011
    Posts
    17
    Vote Rating
    0
    pellyadolfo is on a distinguished road

      0  

    Default


    By server side I refer to connecting via RPC to the implementation of:

    com.google.gwt.user.server.rpc.RemoteServiceServlet;

    which provides the servlet behaviour. I set permission for this URL (localhost) in manifest.json but no luck. Do not know enough yet about Chrome extensions to find out if this is a common issue or something else, but it looks something else....

  8. #8
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Answers
    109
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Is your onFailure method getting called? Assuming so, what is the error it gets?

    I'm not sure how you expect to publish a extension that connects to a separate java server on the same machine... might need to think that through a little further.

  9. #9
    Sencha User
    Join Date
    Feb 2011
    Posts
    17
    Vote Rating
    0
    pellyadolfo is on a distinguished road

      0  

    Default


    Hi Colin, please, can we generalize the issue? My application is just THE demo application that is coming with the GWT Eclipse plugin (http://hello-its-crazy.blogspot.com/...using-gwt.html). I am trying to make this example work and THEN, I would begin creating my GXT apps as Chrome extensions. But so far I just want to obtain a template as a proof of concept and find the right configuration. I do not think I am the only one that wants to create Chrome extensions in GXT as the Chrome community is quite large.

    That said. My locahost server is just a local test, but the idea, in future, is obviously, when I create my GXT extensions, to deploy in a remote machine other than the one running Chrome, accessed from the extension via RPC from the GXT extension.

    About the onFailure, after adding the <add-linker name="xs" /> on the .gwt.xml file it looks that javascript is not longer executed in the extension so I do not even get the button of the demo app.

  10. #10
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Answers
    109
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    If it is a S.O.P. issue, no amount of client code will fix it. Maybe the manifest can be made to instruct the app to ignore such security features, but I doubt it - more likely the server will need to play along using the CORS standard, or you'll need to use JSONP.

    If the app doesn't even load, the xs linker may not be for you. I was offering that as a possible other way that the app could be wired up.

    I am happy to help, but understand that you are having problems with GWT (the framework) and Chrome (the browser), not GXT (the library of widgets that work in GWT). This forum is probably not the best place to find help. Likewise, it doesn't look like a complete project in that zip - I've only looked by clicking on the link, but I don't see .project, .classpath, etc, nor do I see a build file like an ant build.xml or a maven pom.xml. Without those pieces, I'm going to have to re-invent your project to try to understand it. Consider posting a complete project that can be easily run on someone else's machine, possibly with ant/maven/eclipse, probably in some kind of source control (github/googlecode/bitbucket) so others can offer changes back.

    I agree that this is an interesting idea, but I hope that likewise you can agree that you are asking for help in the wrong place and not giving a reasonable sample that can be run. If it were my project, I would start with just a html file with some very simple JS to prove that this aspect can work. Then, add in GWT to make sure GWT compiled JS behaves. Next, add the calls to the server, using whatever debugging is available (onFailure logs, Chrome's Inspector, any server logs, etc), and finally adding more complex interesting widgets (which only change the html - if you've gotten that far, adding more shouldn't be too hard). What you are experimenting with is non-standard so far, but if you get it to work, you'll be able to help others by distributing a sample project to make it more standard - possibly a maven archetype to make it easy to start sample projects.