Package org.opencms.xml.content

Examples of org.opencms.xml.content.CmsXmlContent


 
  public List<PropertyBean> getFields() throws CmsXmlException, CmsException {
    @SuppressWarnings("unchecked")
    List<PropertyBean> fields = (List<PropertyBean>) getJsp().getRequest().getAttribute(ATTR_FIELDS);
    if (fields == null) {
      CmsXmlContent xmlC = CmsXmlContentFactory.unmarshal(getJsp().getCmsObject(), getJsp().getCmsObject().readFile(getTemplatePropertiesUrl(getParamResource(), getJsp())));
     
      Locale l = (Locale) xmlC.getLocales().get(0);
      XmlContentHelper xml = new XmlContentHelper(getJsp().getCmsObject(), xmlC, l);

      int count = xmlC.getIndexCount("Property", l);
      String name, titleKey, type, config;
          fields = new ArrayList<PropertyBean>();
      for (int i = 1; i <= count; i++) {
        name     = xml.getStringValue("Property["+i+"]/Name");
        titleKey   = xml.getStringValue("Property["+i+"]/TitleKey");
View Full Code Here


    Locale locale = OpenCms.getLocaleManager().getDefaultLocale(cms, fileUri);
    return map(cms, locale, fileUri, "");
  }
  public T map(CmsObject cms, Locale locale, String fileUri, String xpathPrefix) throws MappingException, CmsException {
    CmsFile file = cms.readFile(fileUri);
    CmsXmlContent xml = CmsXmlContentFactory.unmarshal(cms, file);
   
    return map(cms, locale, xml, xpathPrefix);
  }
View Full Code Here

TOP

Related Classes of org.opencms.xml.content.CmsXmlContent

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.