Writing JSP Pages

About this task

In your JSP pages, you need to use the standard JSF EL value binding expressions, which are to bind the field to the managed bean attribute.

Following is an example:

<h:inputText id="acctTo" value="#{accountTransferBean.acctTo}"/>

When you use the JSF <f:selectitems> tag, you need to perform the following steps:

  1. Define a BTT IndexedCollection which is used to map its contained data to the JSF <f:selectitems> tag. Set its description attribute as selectItems, and make it contain only one field. Following is an example:
    <managed-bean>
        	<managed-bean-name>accountListNewBean</managed-bean-name>
        	<managed-bean-class>test.AccountListNewBean</managed-bean-class>
        	<managed-bean-scope>request</managed-bean-scope>
        	<managed-property>
          		<property-name>beanContextName</property-name>
          		<value>transCtx</value>
        	</managed-property>
    	</managed-bean>
    
     	<context id="transCtx" type="op">
    		<refKColl refId="transKColl" />
    	</context>
    
    	<kColl id="transKColl">
    		<refData refId="transDetails" />
    	</kColl>
    	
    	<iColl id="transDetails" description="selectItems">
    		<field id="acct"/>
    	</iColl>
  2. In your JSP pages, you can bind the BTT IndexedCollection defined in Step 1 to the JSF <f:selectitems> tag. Following is an example:
    <f:selectItems value="#{accountListNewBean.transDetails}" />