Package com.volantis.mcs.protocols.widgets.attributes

Examples of com.volantis.mcs.protocols.widgets.attributes.TableAttributes


     * @param context
     */
    public TableElement(XDIMEContextInternal context) {
        super(WidgetElements.TABLE, context);
       
        protocolAttributes = new TableAttributes();
    }
View Full Code Here


        return (TableAttributes) protocolAttributes;
    }

    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(XDIMEContextInternal context, XDIMEAttributes attributes) throws XDIMEException {
        TableAttributes tableAttributes = getTableAttributes();
       
        com.volantis.mcs.protocols.TableAttributes xhtml2Attributes =
            new com.volantis.mcs.protocols.TableAttributes();
       
        xhtml2Attributes.copy(tableAttributes);
       
        tableAttributes.setXHTML2Attributes(xhtml2Attributes);
    }
View Full Code Here

    // Javadoc inherited.
    public void doRenderOpen(VolantisProtocol protocol,
            MCSAttributes attributes) throws ProtocolException {

        // Render XHTML2 TABLE element opening
        TableAttributes tableAttributes = (TableAttributes) attributes;

        if (isWidgetSupported(protocol)) {
       
            require(MODULE, protocol, attributes);

            if (tableAttributes.getXHTML2Attributes().getId() == null) {
                tableAttributes.getXHTML2Attributes().setId(protocol.getMarinerPageContext().generateUniqueFCID());
            }
        }

        // open table element no matter widget is supported or not
        protocol.writeOpenTable(tableAttributes.getXHTML2Attributes());
    }
View Full Code Here

    // Javadoc inherited.
    public void doRenderClose(VolantisProtocol protocol,
            MCSAttributes attributes) throws ProtocolException {

        // Render XHTML2 TABLE element opening
        TableAttributes tableAttributes = (TableAttributes) attributes;

        // close table element no matter widget is supported or not
        protocol.writeCloseTable(tableAttributes.getXHTML2Attributes());

        if (isWidgetSupported(protocol)) {

            // Prepare buffer for JavaScript
            StringBuffer script = new StringBuffer();

            // Render JavaScript to buffer
            if (attributes.getId() != null) {
                script.append(createJavaScriptWidgetRegistrationOpening(attributes.getId(), true));
            }

            script.append("new Widget.Table(")
                .append(createJavaScriptString(tableAttributes.getXHTML2Attributes().getId()))
                .append(")");

            if (attributes.getId() != null) {
                script.append(createJavaScriptWidgetRegistrationClosure());
            }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.attributes.TableAttributes

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.