TimeItem.getDisplayValue() Not displaying the Keyed in time

When the Button is clicked the Pre setValue “14:00:00” is displayed.
After changing the Value in the TimeItem control to say “15:00:00” and clicking the button does not display the new value, Instead displays the old value “14:00:00”
(if no value is pre set, then empty value is displayed instead of the keyed in value)

What am I missing here. Thanks for any help.

I am using Ubuntu 8.10 with GWT 1.5.3 and the latest SmartGWT build r439

HLayout topHLayout = new HLayout();
topHLayout.setWidth("90%");
topHLayout.setHeight("10%");

DynamicForm cForm = new DynamicForm();
cForm.setWidth("100%");

final TimeItem tiPreferedTime = new TimeItem();
tiPreferedTime.setName("PreferedTime");
tiPreferedTime.setTitle("Time");
tiPreferedTime.setTimeFormatter(TimeFormatter.TOPADDED24HOURTIME);  
tiPreferedTime.setDisplayFormat(TimeFormatter.TOPADDED24HOURTIME);
tiPreferedTime.setPrompt("Prefered Time");
tiPreferedTime.setHint("hh:mm:ss");

tiPreferedTime.setValue("14:00:00");

ButtonItem btnCreate = new ButtonItem();
btnCreate.setName("Create");
btnCreate.setTitle("Save");
btnCreate.setWidth("60");

cForm.setFields(tiPreferedTime, btnCreate);
topHLayout.addChild(cForm);
topHLayout.draw();

btnCreate.addClickHandler(new ClickHandler(){

	public void onClick(ClickEvent event) {
		Window.alert("Time:" + tiPreferedTime.getDisplayValue());
				
	}
});

Currently TimeItem does not consider the value to have changed until you exit the field. Does this explain what you’re seeing?

No. even after exiting the TimeItem field, the value is not changed.

I am able to reproduce this. Will get back to you on this.

Sanjiv

Fixed in SVN.