Announcement

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

    Value of select item is not viewable

    Hi,

    The Datasource is set to the SelectItem of Dynamic form element. if the DataSource response has a single value then we are not able to view the data's in the SelectItem. Sample image is attached with this post. Please help me to resolve this issue.. Thanks in Advance... !

    Here is the sample code:
    Code:
    		DeviceGroupsDS withoutall = new DeviceGroupsDS("DataSource");
    		DynamicForm form = new DynamicForm();
    		form.setWrapItemTitles(false);
    		com.smartgwt.client.widgets.form.fields.SelectItem grp = new com.smartgwt.client.widgets.form.fields.SelectItem();
    		grp.setTitle("Device Group");
    		grp.setOptionDataSource(withoutall);
    		grp.setAutoFetchData(true);
    		form.setFields(grp);
    		form.draw();
    Here is the Datasource
    Code:
    		DataSourceField groupNameField = new DataSourceField("UserId",
    				FieldType.TEXT, "Group Name");
    		setFields(groupNameField);
    		OperationBinding oppFetch = new OperationBinding();
    		oppFetch.setDataFormat(DSDataFormat.XML);
    		oppFetch.setOperationType(DSOperationType.FETCH);
    		oppFetch.setDataProtocol(DSProtocol.GETPARAMS);
    		oppFetch.setRecordXPath("/XDocument/XUser");
    		setOperationBindings(oppFetch);
    Attached Files
    Last edited by parasuraman; 27 Aug 2009, 03:38. Reason: subscription

    #2
    It looks like you've made some sort of skinning or styling change which is causing unnecessary scrollbars to appear. Revert your styling changes until you find the problem.

    Comment


      #3
      Hi,

      Thanks for your reply.
      while loading the SelectItem with single value, First time click, the value is hided behind the control. And for second click, value can be shown. We are having single valued SelectItem in many pages, all those facing the same issue, is it a bug of SmartGWT library? How to resolve? In previous post, the scroll bar appeared cause of value lengh is larger than the control width. Actually ie not the issue.
      Attached Files

      Comment


        #4
        Again, this appears to be due to customizations in styling, possible inclusion of poorly designed external CSS. If you think you've discovered a bug in SmartGWT, post a standalone testcase that reproduces the problem.

        Comment


          #5
          As i have not used any CSS in side an application or any customization is not done at the application side. I have created new standalone application with its has a Dynamic form and select item. Why the value of select item is hided by the control if it has a single value?. any one faced such a issue.. Please help me to resole it..
          Thanks in advance..
          Here is the sample code on the onModuleLoad

          Code:
          		DynamicForm form = new DynamicForm();
          		form.setWrapItemTitles(false);
          		com.smartgwt.client.widgets.form.fields.SelectItem grp = new com.smartgwt.client.widgets.form.fields.SelectItem();
          		grp.setTitle("Device Group");
          		grp.setValueMap("Smart GWT Application");
          		form.setFields(grp);
          		form.draw();

          Comment


            #6
            Your test case runs fine: value is visible.

            Again, look for CSS or other changes you or someone else made, or that came with a "starter project" or similar. In particular there is an Application.css that GWT sometimes includes - get rid of that.

            Comment


              #7
              Hi,
              I have created a new application with GWT plugin for eclipse 3.4.1 and just added the below code. No additional styling is used. I have deleted the Application.css that gets created by default.

              Code:
              	final DynamicForm form = new DynamicForm();
                      form.setWidth(250);       
              
                      SelectItem cbItem = new SelectItem();
                      cbItem.setTitle("Select");
                      cbItem.setType("comboBox");
                      cbItem.setValueMap("Cat");
              
                      form.setFields(cbItem);
                      form.draw();
              The list contains only one value. If we select the list box, the first time the value is not displayed. On subsequent selections it is displayed. The same is the case in hosted mode as well as in Firefox browser. This behavior occurs only when the list box contains only one value.

              I am using GWT 1.6.4 on ubuntu, SmarGWT 1.2r706, Firefox 3.0.3

              Comment


                #8
                Hi Isomorphic,
                Am also not able to view the list value while trying to select for the first time. Created a new web application with GWT plugin for eclipse 3.4.1, GWT 1.6.4, SmartGWT 1.2 and only have the above code in my application. No other code apart from whatever gets created by default using GWT plugin.

                Code:
                	final DynamicForm form = new DynamicForm();
                        form.setWidth(250);       
                
                        SelectItem cbItem = new SelectItem();
                        cbItem.setTitle("Select");
                        cbItem.setType("comboBox");
                        cbItem.setValueMap("Cat");
                
                        form.setFields(cbItem);
                        form.draw();
                Thanks for any help

                Comment


                  #9
                  As you've been told already, starter projects can contain CSS. If you want this problem solved, stop blaming it on SmartGwt and actually take a thorough look around for what CSS is being loaded.

                  Comment


                    #10
                    Originally posted by parasuraman
                    Hi,
                    I have created a new application with GWT plugin for eclipse 3.4.1 and just added the below code. No additional styling is used. I have deleted the Application.css that gets created by default.

                    Code:
                    	final DynamicForm form = new DynamicForm();
                            form.setWidth(250);       
                    
                            SelectItem cbItem = new SelectItem();
                            cbItem.setTitle("Select");
                            cbItem.setType("comboBox");
                            cbItem.setValueMap("Cat");
                    
                            form.setFields(cbItem);
                            form.draw();
                    The list contains only one value. If we select the list box, the first time the value is not displayed. On subsequent selections it is displayed. The same is the case in hosted mode as well as in Firefox browser. This behavior occurs only when the list box contains only one value.

                    I am using GWT 1.6.4 on ubuntu, SmarGWT 1.2r706, Firefox 3.0.3
                    I can confirm this code works perfectly using Chrome 2.0, IE8 and FF 3.5. GWT 1.7 and SmartGWT latest build (tested Enterprise and Silverwave skins)

                    Comment


                      #11
                      Verify that you are not inheriting GWT's com.google.gwt.user.theme.standard.Standard theme in your module file.

                      Comment


                        #12
                        Hi,

                        Thanks for your reply. After removing the theme (com.google.gwt.user.theme.standard.Standard) from the application.gwt.xml file, value of select item is viewable. But in our project we have used Tab in application. After removing the theme(com.google.gwt.user.theme.standard.Standard) tab are not viewable(not shown properly)

                        Comment


                          #13
                          Manually include the GWT tab styling CSS like the SmartGWT Showcase does. See the GWT integration sample in the SmartGWT showcase.

                          Comment


                            #14
                            Even after manually applying the GWT tab styling, it is still not resolved. Not able to view the value of the list box the first time. My test app has only one GWT decorated tab panel and SmartGWT listbox control. The respective code is attached. Please correct me if i am going wrong. Thanks for any help.

                            GWT version : 1.7.0
                            smartGWT version : 1.2 ,revision.736
                            FireFox version : 3.0.5

                            Note:
                            Its works in IE and please change the .txt extension into .zip and extract the file. you will get .css,.xml and .java files used in the application.
                            Attached Files

                            Comment


                              #15
                              Originally posted by smartgwt.dev
                              Verify that you are not inheriting GWT's com.google.gwt.user.theme.standard.Standard theme in your module file.
                              Thanks for your post here, it is really really helpful. I spent almost 3 days just to figure out what is wrong. You save my life :). Thanks again

                              Comment

                              Working...
                              X