Package org.glassfish.web.deployment.runtime

Examples of org.glassfish.web.deployment.runtime.LocaleCharsetInfo


     * @return the descriptor instance to associate with this XMLNode
     */
    @Override
    public LocaleCharsetInfo getDescriptor() {
        if (descriptor==null) {
            descriptor = new LocaleCharsetInfo();
        }
        return descriptor;
    }
View Full Code Here


    }

    @Override
    public void startElement(XMLElement element, Attributes attributes) {
  if (element.getQName().equals(RuntimeTagNames.LOCALE_CHARSET_INFO)) {
            LocaleCharsetInfo info = (LocaleCharsetInfo) getDescriptor();
            for (int i=0; i<attributes.getLength();i++) {
                if (RuntimeTagNames.DEFAULT_LOCALE.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.DEFAULT_LOCALE,
                        attributes.getValue(i));
                }
            }
        } else if (element.getQName().equals(
            RuntimeTagNames.PARAMETER_ENCODING)) {
      LocaleCharsetInfo info = (LocaleCharsetInfo) getDescriptor();
            info.setParameterEncoding(true);
            for (int i=0; i<attributes.getLength();i++) {
                if (RuntimeTagNames.DEFAULT_CHARSET.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.PARAMETER_ENCODING,
                        LocaleCharsetInfo.DEFAULT_CHARSET,
                        attributes.getValue(i));
                }
                if (RuntimeTagNames.FORM_HINT_FIELD.equals(
                    attributes.getQName(i))) {
                    info.setAttributeValue(LocaleCharsetInfo.PARAMETER_ENCODING,
                        LocaleCharsetInfo.FORM_HINT_FIELD,
                        attributes.getValue(i));
                }
            }
  } else super.startElement(element, attributes);
View Full Code Here

TOP

Related Classes of org.glassfish.web.deployment.runtime.LocaleCharsetInfo

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.