webMethods and Intelligent Business Operations 10.2 | Designing and Implementing Composite Applications | webMethods CAF and OpenCAF Development Help | Working with Facelets | Java Annotations in CAF and webMethods OpenUI Applications | JSF Standard Managed Bean Annotations
 
JSF Standard Managed Bean Annotations
The JSR-344 JavaServer Faces standard defines a set of annotations in the javax.faces.bean package that can be used to declare and configure managed beans directly in a Java class. This is an alternative to declaring the same information in the WEB-INF/faces-config.xml file of your Composite Application Framework (CAF) application. Pertinent code is highlighted in bold.
Example:
package caf.war.testapp1.test1;
 

import javax.faces.bean.ManagedBean;

import javax.faces.bean.SessionScoped;
 
/**
 * Sample that demonstrates using the ManagedBean annotations
 * to declare a managed bean
 */

@ManagedBean(name = "TestBean")

@SessionScoped
public class TestBean extends com.webmethods.caf.faces.bean.BaseFacesSessionBean {
 
    /**
     * Override this method to release any resources associated with this
       session.
     * Please note, the FacesContext is not valid for this function.
     */
    protected void release() {
 
    };
}

Copyright © 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release