Examples of ScriptBuilder


Examples of org.openfaces.util.ScriptBuilder

        Styles.renderStyleClasses(context, messageComponent);
    }

    private Script getClientScript(FacesContext context, UIComponent messageComponent, String css) {
        String messageClientId = messageComponent.getClientId(context);
        return new ScriptBuilder().functionCall("O$.addMessagesRenderer", new NewInstanceScript("O$._MessagesRenderer",
                messageClientId,
                getTitle(messageComponent),
                isTooltip(messageComponent),
                isShowSummary(messageComponent),
                isShowDetail(messageComponent),
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Hide");
        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ColumnMenu._hideColumn",
                getTable("<o:hideColumnMenuItem>", menuItem)).getScript());
        super.encodeBegin(context, component);
    }
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

        writeIdAttribute(context, component);
        writer.writeAttribute("style", "display: none", null);

        EventEditorPage eventEditorPage = (EventEditorPage) component;
        UIComponent timetableView = eventEditorPage.getParent();
        Rendering.renderInitScript(context, new ScriptBuilder().initScript(context, timetableView, "O$.Timetable._initEventEditorPage",
                eventEditorPage,
                eventEditorPage.getActionExpression() != null,
                eventEditorPage.getUrl(),
                eventEditorPage.getModeParamName(),
                eventEditorPage.getEventIdParamName(),
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

        } else {
            componentJs = "timetable/dayTable.js";
        }

        Rendering.renderInitScript(context,
                new ScriptBuilder().initScript(context, eventPreview, "O$.Timetable._initEventPreview",
                        timetableView,
                        eventPreview.getShowingDelay(),
                        Styles.getCSSClass(context, eventPreview, eventPreview.getStyle(), StyleGroup.regularStyleGroup(), eventPreview.getStyleClass(), "o_eventPreview"),
                        Styles.getCSSClass(context, eventPreview, eventPreview.getEventNameStyle(), StyleGroup.regularStyleGroup(), eventPreview.getEventNameClass()),
                        Styles.getCSSClass(context, eventPreview, eventPreview.getEventDescriptionStyle(), eventPreview.getEventDescriptionClass()),
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

        Styles.renderStyleClasses(context, table);
        writer.endElement("span");
    }

    protected void encodeAdditionalFeaturesSupport(FacesContext context, AbstractTable table) throws IOException {
        ScriptBuilder buf = new ScriptBuilder();

        encodeAdditionalFeaturesSupport_buf(context, table, buf);

        AbstractTableSelection selection = table.getSelection();
        if (selection != null)
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

        }
        if ("rows".equals(portionName)) {
            beforeReloadingAllRows(context, table);
            JSONObject result = serveDynamicRowsRequest(context, table, 0, Integer.MAX_VALUE);

            ScriptBuilder sb = new ScriptBuilder();
            encodeAdditionalFeaturesOnBodyReload(context, table, sb);
            Rendering.renderInitScript(context, sb);

            return result;
        } else {
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

    @Override
    public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        CommandLink link = (CommandLink) component;

        ScriptBuilder sb = new ScriptBuilder().functionCall("O$.Link._init", link, link.isDisabled(),
                Styles.getCSSClass(context, link, link.getDisabledStyle(), StyleGroup.disabledStyleGroup(),
                        link.getDisabledClass(), "o_link_disabled " + DefaultStyles.getTextColorClass()));
        Rendering.renderInitScript(context, sb, Resources.utilJsURL(context));

        writer.endElement(getTagName(link));
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        MenuItem menuItem = (MenuItem) component;
        if (menuItem.getValue() == null)
            menuItem.setValue("Group by This Column");
        menuItem.setOnclick(new ScriptBuilder().functionCall("O$.ColumnMenu._groupByColumn",
                getTable("<o:sortDescendingMenuItem>", menuItem)).toString());
        if (menuItem.getIconUrl() == null)
            menuItem.setIconUrl(Resources.internalURL(
                    context, null, "table/groupByColumn.png", false));
        super.encodeBegin(context, component);
View Full Code Here

Examples of org.openfaces.util.ScriptBuilder

        Rendering.addJsonParam(eventsObj, "onshow", popupMenu.getOnshow());

        boolean isRootMenu = !(popupMenu.getParent() instanceof MenuItem);
        PopupMenu rootPopupMenu = getRootPopupMenu(popupMenu);
        String event = Rendering.getEventWithOnPrefix(context, popupMenu, "o:popupMenu");
        ScriptBuilder initScript = new ScriptBuilder();
        initScript.initScript(context, popupMenu, "O$.PopupMenu._init",
                Rendering.getRolloverClass(context, popupMenu),
                forId,
                event,
                popupMenu.isIndentVisible(),
                indentClass,
View Full Code Here

Examples of org.platformlayer.ops.networks.ScriptBuilder

    this.fileMode = "755";
  }

  @Override
  protected byte[] getContentsBytes() throws OpsException {
    ScriptBuilder sb = new ScriptBuilder();

    addIpNeighborProxy(sb);

    sb.add(launchInstanceCommand);

    String script = sb.toString();

    return Utf8.getBytes(script);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.