Hybrid View

    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,639
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      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,639
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      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,639
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      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.

Thread Participants: 3

Tags for this Thread

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