Package org.apache.tapestry

Examples of org.apache.tapestry.IBinding


        PortletRequest request = newRequest(map);
        Location l = newLocation();

        replayControls();

        IBinding b = newBinding("description", vc, l, request, "foo.bar");

        assertSame(l, b.getLocation());
        assertEquals("description", b.getDescription());
        assertEquals(false, b.isInvariant());
        assertEquals("baz", b.getObject());

        verifyControls();
    }
View Full Code Here


        PortletRequest request = newRequest(null);
        Location l = newLocation();

        replayControls();

        IBinding b = newBinding("description", vc, l, request, "foo.bar");

        try
        {
            b.getObject();
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(BindingsMessages.noUserInfo(), ex.getMessage());
View Full Code Here

        converter.coerceValue(newValue, String.class);
        converterc.setReturnValue(valueConverted);

        replayControls();

        IBinding b = newBinding("description", converter, l, request, "foo.bar");

        b.setObject(newValue);

        assertSame(valueConverted, map.get("foo.bar"));

        verifyControls();
    }
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

     */

    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

            String defaultBindingType = BindingUtils.getDefaultBindingType(
                    spec,
                    name,
                    BindingConstants.OGNL_PREFIX);

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

            component.setBinding(name, binding);
        }
    }
View Full Code Here

        // (not the DirectLink or Form, but the page or component containing the
        // link or form).

        String description = PageloadMessages.parameterName(parameterName);

        IBinding binding = new ListenerBinding(description, _valueConverter, spec.getLocation(),
                component.getContainer(), language, spec.getScript(), _managerFactory);

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

        if (containerSpec.getParameter(bindingName) != null
            || containerSpec.isReservedParameterName(bindingName))
            return;

        // if everything passes, establish binding
        IBinding binding = container.getBinding(bindingName);
        component.setBinding(bindingName, binding);
    }
View Full Code Here

     */
    public ITreeSessionStateManager getTreeSessionStateMgr()
    {
        if (m_objTreeSessionStateManager == null)
        {
            IBinding objBinding = getSessionStateManagerBinding();
            if (objBinding != null)
            {
                Object objManager = objBinding.getObject();
                m_objTreeSessionStateManager = (ITreeSessionStateManager) objManager;
            }
            else
            {
                m_objTreeSessionStateManager = new FullTreeSessionStateManager();
View Full Code Here

     * @see org.apache.tapestry.contrib.tree.model.ITreeModelSource#getTreeStateListener()
     */
    public ITreeStateListener getTreeStateListener()
    {
        ITreeStateListener objListener = null;
        IBinding objBinding = getBinding("treeStateListener");
        if (objBinding != null)
        {
            objListener = (ITreeStateListener) objBinding.getObject();
        }
        return objListener;
    }
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.