Referencing ADF Bindings Inside a Table Component

When you create a databound table in your web page, you can edit the source of the table to display other databound components. For example, you may want to allow the user to edit the values of a specific column. The inserted component must contain a reference to the Row object specified in the table's forEach statement.

To insert a databound component into an existing table:

  1. Open the document in the source code editor, and locate the table cell definition you want to modify. For example:
    
    	
    
    <td>
    
            <c:out value="${Row['OrderId']}"/>&nbsp;
    
       </td>        
  2. Select the attribute in the Data Control Palette and drop as the desired component. For example, the text field displays like this:
    
    
    
    <td>
    
            <html:textarea cols="15" rows="1"  property="OrderId" />&nbsp;
    
       </td>        
  3. In the source code, add the readonly="true" attribute to the component, because the table is read-only:
    
    	
    
    <td>
    
            <html:textarea cols="15" rows="1" property="OrderId" 
    
                         readonly="true" />&nbsp;
    
       </td>        
  4. Reference the Row object of the table's iterator binding in the new component:
    
    	
    
    <td>
    
           <html:textarea name="Row" cols="15" rows="1" 
    
                     property="OrderId" readonly="true" />&nbsp;
    
       </td>        
  5. Type a Struts form tag and specify the name of the action to handle the form input:
    
    	
    
    <td>
    
            <html:form action="/targetAction.do">
    
                  <html:textarea name="Row" cols="15" rows="1" 
    
                       property="OrderId" readonly="true" />&nbsp;
    
             </html:form>
    
       </td>        

Editing Databound Components in the ADF Application

 

Copyright © 1997, 2004, Oracle. All rights reserved.