Oh sorry, it was a wrong tip,... You can provide an own GridDataSource, in getAvailableRows() return your list size+1 (the empty row) and in getRowValue(index) return an emty object for the index out of the list size. The empty row will not be included in sort.
Regards 2013/12/13 Eugen <eugens...@gmail.com>: > Hi, > have You tried to provide an own sortModel? > > 2013/12/13 Thai Tran <bubu...@gmail.com>: >> 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 >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org