Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    23
    Vote Rating
    0
    pete_by is on a distinguished road

      0  

    Default user.agent setting is ignored during gwt compilation phase

    user.agent setting is ignored during gwt compilation phase


    I have two user-agents to be used during java->js compilation

    Code:
    <set-property name="user.agent" value="safari,gecko1_8"/>
    But for some reason, there are 6 permutations take place, no matter how many user-agents is specified.

    Here is my main module configuration:

    Code:
    <module rename-to="xxx">
    
        <!-- Inherit the core Web Toolkit stuff.                  -->
        <inherits name='com.google.gwt.user.User'/>
        <inherits name='com.google.gwt.user.UserAgent'/>
        <inherits name="com.google.gwt.http.HTTP"/>
        <inherits name="com.google.gwt.inject.Inject"/>
        <inherits name="com.google.gwt.editor.Editor" />
    
        <inherits name="com.google.gwt.uibinder.GinUiBinder"/>
    
        <inherits name="com.gwtplatform.mvp.Mvp"/>
    
        <define-configuration-property name="gin.ginjector" is-multi-valued="false"/>
        <set-configuration-property name="gin.ginjector"
                                    value="com.company.xxx.client.EdmGinjector"/>
    
        <set-property name="compiler.emulatedStack" value="true"/>
        <set-configuration-property name="compiler.emulatedStack.recordFileNames" value="true"/>
    
        <inherits name="com.gwtplatform.dispatch.Dispatch"/>
        <inherits name="com.gwtplatform.dispatch.DispatchShared"/>
        <inherits name="com.gwtplatform.common.ClientsCommon"/>
    
        <inherits name='com.google.code.morphia.Morphia'/>
    <source path="client"/>
        <source path="shared"/>
    
    <inherits name='com.company.xxx.Model'/>
        <inherits name="com.sencha.gwt.uibinder.UiBinder"/>
    
        <super-source path="overrides"/>
    
        <inherits name='com.sencha.gxt.ui.GXT'/>
    
        <inherits name="net.zschech.gwt.comet.Comet"/>
    
        <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG"/>
    
        <inherits name="com.allen_sauer.gwt.log.gwt-log-RemoteLogger"/>
        <!--If you wish to host your GWT application on one domain and connect your Comet client to another domain
        you need to use GWT's cross site linker by including the following in your project's gwt.xml -->
        <!--add-linker title="xs"/-->
    
        <!-- Specify the app entry point class.   -->
    <entry-point class='com.company.xxx.client.XXX'/>
    
        <replace-with class="com.company.xxx.client.form.TreeAppearance">
            <when-type-is class="com.sencha.gxt.widget.core.client.tree.Tree.TreeAppearance"/>
        </replace-with>
    
    </module>

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    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


    A few things may be happening here. First, I think you are probably putting the set-property tag too early in your module file. Generally, when defining a module file, start with the inherits statements, making sure they are ordered correctly (the com.sencha.gwt.uibinder.UiBinder module should be after both the GWT modules and GXT itself), and you shouldn't need to list some of those modules (UserAgent, for example is included automatically in User). Then, customizing the properties defined and configured in those earlier modules, and changing the rebind rules with replace-with and generate-with, to ensure that your rules override GWT's and GXT's rules.

    Next, GXT 3 has added the capability of compiling for more browers than GWT natively supports. The GXT module compresses these (using the collapse-property element) down to the basic 6 that GWT defines. Using both GXT's collapse-property elements and your set-property (with set-property being placed after the GXT module is inherited) apparently increases the number of builds, as GWT attempts to satisfy all of the conditions we have set. This is new to me, sorry to add this next level of complexity...

    So the eventual fix is for you to constrain the browsers using our own set of user agents.

    Code:
    <set-property name="gxt.user.agent" value="safari3,safari4,safari5,chrome,air,gecko1_8,gecko1_9"/>
    will cause a build that works on all supported versions of safari,chrome, air (the webkit browsers, user.agent=safari), and supported versions of firefox (user.agent=gecko1_8). Assuming you have the GXT module inherited, this will result in two permutations.

    The last thing I want to point out is a question: What are you trying so solve in doing this? If you only plan on supporting a certain number of browsers, being as specific as possible will result in only code for those browser being included. If for example you only want the latest versions of safari and firefox (not chrome nor air), the line above could read
    Code:
    <set-property name="gxt.user.agent" value="safari5,gecko1_9"/>
    If your goal is to reduce the number of permutations, there is another trick you can do, just squish all the js into one giant permutation:
    Code:
    <collapse-all-properties/>

    http://code.google.com/p/google-web-...ftPermutations for more info on these changes - take a look at the com.sencha.gxt.ui.GXT and com.sencha.gxt.core.Core modules for how we are wiring all of this up.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    23
    Vote Rating
    0
    pete_by is on a distinguished road

      0  

    Default


    Thanks for a such detailed answer, Colin. What I need is to restrict the number of browsers the code is generated for, just for the sake of time and simplicity. It takes too long time to compile the code. I will try you to implement suggestions, again thanks for helping!

    

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    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 the goal is just speed of compilation, you can also tell the compiler to use draft mode - this will skip many optimizations, but speed up the compile. Used in conjunection with fewer browsers, less permutations (and more ram!) you'll get the fastest build possible.

    http://code.google.com/webtoolkit/do...ompilerOptions

    -draftCompile will skip a number of things, including breaking split points out into their own files, so be sure to test using a regular compile.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default Our application is not rendering in IE8 browser issue but works in IE9 and Chrome.

    Our application is not rendering in IE8 browser issue but works in IE9 and Chrome.


    Our application is built on GXT3 with https url, but it is rendering in all browsers except IE8. If I add the below line, it works in IE8, but limited to show only IE8. How to address the issue to show in IE8,9 and Chrome.

    <!-- Mask error message -->
    <set-configuration-property name="user.agent.runtimeWarning" value="false"/>

    <set-property name="gxt.user.agent" value="ie8"/>

    Please throw some idea on this issue.

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    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


    The set-property line explicitly instructs GWT to *only* compile for IE8, while the first says "Don't tell me if this won't work in a particular browser". This results in apps that just don't work, with no hint as to why.

    Which browsers do you want to support? If you are supporting most of the browsers out there, don't set any user.agent or gxt.user.agent, and they'll all be supported automatically.

  7. #7
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    Thanks Colin. I inherit the module User, hence I have not explicitly added setting for the browser, but IE8 is not displaying the application and running with wait cursor indefinitely. Hence, I added this setting for IE8, 9 and Chrome. Again no luck for IE8 but works for IE9 and Chrome as expected.

    CoreModule.gwt.xml
    <inherit ...User/>


    MainModule.gwt.xml
    <inherit....CoreModule/>
    <!-- Mask error message -->
    <set-configuration-property name="user.agent.runtimeWarning" value="false"/>
    <set-property name="gxt.user.agent" value="ie8,ie9,chrome"/>

    Besides Index.html is referring the below meta tag, Is that causing it.
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

  8. #8
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    I tried change browser mode using F12, and then see the application in IE8 but I noticed that there was a class added into HTML tag.

    <html class=" ext-strict" style="overflow: hidden;">

  9. #9
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    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 IE8 loading your app in Intranet mode? That will force IE8 to behave like IE7 which can cause issues - in your case, you aren't compiling for IE7, so the app won't load at all. The meta tag for EDGE does nothing, this is just a bug in IE8 - you must set a header to get it to recognize that you do not want it in IE7 mode.

    I really don't suggest setting this line:
    Code:
     <set-configuration-property name="user.agent.runtimeWarning" value="false"/>
    It will hide errors from you, it will prevent you from seeing what browser the app thinks it is running in.

  10. #10
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    Thanks Colin. I have not seen any error on the screen even the line was not in the *.GWT.xml. Now I added IE7 again but no luck. If I could see an error, I would go for the fix, but I am not sure what the error is.

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi