public class TableHandlers extends Object
Constructor and Description |
---|
TableHandlers()
Creates a new instance of TableHandler
|
Modifier and Type | Method and Description |
---|---|
static void |
addRowToTable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler adds one row to table
|
static void |
commitTableRowGroup(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler commits the changes to a
TableRowGroup 's
DataProvider. |
static void |
convertListToArrayList(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the table list to arraylist.
|
static void |
convertRowsToProperties(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the table List to a Property map.
|
static void |
deleteTableRows(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler deletes the given
RowKey s. |
static void |
getAddRemoveProps(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the properties to be removed and added.
|
static void |
getAllSingleMapRows(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler takes TableRowGroup as input and returns a List of Map objects.
|
static void |
getProperties(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the table List to a Properties map.
|
static void |
getSelectedSingleMapRows(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler looks at the input TableRowGroup, checks which row is selected, and returns a list of the Map.
|
static void |
getSelectedTableRowKeys(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the selected row keys.
|
static void |
getTableListFromProperties(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler takes in a HashMap, the name-value pair being the Properties.
|
public static void getSelectedSingleMapRows(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler looks at the input TableRowGroup, checks which row is selected, and returns a list of the Map.
Each Map corresponding to one single row of the table.
This method only works for the table where each row consists of one single map since it only looks at the
first element that is returned by the getObject() method of Input value: "TableRowGroup" -- Type: Input value: "selectedRows" -- Type: MultipleListDataProvider
.
com.sun.webui.jsf.component.TableRowGroup
java.util.List
handlerCtx
- The HandlerContext.public static void getSelectedTableRowKeys(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the selected row keys.
handlerCtx
- The HandlerContext.public static void deleteTableRows(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler deletes the given RowKey
s.
handlerCtx
- The HandlerContext.public static void commitTableRowGroup(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler commits the changes to a TableRowGroup
's
DataProvider.
handlerCtx
- The HandlerContext.public static void getTableListFromProperties(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler takes in a HashMap, the name-value pair being the Properties. It turns each name-value pair to one hashMap, representing one row of table data, and returns the list of Map.
Input value: "Properties" -- Type: java.util.Map
/
Output value: "TableList" -- Type: java.util.List
/
handlerCtx
- The HandlerContext.public static void getAllSingleMapRows(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler takes TableRowGroup as input and returns a List of Map objects.
The List returned contains Map objects with each Map representing one single row.
This method only works for tables where each row consists of one single map
Input value: "TableRowGroup" -- Type: com.sun.webui.jsf.component.TableRowGroup
Output value: "Rows" -- Type: java.util.List
handlerCtx
- The HandlerContext.public static void addRowToTable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler adds one row to table
Input value: "TableRowGroup" -- Type: com.sun.webui.jsf.component.TableRowGroup
Input value: "NameList" -- Type:java.util.List
Input value: "DefaultValueList" -- Type:java.util.List
Input value: "HasSelected" -- Type:java.lang.Boolean
handlerCtx
- The HandlerContext.public static void convertListToArrayList(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the table list to arraylist.
handlerCtx
- The HandlerContext.public static void getAddRemoveProps(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler returns the properties to be removed and added.
handlerCtx
- The HandlerContext.public static void convertRowsToProperties(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the table List to a Property map.
handlerCtx
- The HandlerContext.public static void getProperties(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
This handler converts the table List to a Properties map.
handlerCtx
- The HandlerContext.Copyright © 2019. All rights reserved.