br.com.jarch.faces.controller.GeneratePanelGridWithCommandLink Maven / Gradle / Ivy
//package br.com.jarch.core.crud.action;
//
//import br.com.jarch.faces.controller.ICrudDataController;
//import br.com.jarch.core.model.IBaseEntity;
//import org.primefaces.component.commandlink.CommandLink;
//import org.primefaces.component.panelgrid.PanelGrid;
//
//import java.util.Arrays;
//import java.util.List;
//import java.util.stream.Collectors;
//
///**
// * Created by wagner.araujo on 08/05/16.
// */
//public class GeneratePanelGridWithCommandLink {
//
// public static final String STYLE_PANELGRID = "width: 100%; text-align: right";
// public static final String STYLE_COMMANDLINK = "text-align: center";
//
// public static PanelGrid createButtons(T action, E entity) {
// List buttons =
// Arrays
// .stream(action.getClass().getDeclaredMethods())
// .map(m -> GenerateCommandLink.createCommandLink(action, entity, m))
// .collect(Collectors.toList());
//
// PanelGrid panelGrid = createPanelGrid(buttons.size());
// panelGrid.getChildren().addAll(buttons);
// return panelGrid;
// }
//
// private static PanelGrid createPanelGrid(int columns) {
// PanelGrid panelGrid = new PanelGrid();
// panelGrid.setColumns(columns);
//// panelGrid.setStyle(STYLE_PANELGRID);
// return panelGrid;
// }
//}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy