org.fujion.component.Window.hasAttribute()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(84)

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

Window.hasAttribute介绍

暂无

代码示例

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-plugin-scenario

/**
 * Display view resources dialog.
 *
 * @param scenario Scenario whose resources are to be viewed.
 * @param callback Callback upon dialog closure.
 */
public static void show(Scenario scenario, IResponseCallback<Boolean> callback) {
  Map<String, Object> args = new HashMap<>();
  args.put("scenario", scenario);
  Window dlg = (Window) PageUtil.createPage("web/org/hspconsortium/cwf/ui/scenario/viewResources.fsp", null, args)
      .get(0);
  dlg.modal((event) -> {
    if (callback != null) {
      callback.onComplete(dlg.hasAttribute("modified"));
    }
  });
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

@Override
public void afterInitialized(BaseComponent comp) {
  this.root = (Window) comp;
  root.setAttribute("controller", this);
  control = (DialogControl<?>) root.getAttribute("control");
  root.setTitle(control.getTitle());
  icon.addClass(control.getIconClass());
  message.addClass(control.getTextClass());
  message.setLabel(control.getMessage());
  root.addClass(control.getPanelClass());
  chkRemember.setVisible(root.hasAttribute("remember"));
  root.setOnCanClose(() -> {
    control.callback(response);
    return true;
  });
  
  if (control.getFormat() == ChoiceFormat.BUTTONS) {
    processButtonResponses();
  } else {
    processListResponses();
  }
}

相关文章