TOC PREV NEXT INDEX






 


 




Modifying timezone.jspx


In the timezone.jspx page, make the following changes:

1. To support partial submission, we need to use an ICEfaces specific component, which requires adding a namespace declaration:
xmlns:ice="http://www.icesoft.com/icefaces/component"
 
2. The standard JSF form component is replaced with the ICEfaces form component, enabling partial submission:
<ice:form partialSubmit="true">
 
		...
 
</ice:form>
 
3. In the panelGrid holding the map, add a row of six selectBooleanCheckbox components, under the six commandButton components.
<ice:selectBooleanCheckbox id="Cminus10" required="false" immediate="true" 
 
     valueChangeListener="#{timeZoneBean.timeZoneChanged}" 
 
     value="#{timeZoneBean.checkboxStates['Cminus10']}"
 
     autocomplete="off"/>
 
<ice:selectBooleanCheckbox id="Cminus9" required="false" immediate="true"
 
     valueChangeListener="#{timeZoneBean.timeZoneChanged}" 
 
     value="#{timeZoneBean.checkboxStates['Cminus9']}"
 
     autocomplete="off"/>
 
<ice:selectBooleanCheckbox id="Cminus8" required="false" immediate="true"
 
     valueChangeListener="#{timeZoneBean.timeZoneChanged}" 
 
     value="#{timeZoneBean.checkboxStates['Cminus8']}"
 
     autocomplete="off"/>
 
<ice:selectBooleanCheckbox id="Cminus7" required="false" immediate="true" 
 
     valueChangeListener="#{timeZoneBean.timeZoneChanged}" 
 
     value="#{timeZoneBean.checkboxStates['Cminus7']}"
 
     autocomplete="off"/>
 
<ice:selectBooleanCheckbox id="Cminus6" required="false" immediate="true" 
 
     valueChangeListener="#{timeZoneBean.timeZoneChanged}" 
 
     value="#{timeZoneBean.checkboxStates['Cminus6']}"
 
     autocomplete="off"/>
 
<ice:selectBooleanCheckbox id="Cminus5" required="false" immediate="true" 
 
     valueChangeListener="#{timeZoneBean.timeZoneChanged}" 
 
     value="#{timeZoneBean.checkboxStates['Cminus5']}"
 
     autocomplete="off"/>
 

 
4. A dataTable is added below the panelGrid component in the UI. This dataTable will display information on all the selected time zones, getting its data from timeZoneBean's checkedTimeZoneList property, which is a list of TimeZoneWrapper objects. The properties of each object in the list are then displayed through JSF expression language bindings in outputText components in each row of the dataTable.
<h:dataTable frame="box" value="#{timeZoneBean.checkedTimeZoneList}" 
 
             var="checkedTimeZone">
 
		<f:facet name="header"><h:outputText value="Checked Time 
Zones"/></f:facet>
 
		<h:column>
 
				<f:facet name="header"><h:outputText value="Time Zone"/></f:facet>
 
				<h:outputText value="#{checkedTimeZone.displayName}"/>
 
		</h:column>
 
		<h:column>
 
				<f:facet name="header"><h:outputText value="Location"/></f:facet>
 
				<h:outputText value="#{checkedTimeZone.location}"/>
 
		</h:column>
 
		<h:column>
 
				<f:facet name="header"><h:outputText value="Uses DST"/></f:facet>
 
				<h:outputText value="#{checkedTimeZone.useDaylightTime}"/>
 
		</h:column>
 
		<h:column>
 
				<f:facet name="header"><h:outputText value="In DST"/></f:facet>
 
				<h:outputText value="#{checkedTimeZone.inDaylightTime}"/>
 
		</h:column>
 
		<h:column>
 
				<f:facet name="header"><h:outputText value="Time"/></f:facet>
 
				<h:outputText value=" #{checkedTimeZone.time} "/>
 
		</h:column>
 
</h:dataTable>
 


Copyright 2005-2006. ICEsoft Technologies, Inc.
http://www.icesoft.com

TOC PREV NEXT INDEX