Examples of VarMap


Examples of com.graphbuilder.math.VarMap

        if (expr != null)
        {
          double result;
          try
          {
            VarMap vm = new VarMap();
            vm.setValue("adena", activeChar.getAdena());
            result = expr.eval(vm, null);
            activeChar.sendMessage(expression);
            activeChar.sendMessage("=" + Util.formatDouble(result, "NaN", false));
          }
          catch (Exception ignored)
View Full Code Here

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

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

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

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

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

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

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

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

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

        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 (NumberFormatException e) {
View Full Code Here

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

        }
        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

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

        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

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

    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

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

        System.out.println("*** return from flow");

        assertTrue(!c.isRestoring());
        assertTrue(!c.isCapturing());

        VarMap map = (VarMap)FlowHelper.getContextObject(objectmodel);
       
        assertEquals(((Float)map.getMap().get("result")).floatValue(), 3.3f, 0.1f);

        JXPathContext jxcontext = JXPathContext.newContext(FlowHelper.getContextObject(objectmodel));
        Float result = (Float)jxcontext.getValue("result");

        assertEquals(result.floatValue(), 3.3f, 0.1f);
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.