Vaadin:为浮点步进器设置空值

时间:2014-12-04 17:32:52

标签: java vaadin

我使用vaadin float stepper来设置值。我输入一些值后,我想清除步进器,但它返回以前的值(我的意思是使用UI)。但是,如果不输入任何内容,则允许空值。如何设置空值?

private FloatStepper weightFrom = new FloatStepper("Weight from");  
weightFrom.setWidth("100%");
weightFrom.setMinValue(0f);
weightFrom.setValue(null);
weightFrom.setImmediate(true);
privateLayout.addComponent(weightFrom)

0 个答案:

没有答案