Package org.openfaces.component.command

Examples of org.openfaces.component.command.MenuItem


import java.io.IOException;

public class PrintChartMenuItemRenderer extends MenuItemRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Print");

        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ChartMenu._printChart",
                getChart("<o:printChartMenuItem>", menuItem)).getScript());
        if (menuItem.getIconUrl() == null)
            menuItem.setIconUrl(Resources.internalURL(
                    context, null, "chart/print.png", false));

        super.encodeBegin(context, component);
        Resources.includeJQuery(context);
        Resources.renderJSLinkIfNeeded(context,
View Full Code Here


import java.io.IOException;

public class ResetSortingMenuItemRenderer extends ColumnMenuItemRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Reset sorting");
        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ColumnMenu._resetSorting",
                getTable("<o:resetSortingMenuItem>", menuItem)).toString());
        super.encodeBegin(context, component);

    }
View Full Code Here

import java.io.IOException;

public class SortAscendingMenuItemRenderer extends ColumnMenuItemRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Sort Ascending");
        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ColumnMenu._sortColumnAscending",
                getTable("<o:sortDescendingMenuItem>", menuItem)).toString());
        if (menuItem.getIconUrl() == null)
            menuItem.setIconUrl(Resources.internalURL(
                    context, null, "table/sortAscending.png", false));
        super.encodeBegin(context, component);
    }
View Full Code Here

import java.io.IOException;

public class SortDescendingMenuItemRenderer extends ColumnMenuItemRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Sort Descending");
        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ColumnMenu._sortColumnDescending",
                getTable("<o:sortDescendingMenuItem>", menuItem)).toString());
        if (menuItem.getIconUrl() == null)
            menuItem.setIconUrl(Resources.internalURL(
                    context, null, "table/sortDescending.png", false));
        super.encodeBegin(context, component);
    }
View Full Code Here

import java.io.IOException;

public class CancelGroupingMenuItemRenderer extends ColumnMenuItemRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Cancel Grouping");
        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ColumnMenu._cancelGrouping",
                getTable("<o:cancelGroupingItem>", menuItem)).toString());
        super.encodeBegin(context, component);
    }
View Full Code Here

import java.io.IOException;

public class SaveChartMenuItemRenderer extends MenuItemRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Save");

        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ChartMenu._saveChart",
                getChart("<o:saveChartMenuItem>", menuItem)).getScript());
        if (menuItem.getIconUrl() == null)
            menuItem.setIconUrl(Resources.internalURL(
                    context, null, "chart/save.png", false));

        super.encodeBegin(context, component);

    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.command.MenuItem

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.