⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 periodicdialogbean.java

📁 adf-faces 甲骨文的jsf组件,功能很强.开源免费.
💻 JAVA
字号:
package oracle.adfdemo.view.faces.dialog;

import java.util.Iterator;

import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;

import oracle.adf.view.faces.component.UIXTable;
import oracle.adf.view.faces.context.AdfFacesContext;

public class PeriodicDialogBean
{
  public UIXTable getTable()
  {
    return _table;
  }

  public void setTable(UIXTable table)
  {
    _table = table;
  }

  public String cancel()
  {
    AdfFacesContext.getCurrentInstance().returnFromDialog(null, null);
    return null;
  }

  public String select()
  {
    FacesContext context = FacesContext.getCurrentInstance();
    // The tableSelectOne is marked as required; so there'd better
    // be a selected row - an exception will result here if there
    // isn't.  Is there some better code?
    Iterator iterator = _table.getSelectionState().getKeySet().iterator();
    String rowKey = (String) iterator.next();
    Object oldRowKey = _table.getRowKey();
    _table.setRowKey(rowKey);
    ValueBinding binding = context.getApplication().
      createValueBinding("#{row.symbol}");
    Object value = binding.getValue(context);
    AdfFacesContext.getCurrentInstance().returnFromDialog(value, null);
    _table.setRowKey(oldRowKey);

    return null;
  }

  private UIXTable _table;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -