Adding a Converter to a Web Application

You can add a converter to your Web application. A converter is used in the conversion model; each component can be associated with server-side model object data.

The component data can have two views, model and presentation, and the data can be converted between the model view and the presentation view. For example, use a converter to have the output be object to string and the input be string to object.

  1. In the WorkSpace Navigator of the Web Application Development perspective, select faces-config.xml. The JSF Application Configuration editor opens.
  2. Select the Component tab.
  3. Expand the Converters section.
  4. Click Add. A new converter is added with the default name "New Converter x."
  5. (Optional) Change the default converter name to a unique, descriptive name in the Display name field of the General section.
  6. (Optional) Enter a description.
  7. Do one of the following:
    Option Action
    Enter a new converter ID Type an ID in the Converter ID field.
    Select a converter for class
    1. Click the Browse button adjacent to the Converter for Class field.
    2. Select the matching type that you want to use and click OK.
  8. Click Browse and select a Converter Class.
  9. Click Add in the Attributes section to add an attribute.
  10. Click Add in the Properties section to add a property.
Related concepts
JSF Application Configuration Editor
JavaServer Faces
Configuring the faces-config xml File
Related tasks
Adding a Component to a Web Application
Adding a RenderKit to a Web Application
Adding a Validator to a Web Application
Adding an Action Listener to a Web Application
Adding a Default RenderKit ID to a Web Application
Adding Locale Configuration to a Web Application
Adding a Message Bundle to a Web Application
Adding a Navigation Handler to a Web Application
Adding a Property Resolver to a Web Application
Adding a State Manager to a Web Application
Adding a Variable Resolver to a Web Application
Adding a View Handler to a Web Application
Adding an Application Factory to a Web Application
Adding a Faces Context Factory to a Web Application
Adding a Lifecycle Factory to a Web Application
Adding a RenderKit Factory to a Web Application
Adding a Phase Listener to a Web Application

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.