use of com.sun.webui.jsf.component.TableRowGroup in project Payara by payara.
the class TableHandlers method getAllSingleMapRows.
/**
* <p> This handler takes TableRowGroup as input and returns a List of Map objects.
* <p> The List returned contains Map objects with each Map representing one single row.
* <p> This method only works for tables where each row consists of one single map
*
* <p> Input value: "TableRowGroup" -- Type: <code> com.sun.webui.jsf.component.TableRowGroup</code></p>
* <p> Output value: "Rows" -- Type: <code> java.util.List</code></p>
* @param handlerCtx The HandlerContext.
*/
@Handler(id = "getAllSingleMapRows", input = { @HandlerInput(name = "TableRowGroup", type = TableRowGroup.class, required = true) }, output = { @HandlerOutput(name = "Rows", type = List.class) })
public static void getAllSingleMapRows(HandlerContext handlerCtx) {
TableRowGroup trg = (TableRowGroup) handlerCtx.getInputValue("TableRowGroup");
MultipleListDataProvider dp = (MultipleListDataProvider) trg.getSourceData();
List data = dp.getLists();
try {
handlerCtx.setOutputValue("Rows", data.get(0));
} catch (Exception ex) {
// TODO alert user, log exception
System.out.println("!!!! getAllSingleMapRows() Throws Exception: " + ex.toString());
}
}
Aggregations