wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ORACLEADF <ora....@gmail.com>
Subject Re: Bind ResultSet of a SQL query with wicket datatable
Date Mon, 15 Apr 2013 08:53:04 GMT
Hi Andrea ,Thank you.
I created the following data provider, please help me how to bind this
provider with a dataview.
*public class PersonnelsProvider implements IDataProvider<PersonnelDTO> {
    private List<PersonnelDTO> personnelDTOList;
    private final DatabaseHandler handler;

    public PersonnelsProvider(DatabaseHandler handler) {
        this.handler = handler;
        personnelDTOList = this.handler.gettblPersonnel("0", "0", "1", "0");
    }

    @Override
    public Iterator<? extends PersonnelDTO> iterator(int first, int count) {
        return personnelDTOList.iterator();
    }

    @Override
    public int size() {
        return personnelDTOList.size();
    }

    @Override
    public IModel<PersonnelDTO> model(PersonnelDTO personnelDTO) {
        return new LoadableDetachableModel<PersonnelDTO>() {
            @Override
            protected PersonnelDTO load() {
                return null;  //To change body of implemented methods use
File | Settings | File Templates.
            }
        };
    }

    @Override
    public void detach() {
    }
}
*



-----
Regards
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bind-ResultSet-of-a-SQL-query-with-wicket-datatable-tp4657793p4657980.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message