generate form from table's indexed container

Hi everyone,

I have generated a table which has indexed container.

public void generateTable(final List<Measurement> measurementsList) {

measurementsContainer = new IndexedContainer();
		measurementsContainer.addContainerProperty(DATE, String.class, null);
		measurementsContainer.addContainerProperty(TIME, String.class, null);


and I should generate a form on table’s item click but

 public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) ;

is not getting called in MyFieldFactory So i also tried with

public Field createField(Item item, Object propertyId, Component uiContext) ;

but calling item.getItemProperty(propertyId) in createField() results in null value so ended in nullpointer.

Please aid me in generating fields based on table items.

So when clicking a row in Table you want to have the row item and generate a Form based on that. First of all the createField method that has Item as a parameter is the correct one. That is from FormFieldFactory interface. But to get the item you clicked from the table you need to call container (or table) getItem(itemId) and put the returned Item as an item datasource to your Form.