You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Randy Shelley <rs...@asgnet.psc.sc.edu> on 2001/11/16 01:02:50 UTC

Some how a getter of my db_object cannot be found

*** I have a action with following code ************
...
DBGbulletin_entry dbgbulletinentry = new BGbulletin_entry();
dbgbulletinentry.load(conn,"date_expired IS NULL");
Vector bulletin = dbgbulletinentry.vector();

HttpSession session = request.getSession();
request.setAttribute("bulletin", bulletin);
....


*****and the object DBGbulletin_entry contains a getter method****
...
public java.math.BigDecimal getKey_id()
{
return((java.math.BigDecimal)getColumnValue("KEY_ID"));
}
...

**********and a jsp with the following*************
....
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri='/WEB-INF/datetime.tld' prefix='dt' %>

<logic:iterate name="bulletin" id="element" scope="request" >
 <bean:write name="element" property="key_id"/>
</logic:iterate>
...
******************************************************

Here is my problem, I am getting the following error when running this jsp:

  javax.servlet.ServletException:
     No getter method for property key_id of bean element
....

when I change the object DBGbulletin_entry to the following, it Works!
...
public String getKey_id()
{
return(((java.math.BigDecimal)getColumnValue("KEY_ID")).toString());
}
...
Why?????????
It should not matter what my return type is as long as it has a toString()
method.
This does not make any sense to me! Is there a bug I am not aware of. I have
tried
searching the group to no avail,

Any help would be appreciated.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>