public class CommonHandlers extends Object
| Constructor and Description |
|---|
CommonHandlers()
Creates a new instance of CommonHandlers
|
| Modifier and Type | Method and Description |
|---|---|
static void |
convertDateTimeFormat(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) |
static void |
convertMillisToReadable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the milliseconds to readable format
|
static void |
createAttributeMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler creates a map with the given keys and values
|
static List |
filterAdminObjects(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.
|
static void |
filterMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) |
static List |
filterProtocols(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler filters out not required protocols from the list of protocols available
|
static void |
filterTable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) |
void |
getCurrentTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
Returns the current system time formatted
|
static void |
getFieldLengths(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler will be called from baseLayout.xhtml to load the maximum
field lengths (maximum number of characters that a user can enter in each
field).
|
static void |
getListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns String[] of the given java.util.List
|
static void |
getRequestValue(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the requestParameter value based on the key.
|
void |
handleError(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) |
static void |
initClusterSessionAttribute(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler will be called during initialization when Cluster Support is detected.
|
static void |
initProductInfoAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This function is called in login.jsf to set the various product specific attributes such as the
product GIFs and product names.
|
static void |
initSessionAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler will be called during initialization for doing any initialization.
|
static void |
isAIX(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) |
static void |
logout(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This method kills the session, and logs out
|
void |
longAdd(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This method adds two long integers together.
|
static void |
navigate(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler is different than JSFT's default navigate handler in
that it forces the request to NOT be a "partial request".
|
static void |
onlyDas(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) |
static void |
redirect(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler redirects to the given page.
|
static void |
removeEmptyProps(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
Remove the properties if the key(name) is empty.
|
static void |
removeListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler removes the given element from the list
|
static void |
selectiveEncode(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the encoded String using the type specified.
|
static void |
setComponentRequired(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This method sets the required attribute of a UI component .
|
static void |
setPartialRequest(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler allows the "partialRequest" flag to be set.
|
static void |
setValueExpression(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler sets a property on an object which is stored in an existing key
For example "advance.lazyConnectionEnlistment".
|
static void |
testExists(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
Test if a particular attribute exists.
|
public static void initClusterSessionAttribute(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler will be called during initialization when Cluster Support is detected.
public static void initSessionAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler will be called during initialization for doing any initialization.
public static void getFieldLengths(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler will be called from baseLayout.xhtml to load the maximum field lengths (maximum number of characters that a user can enter in each field).
public static void initProductInfoAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static void getListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns String[] of the given java.util.List
Output value: "selectedIndex" -- Type: Object/
handlerCtx - The HandlerContext.public static void removeListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler removes the given element from the list
Output value: "finalList" -- Type: List/
handlerCtx - The HandlerContext.public static void convertMillisToReadable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the milliseconds to readable format
Output value: "readableString" -- Type: String/
handlerCtx - The HandlerContext.public static void createAttributeMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler creates a map with the given keys and values
Output value: "map" -- Type: Map/
handlerCtx - The HandlerContext.public static void selectiveEncode(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the encoded String using the type specified.
If type is not specified, it defaults to UTF-8.
Input value: "value" -- Type: String
Input value: "delim" -- Type: String
Input Value: "type" -- Type: String
Output Value: "value" -- Type: String
handlerCtx - The HandlerContext.public static void logout(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This method kills the session, and logs out
Server Domain Attributes Page. Input value: "page" -- Type: java.lang.String
handlerCtx - The HandlerContext.public static void setComponentRequired(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This method sets the required attribute of a UI component .
Input value: "id" -- Type: java.lang.String
Input value: "required" -- Type: java.lang.String
handlerCtx - The HandlerContext.public static void testExists(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
Test if a particular attribute exists. It will look at request scope, then page, then session.
public static void removeEmptyProps(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
Remove the properties if the key(name) is empty.
public static void getRequestValue(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the requestParameter value based on the key. If it doesn't exists, then it will look at the request attribute. If there is no request attribute, it will return the default, if specified.
This method will "html escape" any <, >, or & characters that appear in a String from the QUERY_STRING. This is to help prevent XSS vulnerabilities.
orig without escape is available, but be very cautious when using it.
Input value: "key" -- Type: String
Output value: "value" -- Type: String
Output value: "orig" -- Type: String
public void longAdd(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public void getCurrentTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
Returns the current system time formatted
Output value: "Time" -- Type: String
public void handleError(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static void onlyDas(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static void setValueExpression(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler sets a property on an object which is stored in an existing key For example "advance.lazyConnectionEnlistment". Note: This does not evaluate the EL expression. Its value (e.g., "#{advance.lazyConnectionEnlistment}") is passed as is to the EL API.
public static void convertDateTimeFormat(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static void setPartialRequest(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler allows the "partialRequest" flag to be set. This was added to work-a-round a bug in JSF where the behavior was inconsistent between FF and other browsers. Namely it recognized redirects as "partial" requets in other browsers due to the header being preserved across the redirect, but not in FF.
public static void navigate(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler is different than JSFT's default navigate handler in that it forces the request to NOT be a "partial request". The effect is that no wrapping of the response will be done. This is normally done in JSF2 in order to work with the jsf.js JS code that handles the response. In the Admin Console, we typically do not use this JS, so this is not desirable behavior.
Input value: "page" -- Type: Object (should be a
String or a UIViewRoot).
See JSFTemplating's built-in navigate handler for more info.
context - The HandlerContext.public static void redirect(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler redirects to the given page.
Input value: "page" -- Type: String
context - The HandlerContext.public static void filterTable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static void filterMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static void isAIX(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
public static List filterProtocols(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler filters out not required protocols from the list of protocols available
public static List filterAdminObjects(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context)
This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.