Author: ilya_shaikovsky
Date: 2010-05-20 10:54:00 -0400 (Thu, 20 May 2010)
New Revision: 17163
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/Capital.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsParser.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorItem.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorList.java
Removed:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/capitals/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/carsstore/
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
Log:
https://jira.jboss.org/browse/RF-8290
+ refactoring.
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,33 @@
+package org.richfaces.demo.common.data;
+
+import java.util.Random;
+
+public class RandomHelper {
+
+ public static int genRand() {
+ return rand(1, 10000);
+ }
+
+ public static int rand(int lo, int hi) {
+ Random rn2 = new Random();
+ int n = hi - lo + 1;
+ int i = rn2.nextInt() % n;
+
+ if (i < 0) {
+ i = -i;
+ }
+
+ return lo + i;
+ }
+
+ public static String randomstring(int lo, int hi) {
+ int n = rand(lo, hi);
+ byte[] b = new byte[n];
+
+ for (int i = 0; i < n; i++) {
+ b[i] = (byte) rand('A', 'Z');
+ }
+
+ return new String(b);
+ }
+}
Copied:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/Capital.java
(from rev 17153,
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/capitals/Capital.java)
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/Capital.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/Capital.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,56 @@
+package org.richfaces.demo.tables.data.capitals;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlElement;
+
+public class Capital implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1042449580199397136L;
+
+ private static final String FILE_EXT = ".gif";
+
+ private String name;
+ private String state;
+ private String timeZone;
+
+ public Capital() {
+ }
+
+ @XmlElement
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @XmlElement
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ private String stateNameToFileName() {
+ return state.replaceAll("\\s", "").toLowerCase();
+ }
+
+ public String getStateFlag() {
+ return "/images/capitals/" + stateNameToFileName() + FILE_EXT;
+ }
+
+ @XmlElement
+ public String getTimeZone() {
+ return timeZone;
+ }
+
+ public void setTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ }
+}
Copied:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java
(from rev 17153,
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/capitals/CapitalsBean.java)
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsBean.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,29 @@
+package org.richfaces.demo.tables.data.capitals;
+
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+
+@ManagedBean
+@SessionScoped
+public class CapitalsBean {
+
+ @ManagedProperty(value = "#{capitalsParser.capitalsList}")
+ private List<Capital> capitals;
+
+ public CapitalsBean() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public List<Capital> getCapitals() {
+ return capitals;
+ }
+
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+
+
+}
Copied:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsParser.java
(from rev 17153,
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/capitals/CapitalsParser.java)
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsParser.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/capitals/CapitalsParser.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,52 @@
+package org.richfaces.demo.tables.data.capitals;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.faces.FacesException;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@ManagedBean
+@ApplicationScoped
+public class CapitalsParser {
+
+ private List<Capital> capitalsList;
+
+ @XmlRootElement(name = "capitals")
+ private static final class CapitalsHolder {
+
+ private List<Capital> capitals;
+
+ @XmlElement(name = "capital")
+ public List<Capital> getCapitals() {
+ return capitals;
+ }
+
+ @SuppressWarnings("unused")
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
+ }
+ }
+
+ public synchronized List<Capital> getCapitalsList() {
+ if (capitalsList == null) {
+ ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+ URL resource =
ccl.getResource("org/richfaces/demo/data/capitals/capitals.xml");
+ JAXBContext context;
+ try {
+ context = JAXBContext.newInstance(CapitalsHolder.class);
+ CapitalsHolder capitalsHolder = (CapitalsHolder)
context.createUnmarshaller().unmarshal(resource);
+ capitalsList = capitalsHolder.getCapitals();
+ } catch (JAXBException e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+ return capitalsList;
+ }
+}
Copied:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
(from rev 17153,
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/carsstore/CarsBean.java)
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,178 @@
+/**
+ *
+ */
+package org.richfaces.demo.tables.data.carstore;
+
+import java.math.BigDecimal;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+import javax.faces.model.SelectItem;
+
+import org.richfaces.demo.common.data.RandomHelper;
+
+@ManagedBean(name = "carsBean")
+@SessionScoped
+public class CarsBean {
+ private static final int DECIMALS = 1;
+ private static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
+ private List<InventoryItem> allInventoryItems = null;
+ private List<InventoryVendorList> inventoryVendorLists = null;
+
+ public List<InventoryVendorList> getInventoryVendorLists() {
+ synchronized (this) {
+ if (inventoryVendorLists == null){
+ inventoryVendorLists = new ArrayList<InventoryVendorList>();
+ List<InventoryItem> inventoryItems = getAllInventoryItems();
+
+ Collections.sort(inventoryItems, new Comparator<InventoryItem>() {
+ public int compare(InventoryItem o1, InventoryItem o2) {
+ if (o1.getVendor().equals(o2.getVendor())){
+ return 0;
+ }
+ return 1;
+ }
+ });
+ Iterator<InventoryItem> iterator = inventoryItems.iterator();
+ InventoryVendorList vendorList = new InventoryVendorList();
+ vendorList.setVendor(inventoryItems.get(0).getVendor());
+ while (iterator.hasNext()){
+ InventoryItem item = iterator.next();
+ InventoryVendorItem newItem = new InventoryVendorItem();
+ itemToVendorItem(item, newItem);
+ if (!item.getVendor().equals(vendorList.getVendor())){
+ inventoryVendorLists.add(vendorList);
+ vendorList = new InventoryVendorList();
+ vendorList.setVendor(item.getVendor());
+ }
+ vendorList.getVendorItems().add(newItem);
+ }
+ inventoryVendorLists.add(vendorList);
+ }
+ }
+ return inventoryVendorLists;
+ }
+
+ private void itemToVendorItem(InventoryItem item, InventoryVendorItem newItem) {
+ newItem.setActivity(item.getActivity());
+ newItem.setChangePrice(item.getChangePrice());
+ newItem.setChangeSearches(item.getChangeSearches());
+ newItem.setDaysLive(item.getDaysLive());
+ newItem.setExposure(item.getExposure());
+ newItem.setInquiries(item.getInquiries());
+ newItem.setMileage(item.getMileage());
+ newItem.setMileageMarket(item.getMileageMarket());
+ newItem.setModel(item.getModel());
+ newItem.setPrice(item.getPrice());
+ newItem.setPriceMarket(item.getPriceMarket());
+ newItem.setPrinted(item.getPrinted());
+ newItem.setStock(item.getStock());
+ newItem.setVin(item.getVin());
+ }
+
+ public List<InventoryItem> getAllInventoryItems() {
+ synchronized (this) {
+ if (allInventoryItems == null) {
+ allInventoryItems = new ArrayList<InventoryItem>();
+
+ for (int k = 0; k <= 5; k++) {
+ try {
+ switch (k) {
+ case 0:
+ allInventoryItems.addAll(createCar("Chevrolet",
"Corvette", 5));
+ allInventoryItems.addAll(createCar("Chevrolet",
"Malibu", 8));
+ allInventoryItems.addAll(createCar("Chevrolet",
"Tahoe", 6));
+
+ break;
+
+ case 1:
+ allInventoryItems.addAll(createCar("Ford",
"Taurus", 12));
+ allInventoryItems.addAll(createCar("Ford",
"Explorer", 11));
+
+ break;
+
+ case 2:
+ allInventoryItems.addAll(createCar("Nissan",
"Maxima", 9));
+ allInventoryItems.addAll(createCar("Nissan",
"Frontier", 6));
+
+ break;
+
+ case 3:
+ allInventoryItems.addAll(createCar("Toyota",
"4-Runner", 7));
+ allInventoryItems.addAll(createCar("Toyota",
"Camry", 15));
+ allInventoryItems.addAll(createCar("Toyota",
"Avalon", 13));
+
+ break;
+
+ case 4:
+ allInventoryItems.addAll(createCar("GMC",
"Sierra", 8));
+ allInventoryItems.addAll(createCar("GMC",
"Yukon", 10));
+
+ break;
+
+ case 5:
+ allInventoryItems.addAll(createCar("Infiniti",
"G35", 6));
+ allInventoryItems.addAll(createCar("Infiniti",
"EX35", 5));
+
+ break;
+
+ default:
+ break;
+ }
+ } catch (Exception e) {
+ System.out.println("!!!!!!loadallInventoryItems Error:
" + e.getMessage());
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ return allInventoryItems;
+ }
+
+ public List<InventoryItem> createCar(String vendor, String model, int count) {
+ ArrayList<InventoryItem> iiList = null;
+
+ try {
+ int arrayCount = count;
+ InventoryItem[] demoInventoryItemArrays = new InventoryItem[arrayCount];
+
+ for (int j = 0; j < demoInventoryItemArrays.length; j++) {
+ InventoryItem ii = new InventoryItem();
+
+ ii.setVendor(vendor);
+ ii.setModel(model);
+ ii.setStock(RandomHelper.randomstring(6, 7));
+ ii.setVin(RandomHelper.randomstring(14, 15));
+ ii.setMileage(new BigDecimal(RandomHelper.rand(5000,
80000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setMileageMarket(new BigDecimal(RandomHelper.rand(25000,
45000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setPrice(new Integer(RandomHelper.rand(15000, 55000)));
+ ii.setPriceMarket(new BigDecimal(RandomHelper.rand(15000,
55000)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setDaysLive(RandomHelper.rand(1, 90));
+ ii.setChangeSearches(new BigDecimal(RandomHelper.rand(0,
5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setChangePrice(new BigDecimal(RandomHelper.rand(0,
5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setExposure(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS,
ROUNDING_MODE));
+ ii.setActivity(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS,
ROUNDING_MODE));
+ ii.setPrinted(new BigDecimal(RandomHelper.rand(0, 5)).setScale(DECIMALS,
ROUNDING_MODE));
+ ii.setInquiries(new BigDecimal(RandomHelper.rand(0,
5)).setScale(DECIMALS, ROUNDING_MODE));
+ demoInventoryItemArrays[j] = ii;
+ }
+
+ iiList = new
ArrayList<InventoryItem>(Arrays.asList(demoInventoryItemArrays));
+ } catch (Exception e) {
+ System.out.println("!!!!!!createCategory Error: " +
e.getMessage());
+ e.printStackTrace();
+ }
+
+ return iiList;
+ }
+}
Copied:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java
(from rev 17153,
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/carsstore/InventoryItem.java)
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,13 @@
+package org.richfaces.demo.tables.data.carstore;
+
+public class InventoryItem extends InventoryVendorItem {
+ public String vendor;
+
+ public String getVendor() {
+ return vendor;
+ }
+
+ public void setVendor(String vendor) {
+ this.vendor = vendor;
+ }
+}
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorItem.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorItem.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorItem.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,132 @@
+package org.richfaces.demo.tables.data.carstore;
+
+import java.math.BigDecimal;
+
+public class InventoryVendorItem {
+ BigDecimal activity;
+ BigDecimal changePrice;
+ BigDecimal changeSearches;
+ int daysLive;
+ BigDecimal exposure;
+ BigDecimal inquiries;
+ BigDecimal mileage;
+ BigDecimal mileageMarket;
+ String model;
+ Integer price;
+ BigDecimal priceMarket;
+ BigDecimal printed;
+ String stock;
+ String vin;
+
+ public String getModel() {
+ return model;
+ }
+
+ public void setModel(String model) {
+ this.model = model;
+ }
+
+ public String getStock() {
+ return stock;
+ }
+
+ public void setStock(String stock) {
+ this.stock = stock;
+ }
+
+ public String getVin() {
+ return vin;
+ }
+
+ public void setVin(String vin) {
+ this.vin = vin;
+ }
+
+ public BigDecimal getMileage() {
+ return mileage;
+ }
+
+ public void setMileage(BigDecimal mileage) {
+ this.mileage = mileage;
+ }
+
+ public BigDecimal getMileageMarket() {
+ return mileageMarket;
+ }
+
+ public void setMileageMarket(BigDecimal mileageMarket) {
+ this.mileageMarket = mileageMarket;
+ }
+
+ public Integer getPrice() {
+ return price;
+ }
+
+ public void setPrice(Integer price) {
+ this.price = price;
+ }
+
+ public BigDecimal getPriceMarket() {
+ return priceMarket;
+ }
+
+ public void setPriceMarket(BigDecimal priceMarket) {
+ this.priceMarket = priceMarket;
+ }
+
+ public int getDaysLive() {
+ return daysLive;
+ }
+
+ public void setDaysLive(int daysLive) {
+ this.daysLive = daysLive;
+ }
+
+ public BigDecimal getChangeSearches() {
+ return changeSearches;
+ }
+
+ public void setChangeSearches(BigDecimal changeSearches) {
+ this.changeSearches = changeSearches;
+ }
+
+ public BigDecimal getChangePrice() {
+ return changePrice;
+ }
+
+ public void setChangePrice(BigDecimal changePrice) {
+ this.changePrice = changePrice;
+ }
+
+ public BigDecimal getExposure() {
+ return exposure;
+ }
+
+ public void setExposure(BigDecimal exposure) {
+ this.exposure = exposure;
+ }
+
+ public BigDecimal getActivity() {
+ return activity;
+ }
+
+ public void setActivity(BigDecimal activity) {
+ this.activity = activity;
+ }
+
+ public BigDecimal getPrinted() {
+ return printed;
+ }
+
+ public void setPrinted(BigDecimal printed) {
+ this.printed = printed;
+ }
+
+ public BigDecimal getInquiries() {
+ return inquiries;
+ }
+
+ public void setInquiries(BigDecimal inquiries) {
+ this.inquiries = inquiries;
+ }
+}
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorList.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorList.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryVendorList.java 2010-05-20
14:54:00 UTC (rev 17163)
@@ -0,0 +1,29 @@
+package org.richfaces.demo.tables.data.carstore;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InventoryVendorList {
+ private String vendor;
+ private List<InventoryVendorItem> vendorItems;
+
+ public InventoryVendorList() {
+ vendorItems = new ArrayList<InventoryVendorItem>();
+ }
+
+ public String getVendor() {
+ return vendor;
+ }
+
+ public void setVendor(String vendor) {
+ this.vendor = vendor;
+ }
+
+ public List<InventoryVendorItem> getVendorItems() {
+ return vendorItems;
+ }
+
+ public void setVendorItems(List<InventoryVendorItem> vendorItems) {
+ this.vendorItems = vendorItems;
+ }
+}
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-20
14:47:37 UTC (rev 17162)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-20
14:54:00 UTC (rev 17163)
@@ -8,18 +8,52 @@
<ui:composition>
<h:form>
- <tbl:extendedDataTable frozenColumns="1"
value="#{capitalsBean.capitals}" rows="100" var="cap"
id="table" clientRows="50" style="width:300px;
height:300px;">
- <tbl:column>
- <f:facet name="header">
- <h:outputText value="name" />
- </f:facet>
- <h:outputText value="#{cap.name}"/>
- <f:facet name="footer">
- remove this also to check
- </f:facet>
+ <tbl:dataTable value="#{carsBean.inventoryVendorLists}"
var="list">
+ <f:facet name="header">
+ <h:outputText value="Cars marketplace"/>
+ </f:facet>
+ <tbl:column colspan="3">
+ <h:outputText value="#{list.vendor}" />
</tbl:column>
- </tbl:extendedDataTable>
- <a4j:commandButton execute="@this" render="table"
value="table"></a4j:commandButton>
+ <tbl:subTable value="#{list.vendorItems}" var="item">
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{item.model}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{item.price}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{item.mileage}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="VIN Code" />
+ </f:facet>
+ <h:outputText value="#{item.vin}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Items stock" />
+ </f:facet>
+ <h:outputText value="#{item.stock}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Days Live" />
+ </f:facet>
+ <h:outputText value="#{item.daysLive}" />
+ </tbl:column>
+ </tbl:subTable>
+ </tbl:dataTable>
</h:form>
</ui:composition>
</html>
\ No newline at end of file