Announcement

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

    SelectItem is not selecting the items

    Hi

    I'm just writing sample SelectItem inside a dynamic form with OptionDataSource. I'm able to populate values in firefox. But while running every time it's selecting the first value. In chrome i'm getting


    com.smartgwt.client.core.JsObject$SGWT_WARN: 17:07:37.538:MUP5:WARN:ResultSet:isc_ResultSet_0 (created by: isc_PickListMenu_0):getRange(-1, 24): negative indices not supported, clamping start to 0


    Please suggest me.

    -raghu

    #2
    I just mounted the app on

    http://sand9box.appspot.com/test/RESTLite.jsp

    Comment


      #3
      What does your datasource look like? Are you trying to set the page size of the request?

      Comment


        #4
        The xml link is

        http://sand9box.appspot.com/test/testSuite.jsp

        thanks
        raghu

        Comment


          #5
          Well thats the data, was more interested in the datasource definition. Also can you post the code where you setup the form and any type of change or selection handlers you might have as well.

          Comment


            #6
            My Sample code:

            Code:
            final SelectItem  testCases=new SelectItem  ("testCase","Test Cases");
            		testCases.setOptionDataSource(TestSuiteDS.getInstance());
            		testCases.setDisplayField("caseName");
            		 testCases.setPickListWidth(250);  
            	
            		
            		
            		dynamicForm.setNumCols(4);
            		dynamicForm.setFixedColWidths(false);
            		dynamicForm.setFields(testCases);
            -thanks

            Comment


              #7
              So if you do just a setValueMap() I assume it works correct? Can you post how TestSuiteDS is defined?

              Comment


                #8
                Sorry, I should provide all these information before itself.
                Next time I will follow the steps.

                Please check my DS Code.

                Code:
                public class TestSuiteDS extends DataSource {
                
                	static TestSuiteDS instance;
                	 public TestSuiteDS(String id) {
                		 setID(id); 
                		 setRecordXPath("/testSuite/testCase");
                		 DataSourceTextField restPath=new DataSourceTextField ("restPath");
                		 DataSourceTextField caseName=new DataSourceTextField ("caseName");
                		 DataSourceTextField input=new DataSourceTextField ("input");
                		 setFields(restPath,caseName,input);
                		 
                		 setDataURL(RESTLite.REST_TEST_SUITE);  
                	}
                	public static TestSuiteDS getInstance() {  
                	        if (instance == null) {  
                	            instance = new TestSuiteDS("testSuite");  
                	        }  
                	        return instance;  
                	    }  
                }

                Comment


                  #9
                  I get this all the time when the resultset is empty (index=-1)

                  Example:
                  :WARN:ResultSet:isc_ResultSet_0 (created by: isc_PickListMenu_0):get: invalid index -1

                  Comment

                  Working...
                  X