Binding data to table problem

Hello,
I have problem with binding data to table.
My ProducerContainer look like this:


public class ProducerContainer extends BeanItemContainer<ProducerTO> implements
Serializable  {

	public static final Object[] NATURAL_COL_ORDER = new Object[]
 {
		"sname", "ssymbol", "scomment", "sphone", "sfax",
		"semail", "swww", "snip" };

	/**
	 * "Human readable" captions for properties in same order as in
	 * NATURAL_COL_ORDER.
	 */
	public static final String[] COL_HEADERS_ENGLISH = new String[]
 {
		"sname", "ssymbol", "scomment", "sphone", "sfax",
		"semail", "swww", "snip" };

	public ProducerContainer() throws InstantiationException,
	IllegalAccessException {
		super(ProducerTO.class);
	}

	public static ProducerContainer getProducerData(){
		ProducerContainer c = null;
		try {
			c = new ProducerContainer();
			List<Producer> producerDAO = new GestorEJBProxy().getProducerDAO().findProducerEntities();
			for(Producer p : producerDAO){
				ProducerTO producerTO = new ProducerTO();
				producerTO.setSname(p.getSname());
				producerTO.setSsymbol(p.getSsymbol());
				producerTO.setScomment(p.getScomment());
				producerTO.setSphone(p.getSphone());
				producerTO.setSfax(p.getSfax());
				producerTO.setSemail(p.getSemail());
				producerTO.setSwww(p.getSwww());
				producerTO.setSnip(p.getSnip());
				c.addItem(producerTO);

			}
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		
		return c;
	}
}

i checked that my producerDAO retrieve all datas from database
My producer table look like


public class ProducerTable extends Table {
	public ProducerTable(GestorApplication app) {
		setSizeFull();
		setContainerDataSource(ProducerContainer.getProducerData());

		setVisibleColumns(ProducerContainer.NATURAL_COL_ORDER);
		setColumnHeaders(ProducerContainer.COL_HEADERS_ENGLISH);

		setColumnCollapsingAllowed(true);
		setColumnReorderingAllowed(true);

		/*
		 * Make table selectable, react immediatedly to user events, and pass
		 * events to the controller (our main application)
		 */
		setSelectable(true);
		setImmediate(true);
		/* We don't want to allow users to de-select a row */
		setNullSelectionAllowed(false);

	}
}

but when i start application i see only first row retrieved from database in table

I would guess the problem is in the equals() (or hashCode()) method of ProducerTO - the container probably thinks you are trying to add the same item twice, and discards the extra items.

You should either implement a proper equals() method (and hashCode() that is consistent with it), or use another container as your base class.