Announcement

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

    setValue not call change event

    SmartClient v8

    I have the follow button:
    Code:
    isc.ImgButton.create({
    			    ID:"historyLogPrevDayImg",
    			    autoDraw:false,
    			    src:"icons/prev.png", size:16,
    			    prompt:"Go to previous day",
    			    showFocused:false, showRollOver:false, showDown:false,
    			    click : function(){			
    					historyLogDayChoseForm.setValue("day",new Date(historyLogDayChoseForm.getValue("day").getTime()-86400000));	
    				}
    			});
    and the follow form for data chose
    Code:
    isc.DynamicForm.create({
    				ID:"historyLogDayChoseForm",	
    		    	fields : [
    		  		    {name: "day", type:"date", useTextField:false, title:"Day", 
    			  		 	change:function(form, item, value, oldValue){
    		  		    		historyLogList.fetchData({
    								history_job_group:jobList.getSelectedRecord()?jobList.getSelectedRecord().job_group:null,
    								history_job_name:jobList.getSelectedRecord()?jobList.getSelectedRecord().job_name:null,
    								history_job_execution_time:value
    							});	
    		    			}
    					}
    				]
    			});
    the event "change" on form works correctly when I use picker or day/month/hear combo, but NOT when I click on my "historyLogDayChoseForm" button. According to documentation (http://www.smartclient.com/docs/7.0r...micForm.values) : "As the user manipulates form items to change values, change events fire on the items and on the form as a whole" is the correct behaviour when programmatically change the form field value.

    Thanks.

    #2
    Can someone help me with this problem? I'm wronging something or misunderstanding?

    Thanks a lot!

    Comment

    Working...
    X