Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ComboBoxItem & SelectIem() don't show data added through valueMap in Google Chrome

    I am trying to use either ComboBoxItem or SelectItem with static data (entered by filling valueMap) in my form (which also contains 3 sections)

    While Google Chrome shows the combo-box, but there is no data.
    As soon as I open the url in IE.. it shows all the data from valueMap.

    Any pointers to this behaviour?

    My code is as simple as it can get >>
    Code:
    final SelectItem getTasks = new SelectItem("getTasks");
      getTasks .setTitle("Get tasks from queue ");
    
      LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
      valueMap.put("new", "New");
      valueMap.put("active", "Active");
      valueMap.put("revisit", "Revisit");
      valueMap.put("fixed", "Fixed");
      valueMap.put("delivered", "Delivered");
      valueMap.put("resolved", "Resolved");
      valueMap.put("reopened", "Reopened");
    
      getTasks.setValueMap(valueMap);
    
      SectionItem qTasksSection = new SectionItem();  
      qTasksSection.setDefaultValue("Queue Tasks");  
      qTasksSection.setSectionExpanded(false);  
      qTasksSection.setItemIds("getTasks"); 
    
    form.setFields(qTasksSection,getTasks);
    Last edited by ankitbhutani; 13 Jul 2010, 15:23.

    #2
    See FAQ, you have external CSS.

    Comment


      #3
      Can you please point me to faq you are suggesting.. or let me know problem here itself. Thanks in advance !

      Comment


        #4
        Check your *.GWT.xml file inherits from the standard gwt theme and remove it.

        Comment


          #5
          Hi svjard

          I already did that..and knew that Gwt themes have to be removed from gwt.xml file.

          I read it here >>
          "Remove any pre-existing imports of standard GWT themes. These contain CSS settings that style fundamental HTML elements (eg TD - table cell) and interfere with Smart GWT and other widgets."
          http://code.google.com/p/smartgwt/wiki/Getting_Started

          Given this now.. can you point out why Chrome is not able to display data but IE can?

          I have used the developer console and make default-log-level to warn..and haven't got anything alarming for anything on my form. Still data in chrome is missing.

          Comment


            #6
            I am experiencing a similar issue when using SelectItem in Google Chrome.
            The issue is that when clicking on the drop down menu it just gets selected without expanding the list of items.

            The following simple code generates the issue:

            Code:
            public void onModuleLoad() {
            	String[] values = new String[2];
            	values[0] = "Value 1";
            	values[1] = "Value 2";
            	
            	SelectItem selectItem = new SelectItem("Value");
            	selectItem.setValueMap(values);
            	
            	DynamicForm form = new DynamicForm();
            	form.setFields(selectItem);
            	
            	RootPanel.get().add(form);
            }
            As suggested I made sure not to inherit the standard GWT theme:

            Code:
            <module rename-to="smartgwttestapp">
            	<inherits name="com.google.gwt.user.User" />
            
            	<inherits name="com.smartgwt.SmartGwt" />
            	<inherits name="com.smartgwt.tools.SmartGwtTools" />
            
            	<entry-point class="org.smartgwt.testapp.client.SmartGWTTestApp" />
            
            	<source path="client" />
            	<source path="shared" />
            </module>
            My configuration:
            • Development mode
            • SmartGWT 2.2
            • GWT 2.0.4
            • Google Chrome 6.0.472.53
            • Windows v6.0 built 6002 SP2


            Is there any workaround(s) available?
            Regards,
            Luc

            Comment


              #7
              I have the same problem - any comboBox and selectItem in my application refuses to display the picklist in Chrome. It works fine in Firefox and IE.

              I do not have an external CSS that overwrites core HTML classes.

              The problem only happens in DevMode - when I build the application and run it in Hosted mode it is fine.

              Here is my gwt.xml file:

              Code:
              <?xml version="1.0" encoding="UTF-8"?>
              <module rename-to='didmanager'>
                <!-- Inherit the core Web Toolkit stuff.                        -->
                <inherits name='com.google.gwt.user.User'/>
              
                 <!--  Inherit GWT.Log -->
                <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
                
                <!--  Enable and disable loggers -->
                <set-property name="log_FirebugLogger" value="ENABLED" />
                <set-property name="log_GWTLogger" value="ENABLED" />
                
                <set-property name="log_SystemLogger" value="DISABLED" />
                <set-property name="log_ConsoleLogger" value="DISABLED" />
                <set-property name="log_DivLogger" value="DISABLED" />
                <set-property name="log_RemoteLogger" value="DISABLED" />
                <set-property name="log_WindowLogger" value="DISABLED" />
                
                <!--  Configure log pattern -->
                 <set-configuration-property name="log_pattern" value="(%F:%L) %d [%-5p] %m%n" />
                
                
                <!--  Inherit the Smart GWT toolkit -->
                <inherits name="com.smartgwtpro.SmartGwtPro"/>
                
                <!--  Inherit the TPN SmartGWT Core module -->
                <inherits name="com.thinkingphones.smartgwt.core.TPN_SmartGWT_Core"/>
              
              
                <!-- Specify the app entry point class.                         -->
                <entry-point class='com.thinkingphones.didmanager.client.DIDManager'/>
              
                <!-- Specify the paths for translatable code                    -->
                <source path='client'/>
                <source path='shared'/>
              
              </module>
              * Development Mode
              * SmartGWT Pro 2.3
              * GWT 2.0.3
              * Google Chrome 5.0.375.127
              * IDE: STS (SpringSource Tool Suite) 2.5.0.M3 with Google Plugin for Eclipse 3.6

              Comment


                #8
                Due to core GWT bugs that the GWT team has committed to fix for GWT 2.1, Chrome Dev mode will have a number of issues like this. We recommend using Firefox for now, or if you really like Chrome, checking any issues in compiled mode or in another browser before assuming there's any actual issue with either your code or with SGWT.

                Comment


                  #9
                  Cool, good to know Isomorphic.

                  Chrome still has some growing pains; it's still a new browser after all. I know Dojo is pretty buggy with Chrome too....

                  Comment


                    #10
                    We're not buggy with Chrome, GWT is buggy with Chrome :)

                    Comment


                      #11
                      Originally posted by Isomorphic
                      We're not buggy with Chrome, GWT is buggy with Chrome :)
                      hehe, gotcha.

                      Comment

                      Working...
                      X