Announcement

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

  • Isomorphic
    replied
    @jersilver Other posters have confirmed this problem is already fixed in nightlies

    @mihai007 you seem to be talking about some other problem - if the problem is that the chosen value is not highlighted, this is intentional for ComboBoxItem because the highlighted value is what will be chosen on autocompletion, and for rapid data entry the top of the list is where the most likely choices are.

    Leave a comment:


  • jersilver
    replied
    I was running into the same problem with the ComboBox (i.e. when setting setAddUnknownValues=false). When the focus was removed from the ComboBoxItem, the on-complete event would result in clearing the selected value from the ComboBoxItem.

    FINDING: The problem reproduces when the keyField and valueField are the same for the ValueMap (or optionDataSource).

    In all of the examples shown in this thread, they are the same, and thus the problem is occurring. Examples seen here include:
    "Low" : "Low"
    "Med" : "Med"
    "High" : "High"

    and

    "One" : "One"
    "Two" : "Two"

    As I really wanted to maintain the setAddUnknownValues=false functionality, the only way I've been able to solve the problem is by appending all key values with a prefix (i.e. "key_")

    ~Jeremy

    Leave a comment:


  • mihai007
    replied
    I am using build 31-03-2011 of the lgpl version and it does not work; tested on FF4 and IE9.
    http://www.smartclient.com/builds/SmartGWT/2.x/LGPL/2011-03-31/smartgwt.jar

    Code:
            ComboBoxItem cb1 = new ComboBoxItem("cb1");
    
            LinkedHashMap<String, String> map1 = new LinkedHashMap<String, String>();
            map1.put("One", "One");
            map1.put("Two", "Two");
            map1.put("Three", "Three");
    
            cb1.setAddUnknownValues(false);
            cb1.setValueMap(map1);
    
            DynamicForm form = new DynamicForm();
            ButtonItem bi = new ButtonItem();
            bi.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    event.getItem().setTitle(event.getForm().getField("cb1").getValue() + "");
                }
            });
            form.setFields(cb1, bi);
            form.draw();
    The value is changed on the component, but the dropdown list does not highlight the selected value (does not matter if I selected previously with the mouse from the list or just written the value)

    Leave a comment:


  • mve
    replied
    Hi,
    We had the same problem and I can confirm that in the nightly build (EnterpriseEval/2011-03-02) the issue has been fixed.
    Is there a outlook when the next stable (production ready) version will be released (or an intermediary fix)?

    Thanks in advanced

    Leave a comment:


  • Isomorphic
    replied
    Hi Will,
    Thanks for the update. Since we're not reproducing this against the latest code it's likely the issue has been fixed.

    If you do see the issue against the latest nightly available from http://smartclient.com/builds, please let us know.

    Leave a comment:


  • willfleury
    replied
    Hi Sorry for not replying earlier.

    The version i am using is the latest one available at

    http://code.google.com/p/smartgwt/downloads/list

    I did not try to build against the night versions as they usually contain other bugs due to work in progress..

    I acknowledge though that i should have tested it against the latest version available on this site - not through the google code site..

    Leave a comment:


  • Isomorphic
    replied
    We aren't reproducing this issue.
    We tested against Firefox and IE, against the (Evaluation enterprise edition) nightly build dated Feb 23.

    In our tests
    - clicking on the icon to show the pick list
    - selecting "Medium" or "High"
    - hitting Tab, or clicking in the URL bar to take focus from the item
    didn't result in the value being dropped and if we modified the sample to add a "changed" handler it correctly fired.

    Can you verify that you're still seeing this issue against the latest nightly build and if so confirm what browser / platform you're seeing the bug on, what version of gwt you're running against and exactly the sequence of events that causes it to manifest.

    Regards
    Isomorphic Software

    Leave a comment:


  • willfleury
    replied
    The test case is intended to show that the Widget does not function as intended.

    The problem is when you select either "Medium" or "High" using either the drop down list or by the autocomplete feature - when the ComboBoxItem loses focus it resets the selection to "Low" i.e. the default selection.

    if you comment out
    Code:
    item.setAddUnknownValues(false);
    then it will keep the correct selection but the user is allowed to enter invalid items..

    I had added the code for the change handler while testing simply to try and track down the cause of the bug myself.

    Leave a comment:


  • Isomorphic
    replied
    @plech.d If it's easily reproduced then creating a standalone test case should likewise be very easy.

    willfluery, what is your test case intended to demonstrate? There don't seem to be any change handlers. If it's supposed to demonstrate some other problem can you spell out the expected and observed behaviors and the clicks and keystrokes needed to repro the problem?

    Leave a comment:


  • willfleury
    replied
    I agree but if it will help get it fixed quicker - here it is

    Code:
    public class ComboBoxBugExample implements EntryPoint {  
      
        public void onModuleLoad() {  
      
            LinkedHashMap<String, String> values = new LinkedHashMap<String, String>();
            values.put("Low", "Low");
            values.put("Medium", "Medium");
            values.put("High", "High");
    
            ComboBoxItem item = createComboBoxItem("Test", "Low", values);
    
    
            final DynamicForm form = new DynamicForm();  
            form.setWidth(250);  
            form.setNumCols(2);
            form.setWidth100();
            form.setTitleWidth("*");
            form.setFields(item);
      
            form.draw();  
        }  
    
    
        public static ComboBoxItem createComboBoxItem(String title, String   defaultItem, LinkedHashMap<String, String> values) {
            ComboBoxItem item  = new ComboBoxItem();
            item.setTitle(title);
            item.setTitleAlign(Alignment.LEFT);
            item.setWidth(95);
            item.setAddUnknownValues(false);
      
            item.setValueMap(values);
            item.setDefaultValue(defaultItem);
    
            return item;
        }
      
    }

    Leave a comment:


  • plech.d
    replied
    When using setAddUnknownValues(false) on a ComboBoxItem, which does what I need, ChangedHandler and ChangeHandler doesn't fire. Ever. It's as simple as that.

    Leave a comment:


  • Isomorphic
    replied
    We need a standalone test case.

    Leave a comment:


  • willfleury
    replied
    Hi Sorry,

    I set setAddUnknownValues (true) instead of false and it works.. The only hitch is having to check after getValue() that it was in the original list of options..


    I have not submitted a bug request yet - have not had the time to.

    Leave a comment:


  • plech.d
    replied
    Hello,

    any news on this?

    I'm experiencing the problem that when using setAddUnknownValues(false), no change or changed handlers get called - ever. I think this is the same problem you are having. I also tried experimenting with setChangeOnKeypress(false), but this disables the automatic suggestion of options while typing.

    Leave a comment:


  • willfleury
    replied
    Thank you very much.. Will do.

    Leave a comment:

Working...
X