Class TableHandlers


  • public class TableHandlers
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TableHandlers()
      Creates a new instance of TableHandler
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method 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 RowKeys.
      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.
    • Constructor Detail

      • TableHandlers

        public TableHandlers()
        Creates a new instance of TableHandler
    • Method Detail

      • getSelectedSingleMapRows

        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 MultipleListDataProvider.

        Input value: "TableRowGroup" -- Type: com.sun.webui.jsf.component.TableRowGroup

        Input value: "selectedRows" -- Type: java.util.List

        Parameters:
        handlerCtx - The HandlerContext.
      • getSelectedTableRowKeys

        public static void getSelectedTableRowKeys​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler returns the selected row keys.

        Parameters:
        handlerCtx - The HandlerContext.
      • deleteTableRows

        public static void deleteTableRows​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler deletes the given RowKeys.

        Parameters:
        handlerCtx - The HandlerContext.
      • commitTableRowGroup

        public static void commitTableRowGroup​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler commits the changes to a TableRowGroup's DataProvider.

        Parameters:
        handlerCtx - The HandlerContext.
      • getTableListFromProperties

        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/

        Parameters:
        handlerCtx - The HandlerContext.
      • getAllSingleMapRows

        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

        Parameters:
        handlerCtx - The HandlerContext.
      • addRowToTable

        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

        Parameters:
        handlerCtx - The HandlerContext.
      • convertListToArrayList

        public static void convertListToArrayList​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler converts the table list to arraylist.

        Parameters:
        handlerCtx - The HandlerContext.
      • getAddRemoveProps

        public static void getAddRemoveProps​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler returns the properties to be removed and added.

        Parameters:
        handlerCtx - The HandlerContext.
      • convertRowsToProperties

        public static void convertRowsToProperties​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler converts the table List to a Property map.

        Parameters:
        handlerCtx - The HandlerContext.
      • getProperties

        public static void getProperties​(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)

        This handler converts the table List to a Properties map.

        Parameters:
        handlerCtx - The HandlerContext.