Package org.apache.ecs.html

Examples of org.apache.ecs.html.Form


     * @return A ConcreteElement.
     * @throws Exception a generic exception.
     */
    public ConcreteElement doBuild(RunData data) throws Exception
    {
        Form form;
        form = new Form(
            new TurbineURI(data,
                           TurbineConstants.SCREEN_DEFAULT_DEFAULT,
                           TurbineConstants.ACTION_LOGOUT_DEFAULT,
                           true).getRelativeLink(),
            Form.POST).addElement(new Input("SUBMIT", "Logout", "Logout"));
View Full Code Here


     * @exception Exception, a generic exception.
     */
    public ConcreteElement doBuild( RunData data )
        throws Exception
    {
        Form form;
        form = new Form(
            new DynamicURI(data,"DefaultScreen","LogoutUser",true).toString(),
            Form.POST)
                .addElement(new Input("SUBMIT", "Logout", "Logout"));
        ElementContainer body = new ElementContainer()
            .addElement(new HR().setSize(1).setNoShade(true))
View Full Code Here

        clearLogButton.setOnClick("if(!confirm('"
                + Utils.escapeJavaScriptString(labels.getLabel("confirm_cleartransferlog"))
                + "')) return false; document.forms[0]." + ACTION
                + ".value=1;document.forms[0].submit();");

        Form form = getForm("TransferLog", clearLogButton.toString(), labels, false, false);
        form.addElement(new Input(Input.HIDDEN, ACTION, "0"));

        List entries = pers
              .getAllLogMessageEntries(page * LOG_ENTRIES_PER_PAGE, LOG_ENTRIES_PER_PAGE);
       
        int numberOfLogEntries = pers.getNumberOfLogMessageEntries(pipeId);
View Full Code Here

        ElementContainer content = new ElementContainer().addElement(
            tt.getOuterTable(componentTable).setWidth("100%")).addElement(new HR()).
            addElement(reloadComponentsButton);

       
        Form form = getForm("Components", content.toString(), labels, false, false).addElement(
            new Input(Input.HIDDEN, ACTION, "0"));

        String result = form.toString();

        return result;
    }
View Full Code Here

        ElementContainer content = new ElementContainer().addElement(new H1(pipe.getName())).addElement(
            generalFieldsTemplate.toString()).addElement(new BR()).addElement(new BR()).addElement(
            componentTable).addElement(new BR()).addElement(infoTable);

       
        Form form = getForm("EditPipe", content.toString(), labels, false, true).addElement(
            parameters.getInput(Input.HIDDEN, PIPE_ID)).addElement(
            new Input(Input.HIDDEN, CREATE_COMPONENT_OF_TYPE, "-1")).addElement(
            new Input(Input.HIDDEN, DELETE_COMPONENT_OF_TYPE, "-1"));

        return form.toString();
    }
View Full Code Here

            Long pipeId = (Long) session.getAttribute(PIPE_ID_SESSION_KEY);
            Input backButton = new Input(Input.BUTTON,
                             "bb", labels.getLabel("back_to_pipe_editor"));
            backButton.setOnClick("document.location='EditPipe?pipeid=" + pipeId + "'");
           
            Form form = getFormWithCustomButton("EditComponent",
                                  guiHtml, backButton, labels, false, true);

            // Insert hidden fields carrying component and data IDs
           
            form.addElement(parameters.getInput(Input.HIDDEN, COMPONENT_ID));
            form.addElement(parameters.getInput(Input.HIDDEN, DATA_ID));

            content.addElement(form);
        }
           
        }
View Full Code Here

        + Utils.escapeJavaScriptString(labels
            .getLabel("confirm_clearqueue"))
        + "')) return false; document.forms[0]." + ACTION
        + ".value=1;document.forms[0].submit();");

    Form form = getForm("PipeExecutionQueue", clearQueueButton.toString(),
        labels, false, false);
    form.addElement(new Input(Input.HIDDEN, ACTION, "0"));

    List entries = pers.getPipeExecutionRequests(null);

    TableTool tt = new TableTool();
    tt.setZebra(true);
View Full Code Here

                                            String content,
                                            Input customButton,
                                            LabelResource labels,
                                            boolean hasCloseButton,
                                            boolean hasSubmitAndCancelButtons) {
        Form form = new Form(action, Form.POST, Form.ENC_DEFAULT).setAcceptCharset(
            environment.getCharsetWWW()).addElement(content);

        // See if buttons are to be added to the bottom of the tab
        if(hasCloseButton || hasSubmitAndCancelButtons ||
                (customButton != null)) {
            form.addElement(new HR());
            form.addElement(new Input(Input.HIDDEN, ACTION, "1"));

            TR buttonRow = new TR();
           
            if(customButton != null) {
                buttonRow.addElement(new TD().addElement(customButton));
            }

            if(hasCloseButton) {
                Input closeButton = new Input(Input.BUTTON, "clb", labels.getLabel("close_button"));
                closeButton.setOnClick("window.close()");
                buttonRow.addElement(new TD().addElement(closeButton));
            }

            //hmmm, might cause tr without a single td... is it bad?
            if(hasSubmitAndCancelButtons) {
                Input okButton = new Input(Input.BUTTON, "okb", labels.getLabel("ok_button"));
                okButton
                    .setOnClick("document.forms[0].action.value='1';document.forms[0].submit()");
                Input cancelButton = new Input(Input.BUTTON, "cancelb", labels
                    .getLabel("cancel_button"));
                cancelButton
                    .setOnClick("document.forms[0].action.value='0';document.forms[0].submit()");
                buttonRow.addElement(new TD()
                    .setAlign(AlignType.RIGHT)
                    .addElement(okButton)
                    .addElement(Entities.NBSP)
                    .addElement(cancelButton));
            }
            form.addElement(new Table().setWidth("100%").addElement(buttonRow));
        }
        return form;
    }
View Full Code Here

        generalFieldsContext.writeEditors(generalFields, generalFieldsTemplate);

        generalFieldsTemplate.write();
        ElementContainer content = new ElementContainer().addElement(
                generalFieldsTemplate.toString()).addElement(new BR()).addElement(new BR());
        Form form = getForm("PipeSettings", content.toString(), labels, false, true).addElement(
                parameters.getInput(Input.HIDDEN, PIPE_ID));
        return form.toString();
  }
View Full Code Here

               
            } else
                listField.revert();
        }

        Form form = getForm("PipeList", listField.getEditor(), labels, false, true);

        return form.toString();
    }
View Full Code Here

TOP

Related Classes of org.apache.ecs.html.Form

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.