Working with Renderers in ADF-Enabled Web Pages

If the data objects of your business services are complex objects, you may want to use a field renderer specific to the type of object to access those objects in your ADF-enabled web page. You use the input renderer primarily when you want to be able to edit complex object types in your page, such as a video or image file. In that case, the renderer for the object may display a URL for the file. The <adf:inputrender> tag (visible on the Data Control Palette as Input Render) generates the necessary HTML for the object the ADF binding expression represents.

Additionally, you can use custom renderers to display complex objects. The <adf:render> tag (visible on the Data Control Palette as Render Value) provides this capability to use a custom renderer class you have created.

Note: When your application relies on ADF Business Components as its business service and the developer has defined Control Hints for the view object attributes, then the <adf:inputrender> tag will use Control Hints to decide which control to render at runtime.

When using Netscape Navigator as your browser, you must insert the <adf:inputrender> tag inside the HTML <form> </form> tags to render the data correctly.

To edit complex objects in an input form:

  1. Open the Data Control Palette for the ADF-enabled web page that you want to design.

  2. In the Data Control Palette, select the data collection that contains the attribute for the complex object.

  3. Select the Input Render type from the dropdown list.

  4. Drag the attribute as Input Render into the open web page.

  5. If your web page uses a Struts enabled form, you do not need to specify a form name for the attribute of the

  6. In the case of a Business Component Date attribute, you may need to specify the form attribute for the tag:

    Struts forms:

    <adf:inputrender model="bindings.OrderDate"/>

    HTML forms (Model 1):

    <adf:inputrender model="bindings.OrderDate" form="formName"/>

    In the Model 1 JSP page, the form name for the <adf:inputrender> tag and the FORM element must match.

To display complex objects values:

  1. Open the Data Control Palette for the ADF-enabled web page that you want to design.

  2. In the Data Control Palette, select the data collection that contains the attribute of the complex object.

  3. Select the Render Value type from the dropdown list.

  4. Drag the data attribute as Input Render into the open web page. The following tag is inserted into the web page:

    <adf:render model="bindings.CustFirstName"/>

    Note, when you want to render values in a table, where the ForEach loop is used to iterate over the rows, the tag must reference the Row object in order to reference the current row:

    <adf:render model="Row.CustFirstName"/>

If you have created a Struts page flow, you can run the data action and display the form.


Working with Display Metadata in ADF Business Components Clients
About Rendering Data with ADF Renderers

 

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