Hi all,

On my grid, each cell contains a textbox in order to let user edit the data. The last row of the grid is cells which contains empty textbox in order to let user insert the new data. In order to create the last row, I manually add a new element during retrieving data from database
/
//public void setupRender() {//
//    List<Document> docs = documentDAO.getAll();//
//    docs.add(new Document());//
    .....
//}/

/public BeanModel<Document> getDocumentModel(){//
// BeanModel<Document> model = getBeanModelSource().createDisplayModel(Document.class, getMessages());//
//        model.include("name", "shortDescription");//
//        model.add("delete", null);//
//
//        return model;//
//}/

and the tml file:

/<t:parameter name="nameCell">//
// <input t:type="TextField" t:value="document.name" t:id="nameField" />//
//</t:parameter>//
////
//<t:parameter name="shortDescriptionCell">//
//    <input t:type="TextField" t:value="document.shortDescription" />//
//</t:parameter>/
.....

Everything work great; however, when I sort a column of the grid, the last row will jump into the first position, since the empty document (row /element) is included during sorting. How can I override the sorting function to exclude the last element in the list ?

Regards


Reply via email to