You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/01/25 20:36:27 UTC

displaytag

Sorry, guys for posting display tag issue here. Had to do this as I was not 
getting any response from it's user forum today atleast.


Have an object Account. Which is having attributes accountNum, 
accountType....etc.


In PrepareSummaryAction
ArrayList accounts = new ArrayList();

Account account1 = new Account();
acocunt1.setAccountNum("123");
account1.setAccountType("checking");

......

accounts.add(account1);
accounts.ad(account2);

request.set("accountsList", accounts);

In JSP
<display:table name="accountsList" requestURI="PrepareSummaryAction.do">
     <display:caption class="bold_1"><br><bean:message 
key="lbl.summary"/></display:caption>
     <display:column property="accountNum" titleKey="lbl.accountnumber" />
     <display:column property="accountType" titleKey="lbl.acocunttype"/>
               ...........................
</display:table>

When I debug I can see that the all 5 rows are created.

Then, when after the 5th row is done when trying to execute the 
</display:table> line getting an exception.

Error looking up property "accountNum" in object type "com.Account". Cause: 
Unknown property 'accountNum'

Not sure what the issue is here.

Thanks.

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: displaytag

Posted by fea jabi <zy...@hotmail.com>.
thanks. that worked.


>From: gramani@intellicare.com
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Subject: Re: displaytag
>Date: Wed, 25 Jan 2006 14:51:31 -0500
>
>"fea jabi" <zy...@hotmail.com> wrote on 01/25/2006 02:47:03 PM:
>
> > yes, I do.
> >
> >     private String accountNum;
> >
> >     public void setAccountNumber(String accountNum) {
> >         this.accountNum = accountNum;
> >     }
> >
> >     public String getAccountNumber() {
> >         return accountNum;
> >     }
> >
>
>Here's your problem: the correct getter is "getAccountNum()" not
>"getAccountNumber()".. :)
>Geeta

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: displaytag

Posted by gr...@intellicare.com.
"fea jabi" <zy...@hotmail.com> wrote on 01/25/2006 02:47:03 PM:

> yes, I do.
> 
>     private String accountNum;
> 
>     public void setAccountNumber(String accountNum) {
>         this.accountNum = accountNum;
>     }
> 
>     public String getAccountNumber() {
>         return accountNum;
>     }
> 

Here's your problem: the correct getter is "getAccountNum()" not 
"getAccountNumber()".. :)
Geeta

Re: displaytag

Posted by fea jabi <zy...@hotmail.com>.
yes, I do.

    private String accountNum;

    public void setAccountNumber(String accountNum) {
        this.accountNum = accountNum;
    }

    public String getAccountNumber() {
        return accountNum;
    }

>From: gramani@intellicare.com
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Subject: Re: displaytag
>Date: Wed, 25 Jan 2006 14:41:26 -0500
>
>"fea jabi" <zy...@hotmail.com> wrote on 01/25/2006 02:36:27 PM:
>
> > Sorry, guys for posting display tag issue here. Had to do this as I was
>not
> > getting any response from it's user forum today atleast.
> >
> >
> > Have an object Account. Which is having attributes accountNum,
> > accountType....etc.
> >
>
> > Then, when after the 5th row is done when trying to execute the
> > </display:table> line getting an exception.
> >
> > Error looking up property "accountNum" in object type "com.Account".
>Cause:
> > Unknown property 'accountNum'
> >
>
>Do you have a getter for accountNum in Account?
>
> > Not sure what the issue is here.
> >
> > Thanks.
>
>Geeta

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: displaytag

Posted by gr...@intellicare.com.
"fea jabi" <zy...@hotmail.com> wrote on 01/25/2006 02:36:27 PM:

> Sorry, guys for posting display tag issue here. Had to do this as I was 
not 
> getting any response from it's user forum today atleast.
> 
> 
> Have an object Account. Which is having attributes accountNum, 
> accountType....etc.
> 

> Then, when after the 5th row is done when trying to execute the 
> </display:table> line getting an exception.
> 
> Error looking up property "accountNum" in object type "com.Account". 
Cause: 
> Unknown property 'accountNum'
> 

Do you have a getter for accountNum in Account?

> Not sure what the issue is here.
> 
> Thanks.

Geeta