Package com.volantis.mcs.protocols.response.attributes

Examples of com.volantis.mcs.protocols.response.attributes.ResponseDeckAttributes


    public void doRenderCloseResponse(VolantisProtocol protocol,
            MCSAttributes attributes) throws ProtocolException {       

        renderWidgetClose(protocol, listAttributes);

        ResponseDeckAttributes responseDeckAttributes = (ResponseDeckAttributes) attributes;
       
        StringBuffer buffer = new StringBuffer();
       
        if (attributes.getId() != null) {
            buffer.append(createJavaScriptWidgetRegistrationOpening(attributes.getId()));
           
            addCreatedWidgetId(attributes.getId());
        }
       
        buffer.append("new Widget.Internal.DeckResponse(")
            .append(createJavaScriptWidgetReference(listAttributes.getId()))
            .append(", ")
            .append(responseDeckAttributes.getPagesCount())
            .append(")");
       
        addUsedWidgetId(listAttributes.getId());

        if (attributes.getId() != null) {
View Full Code Here


     * @param context An internal XDIME context.
     */
    public ResponseDeckElement(XDIMEContextInternal context){
        super(ResponseElements.DECK, context);
       
        protocolAttributes = new ResponseDeckAttributes();
    }
View Full Code Here

    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(
            XDIMEContextInternal context, XDIMEAttributes attributes)
            throws XDIMEException {
       
        ResponseDeckAttributes responseDeckAttributes = (ResponseDeckAttributes) protocolAttributes;

        // Parse the "total-pages-count" attribute.
        String totalPagesCountAttribute = attributes.getValue("", "total-pages-count");
       
        if (totalPagesCountAttribute == null) {
            throw new XDIMEException("Missing total-pages-count attribute.");           
        }
       
        int totalPagesCount;
       
        try {
            totalPagesCount = Integer.parseInt(totalPagesCountAttribute);
        } catch (NumberFormatException e) {
            throw new XDIMEException("Invalid value for total-pages-count attribute.");
        }
       
        responseDeckAttributes.setTotalPagesCount(totalPagesCount);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.response.attributes.ResponseDeckAttributes

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.