June 2014
Intermediate to advanced
578 pages
12h 2m
English
In this section, you will see how to write contracts for composite components. For this, we will use the Temperature composite component developed in Chapter 10, JSF Custom Components. The implementation section in the code is given as follows:
<cc:implementation> <div id="#{cc.clientId}:tempconv_main"> <h:outputLabel id="tempconv_smlabel" for="tempconv_selectonemenu" value="Convert to:"/> <h:selectOneMenu id="tempconv_selectonemenu" binding="#{cc.unittoI}"> <f:selectItem itemValue="fahrenheit" itemLabel="fahrenheit" /> <f:selectItem itemValue="celsius" itemLabel="celsius" /> </h:selectOneMenu> <h:outputLabel id="tempconv_iflabel" for="tempconv_inputfield" value="Insert value:"/> <h:inputText id="tempconv_inputfield" ...Read now
Unlock full access