Saturday, January 31, 2015

Re: Why doesn't GWT just export everything automattically

That's a good point. I understand why they don't export everything automatically now, but if they won't export everything automatically then I want an easier way to export classes without changing them. The most common reason to not change code in order to export it is if it's in a library. Messing with a library's code would be a lot of trouble. GWT exporter's mechanism for exporting classes without changing them is also difficult.

On Saturday, January 31, 2015 at 6:00:29 PM UTC-5, Peter Donald wrote:


On Sun, Feb 1, 2015 at 8:58 AM, Joseph Gardi <jgle...@gmail.com> wrote:
right now GWT will export things if you tell using GWT exporter. In the GWT 3.0 it'll you can use JsInterfaces etcetera which is much better than GWT exporter and built into the compiler. It seems like it'd still be very complicated to build a hybrid app with GWT and JavaScript because you have to tell the compiler what things to export. Why doesn't GWT just export everything automatically? This would be a dramatic simplification. I understand that there might be a small performance cost but I think it'd be worth it. Doesn't regular javaScript code remain accessible when minified? I don't see why GWT shouldn't do the same.

GWT uses an optimizing compiler not a transpiler and minimizer, so GWT does more than just convert java to javascript and minify it. It removes any code it can determine that is not being used. It also rewrites code that is used to be far more optimal, which often results in methods/fields being elided. If "all" code was exported then it could not perform these optimizations and the performance would be intolerably slow. I don't know how GWT exporter works but I presume it is by identifying further entry points that can't be optimized away. 

--
Cheers,

Peter Donald

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Why doesn't GWT just export everything automattically



On Sun, Feb 1, 2015 at 8:58 AM, Joseph Gardi <jgleoj23@gmail.com> wrote:
right now GWT will export things if you tell using GWT exporter. In the GWT 3.0 it'll you can use JsInterfaces etcetera which is much better than GWT exporter and built into the compiler. It seems like it'd still be very complicated to build a hybrid app with GWT and JavaScript because you have to tell the compiler what things to export. Why doesn't GWT just export everything automatically? This would be a dramatic simplification. I understand that there might be a small performance cost but I think it'd be worth it. Doesn't regular javaScript code remain accessible when minified? I don't see why GWT shouldn't do the same.

GWT uses an optimizing compiler not a transpiler and minimizer, so GWT does more than just convert java to javascript and minify it. It removes any code it can determine that is not being used. It also rewrites code that is used to be far more optimal, which often results in methods/fields being elided. If "all" code was exported then it could not perform these optimizations and the performance would be intolerably slow. I don't know how GWT exporter works but I presume it is by identifying further entry points that can't be optimized away. 

--
Cheers,

Peter Donald

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Why doesn't GWT just export everything automattically

The reason I'm interested in this is because I've been in js interop hell lately. I'm trying to export my stuff to javaScript so that JavaScript code can use it. I'm having a lot of trouble though. Just exporting my regular stuff has been a lot of trouble. But exporting my libraries would involve a ridiculous amount of boiler plate code. I decided to just use javaScript for this part.

On Saturday, January 31, 2015 at 5:07:31 PM UTC-5, Joseph Gardi wrote:
Edit: the variables names in functions in javaScript code are shortened when minified but that's it. This doesn't cause issues because variables within functions don't need to be exported since they're limited to the scope of that function. Conversely, public variables and methods should be exported automatically. The minor performance loss should be ignored. Like Donald Knuth says: "Premature optimization is the root of all evil". 

On Saturday, January 31, 2015 at 4:58:15 PM UTC-5, Joseph Gardi wrote:
right now GWT will export things if you tell using GWT exporter. In the GWT 3.0 it'll you can use JsInterfaces etcetera which is much better than GWT exporter and built into the compiler. It seems like it'd still be very complicated to build a hybrid app with GWT and JavaScript because you have to tell the compiler what things to export. Why doesn't GWT just export everything automatically? This would be a dramatic simplification. I understand that there might be a small performance cost but I think it'd be worth it. Doesn't regular javaScript code remain accessible when minified? I don't see why GWT shouldn't do the same.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Why doesn't GWT just export everything automattically

Edit: the variables names in functions in javaScript code are shortened when minified but that's it. This doesn't cause issues because variables within functions don't need to be exported since they're limited to the scope of that function. Conversely, public variables and methods should be exported automatically. The minor performance loss should be ignored. Like Donald Knuth says: "Premature optimization is the root of all evil". 

On Saturday, January 31, 2015 at 4:58:15 PM UTC-5, Joseph Gardi wrote:
right now GWT will export things if you tell using GWT exporter. In the GWT 3.0 it'll you can use JsInterfaces etcetera which is much better than GWT exporter and built into the compiler. It seems like it'd still be very complicated to build a hybrid app with GWT and JavaScript because you have to tell the compiler what things to export. Why doesn't GWT just export everything automatically? This would be a dramatic simplification. I understand that there might be a small performance cost but I think it'd be worth it. Doesn't regular javaScript code remain accessible when minified? I don't see why GWT shouldn't do the same.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Why doesn't GWT just export everything automattically

right now GWT will export things if you tell using GWT exporter. In the GWT 3.0 it'll you can use JsInterfaces etcetera which is much better than GWT exporter and built into the compiler. It seems like it'd still be very complicated to build a hybrid app with GWT and JavaScript because you have to tell the compiler what things to export. Why doesn't GWT just export everything automatically? This would be a dramatic simplification. I understand that there might be a small performance cost but I think it'd be worth it. Doesn't regular javaScript code remain accessible when minified? I don't see why GWT shouldn't do the same.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Possible performance enhancements for CalendarUtil.getDaysBetween()

I must admit I didn't spend enough time to fully understand why the gwt original  implementation did all that stuff for resetting time. Many thanks for the detailed explanation.
At the moment I have no access to dev tools, anyway I'm just wondering if there's still room for optimizations without incurring in bugs: i.e. if resetting dates time is needed, then CalendarUtils could keep two private static Date instances instead of instantiating two new dates per call (that should be safe until there's no multithreading)

2015-01-31 3:08 GMT+01:00 Jens <jens.nehlmeier@gmail.com>:
Your implementation does not have same behavior as the original GWT one.

GWTs implementation resets hours, minutes, seconds and milliseconds while your implementation only resets milliseconds AND you reset them wrong as well :) For negative getTime() your calculation moves time to the next second into the future which is wrong because when you reset time you always want to go into the past (so you do not modify the actual day accidentally)

As you only have modified the way aTime and bTime are calculated I have printed them for current GWT implementation and your new implementation. See output:

start: 1969-12-31 22:30:30.500
end: 1970-01-02 15:30:30.500

current GWT aTime: -90000000 => Date: 1969-12-31 00:00:00.000
current GWT bTime: 82800000 => Date: 1970-01-02 00:00:00.000
current GWT days between: 2

new aTime: -8969000 => Date: 1969-12-31 22:30:31.000
new bTime: 138630000 => Date: 1970-01-02 15:30:30.000
new days between: 1

As you can see your implementation does not reset the full time and your millisecond reset moves the start date 500ms into the future. 

GWT had the same millisecond reset bug until I fixed it in https://gwt-review.googlesource.com/#/c/7462/3 
This bug has caused some exceptions in DatePicker for dates that are within 1000ms before epoch as described in the corresponding bug report: https://code.google.com/p/google-web-toolkit/issues/detail?id=8653


-- J.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/OVnGQi0k-Y4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Friday, January 30, 2015

Re: Possible performance enhancements for CalendarUtil.getDaysBetween()

Your implementation does not have same behavior as the original GWT one.

GWTs implementation resets hours, minutes, seconds and milliseconds while your implementation only resets milliseconds AND you reset them wrong as well :) For negative getTime() your calculation moves time to the next second into the future which is wrong because when you reset time you always want to go into the past (so you do not modify the actual day accidentally)

As you only have modified the way aTime and bTime are calculated I have printed them for current GWT implementation and your new implementation. See output:

start: 1969-12-31 22:30:30.500
end: 1970-01-02 15:30:30.500

current GWT aTime: -90000000 => Date: 1969-12-31 00:00:00.000
current GWT bTime: 82800000 => Date: 1970-01-02 00:00:00.000
current GWT days between: 2

new aTime: -8969000 => Date: 1969-12-31 22:30:31.000
new bTime: 138630000 => Date: 1970-01-02 15:30:30.000
new days between: 1

As you can see your implementation does not reset the full time and your millisecond reset moves the start date 500ms into the future. 

GWT had the same millisecond reset bug until I fixed it in https://gwt-review.googlesource.com/#/c/7462/3 
This bug has caused some exceptions in DatePicker for dates that are within 1000ms before epoch as described in the corresponding bug report: https://code.google.com/p/google-web-toolkit/issues/detail?id=8653


-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Having only one permutation

At the current project, we don't use GWT widgets. All what we use are java emulation and GQuery. We target only modern browsers, no IE6, or even IE8. It seems to me that in such a case different permutations for different browsers are unnecessary. When I tried opening the wrong permutation with a different browser everything worked fine. Did anybody tried doing this in production? How was the experience?

Thanks,
Konstantin

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Ui binding elemental interfaces



On Friday, January 30, 2015 at 10:36:30 AM UTC+1, Mickaël Leduque wrote:
Hi,

Is it possible to use the UIBinder to bind elemental.html elements?

Not yet, but as soon as Elemental will have moved to JsInterop: http://goo.gl/eRjoD9
(note: this already works in GWT 2.7, the problem being that Elemental doesn't use @JsType) 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Possible performance enhancements for CalendarUtil.getDaysBetween()

I guess com.google.gwt.user.datepicker.client.CalendarUtil.getDaysBetween(Date, Date) was written with datepicker in mind, BTW I've seen some code making heavy use of that method, and its performance was badly impacted.
Since actual implementation internally instantiates two new dates per every invocation and then resets the time for each of them, I've simply rewritten the same logic avoiding date instantiation and time resets, and this gave me good results.
So I hope CalendarUtil.getDaysBetween() could be enhanced the same way.

Follows an excerpt of a naive test comparing one shot original vs optimized implementation... clearly this kind of measurement doesn't consider GC time (mainly induced by original implementation) so I'd consider its results pessimistic. Nonetheless running it with Chrome 37 on my host, the execution time of optimized code is almost constantly 25% of original one.

public class Main implements EntryPoint {

    @Override
    public void onModuleLoad() {
        final int count = 100000;
        
        final Date prev = new Date(0);
        final Date next = new Date(0);
        long optTime = 0;
        long origTime = 0;
        
        for (int i = 0; i<count;i++) {
            next.setTime(prev.getTime()+1000*60*60*24);
            
            final long startOrig = System.currentTimeMillis ();
            final int origResult = CalendarUtil.getDaysBetween (prev, next);
            origTime+= System.currentTimeMillis ()-startOrig;
            
            final long startOpt = System.currentTimeMillis ();
            final int optResult = getDaysBetween (prev, next);
            optTime+= System.currentTimeMillis ()-startOpt;
            
            prev.setTime(next.getTime());
            if (optResult!=origResult) {
                throw new RuntimeException ("Ouch");
            }
        }
        Window.alert(count+" steps took \noptimized code: "+optTime+"\noriginal code: "+origTime+"ms");

//        GWT.log ("Optimized implementation> "+count+" steps took "+optTime+"ms");
//        GWT.log ("Original implementation> "+count+" steps took "+origTime+"ms");
    }
    
    /**
     * {@code CalendarUtil.getDaysBetween()} optimized reimplementation.
     * 
     * @see CalendarUtil#getDaysBetween(Date, Date)
     */
    protected int getDaysBetween(final Date start, final Date finish) {
        // Extracts midnight time for both dates
        final long aTime = (start.getTime() / 1000) * 1000;
        final long bTime = (finish.getTime() / 1000) * 1000;

        long adjust = 60 * 60 * 1000;
        adjust = (bTime > aTime) ? adjust : -adjust;

        return (int) ((bTime - aTime + adjust) / (24 * 60 * 60 * 1000));
    }
}

Talking about real world code instead, this change practically removed getDaysBetween effects from CPU profiling charts, while it was originally one of the main components.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Ui binding elemental interfaces

Hi,

Is it possible to use the UIBinder to bind elemental.html elements?

I can bind _gwt_ elements with UiField, but when I try to bind elemental elements, it fails (for example Type mismatch: cannot convert from com.google.gwt.dom.client.CanvasElement to elemental.html.CanvasElement ).

Sure, I can do the bind to gwt element and then cast to JsElement, but I don't like that much.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Thursday, January 29, 2015

Re: How to set the Cursor back to position zero after clearing a TextArea in GWT?

Thanks for this post - it was the hint I needed.  To help anybody else, you specifically want to call that method on the event:

event.preventDefault();

And you may also wish to do:
  event.stopPropagation();



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

At least 5 more GWT developers needed

Dear GWT Team at Google,

thank you for your great presentations at GWT.create!

I wanted to ask another question on GWT Steering Committee Panel yesterday, but it was too late, so I am asking it here: Why doesn't Google allocate few more resources to the GWT project - let say 5 more software developers? This project needs some more people - at least for 2-3 years - because many things need to be cleaned up / refactored / simplified / added and documentation must be updated as well. I am not sure, that the community could provide so many full-time software developers...

I would be more than happy to contribute full time, but unfortenatelly I don't own the golden search engine which would provide me for the living...

Bye,
Marko

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: WebSocket (JSR 356) + DevMode

Thank you Thomas,

I'am not hot for removing HtmlUnit and jetty from the gwt-dev.jar, I really prefer keep the official releases.
The Brian's proposal is IMHO the best approach. I just need to make it as simple as "mvn gwt:dev" or "gradle gwtDev" for both maven and gradle.
I think that gwt-dev.jar should be split. Extracting the test stuff and the DevMode in separated jars would help to better master the scope of the dependencies.


Le 29 janv. 2015 à 13:27, Thomas Broyer <t.broyer@gmail.com> a écrit :

Start here <https://code.google.com/p/google-web-toolkit/issues/detail?id=8747> and follow links; the Gerrit guys had to do it as they depend on Jetty 9 too (for other purposes than websocket though; and they don't use GWTTestCase, hence HtmlUnit).
The workaround consists in using a customized gwt-dev though (where they strip the Jetty classes), so you'll have the same problem for downstream users of your library.
I think Brian's proposal (comment #10 in the issue) is the best current outcome: people who want to use WebSockets will have to deploy them in their own JSR356-aware container, and launch SDM with -launcherDir (equivalent to -noserver with DevMode, just slightly lighter). You could still create a custom Gradle task for those who use Gradle, that doesn't mean you're forcing anyone to use Gradle (people using Maven might already be running a separate servlet container anyway, "because Maven")

On Thursday, January 29, 2015 at 12:04:38 PM UTC+1, Fabien Dumay wrote:
Hey folks,

I'm implementing a nice way to use WebSocket on PWT.
Ideally I would love to be able to use it with the DevMode.
But actually the DevMode embeds Jetty 8 because of HtmlUnit. And the JSR 356 is only supported since the Jetty 9. 
Does anyone has a workaround to run DevMode or SDM with a jetty 9?

I thought to implement a new ServletContainerLauncher, but I guess that I'll face some classpath troubles.
I also imagined to create a custom gradle plugin in order to run a SDM with a -noserver option and run jetty 9 in the same task, but I do not want to force people to use gradle if they want use PWT.

Thanks for your help or any fresh ideas.

regards

--
Fabien

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Error migrating to GWT 2.7.0 (<script> tags in the gwt.xml files)

Also you should really go away from gwt ext. The project has not been updated for years ..

On 29 Jan 2015 15:04, "ssg" <shivagade@gmail.com> wrote:
Jim,
Thanks a lot very much for your response.

On Tuesday, January 27, 2015 at 12:40:19 PM UTC-5, Jim Douglas wrote:
Yeah, this was a hassle for me too.  This is the breaking change in 2.7.0:


I did a few things to bridge the gap from 2.6.1 to 2.7.0.

(1) Add this to the project.gwt.xml to not crash on those <script> tags:

  <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>


(2) Add this to my GWT client entry point (details will vary depending on your specific .js files):

    @Override

    public void onModuleLoad()

    {

        if (Browser.isJQueryLoaded()) // GWT 2.6.1 <script> tags are supported

        {

            if (!Browser.isTouch())

                Browser.setTooltips(BUISupport.initJQueryTooltip());

        }

        else // GWT 2.7.0+; we need to load external script files.

        {

            List<String> injectList = new ArrayList<String>();

            injectList.add("html2canvas.min.js");

            injectList.add("jquery-1.11.1.min.js");

            injectList.add("jquery-ui.min.js");

            inject(injectList);

        }

...

    public static native boolean isJQueryLoaded()

    /*-{

        return (typeof $wnd.jQuery != 'undefined');

    }-*/;


    private void inject(final List<String> p_jsList)

    {

        final String js =

            GWT.getModuleBaseForStaticFiles() + p_jsList.remove(0);


        ScriptInjector.fromUrl(js).setCallback(new Callback<Void, Exception>()

        {

            @Override

            public void onFailure(Exception e)

            {

                Log.log("inject " + js + " failure " + e);

            }


            @Override

            public void onSuccess(Void ok)

            {

                if (!p_jsList.isEmpty())

                    inject(p_jsList);

                else if (!Browser.isTouch())

                    Browser.setTooltips(BUISupport.initJQueryTooltip());

            }

        }).setWindow(ScriptInjector.TOP_WINDOW).inject();

    }


On Tuesday, January 27, 2015 at 9:20:53 AM UTC-8, ssg wrote:
 Hi All,
I am getting the following error while running ANT Build.xml; Please help me in correcting the following.

[java]       [ERROR] The Cross-Site-Iframe linker does not support <script> tags in the gwt.xml files, but the gwt.xml file (or the gwt.xml files which it includes) contains the following script tags:

     [java] js/ext/adapter/ext/ext-base.js

     [java] js/ext/ext-all.js

     [java] In order for your application to run correctly, you will need to include these tags in your host page directly. In order to avoid this error, you will need to remove the script tags from the gwt.xml file, or add this property to the gwt.xml file: <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>

Based on the above message,
STEP 1:
  How do I include these tags in the host page? WHERE is the host page and WHAT all tags I have to include in the host page ?

STEP 2:
 I have added <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/> to my gwt.xml file.

Below is my gwt.xml code;


<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN" "http://www.gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module>
    <inherits name="com.google.gwt.user.User" />
    <inherits name='com.google.gwt.json.JSON' />
    <!-- Inherit the GWTEXT stuff.-->
    <stylesheet src="js/ext/resources/css/ext-all.css" />

    <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>

    <script src="js/ext/adapter/ext/ext-base.js" />
    <script src="js/ext/ext-all.js" />
    <inherits name="com.gwtext.GwtExt" />
    <inherits name="com.gwtextux.GwtExtUx" />

    <!-- RPC service servlet declarations -->
    <servlet path="/appname.rpc" class="com.acg.mmsea.server.service.AppnameServiceImpl" />
    <servlet path="/codeDecode.rpc"
        class="com.acg.appname.server.service.AppnameCodesDecodeServiceImpl" />

    <!-- Specify the app entry point class. -->
    <entry-point class='com.acg.appname.gwt.client.Appname' />
</module>

Thanks a lot in advance.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Error migrating to GWT 2.7.0 (<script> tags in the gwt.xml files)

Jim,
Thanks a lot very much for your response.

On Tuesday, January 27, 2015 at 12:40:19 PM UTC-5, Jim Douglas wrote:
Yeah, this was a hassle for me too.  This is the breaking change in 2.7.0:


I did a few things to bridge the gap from 2.6.1 to 2.7.0.

(1) Add this to the project.gwt.xml to not crash on those <script> tags:

  <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>


(2) Add this to my GWT client entry point (details will vary depending on your specific .js files):

    @Override

    public void onModuleLoad()

    {

        if (Browser.isJQueryLoaded()) // GWT 2.6.1 <script> tags are supported

        {

            if (!Browser.isTouch())

                Browser.setTooltips(BUISupport.initJQueryTooltip());

        }

        else // GWT 2.7.0+; we need to load external script files.

        {

            List<String> injectList = new ArrayList<String>();

            injectList.add("html2canvas.min.js");

            injectList.add("jquery-1.11.1.min.js");

            injectList.add("jquery-ui.min.js");

            inject(injectList);

        }

...

    public static native boolean isJQueryLoaded()

    /*-{

        return (typeof $wnd.jQuery != 'undefined');

    }-*/;


    private void inject(final List<String> p_jsList)

    {

        final String js =

            GWT.getModuleBaseForStaticFiles() + p_jsList.remove(0);


        ScriptInjector.fromUrl(js).setCallback(new Callback<Void, Exception>()

        {

            @Override

            public void onFailure(Exception e)

            {

                Log.log("inject " + js + " failure " + e);

            }


            @Override

            public void onSuccess(Void ok)

            {

                if (!p_jsList.isEmpty())

                    inject(p_jsList);

                else if (!Browser.isTouch())

                    Browser.setTooltips(BUISupport.initJQueryTooltip());

            }

        }).setWindow(ScriptInjector.TOP_WINDOW).inject();

    }


On Tuesday, January 27, 2015 at 9:20:53 AM UTC-8, ssg wrote:
 Hi All,
I am getting the following error while running ANT Build.xml; Please help me in correcting the following.

[java]       [ERROR] The Cross-Site-Iframe linker does not support <script> tags in the gwt.xml files, but the gwt.xml file (or the gwt.xml files which it includes) contains the following script tags:

     [java] js/ext/adapter/ext/ext-base.js

     [java] js/ext/ext-all.js

     [java] In order for your application to run correctly, you will need to include these tags in your host page directly. In order to avoid this error, you will need to remove the script tags from the gwt.xml file, or add this property to the gwt.xml file: <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>

Based on the above message,
STEP 1:
  How do I include these tags in the host page? WHERE is the host page and WHAT all tags I have to include in the host page ?

STEP 2:
 I have added <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/> to my gwt.xml file.

Below is my gwt.xml code;


<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN" "http://www.gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module>
    <inherits name="com.google.gwt.user.User" />
    <inherits name='com.google.gwt.json.JSON' />
    <!-- Inherit the GWTEXT stuff.-->
    <stylesheet src="js/ext/resources/css/ext-all.css" />

    <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>

    <script src="js/ext/adapter/ext/ext-base.js" />
    <script src="js/ext/ext-all.js" />
    <inherits name="com.gwtext.GwtExt" />
    <inherits name="com.gwtextux.GwtExtUx" />

    <!-- RPC service servlet declarations -->
    <servlet path="/appname.rpc" class="com.acg.mmsea.server.service.AppnameServiceImpl" />
    <servlet path="/codeDecode.rpc"
        class="com.acg.appname.server.service.AppnameCodesDecodeServiceImpl" />

    <!-- Specify the app entry point class. -->
    <entry-point class='com.acg.appname.gwt.client.Appname' />
</module>

Thanks a lot in advance.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Error migrating to GWT 2.7.0 (<script> tags in the gwt.xml files)

Thomas,
Thanks a lot very much for your response.

On Wednesday, January 28, 2015 at 4:45:17 AM UTC-5, Thomas Broyer wrote:


On Tuesday, January 27, 2015 at 6:20:53 PM UTC+1, ssg wrote:
 Hi All,
I am getting the following error while running ANT Build.xml; Please help me in correcting the following.

[java]       [ERROR] The Cross-Site-Iframe linker does not support <script> tags in the gwt.xml files, but the gwt.xml file (or the gwt.xml files which it includes) contains the following script tags:

     [java] js/ext/adapter/ext/ext-base.js

     [java] js/ext/ext-all.js

     [java] In order for your application to run correctly, you will need to include these tags in your host page directly. In order to avoid this error, you will need to remove the script tags from the gwt.xml file, or add this property to the gwt.xml file: <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>

Based on the above message,
STEP 1:
  How do I include these tags in the host page? WHERE is the host page and WHAT all tags I have to include in the host page ?


The "host page" is the HTML page that loads your GWT app: http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideHostPage
So you'll have to put <script src="js/ext/adapter/ext/ext-base.js"></script> and <script src="js/ext/ext-all.js"></script> in there (adapt the paths as necessary).
 


STEP 2:
 I have added <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/> to my gwt.xml file.

I'd have rather removed the <script> elements from the gwt.xml, but indeed that works too…
 

Below is my gwt.xml code;


<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN" "http://www.gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module>
    <inherits name="com.google.gwt.user.User" />
    <inherits name='com.google.gwt.json.JSON' />
    <!-- Inherit the GWTEXT stuff.-->
    <stylesheet src="js/ext/resources/css/ext-all.css" />

I'd also move that to the host page: <link rel=stylesheet href="js/ext/resources/css/ext-all.css" />

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Log4j GWT Problem



On Wednesday, January 28, 2015 at 10:52:15 PM UTC+1, Łukasz Bączek wrote:
Hello,
I have a problem with Log4j GWT:
[…]
My GWT 2.6.0

Have you tried with 2.6.1? It contains a fix for class and resource loading in the webapp in DevMode.

(the only reliable way to get things working is to use a separate servlet container, and launch DevMode in -noserver mode – or launch CodeServer with -launcherDir, which is equivalent)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: WebSocket (JSR 356) + DevMode

Start here <https://code.google.com/p/google-web-toolkit/issues/detail?id=8747> and follow links; the Gerrit guys had to do it as they depend on Jetty 9 too (for other purposes than websocket though; and they don't use GWTTestCase, hence HtmlUnit).
The workaround consists in using a customized gwt-dev though (where they strip the Jetty classes), so you'll have the same problem for downstream users of your library.
I think Brian's proposal (comment #10 in the issue) is the best current outcome: people who want to use WebSockets will have to deploy them in their own JSR356-aware container, and launch SDM with -launcherDir (equivalent to -noserver with DevMode, just slightly lighter). You could still create a custom Gradle task for those who use Gradle, that doesn't mean you're forcing anyone to use Gradle (people using Maven might already be running a separate servlet container anyway, "because Maven")

On Thursday, January 29, 2015 at 12:04:38 PM UTC+1, Fabien Dumay wrote:
Hey folks,

I'm implementing a nice way to use WebSocket on PWT.
Ideally I would love to be able to use it with the DevMode.
But actually the DevMode embeds Jetty 8 because of HtmlUnit. And the JSR 356 is only supported since the Jetty 9. 
Does anyone has a workaround to run DevMode or SDM with a jetty 9?

I thought to implement a new ServletContainerLauncher, but I guess that I'll face some classpath troubles.
I also imagined to create a custom gradle plugin in order to run a SDM with a -noserver option and run jetty 9 in the same task, but I do not want to force people to use gradle if they want use PWT.

Thanks for your help or any fresh ideas.

regards

--
Fabien

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

WebSocket (JSR 356) + DevMode

Hey folks,

I'm implementing a nice way to use WebSocket on PWT.
Ideally I would love to be able to use it with the DevMode.
But actually the DevMode embeds Jetty 8 because of HtmlUnit. And the JSR 356 is only supported since the Jetty 9. 
Does anyone has a workaround to run DevMode or SDM with a jetty 9?

I thought to implement a new ServletContainerLauncher, but I guess that I'll face some classpath troubles.
I also imagined to create a custom gradle plugin in order to run a SDM with a -noserver option and run jetty 9 in the same task, but I do not want to force people to use gradle if they want use PWT.

Thanks for your help or any fresh ideas.

regards

--
Fabien

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Implement select all in CellTable

Thanx alexandra, its working

On Tuesday, April 19, 2011 at 12:21:18 PM UTC+5:30, Alexandre Ardhuin wrote:
Hi,

You can use a "com.google.gwt.view.client.MultiSelectionModel" with your CellTable

MultiSelectionModel<T> msm = new MultiSelectionModel<T>();
cellTable.setSelectionModel(msm);
for (T item : cellTable.getVisibleItems()) {
  msm.setSelected(item, true);
}

Alexandre


2011/4/18 Subhrajyoti Moitra <subhra...@gmail.com>
Hello,

Can some one please point me to a "Select All" functionality in a CellTable?

The functionality i have to implement, is that some of the CellTable headers has a select box which when clicked will select all the rows of CellTable being displayed.
Please give some hints as to how to implement this. Example would be awesome!!

Thanks,
Subhro.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Programatically Click FileUpload

UPDATE 2

Solved it. So it seems that trying to trigger a FileUpload click programatically only currently works if the event triggering it is a ClickEvent. To solve this I have had to create my own native click event and fire that when the user makes a selection from the SuggestBox. Is this intended behaviour?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Wednesday, January 28, 2015

Re: Programatically Click FileUpload

UPDATE

I decided to add a ClickHandler to the FileUpload widget which simply writes to the console when fired. Through both mechanisms the upload widget is 'clicked', so I really am at a loss of where to go next. Interestingly, if I remove the SuggestBox from the audio upload and just call the click function, I do get the popup, but I don't see why this should interfere with click if present.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: How to Find RTL (or) LTR themes Loaded In GWT application?

Thanks Thomas.

On Tuesday, January 27, 2015 at 7:25:21 PM UTC+5:30, Mohammed Sameen wrote:
Hi,
In my GWT Application, I need to support multiple languages like english,arabic,hebrew langauages and also i am using LTR and RTL themes in module.gwt.xml.But internally in my application i need to know which themes is loading (RTL,LTR).Since i need to write some logic in my application for both cases.So how can i identify the themes(RTL or LTR)?Any Suggestion?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Newbie in GWT. The best way to solve my problem

thanks for your answer !

2015-01-28 19:38 GMT+02:00 Thomas Broyer <t.broyer@gmail.com>:
GWT is a client-side technology; so if you're using JS and jQuery in the browser, then you're not doing GWT.
You could use GQuery though, and then possibly use GWT-RPC to communicate with your Java server.


On Wednesday, January 28, 2015 at 1:50:20 PM UTC+1, Laurynas Peciukaitis wrote:
Hello, 
im new in GWT developing. I have a task, and i don't know the right way to do this. Here is my task :
my goal:
all i need to do for now is to create GWT application project with the index.html page i already have. My goal is to communicate using ajax from the elements (which were already written in index.html page) with GWT project which will handle all database methods

what is the best way to do this ? 
 I was  thinking about getting data i need from index.html page using JavaScript and jQuery and send AJAX posts to a Servlet class which extends HttpServlet in my GWT project, but is that a really good idea ?




--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Log4j GWT Problem

Hello,
I have a problem with Log4j GWT:

[INFO] create exploded Jetty webapp in C: \ Users \ Łukasz \ workspace \ WebSKS \ target \ WebSKS-1.0-SNAPSHOT
[INFO] auto discovered modules [pl.cba.lukaszbaczek.webSKS]
[ERROR] log4j: WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
[ERROR] log4j: WARN Please initialize the log4j system properly.
[ERROR] log4j: WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[ERROR] log4j: WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
[ERROR] log4j: WARN Please initialize the log4j system properly.
[ERROR] log4j: WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

My Log4j configuration looks like this:

1. Log4j.properties:

# LOG4J configuration
log4j.rootLogger = DEBUG, Appender1
 
log4j.appender.Appender1 = org.apache.log4j.ConsoleAppender
log4j.appender.Appender1.layout = org.apache.log4j.PatternLayout
log4j.appender.Appender1.layout.ConversionPattern =% - 7p% d [% t]% c% x -% m% n

2. that indicates where the file is stored configuration:

pl.cba.lukaszbaczek.server package;

import java.io.File;

javax.servlet.ServletContext import;
javax.servlet.ServletContextEvent import;
javax.servlet.ServletContextListener import;

org.apache.log4j.PropertyConfigurator import;

public class implements ServletContextListener {ContextListener

Override
public void contextDestroyed (ServletContextEvent arg0) {
}

Override
public void contextInitialized (ServletContextEvent arg0) {
ServletContext context = arg0.getServletContext ();
String log4jConfigFile = context
.getInitParameter ("log4j-config-location");
Context.getRealPath fullpath = String ("") + File.separator
+ Log4jConfigFile;

PropertyConfigurator.configure (fullpath);
}

}


That is my web.xml:

<? xml version = "1.0" encoding = "UTF-8"?>
<web-app version = "3.0" xmlns = "http://java.sun.com/xml/ns/javaee"
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
     <session-config>
         <session-timeout>
             30
         </ session-timeout>
     </ session-config>
    
      <context-param>
         <param-name> log4j-config-location </ param-name>
         <param-value> WEB-INF / log4j.properties </ param-value>
     </ context-param>
      
    <listener>
     <listener-class> pl.cba.lukaszbaczek.server.ContextListener </ listener-class>
    </ listener>
   
     <listener>
         <listener-class> pl.cba.lukaszbaczek.server.GuiceServletDispatchConfig </ listener-class>
     </ listener>
      
     <filter>
         <filter-name> guiceFilter </ filter-name>
         <filter-class> com.google.inject.servlet.GuiceFilter </ filter-class>
     </ filter>

     <filter-mapping>
         <filter-name> guiceFilter </ filter-name>
         <url-pattern> / * </ url-pattern>
     </ filter-mapping>
</ web-app>


Here a link so that you could see where it stores log4j.properties:
https://drive.google.com/file/d/0B919uo76vaP1QjZHam41dU1jQTA/view?usp=sharing

My GWT 2.6.0