Announcement

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

    Undesirable value in comboBoxItem type select

    Hello,

    First of all, please forgive my english which is not the best...

    1. the SmartGWT or SmartClient version and browser version(s) involved;
    Version 2.1

    2. for a server-side problem, the complete logs generated during processing of the request;
    Not a server-side problem

    3. for a client-side problem, the contents of the Developer Console (see FAQ for usage);
    No errors in the developer console

    4. if there is a JavaScript error, the stack trace logged in the Developer Console (from Internet Explorer if possible); and
    No JavaScript error

    5. sample code.

    Code:
    HLayout layoutToolBar = new HLayout();
    		layoutToolBar.setWidth100();
    		layoutToolBar.setAlign(Alignment.RIGHT);
    		
    		ComboBoxItem itemGroupe = new ComboBoxItem();
    		LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
    		@SuppressWarnings("unchecked") 
    		List<Groupe> listGroupe = (List<Groupe>)InformationSession.map.get("listeGroupe");
    		for(int i = 0; i<listGroupe.size(); i++) {
    			if(i==0){
    				itemGroupe.setDefaultValue(listGroupe.get(i).getId());
    			}
    			map.put(String.valueOf(listGroupe.get(i).getId()), listGroupe.get(i).getNom());
    		}
    		itemGroupe.setTitle("Choisir votre groupe");
    		itemGroupe.setType("Select");
    		itemGroupe.setValueMap(map);
    		
    		DynamicForm form = new DynamicForm();
    		form.setItems(itemGroupe);
    		
    		layoutToolBar.addChild(form);
    		
    		layoutGlobal.addMember(layoutToolBar);
    As you can see on the attach image, i have 5 values in the select item.
    The problem is that the last value (349) is not a value coming from my database and, after debuging, is not a value containing in the variable listGroupe.

    I already get this problem on an other list.

    Thanks for the help in advance

    cordially,

    Mister Jpa
    Attached Files

    #2
    If you think you've found a bug you need to post a minimal standalone testcase and not portions of the code.

    Comment


      #3
      Where do you want me to post a testcase?
      In this topic?

      Comment


        #4
        Can you tell me which browser are you using?

        Comment


          #5
          Google Chrome.

          On IE7, there is no problem.

          Comment


            #6
            See the FAQ on problems in Chrome development mode.

            Comment

            Working...
            X