Package org.nextime.ion.backoffice.bean

Examples of org.nextime.ion.backoffice.bean.TypeBean


    }
    // validate metadata
    try {
      Enumeration names = request.getParameterNames();
      // dangerous ?
      TypeBean type = SectionTypes.getSectionBean(null, getTemplate());
      while (names.hasMoreElements()) {
        String name = names.nextElement() + "";
        if (name.startsWith("META_")) {
          String tname = name.substring(5);
          String value = request.getParameter(name);
          PropertyBean prop = type.getProperty(tname);
          if ("".equals(value.trim())) {
            if ("true".equalsIgnoreCase(prop.getRequired())) {
              ActionError error =
                new ActionError("error.editSection.propertyMissing");
              errors.add("META_" + tname, error);
View Full Code Here


      try {
        Mapping.begin();
       
        Section section = Section.getInstance(id);
        String template = section.getMetaData("template")+"";
        TypeBean type = SectionTypes.getSectionBean(servlet,template);
        request.setAttribute("types",type.getPublicationTypes());
        request.setAttribute("workflows",Workflow.listTypes());

        Mapping.rollback();
      } catch (Exception e) {
        Mapping.rollback();
        throw new ServletException(e);
      }

      // Forward to the view page
      return (mapping.findForward("view"));
    }

    // fill data | errors
    if (errors.size() > 0) {
      try {
        Mapping.begin();
       
        Section section = Section.getInstance(id);
        String template = section.getMetaData("template")+"";
        TypeBean type = SectionTypes.getSectionBean(servlet,template);
        request.setAttribute("types",type.getPublicationTypes());
        request.setAttribute(ERROR_KEY,errors);

        Mapping.rollback();
      } catch (Exception e) {
        Mapping.rollback();
View Full Code Here

TOP

Related Classes of org.nextime.ion.backoffice.bean.TypeBean

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.