java - No getter method available for property for bean under name -
struts (1.38) noob, , i'm getting following error: no getter method available property hs.hasrelationshiptoteam bean under name hsform. told create geths , seths method in hsdivform, problem? or how do then?
my bean:
public class hs extends entry implements serializable,cloneable { private boolean hasrelationshiptoteam = false; public boolean ishasrelationshiptoteam() { return hasrelationshiptoteam; } public void sethasrelationshiptoteam(boolean hasrelationshiptoteam) { this.hasrelationshiptoteam = hasrelationshiptoteam; } } my form:
import my.bean.hs; public class hsform extends actionform { private hs hs = new hs(); public hsform() { super(); } } my jsp:
<html:form styleid="hsdivform" action="/disclosure/hsaction" > <table> <tr id = "q-rel"> <td colspan="2" align="center"> <br /> there team relationship? <br /> yes<html:radio property="hs.hasrelationshiptoteam" value="yes" /> no<html:radio property="hs.hasrelationshiptoteam" value="no" /> </td> </tr> </table> </html>
that's because of type in attribute:
private boolean hasrelationshiptoteam = false; when declaring attribute boolean, introspector doesn't see primitive boolean expects getxxx , setxxx.
if attribute boolean primitive type, introspector expects either isxxx or getxxx, bundled setxxx method.
getxxx , isxxx getter methods, while setxxx setter method.
i hope helps.
Comments
Post a Comment