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

📄 answervalidatortag.java

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

import javax.faces.webapp.ValidatorTag;
import javax.faces.validator.Validator;
import javax.servlet.jsp.JspException;

public class AnswerValidatorTag extends ValidatorTag
{

  private String _questionIndex = "";
  private final String ID = "survey answer validator";

  public AnswerValidatorTag()
  {
      super();
      super.setValidatorId(ID);
  }

  public void setQuestionIndex(String index)
  {
    _questionIndex = index;
  }

  public String getQuestionIndex()
  {
    return _questionIndex;
  }

  protected Validator createValidator() throws JspException {

      AnswerValidator validator = (AnswerValidator)super.createValidator();
      validator.setQuestionIndex(_questionIndex);

      //System.out.println("just instantiated " + validator + " with: " + validator.getQuestionIndex());
      return validator;

  }


} // end AnswerValidatorTag

⌨️ 快捷键说明

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