@Component(type = "contrib:TableView", id = "tableView") public abstract TableView getTableWyniki(); @Component(type = "contrib:TablePages", id = "tablePages") public abstract TablePages getTablePages(); @Component(type = "contrib:TableRows", id = "tableRows") public abstract TableRows getTableRows(); public int getRowNo(){ return (getTablePages().getCurrentPage() - 1) * getTableWyniki().getPageSize() + getTableRows().getTableIndex() + 1; }
in html file
<table jwcid="tableView" source="ognl:users" columns="Row number, login"> <tr> <td> <span jwcid="tablePages" /> </td> </tr> <tr> <span jwcid="@contrib:TableColumns" /> </tr> <tr jwcid="tableRows" > <td > <span jwcid="@Insert" value="ognl:rowNo" /> </td> <td > <span jwcid="@Insert" value="ognl:components.tableRows.tableRow.login" /> </td> </tr> </table>
Brak komentarzy:
Prześlij komentarz