Package org.apache.cocoon.components.flow.java

Examples of org.apache.cocoon.components.flow.java.VarMap


     * @param bizData some business data for the view (like in cocoon.sendPageAndWait()).
     *            The "{FormsPipelineConfig.CFORMSKEY}" and "locale" properties are added to this object.
     */
    public void show(String uri, Object bizData) {

        if (bizData==null) bizData = new VarMap();
        ((VarMap)bizData).add(FormsPipelineConfig.CFORMSKEY, this.form);

        if (this.locale == null)
            this.locale = java.util.Locale.getDefault();
        ((VarMap)bizData).add("locale", this.locale);
View Full Code Here


            results.add(i.next());
        }
        // Sort result
        Collections.sort(results, new EmployeeComparator());
        // Send response to the user
        sendPage("page/employee-result", new VarMap().add("employee", results));
    }
View Full Code Here

        count++;
    }

    private float getNumber(String name, float a, float b) {
        String uri = "page/calculator-" + name.toLowerCase();
        sendPageAndWait(uri, new VarMap().add("a", a).add("b", b).add("count", count));

        float value = 0f;
        try {
            value = Float.parseFloat(getRequest().getParameter(name));
        } catch (Exception e) {
View Full Code Here

        }
        return value;
    }

    private String getOperator(float a, float b) {
        sendPageAndWait("page/calculator-operator", new VarMap().add("a", a).add("b", b).add("count", count));
        return getRequest().getParameter("operator");
    }
View Full Code Here

        sendPageAndWait("page/calculator-operator", new VarMap().add("a", a).add("b", b).add("count", count));
        return getRequest().getParameter("operator");
    }

    private void sendResult(float a, float b, String op, float result) {
        sendPage("page/calculator-result", new VarMap().add("a", a).add("b", b).add("operator", op).add("result", result).add("count", count));
    }
View Full Code Here

    private void sendResult(float a, float b, String op, float result) {
        sendPage("page/calculator-result", new VarMap().add("a", a).add("b", b).add("operator", op).add("result", result).add("count", count));
    }

    private void sendMessage(String message) {
        sendPageAndWait("page/calculator-message", new VarMap().add("message", message).add("count", count));
    }
View Full Code Here

        field = (Field) repeater.getWidget(1, "firstname");
        field.setValue("Lucien");

        form.show("form/form1");

        sendPage("page/form1-result", new VarMap().add("email", ((Field)form.getChild("email")).getValue())
                                                  .add("somebool", ((BooleanField)form.getChild("somebool")).getValue())
                                                  .add("firstname", ((Field)((Repeater)form.getChild("contacts")).getWidget(1, "firstname")).getValue()));
    }
View Full Code Here

        FormInstance form = new FormInstance("forms/form2.xml", "forms/form2-binding.xml");
        form.load(bean);
        form.show("form/form2");
        form.save(bean);
                                        
        sendPage("page/form2-result", new VarMap().add("form2bean", bean));
    }
View Full Code Here

/*    public WebContinuation getBookmark() {
        return this.local_.webContinuation;
    }  */

    public void show(String uri) {
        show(uri, new VarMap());
    }
View Full Code Here

     * @param bizData some business data for the view (like in cocoon.sendPageAndWait()).
     *            The "{FormsPipelineConfig.CFORMSKEY}" and "locale" properties are added to this object.
     */
    public void show(String uri, Object bizData) {

        if (bizData==null) bizData = new VarMap();
        ((VarMap)bizData).add(FormsPipelineConfig.CFORMSKEY, this.form);

        if (this.locale == null)
            this.locale = java.util.Locale.getDefault();
        ((VarMap)bizData).add("locale", this.locale);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.flow.java.VarMap

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.