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

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


        // Retrieve block attributes stored in doRenderOpen
        EffectBlockAttributes blockAttributes = (EffectBlockAttributes)popMCSAttributes();
        renderWidgetClose(protocol, blockAttributes);
        addUsedWidgetId(blockAttributes.getId());

        DatePickerAttributes datePickerAttributes = (DatePickerAttributes) attributes;       
       
        // Create the widget
        StringBuffer textBuffer = new StringBuffer(createJavaScriptWidgetRegistrationOpening(attributes.getId()))
            .append("new Widget.DatePicker(")
            .append(createJavaScriptString(attributes.getId()))
            .append(", ").append(createJavaScriptString(blockAttributes.getId()))
            .append(", {");
       
          if (datePickerAttributes.getInputField() != null) {
              textBuffer.append("inputField:").append(createJavaScriptString(datePickerAttributes.getInputField())).append(", ");           
          } else {
            if (datePickerAttributes.getDayInputField() != null) {
              textBuffer.append("dayInputField:").append(createJavaScriptString(datePickerAttributes.getDayInputField())).append(", ");
            }
            if (datePickerAttributes.getMonthInputField() != null) {
              textBuffer.append("monthInputField:").append(createJavaScriptString(datePickerAttributes.getMonthInputField())).append(", ");
           
            if (datePickerAttributes.getYearInputField() != null) {
              textBuffer.append("yearInputField:").append(createJavaScriptString(datePickerAttributes.getYearInputField())).append(", ");
            }             
          }
          if (calendarDisplayId!=null)
            textBuffer.append("calendarDisplayId:").append(createJavaScriptString(calendarDisplayId)).append(", ");
         
          Styles styles = attributes.getStyles();
          StyleValue unfoldon = styles.getPropertyValues().getSpecifiedValue(StylePropertyDetails.MCS_TOGGLE_EVENT);
         
          if (unfoldon != null)
            textBuffer.append("unfoldon: ").append(createJavaScriptString(unfoldon.getStandardCSS())).append(", ");
         
          LoadAttributes loadAttributes = datePickerAttributes.getLoadAttributes();
          if (loadAttributes != null) {
            String load = "load_src: " + createJavaScriptString(loadAttributes.getSrc())
                      + ", load_when: " + createJavaScriptString(loadAttributes.getWhen()) + ", ";
            textBuffer.append(load);
          }         
View Full Code Here


            LocalizationFactory.createExceptionLocalizer(
                    GalleryElement.class);
   
    public DatePickerElement(XDIMEContextInternal context) {
        super(WidgetElements.DATE_PICKER, context);
        protocolAttributes = new DatePickerAttributes();
    }
View Full Code Here

        return super.callOpenOnProtocol(context, attributes);
    }
   
    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(XDIMEContextInternal context, XDIMEAttributes attributes) throws XDIMEException {
        DatePickerAttributes datePickerAttributes = (DatePickerAttributes) protocolAttributes;
       
        /**
         * Input fields into which selected date will be typed
         */
        datePickerAttributes.setInputField(attributes.getValue("", "inputField"));
        datePickerAttributes.setDayInputField(attributes.getValue("", "dayInputField"));
        datePickerAttributes.setMonthInputField(attributes.getValue("", "monthInputField"));
        datePickerAttributes.setYearInputField(attributes.getValue("", "yearInputField"));
    }
View Full Code Here

TOP

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

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.