Sorry in case this question has already been asked, but after searching these topics still could not figure out the problem.
I have very simple bean as below,
<code>
public class FileBean extends AbstractFileBean {
...
private int headingRow = 0;
private ColumnDefinition columnSet;
...
}
</code>
Now using above bean, am trying to bind these properties to UI fields as below.
<code>
public AddCsv(AbstractFileBean fileBean) {
csvbinder = new BeanFieldGroup<FileBean>(FileBean.class);
csvbinder.setItemDataSource((FileBean) fileBean);
csvbinder.setBuffered(false);
csvbinder.bind((TextField)form.getField(UIField.NAME), "name");
csvbinder.bind((IntStepper)form.getField(UIField.HEADINGROW), "headingRow");
ComboBox columnDefinitions = (ComboBox)form.getField(UIField.COLUMNDEF);
csvbinder.bind(columnDefinitions, "columnSet");
//AddFileUtil.populateColumnSets(columnDefinitions,fileBean); - this method fills up combo box
...
}
</code>
Problem: I have one form with set of fields as described above. There is another button on same form as 'Upload New file', which basically picks up the file from system and I'm setting name and path as below by service layer
<code>
fileBean.setName(file.getName());
fileBean.setFilePath(filePath);
</code>
After selecting the file, coming back to same form does not show the UI fields populated. The strange thing is, when you type manually in those form fields say inside Name textfield, that is populated inside the filebean. but the only problem is other way round. After selecting the file. Those UI fields still shows as blank.
Is there something missing whilst setting up the binder which is not letting the UI to refresh?
Please let me know in case more information needed.
Thanks in advance,