org.apache.myfaces.trinidadinternal.ui.laf.base
Class BaseLafUtils

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.ui.laf.base.BaseLafUtils
All Implemented Interfaces:
UIConstants
Direct Known Subclasses:
XhtmlLafUtils

public class BaseLafUtils
extends java.lang.Object
implements UIConstants

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/base/BaseLafUtils.java#0 $) $Date: 10-nov-2005.18:52:57 $
Author:
The Oracle ADF Faces Team

Field Summary
static char CHAR_UNDEFINED
           
 
Fields inherited from interface org.apache.myfaces.trinidadinternal.ui.UIConstants
ABBREVIATION_ATTR, ACCESS_KEY_ATTR, ACTIONS_CHILD, ADD_NAME, ADD_ROWS_EVENT, ADVANCED_CHOICES_CHILD, ADVERTISEMENT_LARGE_CHILD, ADVERTISEMENT_MEDIUM_CHILD, AGENT_NAME, ALL_DETAILS_ENABLED_ATTR, ALLOWS_TRANSPARENT_ATTR, ALTERNATE_CONTENT_CHILD, ANCESTOR_ATTRIBUTE_NAME, ANCESTOR_ID_ATTR, ANCESTOR_PATH_ATTR, ANCHOR_ATTR, AND_NAME, ANNOTATION_ATTR, APP_ABOUT_CHILD, APP_COPYRIGHT_CHILD, APP_PRIVACY_CHILD, APPLICATION_SWITCHER_NAME, ATTRIBUTE_MAP_NAME, AUTOFLIP_ATTR, AUTOMATIC_ATTR, AUTOSTART_ATTR, BACKGROUND_ATTR, BACKGROUND_DARK, BACKGROUND_LIGHT, BACKGROUND_MEDIUM, BACKGROUND_TRANSPARENT, BANDING_SHADE_DARK, BANDING_SHADE_LIGHT, BEAN_NAME, BETWEEN_TEXT_ATTR, BLOCK_SIZE_ATTR, BODY_NAME, BORDER_ATTR, BORDER_LAYOUT_NAME, BORDER_WIDTH_ATTR, BOTTOM_CHILD, BOUND_ATTRIBUTE_NAME, BOUND_MESSAGE_NAME, BOUND_TEXT_NAME, BOUND_VALUE_PROVIDER_NAME, BRANDING_APP_CHILD, BRANDING_APP_CONTEXTUAL_CHILD, BRANDING_CHILD, BRANDING_COOPERATIVE_CHILD, BREAD_CRUMB_TEXT_ATTR, BREAD_CRUMBS_NAME, BUNDLE_NAME, BUTTON_CLIENT_ACTION_ATTR, BUTTON_NAME, BYTE_LENGTH_NAME, CANCEL_EVENT, CASE_NAME, CATCH_CHILD, CATEGORIES_CHILD, CATEGORY_TITLE_ATTR, CELL_FORMAT_NAME, CELL_NO_WRAP_FORMAT_KEY, CELL_PADDING_ATTR, CELL_SPACING_ATTR, CENTER_CHILD, CHECKED_ATTR, CHILD_BLOCK_SIZE_ATTR, CHILD_DATA_ATTR, CHILD_LIST_NAME, CHILD_MAP_NAME, CHILD_NAME_ATTR, CHILD_TYPE_TEXT, CHILD_TYPE_TEXT_ATTR, CHOICE_NAME, CHROME_TYPE_ATTR, COLLAPSE_ALL_EVENT, COLLAPSE_DESTINATION_KEY, COLOR_BUTTON_NAME, COLOR_DATA_ATTR, COLOR_FIELD_NAME, COLOR_NAME, COLOR_PALETTE_NAME, COLOR_SWATCH_NAME, COLUMN_BANDING, COLUMN_DATA_FORMAT_KEY, COLUMN_FOOTER_CHILD, COLUMN_FORMAT_ATTR, COLUMN_GROUP_NAME, COLUMN_HEADER_DATA_ATTR, COLUMN_HEADER_FORMAT_ATTR, COLUMN_HEADER_STAMP_CHILD, COLUMN_NAME, COLUMN_SPAN_ATTR, COLUMNS_ATTR, COMMAND_ITEM_NAME, COMMAND_NAVIGATION_ITEM_NAME, COMPACT_ATTR, COMPARISON_NAME, COMPARISON_TYPE_EQUALS, COMPARISON_TYPE_GREATER_THAN, COMPARISON_TYPE_GREATER_THAN_OR_EQUALS, COMPARISON_TYPE_LESS_THAN, COMPARISON_TYPE_LESS_THAN_OR_EQUALS, COMPARISON_TYPE_NOT_EQUALS, COMPOSITE_ROLE, CONCAT_NAME, CONCISE_MESSAGE_CHILD, CONFIG_NAME_PARAM, CONTENT_FOOTER_CHILD, CONTENT_FOOTER_NAME, CONTENT_FORM_CHILD, CONTENT_LINK_CHILD, CONTENT_STYLE_ATTR, CONTENT_STYLE_CLASS_ATTR, CONTENT_TYPE_ATTR, CONTENTS_NAME, CONTEXT_POPPING_NAME, CONTEXT_PROPERTY_NAME, CONTEXT_SWITCHER_CHILD, CONTEXT_URI_PARAM, CONTROLS_ALL, CONTROLS_ATTR, CONTROLS_MINIMAL, CONTROLS_NONE, CONTROLS_NONE_VISIBLE, CONTROLS_TYPICAL, CONVERT_NAME, CONVERT_PARAM, CONVERTER_ATTR, CURRENT_DATA_ATTR, CURRENT_INDEX_ATTR, CUSTOM_COLOR_DATA_ATTR, DATA_KEY, DATA_NAME, DATA_NAME_ATTR, DATA_NAMESPACE_ATTR, DATA_OBJECT_NAME, DATE_BUTTON_NAME, DATE_EVENT, DATE_FIELD_NAME, DATE_NAME, DATE_STYLE_PARAM, DECIMAL_NAME, DEFAULT_CASE_ATTR, DEFAULT_COMMAND_ATTR, DEFAULT_CONTENTS_ATTR, DEFAULT_LAYOUT, DEFAULT_NAME, DEFAULTING_NAME, DESCRIPTION_ATTR, DESCRIPTION_KEY, DESTINATION_ATTR, DESTINATION_KEY, DESTINATION_TEXT_KEY, DETAIL_STAMP_CHILD, DETAILED_MESSAGE_CHILD, DIRECTION_ATTR, DIRTY_ATTR, DISABLED_ATTR, DISCLOSE_MANY_ATTR, DISCLOSE_NONE_ATTR, DISCLOSED_ATTR, DISCLOSED_KEY, DISCLOSED_TEXT_ATTR, DISPLAY_GRID_KEY, DOCUMENT_NAME, EMBEDDED_ATTR, EMPTY_TEXT_ATTR, ENC_PARAM, ENCODED_PARAMETER_NAME, END_CHILD, ENTER_CLIENT_ACTION_ATTR, ESCAPE_ATTR, EVENT_ATTR, EVENT_PARAM, EXPAND_ALL_ENABLED_ATTR, EXPAND_ALL_EVENT, EXPAND_DESTINATION_KEY, EXPAND_EVENT, EXPANDABLE_ALWAYS, EXPANDABLE_COLLAPSED, EXPANDABLE_EXPANDED, EXPANDABLE_KEY, EXPANDABLE_NO, EXPRESSION_LANGUAGE_ATTRIBUTE_NAME, FACET_DEFAULT, FACET_EMAIL, FACET_PORTLET, FACET_PRINTABLE, FIELD_WIDTH_ATTR, FILE_UPLOAD_NAME, FILTER_CHILD, FILTER_CHOICE_CHILD, FIRST_CLICK_PASSED_ATTR, FIXED_NAME, FLOW_LAYOUT_NAME, FOCUS_EVENT, FOCUS_PATH_ATTR, FOOTER_CHILD, FOOTER_NAME, FORM_DATA_ATTR, FORM_NAME_ATTR, FORM_NAME_PROPERTY, FORM_SUBMITTED_ATTR, FORM_VALUE_NAME, FORMAT_NAME, FRAME_BORDER_LAYOUT_NAME, FRAME_NAME, GENERATES_CONTENT_ATTR, GLOBAL_BUTTON_BAR_NAME, GLOBAL_BUTTON_NAME, GLOBAL_HEADER_NAME, GLOBAL_ONLY_ATTR, GOTO_EVENT, H_ALIGN_ATTR, H_ALIGN_CENTER, H_ALIGN_END, H_ALIGN_LEFT, H_ALIGN_RIGHT, H_ALIGN_START, HARD_WRAP, HEAD_NAME, HEADER_ATTR, HEADER_CHILD, HEADER_INSTRUCTIONS_CHILD, HEADER_NAME, HEADER_TEXT_ATTR, HEADERS_ATTR, HEIGHT_ATTR, HIDE_EVENT, HORIZONTAL_LAYOUT, HTML_NAME, ICON_ATTR, ICON_BUTTON_FORMAT, ICON_KEY, ICON_KEY_NAME, ICON_NAME, ICON_REQUIRED, ICON_SHORT_DESC_KEY, ID_ATTR, IF_NAME, IMAGE_ATTR, IMAGE_MAP_TYPE_ATTR, IMAGE_MAP_TYPE_NONE, IMAGE_MAP_TYPE_SERVER, IMAGE_NAME, IMPORT_SCRIPT_NAME, IN_CONTEXT_BRANDING_STYLE, INCLUDE_NAME, INCOMPLETE_DATA_SET, INFO_FOOTNOTE_CHILD, INFO_RETURN_CHILD, INFO_STATUS_CHILD, INFO_SUPPLEMENTAL_CHILD, INFO_USER_CHILD, INITIAL_FOCUS_CONTEXT_PROPERTY, INITIAL_FOCUS_ID_ATTR, INLINE_DATE_PICKER_NAME, INLINE_NAME, INLINE_STYLE_ATTR, INNER_BOTTOM_CHILD, INNER_END_CHILD, INNER_HEIGHT_ATTR, INNER_LEFT_CHILD, INNER_RIGHT_CHILD, INNER_START_CHILD, INNER_TOP_CHILD, INNER_WIDTH_ATTR, INSERTED_NODE_LIST_NAME, INSTANCE_NAME, INSTRUCTION_STYLE, INTERVAL_ATTR, ITEM_TITLE_ATTR, ITEMS_CHILD, JSP_PARAM, LABEL_ATTR, LABEL_CHILD, LABEL_WIDTH_ATTR, LABELED_NODE_ID_ATTR, LANGUAGE_ATTR, LAYOUT_ATTR, LEADING_CHILD, LEADING_DESC_SHOWN_ATTR, LEADING_FOOTER_CHILD, LEADING_HEADER_ATTR, LEFT_CHILD, LEVEL_ATTR, LINK_NAME, LIST_STYLE_ATTR, LIST_STYLE_CIRCLE, LIST_STYLE_DECIMAL, LIST_STYLE_DISC, LIST_STYLE_LOWER_ALPHA, LIST_STYLE_NONE, LIST_STYLE_SQUARE, LIST_STYLE_UPPER_ALPHA, LOC_PARAM, LOCATION_CHILD, LOCATION_PARAM, LONG_DESC_ATTR, LONG_DESC_URL_ATTR, LOV_EVENT, LOV_FILTER_EVENT, LOV_SEARCH_TEXT, MAILTO_NAME, MARGIN_HEIGHT_ATTR, MARGIN_WIDTH_ATTR, MARLIN_NAMESPACE, MAX_COLUMNS_ATTR, MAX_VALUE_ATTR, MAX_VALUE_PARAM, MAX_VALUE_UNKNOWN, MAX_VISITED_ATTR, MAXIMUM_LENGTH_ATTR, MENU_LIST_NAME, MENU_SWITCH_CHILD, MESSAGE_ATTR, MESSAGE_BOX_NAME, MESSAGE_FORMAT_NAME, MESSAGE_TYPE_ATTR, MESSAGE_TYPE_CONFIRMATION, MESSAGE_TYPE_ERROR, MESSAGE_TYPE_INFO, MESSAGE_TYPE_NONE, MESSAGE_TYPE_PROCESSING, MESSAGE_TYPE_WARNING, MESSAGES_CHILD, META_CONTAINER_CHILD, METHOD_ATTR, METHOD_NAME, MIN_VALUE_ATTR, MIN_VALUE_PARAM, MINIMUM_WIDTH_ATTR, MODEL_ATTR, MONTH_PARAM, MULTIPLE_ATTR, NAME_ATTR, NAME_TRANSFORMED_ATTR, NAME_VALUES_ATTR, NAMED_SOURCE_ATTR, NAMES_ATTR, NAVIGATE_EVENT, NAVIGATION_BAR_NAME, NAVIGATION_EXCLUDE_NAMES_ATTR, NAVIGATION_FORM_NAME_ATTR, NAVIGATION_GLOBAL_CHILD, NAVIGATION_PATH_NAME, NAVIGATION_TREE_NAME, NAVIGATION1_CHILD, NAVIGATION2_CHILD, NAVIGATION3_CHILD, NEXT_EVENT, NO_AUTO_COMPLETE_ATTR, NO_BANDING, NODE_ATTR, NODE_PARAM, NODE_STAMP_CHILD, NODES_ATTR, NODES_KEY, NOT_NAME, NULL_NAME, NUMBER_FORMAT, OBJECT_NAME_FORMAT, ON_BLUR_ATTR, ON_BLUR_VALIDATER_ATTR, ON_CHANGE_ATTR, ON_CLICK_ATTR, ON_CLICK_KEY, ON_COLOR_SELECT_ATTR, ON_DOUBLE_CLICK_ATTR, ON_FOCUS_ATTR, ON_KEY_DOWN_ATTR, ON_KEY_PRESS_ATTR, ON_KEY_UP_ATTR, ON_LOAD_ATTR, ON_LOV_INIT_ATTR, ON_LOV_SELECT_ATTR, ON_LOV_VALIDATE_ATTR, ON_MOUSE_DOWN_ATTR, ON_MOUSE_MOVE_ATTR, ON_MOUSE_OUT_ATTR, ON_MOUSE_OVER_ATTR, ON_MOUSE_UP_ATTR, ON_NAVIGATE_ATTR, ON_SELECT_ATTR, ON_SUBMIT_ATTR, ON_SUBMIT_VALIDATER_ATTR, ON_SWITCH_APP_ATTR, ON_UNLOAD_ATTR, OPTION_NAME, OR_NAME, ORIENTATION_ATTR, ORIENTATION_BOTTOM, ORIENTATION_DEFAULT, ORIENTATION_HORIZONTAL, ORIENTATION_TOP, ORIENTATION_VERTICAL, PAGE_HEADER_LAYOUT_NAME, PAGE_LAYOUT_NAME, PAGE_MENU_BAR_NAME, PAGE_MENU_BUTTONS_NAME, PAGE_MENU_LIST_NAME, PAGE_MENU_TABS_NAME, PAGE_NAME, PAGE_NAVIGATION_PATH_NAME, PAGE_NAVIGATION_TREE_NAME, PAGE_STAMP_STYLE, PALETTE_ID_ATTR, PALETTE_NAME, PARSE_NAME, PARTIAL_PARAM, PARTIAL_RENDER_MODE_ATTR, PARTIAL_RENDER_MODE_NONE, PARTIAL_RENDER_MODE_SELF, PARTIAL_ROOT_NAME, PARTIAL_TARGETS_ATTR, PARTIAL_TARGETS_PARAM, PATH_STAMP_CHILD, PATTERN_ATTR, PATTERN_PARAM, PATTERNS_ATTR, PERCENT_COMPLETE_ATTR, PERCENT_UNKNOWN, PICKER_ID_ATTR, PLAY_COUNT_ATTR, PLAYER_ATTR, PLAYER_LINK, PLAYER_QUICKTIME, PLAYER_REAL, PLAYER_WINDOWS, POSITION_ABOVE, POSITION_ATTR, POSITION_BELOW, POSITION_BOTH, POST_TEXT_ATTR, PRE_TEXT_ATTR, PREVIOUS_EVENT, PRIMARY_CLIENT_ACTION_ATTR, PROCESS_CHOICE_BAR_NAME, PROCESS_STEPS_NAME, PROCESS_TRAIN_NAME, PROCESSING_NAME, PRODUCT_BRANDING_NAME, PROMPT_CHILD, PROVIDER_ATTR, PROXIED_ATTR, PROXY_ATTR, RAW_TEXT_NAME, READ_ONLY_ATTR, REG_EXP_NAME, RENDERED_ATTR, REORDER_ONLY_ATTR, REORDERABLE_ATTR, REQUIRED_ATTR, REQUIRED_NO, REQUIRED_UI_ONLY, REQUIRED_YES, RIGHT_CHILD, ROOT_ATTRIBUTE_MAP_NAME, ROOT_PARAM, ROW_BANDING, ROW_FORMATS_ATTR, ROW_HEADER_DATA_ATTR, ROW_HEADER_FORMATS_ATTR, ROW_HEADER_STAMP_CHILD, ROW_LAYOUT_NAME, ROW_SPAN_ATTR, ROWS_ATTR, SAMPLE_NAME, SCRIPT_NAME, SCROLLED_VALUE_ATTR, SCROLLED_VALUE_PARAM, SCROLLING_ATTR, SCROLLING_AUTO, SCROLLING_NO, SCROLLING_YES, SEARCH_AREA_MODE_ATTR, SEARCH_CHILD, SEARCH_DESC_ATTR, SEARCH_INSTRUCTIONS_CHILD, SEARCH_TEXT_ATTR, SECRET_ATTR, SECRET_FIELD_DEFAULT_VALUE, SELECT_ATTR, SELECT_MODE_KEY, SELECT_OPTION_NAME, SELECTED_ATTR, SELECTED_INDEX_ATTR, SELECTED_KEY, SELECTED_VALUE_ATTR, SELECTION_ATTR, SELECTION_CHILD, SELECTION_PARAM, SEPARATOR_CHILD, SEPARATOR_NAME, SERVER_VALIDATER_ATTR, SERVLET_INCLUDE_NAME, SHORT_DESC_ATTR, SHORT_TEXT_ATTR, SHOW_ALL_ACTIVE, SHOW_ALL_ATTR, SHOW_ALL_NO, SHOW_ALL_YES, SHOW_EVENT, SHOW_ITEM_NAME, SHOW_ONE_TAB_NAME, SHOW_REQUIRED_ATTR, SHOW_WINDOW_ATTR, SIDE_BAR_NAME, SIDE_NAV_NAME, SIMPLE_ATTR, SINGLE_SELECTION_NAME, SINGLE_STEP, SIZE_ATTR, SIZE_PARAM, SOFT_WRAP, SORT_EVENT, SORT_STATE_ASCENDING, SORT_STATE_DESCENDING, SORTABLE_ASCENDING, SORTABLE_ATTR, SORTABLE_DESCENDING, SORTABLE_HEADER_NAME, SORTABLE_NO, SORTABLE_YES, SOURCE_ATTR, SOURCE_PARAM, SPACER_NAME, STACK_LAYOUT_NAME, STANDBY_TEXT_ATTR, START_CHILD, START_DEPTH_ATTR, START_LEVEL_ATTR, STATE_CHECK_ATTR, STATE_PARAM, STATE_ROLE, STEPS_COMPLETE_ATTR, STRUCTURAL_ROLE, STYLE_CLASS_ATTR, STYLE_SHEET_NAME, STYLE_USAGE_ATTR, STYLED_TEXT_NAME, SUB_TAB_BAR_NAME, SUB_TAB_LAYOUT_NAME, SUB_TABS_CHILD, SUBMIT_BUTTON_NAME, SUBMIT_PREPARE_ATTR, SUMMARY_ATTR, SWITCH_APP_EVENT, SWITCH_APP_TYPE_BACK, SWITCH_APP_TYPE_GOTO, SWITCHER_NAME, TAB_BAR_NAME, TABLE_FILTER_CHILD, TABLE_FOOTER_NAME, TABLE_LAYOUT_NAME, TABLE_NAME, TABLE_NAME_ATTR, TARGET_FRAME_ATTR, TARGET_FRAME_KEY, TEMPLATE_DEFINITION_NAME, TEMPLATE_IMPORT_NAME, TEMPLATE_LIBRARY_NAME, TEMPLATES_NAME, TEXT_ATTR, TEXT_FORMAT, TEXT_KEY, TEXT_NAME, THREADED_ATTR, TIP_ATTR, TITLE_ATTR, TOK_PARAM, TOP_CHILD, TOTAL_CHILD, TRAILING_CHILD, TRAILING_DESC_SHOWN_ATTR, TRAILING_FOOTER_CHILD, TRAILING_HEADER_ATTR, TREE_NAME, TRUNCATE_AT_ATTR, TRUNCATE_NAME, TYPE_ATTR, TYPE_PARAM, TYPE_POST, TYPE_PRE, TYPE_TEXT_ATTR, UNDISCLOSED_TEXT_ATTR, UNKNOWN_ROLE, UNVALIDATED_ATTR, UPDATE_EVENT, URI_PARAM, USE_SEPARATE_ROWS_ATTR, USER_INVISIBLE_ROLE, USES_UPLOAD_ATTR, UTF8_LENGTH_NAME, V_ALIGN_ABSMIDDLE, V_ALIGN_ATTR, V_ALIGN_BOTTOM, V_ALIGN_MIDDLE, V_ALIGN_TOP, VALID_ATTR, VALIDATE_BLANKS_ATTR, VALIDATORS_ATTR, VALUE_ATTR, VALUE_COLUMNS_ATTR, VALUE_PARAM, VALUE_SHOW_ALL, VERTICAL_LAYOUT, WIDTH_ATTR, WIDTH_KEY, WML_NAME, WRAP_ATTR, WRAPPING_DISABLED_ATTR, YEAR_PARAM
 
Constructor Summary
protected BaseLafUtils()
           
 
Method Summary
static java.lang.String appendURLArgument(java.lang.String baseURL, java.lang.String key, java.lang.String value)
           
static java.lang.String appendURLArguments(java.lang.StringBuffer buffer, java.lang.String baseURL, java.lang.String[] keysAndValues)
           
static java.lang.String appendURLArguments(java.lang.String baseURL, java.lang.String[] keysAndValues)
           
static BoundValue createIsRenderedBoundValue(BoundValue targetUINodeValue)
          produces a BoundValue that checks to see if a given UINode must be rendered.
static BoundValue createIsRenderedBoundValue(java.lang.String childName)
           
static java.lang.String encodeCompoundKeyValues(java.lang.Object[] keyValues)
          Encodes an array of key value pairs as a single value appended to the baseName, if any;
static java.lang.String encodeCompoundKeyValues(java.lang.Object[] keyValues, java.lang.Object[] keyExchanges)
          Encodes an array of key value pairs as a single value appended to the baseName, if any;
static java.lang.String generateUniqueID(UIXRenderingContext context)
          Generates an ID that will be unique in the current rendering context.
static java.awt.Color getBackgroundColor(UIXRenderingContext context)
          Returns the current background color.
static char getCharacter(java.lang.Object charObj)
           
static char getCharacterAttr(UIXRenderingContext context, UINode node, AttributeKey key)
           
static java.lang.Object getComponentLabel(javax.faces.component.UIComponent component)
          Utility method to get the component's label.
static java.lang.String getConfiguredURL(UIXRenderingContext context, java.lang.Object directoryKey)
          Return an URL based on the current Configuration.
static java.lang.String getFormattedString(UIXRenderingContext context, java.lang.String pattern, java.lang.String[] parameters)
          Format a string with the specified pattern and parameters, caching the FastMessageFormat on the RenderingContext.
static int getKeyValueArraySize(java.lang.Object[] keyValues, int perPairOverhead)
          Returns the total string length of an array of key/value pairs, plus any per pair overhead
static int getLength(java.lang.String[] strings)
          Adds up the lengths of each individual String.
static java.lang.Object getLocalAttribute(UIXRenderingContext context, UINode node, AttributeKey attrKey)
          Returns the value of the specified attribute from the local Renderer stack frame if possible, or from the node, and caches the result
static boolean getLocalBooleanAttribute(UIXRenderingContext context, UINode node, AttributeKey attrKey, boolean defaultValue)
          Returns the value of the specified Boolean attribute from the local Renderer stack frame if possible, or from the node, and caches the result
static UINode getLocalNamedChild(UIXRenderingContext context, UINode node, java.lang.String childName)
          Returns the value of the specified named child from the local Renderer stack frame if possible, or from the node, and caches the result
static java.lang.String getLocalTextAttribute(UIXRenderingContext context, UINode node, AttributeKey attrKey)
          Returns the value of the specified String attribute from the local Renderer stack frame if possible, or from the node, and caches the result
static java.lang.String getOutputEncoding(UIXRenderingContext context)
          Gets the character encoding of the output.
static java.lang.String getParentFormName(UIXRenderingContext context)
          Returns the name of the current parent form
static UINode getRenderedAncestorByName(UIXRenderingContext context, UINode child, java.lang.String namespaceURI, java.lang.String name)
          Returns the nearest rendered ancestor of the specified child node which has the desired local name.
static java.lang.Object getRenderingProperty(UIXRenderingContext context, java.lang.Object key)
          Gets a property stored on the context, using the BLAF namespace.
static java.lang.Object getRenderingProperty(UIXRenderingContext context, java.lang.Object key, java.lang.Object defaultValue)
          Gets a property stored on the context, using the Marlin namespace.
static java.lang.String getStringAttributeValue(UIXRenderingContext context, UINode node, AttributeKey key)
          Returns the attribute as a String
static java.lang.Object getTransformedID(UIXRenderingContext context, java.lang.Object idObject, boolean isSubID)
           
static boolean isRightToLeft(UIXRenderingContext context)
           
static void popRenderingProperty(UIXRenderingContext context, java.lang.Object key)
          Pops a previously pushed local value back into the rendering context property, setting the local property value back to null.
static void popRenderingProperty(UIXRenderingContext context, java.lang.Object key, java.lang.Object localKey)
          Pops a previously pushed local value back into the rendering context property, setting the local property value back to null.
static void popStyleAttrs(UIXRenderingContext context)
          Pops the style attributes stack.
static void pushAttributeAsRenderingProperty(UIXRenderingContext context, UINode node, AttributeKey attrKey)
          Pushes the attribute value into the rendering context property, storing the old value as a local property to be restored later.
static void pushAttributeAsStringRenderingProperty(UIXRenderingContext context, UINode node, AttributeKey attrKey)
          Pushes the attribute value into the rendering context property, as a String, storing the old value as a local property to be restored later.
static void pushRenderingProperty(UIXRenderingContext context, java.lang.Object key, java.lang.Object value)
          Pushes a new value into the rendering context property, storing the old value as a local property to be restored later.
static void pushRenderingProperty(UIXRenderingContext context, java.lang.Object key, java.lang.Object localKey, java.lang.Object value)
          Pushes a new value into the rendering context property, storing the old value as a local property to be restored later.
static void pushStyleAttrs(UIXRenderingContext context, java.lang.String styleClass, Style inlineStyle)
          Pushes the specified style attributes onto a stack which is used to track the current background color.
static void setRenderingProperty(UIXRenderingContext context, java.lang.Object key, java.lang.Object value)
          Stores a property on the context, using the BLAF namespace.
static void setRootBoundValue(MutableUINode node, AttributeKey attrKey)
          Convenience function for creating and setting a RootAttributeBoundValue that points to the root of the local rendering node stack with the same key as the attribute will be registered under.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHAR_UNDEFINED

public static char CHAR_UNDEFINED
Constructor Detail

BaseLafUtils

protected BaseLafUtils()
Method Detail

appendURLArgument

public static java.lang.String appendURLArgument(java.lang.String baseURL,
                                                 java.lang.String key,
                                                 java.lang.String value)

appendURLArguments

public static java.lang.String appendURLArguments(java.lang.StringBuffer buffer,
                                                  java.lang.String baseURL,
                                                  java.lang.String[] keysAndValues)

appendURLArguments

public static java.lang.String appendURLArguments(java.lang.String baseURL,
                                                  java.lang.String[] keysAndValues)

getStringAttributeValue

public static java.lang.String getStringAttributeValue(UIXRenderingContext context,
                                                       UINode node,
                                                       AttributeKey key)
Returns the attribute as a String


getParentFormName

public static java.lang.String getParentFormName(UIXRenderingContext context)
Returns the name of the current parent form


isRightToLeft

public static boolean isRightToLeft(UIXRenderingContext context)

getTransformedID

public static java.lang.Object getTransformedID(UIXRenderingContext context,
                                                java.lang.Object idObject,
                                                boolean isSubID)

getRenderedAncestorByName

public static UINode getRenderedAncestorByName(UIXRenderingContext context,
                                               UINode child,
                                               java.lang.String namespaceURI,
                                               java.lang.String name)
Returns the nearest rendered ancestor of the specified child node which has the desired local name.

Parameters:
context - a RenderingContext
child - the node whose ancestor is being sought
namespaceURI - the namespace of the ancestor being sought
name - the local name of the ancestor being sought

setRootBoundValue

public static void setRootBoundValue(MutableUINode node,
                                     AttributeKey attrKey)
Convenience function for creating and setting a RootAttributeBoundValue that points to the root of the local rendering node stack with the same key as the attribute will be registered under.


getRenderingProperty

public static java.lang.Object getRenderingProperty(UIXRenderingContext context,
                                                    java.lang.Object key)
Gets a property stored on the context, using the BLAF namespace.


getRenderingProperty

public static java.lang.Object getRenderingProperty(UIXRenderingContext context,
                                                    java.lang.Object key,
                                                    java.lang.Object defaultValue)
Gets a property stored on the context, using the Marlin namespace.


setRenderingProperty

public static void setRenderingProperty(UIXRenderingContext context,
                                        java.lang.Object key,
                                        java.lang.Object value)
Stores a property on the context, using the BLAF namespace.


pushAttributeAsRenderingProperty

public static void pushAttributeAsRenderingProperty(UIXRenderingContext context,
                                                    UINode node,
                                                    AttributeKey attrKey)
Pushes the attribute value into the rendering context property, storing the old value as a local property to be restored later.

See Also:
pushRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object, java.lang.Object), popRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object)

pushAttributeAsStringRenderingProperty

public static void pushAttributeAsStringRenderingProperty(UIXRenderingContext context,
                                                          UINode node,
                                                          AttributeKey attrKey)
Pushes the attribute value into the rendering context property, as a String, storing the old value as a local property to be restored later.

See Also:
pushRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object, java.lang.Object), popRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object)

pushRenderingProperty

public static void pushRenderingProperty(UIXRenderingContext context,
                                         java.lang.Object key,
                                         java.lang.Object value)
Pushes a new value into the rendering context property, storing the old value as a local property to be restored later.

See Also:
popRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object)

pushRenderingProperty

public static void pushRenderingProperty(UIXRenderingContext context,
                                         java.lang.Object key,
                                         java.lang.Object localKey,
                                         java.lang.Object value)
Pushes a new value into the rendering context property, storing the old value as a local property to be restored later.

See Also:
popRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object)

popRenderingProperty

public static void popRenderingProperty(UIXRenderingContext context,
                                        java.lang.Object key)
Pops a previously pushed local value back into the rendering context property, setting the local property value back to null.

See Also:
pushRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object, java.lang.Object)

popRenderingProperty

public static void popRenderingProperty(UIXRenderingContext context,
                                        java.lang.Object key,
                                        java.lang.Object localKey)
Pops a previously pushed local value back into the rendering context property, setting the local property value back to null.

See Also:
pushRenderingProperty(org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext, java.lang.Object, java.lang.Object)

getLocalAttribute

public static java.lang.Object getLocalAttribute(UIXRenderingContext context,
                                                 UINode node,
                                                 AttributeKey attrKey)
Returns the value of the specified attribute from the local Renderer stack frame if possible, or from the node, and caches the result


getLocalTextAttribute

public static java.lang.String getLocalTextAttribute(UIXRenderingContext context,
                                                     UINode node,
                                                     AttributeKey attrKey)
Returns the value of the specified String attribute from the local Renderer stack frame if possible, or from the node, and caches the result


getLocalBooleanAttribute

public static boolean getLocalBooleanAttribute(UIXRenderingContext context,
                                               UINode node,
                                               AttributeKey attrKey,
                                               boolean defaultValue)
Returns the value of the specified Boolean attribute from the local Renderer stack frame if possible, or from the node, and caches the result


getLocalNamedChild

public static UINode getLocalNamedChild(UIXRenderingContext context,
                                        UINode node,
                                        java.lang.String childName)
Returns the value of the specified named child from the local Renderer stack frame if possible, or from the node, and caches the result


getLength

public static int getLength(java.lang.String[] strings)
Adds up the lengths of each individual String.

Parameters:
strings - Each element must be a String and cannot be null
Returns:
the sum total of all the lengths of the Strings

generateUniqueID

public static java.lang.String generateUniqueID(UIXRenderingContext context)
Generates an ID that will be unique in the current rendering context.


getCharacterAttr

public static char getCharacterAttr(UIXRenderingContext context,
                                    UINode node,
                                    AttributeKey key)

getCharacter

public static char getCharacter(java.lang.Object charObj)

getConfiguredURL

public static java.lang.String getConfiguredURL(UIXRenderingContext context,
                                                java.lang.Object directoryKey)
Return an URL based on the current Configuration.

This method uses the RenderingContext.CONTEXT_URI_PROPERTY to resolve URLs, which means that it never returns URLs to shared installable resources. As such, this method should only be used to get URLs for resources which are always known to be local to the current application's context path - such as the image cache. For resources which could be shared across applications, such as images, jsps, jsLibs, getSharedConfiguredURL() should be used instead.


createIsRenderedBoundValue

public static BoundValue createIsRenderedBoundValue(java.lang.String childName)
Returns:
a BoundValue that returns Boolean.TRUE only if the current UINode has the specified named child and that named child does not have rendered attribute set to false.

createIsRenderedBoundValue

public static BoundValue createIsRenderedBoundValue(BoundValue targetUINodeValue)
produces a BoundValue that checks to see if a given UINode must be rendered.

Parameters:
targetUINodeValue - This bound value must return a UINode (or null). If a UINode is returned and this UINode does not have its rendered attribute set to false, then the value returned by this method is true.
Returns:
a BoundValue that returns Boolean.TRUE or Boolean.FALSE

getKeyValueArraySize

public static int getKeyValueArraySize(java.lang.Object[] keyValues,
                                       int perPairOverhead)
Returns the total string length of an array of key/value pairs, plus any per pair overhead


encodeCompoundKeyValues

public static java.lang.String encodeCompoundKeyValues(java.lang.Object[] keyValues)
Encodes an array of key value pairs as a single value appended to the baseName, if any;


encodeCompoundKeyValues

public static java.lang.String encodeCompoundKeyValues(java.lang.Object[] keyValues,
                                                       java.lang.Object[] keyExchanges)
Encodes an array of key value pairs as a single value appended to the baseName, if any;


getOutputEncoding

public static java.lang.String getOutputEncoding(UIXRenderingContext context)
Gets the character encoding of the output.


getFormattedString

public static java.lang.String getFormattedString(UIXRenderingContext context,
                                                  java.lang.String pattern,
                                                  java.lang.String[] parameters)
Format a string with the specified pattern and parameters, caching the FastMessageFormat on the RenderingContext.


pushStyleAttrs

public static void pushStyleAttrs(UIXRenderingContext context,
                                  java.lang.String styleClass,
                                  Style inlineStyle)
Pushes the specified style attributes onto a stack which is used to track the current background color. Each call to pushStyleAttrs() should be accompanied by a call to popStyleAttr() when the styles are no longer in scope. The background color can be retrieved at any time by calling getBackgroundColor().


popStyleAttrs

public static void popStyleAttrs(UIXRenderingContext context)
Pops the style attributes stack.


getBackgroundColor

public static java.awt.Color getBackgroundColor(UIXRenderingContext context)
Returns the current background color.


getComponentLabel

public static java.lang.Object getComponentLabel(javax.faces.component.UIComponent component)
Utility method to get the component's label.



Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.