NameBean.java 文件源码

java
阅读 13 收藏 0 点赞 0 评论 0

项目:portals-pluto 作者:
/**
 * writes the action form as string. This method is placed within the bean 
 * to allow easier access to form state data, which might be part of the bean
 * state, but not part of the bean public API.  
 * 
 * @return the action form as string
 */
@RenderMethod(portletNames = {"BeanPortlet"}, ordinal=200)
public String getActionForm() {
   StringBuilder txt = new StringBuilder(128);

   PortletURL aurl = mimeresp.createActionURL(Copy.ALL);
   txt.append("<FORM id='").append(pid).append("-setParams' METHOD='POST' ACTION='").append(aurl);
   txt.append("' enctype='application/x-www-form-urlencoded' accept-charset='UTF-8'>");
   txt.append("   <table><tr><td align='left'>");
   txt.append("   Enter your name:");
   txt.append("   </td><td>");
   txt.append("   <input name='").append(PARAM_NAME);
   txt.append("' type='text' value='").append((name == null) ? "" : name);
   txt.append("' size='50' maxlength='50'>");
   txt.append("   <input type='hidden' name='").append(ActionRequest.ACTION_NAME);
   txt.append("' value='setName'>");
   txt.append("   </td></tr><tr><td>");
   txt.append("   <INPUT VALUE='send' TYPE='submit'>");
   txt.append("   </td></tr></table>");
   txt.append("</FORM>");

   return txt.toString();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号