Package org.apache.tapestry

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


                continue;
            }

            String description = PageloadMessages.parameterName(name);

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

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

     * @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

            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

    /**
     * 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

    /**
     * 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

    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

    protected Iterator evaluateFullSourceIterator()
    {
        Iterator it = null;
        Object fullSource = null;

        IBinding fullSourceBinding = getBinding("fullSource");
        if (fullSourceBinding != null)
            fullSource = fullSourceBinding.getObject();

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

        if (it == null)
View Full Code Here

                condition = readValue(cycle, name);
            }
        }

        // write condition value if parameter is bound
        IBinding conditionValueBinding = getConditionValueBinding();
        if (conditionValueBinding != null)
            conditionValueBinding.setObject(new Boolean(condition));

        return condition;
    }
View Full Code Here

    protected Iterator getSourceData()
    {
        Object source = null;

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

        if (source == null) return null;

        return (Iterator) getValueConverter().coerceValue(source,
                Iterator.class);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IBinding

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.