日期:2014-05-18  浏览次数:20673 次

Struts中taglib标签的问题
关于 <html:hidden...> 标签中,有property和name   两个属性,两者有什么区别,分别用干什么?
英文太差,官方文档看不懂.
name:
The   attribute   name   of   the   bean   whose   properties   are   consulted   when   rendering   the   current   value   of   this   input   field.   If   not   specified,   the   bean   associated   with   the   form   tag   we   are   nested   within   is   utilized.

property:
Name   of   this   input   field,   and   the   name   of   the   corresponding   bean   property   if   value   is   not   specified.   The   corresponding   bean   property   (if   any)   must   be   of   type   String.

------解决方案--------------------
property是该控件在formbean中对应的get()/set()属性名称,
name是formbean的名称