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

📄 formtest.java

📁 webwork source
💻 JAVA
字号:
/*
 * Skeleton
 *
 */
package skeleton.action;

import webwork.action.ActionSupport;
import webwork.action.CommandDriven;

/**
 * A sample action
 *
 * @author Matt Baldree (matt@smallleap.com)
 * @version $Revision: 1.1 $
 */
public class FormTest
   extends ActionSupport
   implements CommandDriven
{
   String user = "";
   String comments = "";

   // Public --------------------------------------------------------
   public void setUser(String user)
   {
      this.user = user;
   }

   public String getUser()
   {
      return user;
   }

   public void setComments(String comments)
   {
      this.comments = comments;
   }

   public String getComments()
   {
      return comments;
   }

   // Action implementation -----------------------------------------
   protected void doValidation()
   {
      if (user.equals(""))
         addError("user", "Missing name");
   }

   protected String doExecute()
      throws Exception
   {
      // Process data
      return SUCCESS;
   }
}

⌨️ 快捷键说明

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