Package com.agiletec.plugins.jpmyportalplus.aps.system.services.pagemodel

Examples of com.agiletec.plugins.jpmyportalplus.aps.system.services.pagemodel.MyPortalPageModel


      IPage page = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
      Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
      IMyPortalConfigManager myportalConfigManager =
          (IMyPortalConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.MYPORTAL_CONFIG_MANAGER, reqCtx.getRequest());
      Set<String> allowedShowlet = myportalConfigManager.getConfig().getAllowedShowlets();
      MyPortalPageModel model = (MyPortalPageModel) page.getModel();
      Frame currentFrameObject = model.getFrameConfigs()[currentFrame];
      return (!currentFrameObject.isLocked() && allowedShowlet.contains(showlet.getType().getCode()));
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "needsDecoration", "Error checking widget decorators");
      throw new RuntimeException("Error checking widget decorators", t);
    }
View Full Code Here


        ApsSystemUtils.getLogger().debug("Page '" + currentPage.getCode() + "' - No swap to do");
        return SUCCESS;
      }
      Widget[] customShowlets = super.getCustomShowletConfig();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);
      MyPortalPageModel pageModel = (MyPortalPageModel) currentPage.getModel();
      Integer[] columnFrames = this.calculateColumnFrames(pageModel);
      boolean isFrameDestBusy = this.calculateFrameDestOnSwapAjax(showletsToRender, columnFrames);
      if (this.getStartFramePos().equals(this.getTargetFramePos())) {
        //System.out.println("SPOSTAMENTO NELLA STESSA POSIZIONE - pos " + this.getStartFramePos());
        return SUCCESS;
View Full Code Here

    //System.out.println("Frame where opens section " + this.getFrameWhereOpenSection());
    List<FrameSelectItem> selectItems = new ArrayList<FrameSelectItem>();
    this.setSelectItems(selectItems);
    try {
      IPage currentPage = this.getCurrentPage();
      MyPortalPageModel pageModel = (MyPortalPageModel) currentPage.getModel();
      Integer currentColumnId = pageModel.getFrameConfigs()[this.getFrameWhereOpenSection()].getColumn();
      if (null == currentColumnId) {
        return SUCCESS;
      }
      CustomPageConfig config = this.getCustomPageConfig();
      Widget[] customShowlets = (null == config || config.getConfig() == null) ? null : config.getConfig();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);
      Lang currentLang = this.getCurrentLang();
      String voidShowletCode = this.getPageUserConfigManager().getVoidShowlet().getCode();
      for (int i = 0; i < showletsToRender.length; i++) {
        Frame frame = pageModel.getFrameConfigs()[i];
        Integer columnId = frame.getColumn();
        if (frame.isLocked() || null == columnId || i == this.getFrameWhereOpenSection().intValue()) continue;
        Widget widget = showletsToRender[i];
        if (columnId.equals(currentColumnId)) {
          if (widget != null && !widget.getType().getCode().equals(voidShowletCode)) {
View Full Code Here

    List<FrameSelectItem> selectItems = new ArrayList<FrameSelectItem>();
    IPageUserConfigManager pageUserConfigManager = (IPageUserConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.PAGE_USER_CONFIG_MANAGER, pageContext);
    try {
      Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
      IPage currentPage = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
      MyPortalPageModel pageModel = (MyPortalPageModel) currentPage.getModel();
      Integer currentColumnId = pageModel.getFrameConfigs()[currentFrame].getColumn();
      if (null == currentColumnId) {
        return super.doStartTag();
      }
      Lang currentLang = (Lang) this.pageContext.getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_LANG);
      Widget[] customShowletConfig = this.getCustomShowletConfig(currentPage, pageUserConfigManager);
      Widget[] showletsToRender = pageUserConfigManager.getShowletsToRender(currentPage, customShowletConfig);

      String voidShowletCode = pageUserConfigManager.getVoidShowlet().getCode();
      for (int i = 0; i < showletsToRender.length; i++) {
        Frame frame = pageModel.getFrameConfigs()[i];
        Integer columnId = frame.getColumn();
        if (frame.isLocked() || null == columnId || i == currentFrame.intValue()) continue;
        Widget showlet = showletsToRender[i];
        if (columnId.equals(currentColumnId)) {
          if (showlet != null && !showlet.getType().getCode().equals(voidShowletCode)) {
View Full Code Here

    try {
      RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX);
      IPage currPage = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
      String value = null;
      if (null == this.getParamName() || this.getParamName().equals(PARAM_NAME_FIRST_FRAME_ID)) {
        MyPortalPageModel model = (MyPortalPageModel) currPage.getModel();
        Frame[] frames = model.getFrameConfigs();
        for (int i = 0; i < frames.length; i++) {
          Frame frame = frames[i];
          //FIXME attenzione: getColumn può essere null
          if (null != frame.getColumn() && (frame.getColumn().equals(this.getColumnId()))) {
            value = String.valueOf(frame.getPos());
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpmyportalplus.aps.system.services.pagemodel.MyPortalPageModel

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.