remove the "property" attribute from the <display:table> declaration:

<display:table width="75%" name="brokerList" property="list" scope="request" >

 

the "property" attribute can be used create an iteration on an object accessed using a javabean getter method. So in your example you are trying to iterate on request.getAttribute("brokerList").getList(), that's why you get the NoSuchMethodException

 

 

fabrizio 

-----Original Message-----
From: arlie m. panis [mailto:[EMAIL PROTECTED]
Sent: Tue 6/17/2003 10:01 AM
To: [EMAIL PROTECTED]
Cc:
Subject: [displaytag-user] Database

Sir,

 BrokerDTO broker = new BrokerDTO();

 ArrayList brokerList = new ArrayList();   

            .

.          

            ResultSet rs = cm.executeQuery("select * from PORTAL_BROKERS");

            if (rs != null){

                while ( rs.next()){

                    broker = new BrokerDTO();

                    broker.setBrokerID(rs.getInt("brokerID"));

                    broker.setFirstname(rs.getString("firstName"));

                    broker.setLastname(rs.getString("lastName"));

                    broker.setMiddleInitial(rs.getString("middleInitial"));

                    broker.setPhoneNum(rs.getString("phoneNum"));

                    broker.setFaxNum(rs.getString("faxNum"));

                    broker.setEmailAddress(rs.getString("emailAddress"));

                    brokerList.add(broker);             

                }

              }

            .

            .

            .

        req.setAttribute("brokerList", brokerList);

        return mapping.findForward("brokerCreated");

 

 

            Above is the code from the Action form. I want now to display “brokerList” using your display-tag, but I seem to have a problem.

 

<display:table width="75%" name="brokerList" property="list" scope="request" >

  <display:column property="firstname"/>

</display:table>

 

Above is the code from my JSP page.

 

            Below is the error I get:

            javax.servlet.ServletException: NoSuchMethodException trying to fetch property list on bean brokerList

 

            How do I properly do this?

 

            Thanks!

 

Arlie

Reply via email to