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

📄 compositetest.java

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

import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;

public class CompositeTest
{
  public CompositeTest()
  {
  }

  public UIComponent getDateInput()
  {
    return _dateInput;
  }

  public void setDateInput(UIComponent dateInput)
  {
    _dateInput = dateInput;
  }

  private UIComponent _dateInput = new ForceRendererType();

  /**
   * Turns out there's no easy way to simply replace the renderer
   * for a control like UIInput;  UIComponentTag will call setRendererType()
   * after consulting the "binding" attribute, overriding anything
   * done in either the getter or setter.  So, here's a subclass
   * that forces the renderer type to a constant.  The alternative
   * is writing a custom JSP tag to do the same, but then you
   * have to re-invent the wheel as far as the input tag goes.
   */
  static public class ForceRendererType extends UIInput
  {
    public String getRendererType()
    {
      return "oracle.adfdemo.DateField";
    }
  }
}

⌨️ 快捷键说明

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