From richfaces-svn-commits at lists.jboss.org Tue Jan 25 08:01:39 2011 Content-Type: multipart/mixed; boundary="===============0677024123257400775==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r21201 - in trunk/examples/richfaces-showcase/src/main: webapp/richfaces/dataTable/samples and 1 other directory. Date: Tue, 25 Jan 2011 08:01:38 -0500 Message-ID: <201101251301.p0PD1cVY027351@svn01.web.mwc.hst.phx2.redhat.com> --===============0677024123257400775== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ilya_shaikovsky Date: 2011-01-25 08:01:38 -0500 (Tue, 25 Jan 2011) New Revision: 21201 Modified: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/table= s/CarsBean.java trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/sa= mples/dataTableEdit-sample.xhtml Log: dataTable edit example Modified: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/dem= o/tables/CarsBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tabl= es/CarsBean.java 2011-01-25 13:00:20 UTC (rev 21200) +++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tabl= es/CarsBean.java 2011-01-25 13:01:38 UTC (rev 21201) @@ -32,12 +32,18 @@ private static final int ROUNDING_MODE =3D BigDecimal.ROUND_HALF_UP; private List allInventoryItems =3D null; private List inventoryVendorLists =3D null; - private InventoryItem currentCar; + private int currentCarIndex; + private InventoryItem editedCar; + private int page; = public void remove() { - allInventoryItems.remove(currentCar); + allInventoryItems.remove(allInventoryItems.get(currentCarIndex)); } - = + + public void store() { + allInventoryItems.set(currentCarIndex, editedCar); + } + public List getVendorOptions() { List result =3D new ArrayList(); result.add(new SelectItem("", "")); @@ -197,12 +203,27 @@ return iiList; } = - public InventoryItem getCurrentCar() { - return currentCar; + public int getCurrentCarIndex() { + return currentCarIndex; } = - public void setCurrentCar(InventoryItem currentCar) { - this.currentCar =3D currentCar; + public void setCurrentCarIndex(int currentCarIndex) { + this.currentCarIndex =3D currentCarIndex; } = + public InventoryItem getEditedCar() { + return editedCar; + } + + public void setEditedCar(InventoryItem editedCar) { + this.editedCar =3D editedCar; + } + + public int getPage() { + return page; + } + + public void setPage(int page) { + this.page =3D page; + } } Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataT= able/samples/dataTableEdit-sample.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/s= amples/dataTableEdit-sample.xhtml 2011-01-25 13:00:20 UTC (rev 21200) +++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/s= amples/dataTableEdit-sample.xhtml 2011-01-25 13:01:38 UTC (rev 21201) @@ -5,13 +5,25 @@ xmlns:ui=3D"http://java.sun.com/jsf/facelets" xmlns:a4j=3D"http://richfaces.org/a4j" xmlns:rich=3D"http://richfaces.org/rich"> + + + + iterationStatusVar=3D"it" id=3D"table" rows=3D"15"> Nothing found + # + #{it.index} + + Vendor @@ -32,47 +44,66 @@ - Actions - - - - + + + + + + + - - - - - - + - + + + + + + + Wait please... + + + = + Sure to delete row? + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file --===============0677024123257400775==--