setVisibleItemProperties has no effect

Hie

My bean is bound to automatically generate a form. But the order was not desired so used setVisibleItemProperties but it has no effect. The below code still renders confirmEmailId first and then emailId field. Is it a bug?

Form subscribeform = new Form();
subscribeform.setCaption(“Subscribe/Unsubscribe”);
subscribeform.setDescription(“Please provide your email id to be a part of Sakshum’s mailing list…”);

        		SubscriptionBean bean = new SubscriptionBean();
        		BeanItem item = new BeanItem(bean);
        		Vector<String> order = new Vector<String>();
        		order.add("emailId");
        		order.add("confirmEmailId");
        		subscribeform.setVisibleItemProperties(order);
        		subscribeform.setItemDataSource(item);

Hi,

I think you need to set the data source
before
setting the visible properties:

subscribeform.setItemDataSource(item); 
subscribeform.setVisibleItemProperties(order);

Best Regards,
Marc

gr8 that works…

but should these things be documented in the book? let me know if there is place to log bugs for improving documentation

Vik

You can report bugs at
dev.vaadin.com
. You need to register before you can add new tickets.

Thanks!
/Jonatan

Ok created http://dev.vaadin.com/ticket/3708

Actually, I’d make a bug report about the behavior, not about the documentation.
The item order is about the form metadata, and I don’t see why a data source should be bound before being able to specify the order of the items.