Results 1 to 7 of 7

Thread: combobox is not showing values on setvalue method

    You found a bug! We've classified it as EXTGWT-2354 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    New York, NY
    Posts
    116

    Default combobox is not showing values on setvalue method

    Code:
    dateField = new DateField(new DateCell(), new DateTimePropertyEditor(DateTimeFormat.getFormat("MM/dd/yyyy")));
    dateField.setClearValueOnParseError(false);
    dateField.setAllowBlank(false);

    If I type asdf it shows an error correctly but when i set value to a date as a part of other call back. it does set a value but it still shows asdf it doesn't clear it and show correct value.

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I am not sure if i can understand correctly what you mean. Would it be possible to provide a testcase that exactly shows what you are doing and what values you are setting?

  3. #3
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    New York, NY
    Posts
    116

    Default

    run following example once you start your page enter invalid character and it will reset it's values again but it doesn't get reflected. I am setting same value again to field every 10 second.

    Code:
    public class MySampleApplication implements IsWidget, EntryPoint {
    
        @Override
        public Widget asWidget() {
            final DateField dateField = new DateField(new DateCell(), new DateTimePropertyEditor(DateTimeFormat.getFormat("MM/dd/yyyy")));
            dateField.setClearValueOnParseError(false);
            dateField.setAllowBlank(false);
            dateField.setErrorSupport(new ToolTipErrorHandler(dateField));
            DateWrapper dateWrapper = new DateWrapper(new Date());
            dateField.setMaxValue(dateWrapper.addDays(1).asDate());
    
    
            FramedPanel cp = new FramedPanel();
    
    
            cp.setButtonAlign(BoxLayoutContainer.BoxLayoutPack.CENTER);
            cp.add(dateField);
            final Date date = new Date();
            dateField.setValue(date);
            Timer t = new Timer() {
                @Override
                public void run() {
                    dateField.setValue(date);
                }
            };
            t.scheduleRepeating(10000);
            return cp;
    
    
        }
    
    
        @Override
        public void onModuleLoad() {
            RootPanel.get().add(asWidget());
        }
    }

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    16

    Default

    I've had the same issue with DateField, TriggerField, and ComboBox. What I've found I have to do is after the setValue() call, is also call redraw( true ) and setText( getValue() ) It appears the value of the Field is updated, but the underlying Cell and text are not.

  5. #5
    Ext GWT Premium Member
    Join Date
    Dec 2010
    Location
    New York, NY
    Posts
    116

    Default

    Yeah i have to do the same after setValue , I validated and redraw. I reported so they can fix this behavior.

  6. #6
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I will move this thread to the bugs forum so we can take a look at it. Thanks for reporting.

  7. #7

    Default

    Hi,

    Is there a known workaround for this? I have tried calling:

    setValue
    isCurrentValid
    redraw
    setText

    in various orders to see if I can get the value to update, but with no luck. I've also tried 3.0.1 and 3.0.6, but no success.

    Thanks in advance,
    Stephen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •