1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    7
    Vote Rating
    0
    florin_p is on a distinguished road

      0  

    Default Unanswered: LiveGrid is not displayed when deployed on TomCat.

    Unanswered: LiveGrid is not displayed when deployed on TomCat.


    I have a GWT application that include only a LiveGrid widget.
    When the application runs inside Eclipse everything works correctly. The same when the app is remotely debugged on TomCat.

    When the app is deployed on TomCat nothing is displayed. The page remains blank.

    After many hours I've found out the culprit: the setting I've used to detect and switch on different platforms. When the settings are removed, everything works correctly.

    Bellow are the settings used in app_gwt.xml:
    Code:
    <define-property name="mobile.user.agent"
    		values="android, iphone, ipad,not_mobile" />
    	<property-provider name="mobile.user.agent"><![CDATA[
      	{
        	var ua = window.navigator.userAgent.toLowerCase();
        	if (ua.indexOf('android') != -1) { return 'android'; }
        	if (ua.indexOf('iphone') != -1) { return 'iphone'; }
        	if (ua.indexOf('ipad') != -1) { return 'ipad'; }
        	return 'not_mobile';
      	}
    	]]></property-provider>
    
    
    	<!-- Constrain the value for non-webkit browsers -->
    	<set-property name="mobile.user.agent" value="not_mobile">
    		<none> <!-- Actually means NOR, in this case "not safari" -->
    			<when-property-is name="user.agent" value="safari" />
    		</none>
    	</set-property>
    
    
    	<define-property name="deviceType"
    		values="com$client$gin$DesktopGinModule,com$client$gin$AndroidGinModule,com$client$gin$IpadGinModule,com$client$gin$IphoneGinModule" />
    
    
    	<set-property name="deviceType"
    		value="com$client$gin$DesktopGinModule">
    		<when-property-is name="mobile.user.agent" value="not_mobile" />
    	</set-property>
    	<set-property name="deviceType"
    		value="com$client$gin$IphoneGinModule">
    		<when-property-is name="mobile.user.agent" value="iphone" />
    
    
    	</set-property>
    	<set-property name="deviceType"
    		value="com$acpit$passdown$client$gin$IpadGinModule">
    		<when-property-is name="mobile.user.agent" value="ipad" />
    	</set-property>
    
    
    	<set-property name="deviceType"
    		value="com$client$gin$AndroidGinModule">
    		<when-property-is name="mobile.user.agent" value="android" />
    	</set-property>
    In app I've used mvp4g, gin and guice libraries.

    I think the problem is the way I've defined mobile.user.agent.

    How can I solve the problem considering that I need to use the platform detection ?
    Thank you.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    404
    Answers
    7
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    Do you know if the view with the grid is getting displayed? I have a feeling it could be the view is not showing up. Could you add a html widget to the view and see if it displays. Let me know if this works or doesn't. Another thing I might try to verify everything is wired up is force the other form factor to load on the mobile with the livegrid and see if that works.

    Let me know what you find out,
    Brandon

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    7
    Vote Rating
    0
    florin_p is on a distinguished road

      0  

    Default


    I have a single view which have the LiveGrid inside. The view is not called. No matter is I put another widget before or after. Don't display also a Window.alert("something");

    In a GWT application first nocache.js is get from server and the the next js file are downloaded. In this case only nocache.js is got. That happens every time (is not the caching of this file the problem.)

    I think the way sencha GXT uses user.agent for is the problem here. My feeling is that the generated code doesn't recognise any browser and the js files are not called from nocache.js.

Thread Participants: 1

Tags for this Thread