Package com.exedosoft.plat.ui

Examples of com.exedosoft.plat.ui.DOMenuModel


*/
public class JqueryMenu extends DOBaseMenu {

  public String getHtmlCode(DOIModel aModel) {

    DOMenuModel rootMenu = (DOMenuModel) aModel;
    StringBuffer buffer = new StringBuffer();

    for (Iterator it = rootMenu.retrieveChildren().iterator(); it.hasNext();) {
      DOMenuModel aMenu = (DOMenuModel) it.next();
      if (aMenu.getIntEnvType() != DOMenuModel.MENU_ENV_PC) {

        buffer.append("<ul data-role='listview' data-inset='true' data-theme='c' data-dividertheme='b'>\n");
        buffer.append("  <li data-role='list-divider'>")
            .append(aMenu.getL10n()).append("</li>\n");

        if (aMenu.retrieveChildren() != null) {

          for (Iterator itChild = aMenu.retrieveChildren().iterator(); itChild
              .hasNext();) {
            DOMenuModel aChildMenu = (DOMenuModel) itChild.next();
            // 自定义属性paneid
            if (aChildMenu.getIntEnvType() != DOMenuModel.MENU_ENV_PC && aChildMenu.getLinkPane()!=null) {
              buffer.append(
                  "<li><a href='")
                  .append(aChildMenu.getLinkPane().getCorrHref())
                  .append("'>")
                  .append(aChildMenu.getL10n())
                  .append("</a></li>");
            }
          }

        }
View Full Code Here


      pmBottomLink.setOrderNum(new Integer(10));
      DAOUtil.INSTANCE().store(pmBottomLink, aService);

      // /左边面板

      DOMenuModel dmRoot = new DOMenuModel();
      dmRoot.setCategory(aBO);
      dmRoot.setController(menuController);
      // ////////同名DOMenuModel
      dmRoot.setName(project.getName() + "_root");
      dmRoot.setL10n("Welcome " + project.getL10n());
      DOService storeRootMenu = DOService.getService("DO_UI_MenuModel_Insert_firstlevel");
      DAOUtil.INSTANCE().store(dmRoot,storeRootMenu);     
     
      ////更新菜单获取的sql语句
       DOService menuService = DOService.getService("s_menumodel_byName");
       menuService.setMainSql("select * from do_ui_menumodel where name = '" + dmRoot.getName() + "'");
       DAOUtil.INSTANCE().store(menuService);
       

      DOMenuModel dmBP = new DOMenuModel();
      dmBP.setCategory(aBO);
      dmBP.setParentMenu(dmRoot);
      dmBP.setController(menuController);
      // ////////同名DOMenuModel
      dmBP.setName(project.getName());
      dmBP.setL10n(project.getL10n());
      DAOUtil.INSTANCE().store(dmBP);
     
     
      ///////组织权限相关的菜单 初始化到工程根菜单下面
      DOMenuModel dmmAuth = DOMenuModel.getMenuModelByName("dorgauth_bp");
      dmmAuth.setParentMenu(dmRoot);
      DAOUtil.INSTANCE().store(dmmAuth);
           
      ///把工作流相关的菜单初始化到工程根菜单下面
      DOMenuModel dorgauth_flow_test  = DOMenuModel.getMenuModelByName("dorgauth_flow_test");
      dorgauth_flow_test .setParentMenu(dmRoot);
      DAOUtil.INSTANCE().store(dorgauth_flow_test );
           
     
     
      ////工作台jsp
View Full Code Here

      } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }

      DOMenuModel parentMenu = DOMenuModel.getMenuModelByName(menuName);
      DOBO boMenu = DOBO.getDOBOByName("DO_UI_MenuModel");
     
      if(parentMenu==null){
        DOMenuModel dmm  =  DOMenuModel.getMenuModelByName(menuName+"_root");
        if(dmm!=null){
          parentMenu = (DOMenuModel)dmm.retrieveChildren().get(0);
        }
      }
     
      if (parentMenu != null) {
        boMenu.refreshContext(parentMenu.getObjUid());
      }
      DOMenuModel dmm = new DOMenuModel();
      dmm.setName(geneATable);
      dmm.setL10n(geneATable);
      dmm.setLinkPane(pmTotal);
      dmm.setTargetPane(_opener_tab);
      dmm.setParentMenu(parentMenu);
      dmm.setCategory(category);
      dmm.setOrderNum(5);
      DOService menuModelInsert = DOService
          .getService("DO_UI_MenuModel_copy");
      DAOUtil.INSTANCE().store(dmm,menuModelInsert);

      t.end();
View Full Code Here

  }

  public static void main(String[] args) {

    DOMenuModel parentMenu = new DOMenuModel();
    parentMenu.setObjUid("cccc");
   
    DOMenuModel dmm = new DOMenuModel();
    dmm.setName("a");
    dmm.setL10n("b");
    dmm.setParentMenu(parentMenu);
    dmm.setOrderNum(5);
   
    BOInstance bi = new BOInstance();
    bi.fromObject(dmm);
   
    System.out.println(bi);
View Full Code Here

       * 保存左边的左边的索引菜单
       */
      pmLeft.setTargetPane(pmContent);
     
     
      DOMenuModel dmRoot = new DOMenuModel();
      dmRoot.setCategory(aBO);
      dmRoot.setController(menuController);
      //////////同名DOMenuModel
      dmRoot.setName(project.getName()+"_root");
      dmRoot.setL10n(project.getL10n()+"_根菜单");
      DAOUtil.INSTANCE().store(dmRoot);
     
     
      DOMenuModel dmBP = new DOMenuModel();
      dmBP.setCategory(aBO);
      dmBP.setParentMenu(dmRoot);
      dmBP.setController(menuController);
      //////////同名DOMenuModel
      dmBP.setName(project.getName());
      dmBP.setL10n(project.getL10n()+"_根业务对象");
      DAOUtil.INSTANCE().store(dmBP);
     
      DOMenuLinks links = new DOMenuLinks();
      links.setLinkType(DOMenuLinks.LINKTYPE_PANEMODEL);
      links.setLinkUID(pmLeft.getObjUid());
View Full Code Here

      for (int i = 0; i < configs.length; i++) {
        String[] aConfig = configs[i].split(",");
        if (aConfig[0] != null && !"".equals(aConfig[0])) {
         
          if(DOAuthorization.WHAT_UI_MENU==type){
            DOMenuModel dmm = DOMenuModel.getMenuModelByID(aConfig[0]);
            if(dmm!=null && !dmm.isFilter()){
              continue;
            }
          }
         
          String containKey = aConfig[0];
View Full Code Here

  public String getHtmlCode(DOIModel doimodel) {

    String s = "";
    try {
      DOMenuModel mm = (DOMenuModel) doimodel;

      Map<String, Object> data = this.putData(doimodel);

      s = HtmlTemplateGenerator.getContentFromDBTemplate(mm.getController().getObjUid(),
          data);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return s;
View Full Code Here

  /* (non-Javadoc)
   * @see com.exedosoft.plat.ui.DOIView#getHtmlCode(com.exedosoft.plat.ui.DOIModel)
   */
  @Override
  public String getHtmlCode(DOIModel aMenu) {
    DOMenuModel aModel = (DOMenuModel)aMenu;
    return this.drawStaticTree(aModel);
  }
View Full Code Here

*/
public class JqueryMenuXP extends DOBaseMenu {

  public String getHtmlCode(DOIModel aModel) {

    DOMenuModel rootMenu = (DOMenuModel) aModel;
    StringBuffer buffer = new StringBuffer();

    for (Iterator it = rootMenu.retrieveChildren().iterator(); it.hasNext();) {
      DOMenuModel aMenu = (DOMenuModel) it.next();

      buffer.append("<DIV class=mTitle id=").append(aMenu.getObjUid())
          .append(" name=").append(aMenu.getL10n()).append("><a>");
      buffer.append(aMenu.getL10n()).append("</a></div>");
      buffer.append("<div class=mHi>");
      if (aMenu.retrieveChildren() != null) {

        for (Iterator itChild = aMenu.retrieveChildren().iterator(); itChild
            .hasNext();) {
          DOMenuModel aChildMenu = (DOMenuModel) itChild.next();
          buffer.append("<div class=mMenu id=\""
              + aChildMenu.getObjUid() + "\" name =\""
              + aChildMenu.getL10n() + "\"");
          // �Զ�������paneid
          if (aChildMenu.getMenuType() != null
              && aChildMenu.getMenuType().intValue() == DOMenuModel.MENUTYPE_LINK) {
            buffer.append(" paneid=\"")
                .append(aChildMenu.getNote()).append("\"");
          } else

          if (aChildMenu.getLinkPane() != null) {
            BOInstance bi = DOGlobals.getInstance()
                .getRuleContext().getInstance();
            buffer.append(" paneid=\"").append(
                aChildMenu.getLinkPane().getFullCorrHref(bi,
                    null)).append("\"");
          }
          if(aChildMenu.getDoClickJs()!=null){
            buffer.append(" clickjs=\"")
            .append(aChildMenu.getDoClickJs())
            .append("\" ");
          }
         
          buffer.append(">").append("<A>").append(
              aChildMenu.getL10n()).append("</A></div>");
        }

      }
      buffer.append("</div>");
    }
View Full Code Here

import com.exedosoft.plat.util.StringUtil;

public class DOWebFxTree extends DOBaseMenu{

  public String getHtmlCode(DOIModel aMenu) {
    DOMenuModel aModel = (DOMenuModel)aMenu;
    return this.drawStaticTree(aModel);
  }
View Full Code Here

TOP

Related Classes of com.exedosoft.plat.ui.DOMenuModel

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.