Package org.openfaces.component.table

Examples of org.openfaces.component.table.ColumnMenu


import java.util.List;

public class ColumnMenuRenderer extends PopupMenuRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        ColumnMenu menu = (ColumnMenu) component;
        if (menu.getChildren().size() == 0) {
            List<UIComponent> menuItems = menu.getChildren();
            menuItems.add(Components.createComponent(context, SortAscendingMenuItem.COMPONENT_TYPE, SortAscendingMenuItem.class, menu, "sortAscending"));
            menuItems.add(Components.createComponent(context, SortDescendingMenuItem.COMPONENT_TYPE, SortDescendingMenuItem.class, menu, "sortDescend"));
            if (getTable(menu).getUnsortedStateAllowed()) {
                menuItems.add(Components.createComponent(context, ResetSortingMenuItem.COMPONENT_TYPE, ResetSortingMenuItem.class, menu, "resetSorting"));
            }
View Full Code Here

TOP

Related Classes of org.openfaces.component.table.ColumnMenu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.