Not only a sheet can be used to display data, it may also contain inputfields to edit the data.
Tag Library Documentation: <tc:sheet/> | <tc:column/>
In this sheet you can edit the data of solar objects. Press the 'Submit' button to see the results in the 'Result' section.
The sheet in this section is for verifying the submitted data.
<?xml version="1.0" encoding="UTF-8"?> <!-- * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --> <ui:composition template="/main.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:tc="http://myfaces.apache.org/tobago/component" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"> <ui:param name="title" value="#{demoBundle.sheet_editable} <tc:sheet>"/> <p>Not only a sheet can be used to display data, it may also contain inputfields to edit the data.</p> <p>Tag Library Documentation: <tc:link label="<tc:sheet/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/sheet.html"/> | <tc:link label="<tc:column/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{apiController.currentRelease}/tld/tc/column.html"/></p> <tc:section label="Editable Sheet" id="basics"> <p>In this sheet you can edit the data of solar objects. Press the 'Submit' button to see the results in the 'Result' section.</p> <tc:sheet id="editSheet" value="#{sheetEditableController.solarList}" var="object" rows="5"> <tc:column label="Name"> <tc:in id="nameCol" value="#{object.name}" labelLayout="skip"> <f:ajax execute="nameCol" render="resultSheet"/> </tc:in> </tc:column> <tc:column label="Orbit"> <tc:in value="#{object.orbit}" labelLayout="skip"/> </tc:column> <tc:column label="Period (Days)"> <tc:in value="#{object.period}" labelLayout="skip"/> </tc:column> <tc:column label="Discoverer"> <tc:in value="#{object.discoverer}" labelLayout="skip"/> </tc:column> <tc:column label="Year"> <tc:date value="#{object.discoverYear}" converter="#{sheetController.yearConverter}" labelLayout="skip"/> </tc:column> </tc:sheet> <tc:button label="Submit"> <f:ajax execute="editSheet" render="resultSheet"/> </tc:button> </tc:section> <tc:section label="Result"> <p>The sheet in this section is for verifying the submitted data.</p> <tc:sheet id="resultSheet" var="object" value="#{sheetEditableController.solarList}"> <tc:column label="Name"> <tc:out value="#{object.name}"/> </tc:column> <tc:column label="Orbit"> <tc:out value="#{object.orbit}"/> </tc:column> <tc:column label="Period (Days)"> <tc:out value="#{object.period}"/> </tc:column> <tc:column label="Discoverer"> <tc:out value="#{object.discoverer}"/> </tc:column> <tc:column label="Year"> <tc:out value="#{object.discoverYear}"/> </tc:column> </tc:sheet> </tc:section> </ui:composition>