gpt4 book ai didi

com.github.bordertech.wcomponents.WebUtilities.updateBeanValue()方法的使用及代码示例

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

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

WebUtilities.updateBeanValue介绍

[英]Updates the bean value with the current value of the component and all its bean-bound children. By default this method will only process visible components.
[中]使用组件及其所有绑定到bean的子组件的当前值更新bean值。默认情况下,此方法仅处理可见组件。

代码示例

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

/**
 * Updates the bean value with the current value of the component and all its bean-bound children. By default this
 * method will only process visible components.
 *
 * @param component the component whose contents need to be copied to the bean.
 */
public static void updateBeanValue(final WComponent component) {
  updateBeanValue(component, true);
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-examples

@Override
  public void execute(final ActionEvent event) {
    WebUtilities.updateBeanValue(layout);
  }
});

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

@Override
  public void execute(final ActionEvent event) {
    WebUtilities.updateBeanValue(beanContainer);
  }
});

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

@Override
  public void execute(final ActionEvent event) {
    WebUtilities.updateBeanValue(beanContainer);
  }
});

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-examples

@Override
  public void executeOnValid(final ActionEvent event) {
    WebUtilities.updateBeanValue(layout);
    messages.success("OK");
  }
});

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

/**
 * Override updateBeanValue to update the bean value for all WBeanComponents Updates the bean value with the value
 * returned by {@link #getData()}.
 */
@Override
public void updateBeanValue() {
  List<?> beanList = this.getBeanList();
  WComponent renderer = getRepeatedComponent();
  for (int i = 0; i < beanList.size(); i++) {
    Object rowData = beanList.get(i);
    UIContext rowContext = getRowContext(rowData, i);
    UIContextHolder.pushContext(rowContext);
    try {
      WebUtilities.updateBeanValue(renderer);
    } finally {
      UIContextHolder.popContext();
    }
  }
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

/**
 * Update the expandable row renderer.
 *
 * @param rowRenderer the table row renderer
 * @param rowContext the row context
 * @param expandRenderer the renderer for the expandable row.
 */
private void updateBeanValueForRowRenderer(final WTableRowRenderer rowRenderer,
    final UIContext rowContext,
    final Class<? extends WComponent> expandRenderer) {
  Container expandWrapper = (Container) rowRenderer.
      getExpandedTreeNodeRenderer(expandRenderer);
  if (expandWrapper == null) {
    return;
  }
  // The actual component is wrapped in a renderer wrapper, so we have to fetch it from that
  WComponent expandInstance = expandWrapper.getChildAt(0);
  UIContextHolder.pushContext(rowContext);
  try {
    // Will apply updates to the "bean" returned by the model for this expanded renderer (ie
    // getValueAt(rowIndex, -1))
    WebUtilities.updateBeanValue(expandInstance);
  } finally {
    UIContextHolder.popContext();
  }
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

/**
 * Updates the bean value with the current value of the component and all its bean-bound children.
 *
 * @param component the component whose contents need to be copied to the bean.
 * @param visibleOnly - whether to include visible components only.
 */
public static void updateBeanValue(final WComponent component, final boolean visibleOnly) {
  // Do not process if component is invisble and ignore visible is true. Will ignore entire branch from this point.
  if (!component.isVisible() && visibleOnly) {
    return;
  }
  if (component instanceof WBeanComponent) {
    ((WBeanComponent) component).updateBeanValue();
  }
  // These components recursively update bean values themselves,
  // as they have special requirements due to repeating data.
  if (component instanceof WDataTable || component instanceof WTable || component instanceof WRepeater) {
    return;
  }
  if (component instanceof Container) {
    for (int i = ((Container) component).getChildCount() - 1; i >= 0; i--) {
      updateBeanValue(((Container) component).getChildAt(i), visibleOnly);
    }
  }
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

WebUtilities.updateBeanValue(renderer);
} else if (renderer instanceof DataBound) { // Update Databound renderer
  Object oldValue = model.getValueAt(rowIndex, col);

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