Announcement

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

    MiniDateRangeItem.addChangedHandler behaves like ChangeHandler, not ChangedHandler

    Hello, dear smartgwt developers!

    Just upgraded smartgwt version to today's nightly build(19/11/2010), because Changed and Change events didn't work. It's now fixed, but MiniDateRangeItem control's ChangeD event behaves just like Change event, i.e. event handler sees date range as null when first runned. Real data comes only starting from the second iteration.

    Please, check it.

    Here is the info you requested:

    1. SmartGWT 2.2(19.11.2010 nightly build) + IE 8 and Mozilla Firefox 3.6.12

    3. for a client-side problem, the contents of the Developer Console:
    Code:
    00:03:44.272 [INFO] [recondashboard] Module recondashboard has been loaded
    4. if there is a JavaScript error, the stack trace logged in the Developer Console (from Internet Explorer if possible);
    Code:
    Webpage error details
    
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
    Timestamp: Fri, 19 Nov 2010 22:04:10 UTC
    
    Message: 'isc' is undefined
    Line: 7
    Char: 1
    Code: 0
    URI: http://127.0.0.1:8888/recondashboard/sc/skins/SilverWave/load_skin.js
    5. sample code:
    Code:
    TabSet mainTabs = new TabSet();
    mainTabs.setWidth(600);  
    mainTabs.setHeight(800);
    
    Tab summaryTab = new Tab("Summary");
    VLayout summaryTabVL = new VLayout();
    
    
    DynamicForm dateForm = new DynamicForm();  
    dateForm.setWidth(450);  
    dateForm.setIsGroup(false);  
    MiniDateRangeItem dateRangeItem = new MiniDateRangeItem("mdri", "Date Range");
    dateForm.setItems(dateRangeItem);        
    
    dateRangeItem.addChangedHandler(new ChangedHandler()
    {
        @Override
        public void onChanged(ChangedEvent event)
        {
            MiniDateRangeItem dateRangeItem = (MiniDateRangeItem)event.getSource();
            java.util.Date fromDate = dateRangeItem.getFromDate();
            java.util.Date toDate = dateRangeItem.getToDate();
        }
    });
    
    summaryTabVL.addMember(dateForm);
    summaryTab.setPane(summaryTabVL);
    
    mainTabs.setTabs(summaryTab);
    
    mainVL.addMember(mainTabs);
    mainVL.setMargin(5);
    mainVL.setWidth100();
    mainVL.setHeight100();
    
    mainVL.draw();
    When I debug this code just after starting, fromDate and toDate are both nulls. But when I change dates in the browser again, the values are the precedent ones, i.e. it's always step behind, like it's Change event, not ChangeD.

    Please help me, I need ChangedHandler to work.

    Thank you very much in advance!
    Last edited by J-Pro; 22 Nov 2010, 17:30.

    #2
    Any suggestions? Is it really a bug or just my mistake? If it's a bug, when it's planned to be fixed?

    Thanks.

    Comment


      #3
      This has been fixed, please pick up the next nightly build.

      Comment


        #4
        Thanks, it works.

        Comment

        Working...
        X