CAF Core - caf_f

Tag Library Information 
InfoValue
ID (tag prefix)caf_f
URIhttp://webmethods.com/jsf/caf/core
Tag Summary 
TagDescription
convertArray

Converter for an array of generic objects. Converts comma-separated value (CSV) strings into an array of the selected type. You can only use this converter when the elements in the string are parsable by the selected type.

convertBigDecimal

Converter implementation for java.math.BigDecimal values.

convertBigInteger

Converter implementation for java.math.BigInteger values.

convertBoolean

Converter implementation for java.lang.Boolean (and boolean primitive) values.

convertByte

Converter implementation for java.lang.Byte (and byte primitive) values.

convertCharacter

Converter implementation for java.lang.Character (and char primitive) values.

convertCollection

Converter for a group of objects in a java.util.Collection.

convertCurrencyBigDecimal

Converter implementation for java.math.BigDecimal (and int primitive) values, taking into account localized currency formatting.

convertCurrencyBigInteger

Converter implementation for java.math.BigInteger (and int primitive) values, taking into account localized currency formatting.

convertCurrencyDouble

Converter implementation for java.lang.Double (and double primitive) values, taking into account localized currency formatting.

convertCurrencyFloat

Converter implementation for java.lang.Float (and float primitive) values, taking into account localized currency formatting.

convertCurrencyInteger

Converter implementation for java.lang.Integer (and int primitive) values, taking into account localized currency formatting.

convertCurrencyLong

Converter implementation for java.lang.Long (and long primitive) values, taking into account localized currency formatting.

convertCurrencyNumber

Converter implementation for java.lang.Number values, taking into account localized currency formatting.

convertCurrencyShort

Converter implementation for java.lang.Short (and short primitive) values, taking into account localized currency formatting.

convertDouble

Converter implementation for java.lang.Double (and double primitive) values.

convertFloat

Converter implementation for java.lang.Float (and float primitive) values.

convertFormattedBigDecimal

Converter implementation for java.math.BigDecimal values, taking into account localized number formatting.

convertFormattedBigInteger

Converter implementation for java.math.BigInteger values, taking into account localized number formatting.

convertFormattedBoolean

Converter implementation for java.lang.Boolean (and boolean primitive) values, taking into account localized number formatting.

convertFormattedDateTime

Converter implementation for java.util.Date values, taking into account localized number formatting.

convertFormattedDouble

Converter implementation for java.lang.Double (and double primitive) values, taking into account localized number formatting.

convertFormattedFileSize

Converter implementation for java.lang.Number values, taking into account localized number formatting.

convertFormattedFloat

Converter implementation for java.lang.Float (and float primitive) values, taking into account localized number formatting.

convertFormattedInteger

Converter implementation for java.lang.Integer (and int primitive) values, taking into account localized number formatting.

convertFormattedLong

Converter implementation for java.lang.Long (and long primitive) values, taking into account localized number formatting.

convertFormattedNumber

Converter implementation for java.lang.Number values, taking into account localized number formatting.

convertFormattedShort

Converter implementation for java.lang.Short (and short primitive) values, taking into account localized number formatting.

convertFormattedSize

Converter implementation for java.lang.Number values, taking into account localized number formatting.

convertInteger

Converter implementation for java.lang.Integer (and long primitive) values.

convertIterator

Converter for java.util.Iterator values.

convertLong

Converter implementation for java.lang.Long (and int primitive) values.

convertMap

Converter that converts a java.util.Map to a comma-separated value string of key value pairs.

convertShort

Converter implementation for java.lang.Short (and short primitive) values.

convertStringArray

Converter to convert a Java String array into a comma-separated value string and back.

convertURL

Converter for java.net.URL.

design-time-attribute

This tag is used in Software AG Designer to enable design-time annotations for the parent tag. The page editor can use this additional information to enhance the presentation or functionality of the parent tag.

This control is typically machine-generated. A developer typically does not manually use it.

importTemplateView

Imports the view tree from another .view file into the current view tree. This control enables you to reuse views as templates.

You can load the view from a resource on the class path and store the view in a shared utility library that can be accessed by multiple CAF applications.

To specify a view on the class path, include a prefix to the import value with classpath:, for example:

<control component-type='com.webmethods.caf.faces.logic.ImportTemplate' renderer-type=''>
   <property name='id' value='import' />
   <property name='value' value='classpath:/com/webmethods/caf/test/subpage.view' />
</control>

The phase listener callbacks for the page bean of the imported view execute after the primary page bean phase listener has executed.

Following is a pseudo-code summary of the importTemplateView control behavior:


ImportTemplate {
    Constructor {
        1. Increment a counter to provide a unique instance number for the control instance that is used as a key for the internal_page_bean object.
    }

    --------- Internal Utility Methods ------

    reloadViewIfChanged() {
        1. If the viewId does not match what was previously loaded, reload the imported view.
    }

    getInternalPageBean() {
        if (internal_page_bean instance already exists in pageflow or session scope) {
            return it.
        } else {
            1. Get the master managed bean that that is associated with the imported template.
                a) NOTE: This can cause the managed bean to be created and stored in the configured scope.
            2. Clone the master managed bean to create the internal_page_bean private copy of it to avoid collision with other imported views using the same name.
                a) If the clone fails, log an error and try to just make a new instance of the managed bean class.
            3. If the master managed bean was configured for pageflow scope, store the cloned object in pageflow scope. Otherwise, store the cloned object in session scope.
            4. Return the internal_page_bean.
        }
    }

    propagateParametersToPageBean() {
        1. Propagate any non-content param values from the control to the appropriate properties of the specified page bean.
    }

    --------- Implementation of PhaseListener interface ------
	
    NOTE: The PhaseListener part is provided for backward compatibility to previous versions. Generally, the IPostPageComponentPhaseListener would take care of the the work instead.

    beforePhase(ANY_PHASE) {
        if (rendered property resolves as false) {
            return and do nothing
        } else {
            1. Push the variables for any ancestor scoped variables into scope.
            2. if (phaseId == RENDER_RESPONSE) {
                 call reloadViewIfChanged()
               }
            3. Call getInternalPageBean()
            4. Call propagateParametersToPageBean()
            5. Pop the variables for any for any ancestor scoped variables from that scope that were pushed in #1 and restore the previous values.
        }
    }

    afterPhase(ANY_PHASE) {
        do nothing
    }

    --------- Implementation of IPostPageComponentPhaseListener interface ------

    postPageBeforePhase(ANY_PHASE) {
        if (rendered property resolves as false) {
            return and do nothing
        } else {
            1. Push the variables for any ancestor scoped variables into scope.
            2. Call reloadViewIfChanged()
            3. Call getInternalPageBean()
            4. Call propagateParametersToPageBean()
            5. If (internal_page_bean implements the PhaseListener interface and configured to listen to the current phaseId) {
                 call internal_page_bean.beforePhase(event)
               }
            6. If (internal_page_bean implements the IPostPageComponentPhaseListener interface and configured to listen to the current phaseId) {
                 call internal_page_bean.postPageBeforePhase(event)
               }
            7. Pop the variables for any for any ancestor scoped variables from that scope that were pushed in #1 and restore the previous values
        }
    }

    postPageAfterPhase(ANY_PHASE) {
        if (rendered property resolves as false) {
            return and do nothing
        } else {
            1. Push the variables for any ancestor scoped variables into scope.
            2. Call reloadViewIfChanged()
            3. Call getInternalPageBean()
            4. Call propagateParametersToPageBean()
            5. If (internal_page_bean implements the PhaseListener interface and configured to listen to the current phaseId) {
                 call internal_page_bean.afterPhase(event)
               }
            6. If (internal_page_bean implements the IPostPageComponentPhaseListener interface and configured to listen to the current phaseId) {
                 call internal_page_bean.postPageAfterPhase(event)
               }
            7. Pop the variables for any for any ancestor scoped variables from that scope that were pushed in #1 and restore the previous values.
        }
    }

    --------- Override UIComponent methods to make the internal_page_bean variable override the master page bean with the same name while processing the template content ------

    encodeBegin {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
    }

    encodeChildren {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
        3. Render each of the child controls.
        4. Restore the value from #1.
    }

    encodeEnd {
        1. Restore the value from encodeBegin #1.
    }

    processDecodes {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
        3. Call super.processDecodes(..) to do the default handling.
        4. Restore the value from #1.
    }

    processRestoreState {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
        3. Ccall super.processRestoreState(..) to do the default handling.
        4. Restore the value from #1.
    }

    processSaveState {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
        3. Call super.processSaveState(..) to do the default handling.
        4. Restore the value from #1.
    }

    processUpdates {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
        3. Call super.processUpdates(..) to do the default handling.
        4. Restore the value from #1.
    }

    processValidators {
        1. Remember what is currently stored in the request attributes with the key == internal_page_bean name.
        2. Set the internal_page_bean as a request attribute so it can be resolved with binding expressions.
        3. Call super.processValidators(..) to do the default handling.
        4. Restore the value from #1.
    }
}

While processing the JSF lifecycle, CAF has global phase listeners that affect this scenario and run in this order:


  1. ComponentPhaseListener - propagates phase events through component tree for any component that implements the PhaseListener interface before the primary page bean has handled the phase events.
  2. FacesBeanPhaseListener - provides phase event callback methods to the primary page bean of the current view.
  3. PostPageComponentPhaseListener - propagates phase events through component tree for any component that implements the PhaseListener or IPostPageComponentPhaseListener interface after the primary page has handled the phase events.

As demonstrated in the attached example project, if the main page bean named TestDefaultviewView and the page bean of the imported view is named TestimportMeView then:

You would get this sequence during a render request:


TestDefaultviewView: beforePhase[RENDER_RESPONSE 6]
TestimportMeView: beforePhase[RENDER_RESPONSE 6]
TestimportMeView: postPageBeforePhase[RENDER_RESPONSE 6]

And you would get this sequence during an action request:


TestDefaultviewView: beforePhase[RESTORE_VIEW 1]
TestimportMeView: beforePhase[RESTORE_VIEW 1]
TestimportMeView: postPageBeforePhase[RESTORE_VIEW 1]
TestimportMeView: afterPhase[RESTORE_VIEW 1]
TestimportMeView: postPageAfterPhase[RESTORE_VIEW 1]
TestDefaultviewView: afterPhase[RESTORE_VIEW 1]
TestDefaultviewView: beforePhase[APPLY_REQUEST_VALUES 2]
TestimportMeView: beforePhase[APPLY_REQUEST_VALUES 2]
TestimportMeView: postPageBeforePhase[APPLY_REQUEST_VALUES 2]
TestimportMeView: afterPhase[APPLY_REQUEST_VALUES 2]
TestimportMeView: postPageAfterPhase[APPLY_REQUEST_VALUES 2]
TestDefaultviewView: afterPhase[APPLY_REQUEST_VALUES 2]
TestDefaultviewView: beforePhase[PROCESS_VALIDATIONS 3]
TestimportMeView: beforePhase[PROCESS_VALIDATIONS 3]
TestimportMeView: postPageBeforePhase[PROCESS_VALIDATIONS 3]
TestimportMeView: custom converter.getAsObject("abc") -
TestimportMeView: custom validator - value: "abc";
TestimportMeView: afterPhase[PROCESS_VALIDATIONS 3]
TestimportMeView: postPageAfterPhase[PROCESS_VALIDATIONS 3]
TestDefaultviewView: afterPhase[PROCESS_VALIDATIONS 3]
TestDefaultviewView: beforePhase[UPDATE_MODEL_VALUES 4]
TestimportMeView: beforePhase[UPDATE_MODEL_VALUES 4]
TestimportMeView: postPageBeforePhase[UPDATE_MODEL_VALUES 4]
TestimportMeView: afterPhase[UPDATE_MODEL_VALUES 4]
TestimportMeView: postPageAfterPhase[UPDATE_MODEL_VALUES 4]
TestDefaultviewView: afterPhase[UPDATE_MODEL_VALUES 4]
TestDefaultviewView: beforePhase[INVOKE_APPLICATION 5]
TestimportMeView: beforePhase[INVOKE_APPLICATION 5]
TestimportMeView: postPageBeforePhase[INVOKE_APPLICATION 5]
TestimportMeView: actionListener
TestimportMeView: doAction
TestimportMeView: afterPhase[INVOKE_APPLICATION 5]
TestimportMeView: postPageAfterPhase[INVOKE_APPLICATION 5]
TestDefaultviewView: afterPhase[INVOKE_APPLICATION 5]
TestDefaultviewView: beforePhase[RENDER_RESPONSE 6]
TestimportMeView: beforePhase[RENDER_RESPONSE 6]
TestimportMeView: postPageBeforePhase[RENDER_RESPONSE 6]
TestimportMeView: custom converter.getAsString("abc") - 
importView

WARNING: This tag has been deprecated. Replace with an Import Template View control

Deprecated. Imports the view tree from another .view file into the current view tree.

This control performs basically the same function as the Import Template View control. However, the Import View control only imports the same .vew file once in a page, while the Import Template View control can use the same template multiple times in the same page.

loadBundle

WARNING: This tag has been deprecated. Use a f:loadBundle tag instead.

Loads the specified resource bundle into a binding expression variable.

logicAccessControl

Provides the ability to grant or deny access to a panel, based on a security role in My webMethods Server.

logicElse

A panel that renders its children if the value property set to true and its preceding If or Else sibling control is not set to true. The control's behavior is the conditional else if rather than an unconditional else behavior.

Children

Any.

logicIf

A panel that renders its children if the value property is set to true.

Children

Any.

propertyAssigner

WARNING: This tag has been deprecated.

Assigns a destination property from a value expression.

selectItem

An individual option for a select control.

selectItems

A group of options for a select control.

validateCreditCard

A validator that checks that a string of numbers matches the style of Visa, MasterCard, etc. card numbers.

validateEmail

A validator that checks that the input string matches the Backus-Naur Form (BNF) for an e-mail address.

validateEqual

A validator that matches the value of another component.

validateExactRegex

A validator that checks the Regular Expression to verify that the string and sub-string exactly match the entire string. Compare with the RegExp validator.

validateFile

A validator that checks the size and content type of uploaded files.

validateFormattedDateRange

A validator that checks the value of the corresponding component against specified minimum and maximum values, taking into account localized date formatting.

validateFormattedDoubleRange

A validator that checks the corresponding component against specified minimum and maximum settings, taking into account localized number formatting.

If the current component value cannot be converted to Double, a ValidatorException is thrown.

validateFormattedLongRange

A validator that checks the value of the corresponding component against specified minimum and maximum values, taking into account localized number formatting.

If the current component cannot be converted to long, a ValidatorException is thrown.

validateOneOf

A validator that checks that the value is equal to one of the items in a collection.

validateRegExpr

A validator that checks that the Regular Expression matches the portion of the (sub-)string represented by String. Compare with the Exact RegExp validator.

variableContainer

A container that resolves an expression and assigns the value as a named request attribute for the child controls to utilize.

view

The root of the UI component tree.

Output generated by Vdldoc View Declaration Language Documentation Generator.