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

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


    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;
      WidgetUpdateInfoBean resizingFrame =
        new WidgetUpdateInfoBean(this.getFrameToResize(), showlet, status);
      this.addUpdateInfoBean(resizingFrame);
      this.executeUpdateUserConfig(currentPage);
View Full Code Here


    return codes;
  }

  protected void addNewWidgetUpdateInfo(List<String> showletsToAdd, int framePos, boolean frameToFlow) {
    WidgetUpdateInfoBean infoBean = null;
    Widget showletToInsert = null;
    String typeCode = showletsToAdd.get(0);
    WidgetType type = this.getWidgetTypeManager().getWidgetType(typeCode);
    if (null != type) {
      showletsToAdd.remove(typeCode);
      showletToInsert = new Widget();
      showletToInsert.setType(type);
    }
    if (null != showletToInsert) {
      infoBean = new WidgetUpdateInfoBean(framePos, showletToInsert, IPageUserConfigManager.STATUS_OPEN);
      this.addUpdateInfoBean(infoBean);
    } else if (frameToFlow) {
View Full Code Here

      throw new ApsSystemException("Error on updating session params", t);
    }
  }

  protected Widget getShowletVoid() {
    Widget voidShowlet = new Widget();
    voidShowlet.setType(this.getPageUserConfigManager().getVoidShowlet());
    voidShowlet.setConfig(new ApsProperties());
    return voidShowlet;
  }
View Full Code Here

      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)) {
            FrameSelectItem item = new FrameSelectItem(currentColumnId, columnId,
                showlet, i, currentLang);
            selectItems.add(item);
          }
        } else {
          if (showlet == null || showlet.getType().getCode().equals(voidShowletCode)) {
            boolean check = this.check(selectItems, columnId);
            if (!check) {
              FrameSelectItem item = new FrameSelectItem(currentColumnId, columnId,
                  null, i, currentLang);
              selectItems.add(item);
View Full Code Here

      }
      MyPortalConfig mPortalConfig = this.getMyPortalConfigManager().getConfig();
      customConfig = new CustomPageConfig(cookie, page, this.getWidgetTypeManager(),
          mPortalConfig.getAllowedShowlets(), this.getVoidShowletCode());
      for (int i = 0; i < customConfig.getConfig().length; i++) {
        Widget showlet = customConfig.getConfig()[i];
        if (null != showlet) {
          if (null != showlet.getType()) {
            String mainGroup = showlet.getType().getMainGroup();
            if (null != mainGroup && !mainGroup.equals(Group.FREE_GROUP_NAME)) {
              customConfig.getConfig()[i] = null;
              customConfig.getStatus()[i] = null;
            }
          } else {
View Full Code Here

      }
      Frame[] frames = ((MyPortalPageModel) page.getModel()).getFrameConfigs();
      int widgetNumber = defaultWidgets.length;
      mergedWidgets = new Widget[widgetNumber];
      for (int scan = 0; scan < widgetNumber; scan++) {
        Widget customWidget = customShowlets[scan];
        if (null == customWidget || frames[scan].isLocked()) {
          mergedWidgets[scan] = defaultWidgets[scan];
        } else {
          mergedWidgets[scan] = customWidget;
        }
View Full Code Here

        this.addFieldError("contentType", this.getText("INVALID_CONTENT_TYPE", new String[]{this.getContentType()}));
      }
    }
    if (this.getActionErrors().size()>0 || this.getFieldErrors().size()>0) {
      try {
        Widget widget = super.createNewShowlet();
        this.setShowlet(widget);
      } catch (Throwable t) {
        throw new RuntimeException(t);
      }
    }
View Full Code Here

    return attributesForSelect;
  }

  public String configContentType() {
    try {
      Widget widget = super.createNewShowlet();
      widget.getConfig().setProperty("typeCode", this.getContentType());
      this.setShowlet(widget);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "init");
      return FAILURE;
    }
View Full Code Here

    return SUCCESS;
  }

  public String changeContentType() {
    try {
      Widget widget = super.createNewShowlet();
      this.setShowlet(widget);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "changeContentType");
      return FAILURE;
    }
View Full Code Here

TOP

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

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.