Examples of IBinding


Examples of org.apache.tapestry.IBinding

            // ImageButton is used for its original purpose (as a kind
            // of image map).  In modern usage, we only care about
            // whether the user clicked on the image (and thus submitted
            // the form), not where in the image the user actually clicked.

            IBinding pointBinding = getPointBinding();

            if (pointBinding != null)
            {
                int x = Integer.parseInt(value);

                parameterName = name + ".y";
                value = context.getParameter(parameterName);

                int y = Integer.parseInt(value);

                pointBinding.setObject(new Point(x, y));
            }

            // Notify the application, by setting the select parameter
            // to the tag parameter.

            IBinding selectedBinding = getSelectedBinding();

            if (selectedBinding != null)
                selectedBinding.setObject(getTag());

            IActionListener listener = getListener();

            if (listener != null)
                listener.actionTriggered(this, cycle);
View Full Code Here

Examples of org.apache.tapestry.IBinding

                parameterSpec.getLocation(),
                null);
           
            // if there is no binding for this parameter, bind it to the default value
            if (component.getBinding(name) == null) {
                IBinding binding = new ExpressionBinding(_resolver, component, defaultValue, parameterSpec.getLocation());
                component.setBinding(name, binding);
            }
               
        }
    }
View Full Code Here

Examples of org.apache.tapestry.IBinding

            // Map.  We're just interested in informal parameters.

            if (specification.getParameter(name) != null)
                continue;

            IBinding binding = (IBinding) entry.getValue();

            Object value = binding.getObject();
            if (value == null)
                continue;

            if (value instanceof IAsset)
            {
View Full Code Here

Examples of org.apache.tapestry.IBinding

            // Skip formal parameters

            if (getSpecification().getParameter(bindingName) != null)
                continue;

            IBinding binding = getBinding(bindingName);

            Object value = binding.getObject();

            result.put(bindingName, value);
        }

        return result;
View Full Code Here

Examples of org.apache.tapestry.IBinding

                continue;
            }

            String description = PageloadMessages.parameterName(name);

            IBinding binding = convert(container, description, defaultBindingPrefix, bspec);

            addBindingToComponent(component, parameterName, binding);
        }
    }
View Full Code Here

Examples of org.apache.tapestry.IBinding

     * @since 4.0
     */

    static void addBindingToComponent(IComponent component, String parameterName, IBinding binding)
    {
        IBinding existing = component.getBinding(parameterName);

        if (existing != null)
            throw new ApplicationRuntimeException(PageloadMessages.duplicateParameter(
                    parameterName,
                    existing), component, binding.getLocation(), null);
View Full Code Here

Examples of org.apache.tapestry.IBinding

            RequestContext context = cycle.getRequestContext();
            String submittedConditions[] = context.getParameters(name);
            condition = convertValue(submittedConditions[0]);
        }

        IBinding conditionValueBinding = getConditionValueBinding();
        if  (conditionValueBinding != null)
            conditionValueBinding.setBoolean(condition);
       
        return condition;
    }
View Full Code Here

Examples of org.apache.tapestry.IBinding

    /**
     * Updates the index and value output parameters if bound.
     */
    protected void updateOutputParameters()
    {
        IBinding indexBinding = getBinding("index");
        if (indexBinding != null)
            indexBinding.setObject(new Integer(_index));

        IBinding valueBinding = getBinding("value");
        if (valueBinding != null)
            valueBinding.setObject(_value);
    }
View Full Code Here

Examples of org.apache.tapestry.IBinding

    /**
     * Updates the primaryKeys parameter if bound.
     */
    protected void updatePrimaryKeysParameter(String[] stringReps)
    {
        IBinding primaryKeysBinding = getBinding("primaryKeys");
        if (primaryKeysBinding == null)
            return;

        DataSqueezer squeezer = getDataSqueezer();

        int repsCount = stringReps.length;
        List primaryKeys = new ArrayList(repsCount);
        for (int i = 0; i < stringReps.length; i++)
        {
            String rep = stringReps[i];
            if (rep.length() == 0 || rep.charAt(0) != DESC_PRIMARY_KEY)
                continue;
            Object primaryKey = squeezer.unsqueeze(rep.substring(1));
            primaryKeys.add(primaryKey);
        }

        primaryKeysBinding.setObject(primaryKeys);
    }
View Full Code Here

Examples of org.apache.tapestry.IBinding

    protected Iterator evaluateSourceIterator()
    {
        Iterator it = null;
        Object source = null;

        IBinding sourceBinding = getBinding("source");
        if (sourceBinding != null)
            source = sourceBinding.getObject();

        if (source != null)
            it = (Iterator) getValueConverter().coerceValue(source, Iterator.class);

        if (it == null)
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.