Package com.agiletec.aps.system.services.page

Examples of com.agiletec.aps.system.services.page.IPage


  @Override
  public String addWidgets() {
    try {
      Widget[] customShowlets = super.getCustomShowletConfig();
      IPage currentPage = this.getCurrentPage();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);

      //for (int i = 0; i < this.getShowletToShow().size(); i++) {
      //  System.out.println("DA MOSTRARE " + this.getShowletToShow().get(i));
      //}
      List<Integer> framesToFlow = this.getFramesToFlow(showletsToRender, currentPage);
      //for (int i = 0; i < framesToFlow.size(); i++) {
      //  System.out.println("DA ELIMINARE - " + framesToFlow.get(i));
      //}
      List<String> showletsToAdd = this.getShowletsToAdd(showletsToRender, currentPage);
      //for (int i = 0; i < showletsToAdd.size(); i++) {
      //  System.out.println("DA AGGIUNGERE + " + showletsToAdd.get(i));
      //}

      String voidShowletCode = this.getPageUserConfigManager().getVoidShowlet().getCode();
      Frame[] frames = ((MyPortalPageModel) currentPage.getModel()).getFrameConfigs();
      for (int i = 0; i < frames.length; i++) {
        Frame frame = frames[i];
        if (!frame.isLocked()) {
          boolean isFrameToFlow = framesToFlow.contains(i);
          if (isFrameToFlow) {
View Full Code Here


  }

  @Override
  public String resetFrames() {
    try {
      IPage currentPage = this.getCurrentPage();
      UserDetails currentUser = super.getCurrentUser();
      if (currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
        this.getPageUserConfigManager().removeGuestPageConfig(currentPage, this.getRequest(), this.getResponse());
      } else {
        this.getPageUserConfigManager().removeUserPageConfig(currentUser.getUsername(), currentPage);
View Full Code Here

public abstract class AbstractFrontAction extends BaseAction implements IFrontAction, ServletResponseAware {

  @Override
  public String swapFrames() {
    try {
      IPage currentPage = this.getCurrentPage();
      CustomPageConfig config = this.getCustomPageConfig();
      Widget[] customShowlets = (null == config || config.getConfig() == null) ? null : config.getConfig();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);

      Widget showletToMove = showletsToRender[this.getStartFramePos()];
View Full Code Here

    return SUCCESS;
  }

  protected boolean executeResetFrame() throws ApsSystemException {
    try {
      IPage currentPage = this.getCurrentPage();
      WidgetUpdateInfoBean resetFrame =
        new WidgetUpdateInfoBean(this.getFrameToEmpty(), this.getShowletVoid(), IPageUserConfigManager.STATUS_OPEN);
      this.addUpdateInfoBean(resetFrame);
      this.executeUpdateUserConfig(currentPage);
    } catch (Throwable t) {
View Full Code Here

    try {
      Lang currentLanguage = this.getCurrentSessionLang();
      if (null == currentLanguage) {
        currentLanguage = this.getLangManager().getDefaultLang();
      }
      IPage currentPage = this.getCurrentPage();
      String pathDestFirst = this.getUrlManager().createUrl(currentPage, currentLanguage, null);
      pathDest = this.getResponse().encodeURL(pathDestFirst);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getDestForwardPath", "Error on extracting destination forward Path");
      throw new RuntimeException("Error on extracting destination forward Path", t);
View Full Code Here

    return this.executeResizeFrame(IPageUserConfigManager.STATUS_OPEN);
  }

  protected boolean executeResizeFrame(int status) {
    try {
      IPage currentPage = this.getCurrentPage();
      CustomPageConfig config = this.getCustomPageConfig();
      Widget[] customShowlets = (null == config || config.getConfig() == null) ? null : config.getConfig();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);
      Widget showlet = showletsToRender[this.getFrameToResize()];
      if (null == showlet) return true;
View Full Code Here

    try {
      //AGGIORNARE SE L'UTENTE CORRENTE è DIVERSO DA GUEST
      //public static final String SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG = "jpmyportalplus_currentCustomUserPageConfig";
      //AGGIORARE SEMPRE
      //public static final String SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG = "jpmyportalplus_currentCustomPageConfig";
      IPage currentPage = this.getCurrentPage();
      UserDetails currentUser = super.getCurrentUser();
      if (null == currentUser) {
        currentUser = this.getUserManager().getGuestUser();
        this.getRequest().getSession().setAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER, currentUser);
      }
      if (!currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
        CustomPageConfig customUserPageConfig = null;
        PageUserConfigBean pageUserConfigBean =
          (PageUserConfigBean) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG);
        if (null == pageUserConfigBean) {
          ApsSystemUtils.getLogger().info("No Page User Config by user " + currentUser.getUsername());
          pageUserConfigBean = this.createNewPageUserConfig(infos, currentUser, currentPage);
          this.getRequest().getSession().setAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG, pageUserConfigBean);
          customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
        } else {
          customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
          if (null == customUserPageConfig) {
            customUserPageConfig = this.createNewPageConfig(infos, currentPage);
            pageUserConfigBean.getConfig().put(currentPage.getCode(), customUserPageConfig);
          } else {
            this.updatePageConfig(customUserPageConfig, infos);
          }
        }
        this.getRequest().getSession().setAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG, customUserPageConfig);
View Full Code Here

    }
    return customShowletStatus;
  }

  protected CustomPageConfig getCustomPageConfig() {
    IPage currentPage = this.getCurrentPage();
    CustomPageConfig config = (CustomPageConfig) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
    if (config != null && !config.getPageCode().equals(currentPage.getCode())) {
      ApsSystemUtils.getLogger().error("Current page '" + currentPage
          + "' not equals then pageCode of custom config param '" + config.getPageCode() + "'");
      return null;
    }
    return config;
View Full Code Here

    RequestContext reqCtx = (RequestContext) this.pageContext.getRequest().getAttribute(RequestContext.REQCTX);
    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);
View Full Code Here

  @Override
  public int doStartTag() throws JspException {
    ServletRequest request =  this.pageContext.getRequest();
    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()))) {
View Full Code Here

TOP

Related Classes of com.agiletec.aps.system.services.page.IPage

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.