gpt4 book ai didi

org.hippoecm.frontend.plugins.yui.layout.YuiId.getElementId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 03:41:31 25 4
gpt4 key购买 nike

本文整理了Java中org.hippoecm.frontend.plugins.yui.layout.YuiId.getElementId()方法的一些代码示例,展示了YuiId.getElementId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YuiId.getElementId()方法的具体详情如下:
包路径:org.hippoecm.frontend.plugins.yui.layout.YuiId
类名称:YuiId
方法名:getElementId

YuiId.getElementId介绍

暂无

代码示例

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

public Object processObjectValue(String key, Object value, JsonConfig jsonConfig) {
  YuiId id = (YuiId) value;
  String elid = id.getElementId();
  if (elid != null && !"".equals(elid)) {
    return elid;
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

public Object processObjectValue(String key, Object value, JsonConfig jsonConfig) {
  YuiId id = (YuiId) value;
  String elid = id.getElementId();
  if (elid != null && !"".equals(elid)) {
    return elid;
  }
  return null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

@Override
public String getId() {
  return settings.getRootId().getElementId();
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
public String getId() {
  return settings.getRootId().getElementId();
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
public String getId() {
  return settings.getRootId().getElementId();
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

@Override
public String getId() {
  return settings.getRootId().getElementId();
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
public void resize(AjaxRequestTarget target) {
  if (rendered) {
    target.appendJavaScript(
        "YAHOO.hippo.LayoutManager.getWireframe('" + settings.getRootId().getElementId() + "').resize()");
  }
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

public boolean toggle(String position, AjaxRequestTarget target) {
  UnitSettings unitSettings = settings.getUnit(position);
  if (unitSettings == null) {
    throw new IllegalArgumentException(
        "No unit with position " + position + " is defined in layout[" + settings.getRootId() + "], cannot expand/collapse.");
  }
  boolean expand = !unitSettings.isExpanded();
  String jsMethod = expand ? "YAHOO.hippo.LayoutManager.expandUnit" : "YAHOO.hippo.LayoutManager.collapseUnit";
  target.appendJavascript(
      jsMethod + "('" + this.settings.getRootId().getElementId() + "', '" + position + "');");
  unitSettings.setExpanded(expand);
  onToggle(expand, position);
  return expand;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-edit

@Override
public void render(PluginRequestTarget target) {
  super.render(target);
  boolean hasMessage = feedback.anyMessage();
  UnitSettings topSettings = wfSettings.getUnit("top");
  boolean updateTop = false;
  if (hasMessage && !feedbackShown) {
    topSettings.setHeight(Integer.valueOf(
        getPluginConfig().getAsInteger("feedback.height", 50) + Integer.parseInt(topHeight)).toString());
    feedbackShown = true;
    updateTop = true;
  } else if (!hasMessage && feedbackShown) {
    topSettings.setHeight(topHeight);
    feedbackShown = false;
    updateTop = true;
  }
  if (updateTop && isVisibleInHierarchy() && target != null) {
    String topId = topSettings.getId().getElementId();
    target.appendJavascript("YAHOO.hippo.LayoutManager.findLayoutUnit(YAHOO.util.Dom.get('" + topId
        + "')).set('height', " + topSettings.getHeight() + ");");
    target.addComponent(feedback);
  }
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

public boolean toggle(String position) {
  UnitSettings unitSettings = settings.getUnit(position);
  if (unitSettings == null) {
    throw new IllegalArgumentException(
        "No unit with position " + position + " is defined in layout[" + settings.getRootId() + "], cannot expand/collapse.");
  }
  boolean expand = !unitSettings.isExpanded();
  AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
  if (target != null) {
    String jsMethod = expand ? "YAHOO.hippo.LayoutManager.expandUnit" : "YAHOO.hippo.LayoutManager.collapseUnit";
    target.appendJavaScript(
        jsMethod + "('" + this.settings.getRootId().getElementId() + "', '" + position + "');");
  }
  unitSettings.setExpanded(expand);
  onToggle(expand, position);
  return expand;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

/**
 * If no unit has been expanded and a default expanded unit has been configured, it will be expanded.
 */
public void expandDefault() {
  final String defaultExpandedUnit = settings.getDefaultExpandedUnit();
  if (defaultExpandedUnit == null) {
    return;
  }
  final UnitSettings defaultExpandedUnitSettings = settings.getUnit(defaultExpandedUnit);
  if (defaultExpandedUnitSettings == null || !defaultExpandedUnitSettings.isExpandCollapseEnabled()) {
    return;
  }
  if (!settings.hasExpandedUnit()) {
    final AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
    if (target != null) {
      final String jsMethod = String.format("YAHOO.hippo.LayoutManager.expandUnit('%s', '%s');",
          settings.getRootId().getElementId(), defaultExpandedUnitSettings.getPosition());
      target.appendJavaScript(jsMethod);
    }
    defaultExpandedUnitSettings.setExpanded(true);
  }
  onExpandDefault();
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-yui

public void expandDefault() {
  String defaultExpandedUnit = settings.getDefaultExpandedUnit();
  if(defaultExpandedUnit != null) {
    UnitSettings defaultSettings = settings.getUnit(defaultExpandedUnit);
    if(defaultSettings == null) {
      return;
    }
    if (defaultSettings.isExpandCollapseEnabled()) {
      if(!settings.hasExpandedUnit()) {
        AjaxRequestTarget target = AjaxRequestTarget.get();
        if(target != null) {
          String jsMethod = "YAHOO.hippo.LayoutManager.expandUnit" + "('" + this.settings.getRootId().getElementId() + "', '" + defaultSettings.getPosition() + "');";
          target.appendJavascript(jsMethod);
        }
        defaultSettings.setExpanded(true);
      }
      onExpandDefault();
    }
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com