Package org.apache.tapestry

Examples of org.apache.tapestry.IBinding


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

        // check if parameter is informal for the container
        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 void setTableRow(Object tableRow)
    {
        m_objTableRow = tableRow;

        IBinding objRowBinding = getBinding("row");
        if (objRowBinding != null) objRowBinding.setObject(tableRow);
    }
View Full Code Here

     */
    public void setTableIndex(int tableIndex)
    {
        m_nTableIndex = tableIndex;

        IBinding objIndexBinding = getBinding("index");
        if (objIndexBinding != null)
            objIndexBinding.setObject(new Integer(tableIndex));
    }
View Full Code Here

     *
     * @return the CSS class of the cell
     */
    public String getValueClass()
    {
        IBinding classBinding = getBinding("class");
        if (classBinding != null)
            return classBinding.getObject(String.class).toString();

        return getTableColumn().getColumnName() + TABLE_VALUE_CSS_CLASS_SUFFIX;
    }
View Full Code Here

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

                String defaultBindingType = parameterSpec.getDefaultBindingType();
                if (defaultBindingType == null)
                    defaultBindingType = BindingConstants.OGNL_PREFIX;

                IBinding binding = _bindingSource.createBinding(
                        component,
                        description,
                        defaultValue,
                        defaultBindingType,
                        parameterSpec.getLocation());
View Full Code Here

        _parameterName = parameterName;
    }

    public void connect()
    {
        IBinding binding = _component.getContainer().getBinding(_containerParameterName);

        if (binding == null)
            return;

        _component.setBinding(_parameterName, binding);
View Full Code Here

     * @param parameterName
     * @return
     */
    public static JSONObject parseJSONParameter(IComponent component, String parameterName)
    {
        IBinding binding = component.getBinding(parameterName);
        if (binding == null || binding.getObject() == null)
            return new JSONObject();
       
        try
        {
            return new JSONObject((String) binding.getObject(String.class));
        }
        catch (ParseException ex)
        {
            throw new ApplicationRuntimeException( DojoMessages.mustUseValidJsonInParameter(parameterName),
                    binding.getLocation() , ex);
        }
    }
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.