Package com.volantis.mcs.papi

Examples of com.volantis.mcs.papi.XFImplicitAttributes


        requestContext.pushProject(runtimeProjectMock);
        pageContext.pushRequestContext(requestContext);

        // Create the XFImplicit element and attributes
        implicitElement = new XFImplicitElementImpl();
        papiAttributes = new XFImplicitAttributes();
    }
View Full Code Here


                                    logger.debug ( "Hidden input. For group "+getFormName(pageContext)+" setting attribute _D" + vname + " to " + inputAttributes.getName() );
                                }
                                sessionMap.setAttribute(getFormName(pageContext), "_D"+vname, inputAttributes.getName());
                            }
                        } else {                           
                            XFImplicitAttributes ia = new XFImplicitAttributes();
                            ia.setName( "i_" + vname );
                            ia.setValue( inputAttributes.getInitial() );

                            writer.openElement(ia);
                            writer.closeElement(ia);

                            if (logger.isDebugEnabled()) {
                                logger.debug ( "Hidden input. For group "+getFormName(pageContext)+" setting attribute _V" + vname + " to " + inputAttributes.getName() );
                            }
                            sessionMap.setAttribute(getFormName(pageContext), "_V"+vname, inputAttributes.getName());
                        }
                    } else {
                        if (logger.isDebugEnabled()) {
                            logger.debug ("hidden-input-undefined");
                        }
                        XFImplicitAttributes ia = new XFImplicitAttributes();
                        ia.setName( inputAttributes.getName() );
                        ia.setValue( inputAttributes.getInitial() );

                        writer.openElement(ia);
                        writer.closeElement(ia);
                                               
                    }
View Full Code Here

            throws PAPIException {

        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(context);

        XFImplicitAttributes attributes = (XFImplicitAttributes) papiAttributes;

        // Create a new protocol attributes object every time, as this element
        // could be reused before the attributes have actually been finished with
        // by the protocol.
        com.volantis.mcs.protocols.XFImplicitAttributes pattributes
                = new com.volantis.mcs.protocols.XFImplicitAttributes();

        // Get the enclosing form element's attributes.
        XFFormElementImpl formElement
                = (XFFormElementImpl) pageContext.getCurrentElement();
        XFFormAttributes formAttributes = formElement.getProtocolAttributes();

        // Get the enclosing form element's descriptor.
        FormDescriptor formDescriptor = formElement.getFormDescriptor();

        // Add a reference back to the form attributes.
        pattributes.setFormAttributes(formAttributes);
        pattributes.setFormData(formAttributes.getFormData());

        // Set the name.
        String name = attributes.getName();
        pattributes.setName(name);

        // Set the value.
        String value = attributes.getValue();
        pattributes.setValue(value);

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Set the client variable name
        TextAssetReference reference = resolver.resolveQuotedTextExpression(
                attributes.getClientVariableName());
        String clientVariableName = getPlainText(reference);

        // One of value and clientVariableName must be specified.
        if (value == null && clientVariableName == null) {
            throw new PAPIException(exceptionLocalizer.format(
View Full Code Here

                            if(logger.isDebugEnabled()){
                                logger.debug ( "Hidden input. Setting session attribute _V" + vname + " to " + inputAttributes.getName() );
                            }  
                            session.setAttribute( new String( "_V"+vname ), new String( inputAttributes.getName() ) );

                            XFImplicitAttributes ia = new XFImplicitAttributes();
                            ia.setName( "i_" + vname );
                            ia.setValue( inputAttributes.getInitial() );

                            writer.openElement(ia);
                            writer.closeElement(ia);
                        }
                    } else {
                        if(logger.isDebugEnabled()){
                            logger.debug ( "Hidden input  vname is undefined" );
                        }
                        XFImplicitAttributes ia = new XFImplicitAttributes();
                        ia.setName( inputAttributes.getName() );
                        ia.setValue( inputAttributes.getInitial() );

                        writer.openElement(ia);
                        writer.closeElement(ia);
                    }
                }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.papi.XFImplicitAttributes

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.