Before asking a question, i want to say that the Title doesn't give clear picture. My question is very specific so not able to frame title. So put a title which is little relevant. Also, i found Jgoodies with List Binding but it doesn't give better info required for the below scenario.
Question:
I have panel which is list of label, Textfield and ComboBox. This List is static i.e it consist of 8 Such Combination. I have created a Model which extends PresentationModel of ListInfoBean . This ListBean is a List of a InfoBean. Each InfoBean consist of label value, TextField value and ComboBox value.
In the Controller, i want to bind the view(panel of List of label, Textfield and ComboBox with the each of the InfoBean that corresponds to Label, Textfield and ComboBox. Below is the code snippet for binding.
PresentationModelBinder binder = Binders.binderFor(model); //model is member of controller
binder.bindBeanProperty(InfoBean.LABEL_PROPERTY).to(label); //This results an exception because binder is bind with model and model is extends to ListInfoBean not InfoBean. so its says LABEL_PROPERTY is not present in ListInfoBean.
I checked SeletionInListBean as well. As per my understanding, it is related to comboBox or Selection from the List. But my case is different. Any idea or help will be greatful.
class InfoBean extends Bean {
public static final String LABEL_PROPERTY = "label";
public static final String TEXT_PROPERTY = "text";
public static final String COMBOBOX_PROPERTY = "ComboxBox";
private String label;
private String text;
private String ComboxBox;
public void setLabel(String label) {
String oldValue = this.label;
this.label = label;
firePropertychange(LABEL_PROPERTY, oldValue , label);
}
//Similarly for text and ComboBox as well.
}