🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ibm.software.vajava.beans
Article #22

Re: Customize bean extending Commerce Bean

#22
From: Anthony Pomtree
Date: Wed, 24 Apr 2002 21:02
74 lines
3898 bytes
In my JSP (for category display) I have the following:

<jsp:useBean id="category"
class="com.ibm.commerce.catalog.beans.CategoryDataBean" scope="page">
<%
category.setCategoryId(categoryId);
category.setCatalogId(catalogId);
com.ibm.commerce.beans.DataBeanManager.activate(category, request);
%>
</jsp:useBean>

CategoryDataBean subcats[], cat;
subcats = category.getSubCategories();

<%
for (int i = 0; i < subcats.length; ++i)
{
      cat = subcats[i];
      if (cat.getDescription().getPublished().equals("1"))
      {
%>
<tr><td><div align="right"><font face="Arial" size="-2" class="linkstyle">
<a href="blah.html"
class="linkstyle"><%=cat.getDescription().getName()%></a></font></div>
</td></tr>
<%
    }
}
%>

----------------------------------------------------------------------------
-------------------

I need to be able to sort these by their sequence number, but from what I
can
see the sequence number is not something that can be gotten through any
getter.
So my thinking was I need to create a customized bean that extended
CategoryDataBean... or something along those lines.  Am I just thinking
wrong
or is there another way to handle this?

Thanks.

"Thomas Tolborg" <news@tolborg.dk> wrote in message
news:aa7065$19ns$1@news.boulder.ibm.com...
> "Anthony Pomtree" <apomtree@yahoo.com> wrote in message
> news:aa6oeu$165a$1@news.boulder.ibm.com...
> > Trying to set up shopping page that pulls back list of categories from
> > DB2 table.  Process works fine, but I need to customize and add a
> > field (sequence number) so I can have the categories sorted based
> > on a sequence number on the table.  I assume I need to create my
> > own custom bean that extends a current data bean in order to be able
> > to sort on the sequence number.  If this is correct, could someone
> > please give a little (actually a lot) of insight on this... if this is
not
> > the
> > case, could you please set me straight.
> >
> > Thanks.
> >
> > p.s.  Examples would be most appreciative.
> >
>
> What is it exactly that you want to do. There is already a sequence column
> on the relationtables (CATGRPREL, CATTOGRP, CATGPENREL).
>
> Remember that if you uses the sequence column, then you are forced to sort
> the categories the same way in every language, which might not be a good
> idea.
>
> /Thomas Tolborg
>
>
Technical Details
Message-ID: <aa766v$1484$1@news.boulder.ibm.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!news.software.ibm.com!not-for-mail
References: <aa6oeu$165a$1@news.boulder.ibm.com> <aa7065$19ns$1@news.boulder.ibm.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f4581,8a31c3a56595988c
X-Google-Attributes: gidf4581,public
X-Google-Thread: 109b1c,8a31c3a56595988c
X-Google-Attributes: gid109b1c,public
X-Google-Thread: 110ea8,8a31c3a56595988c
X-Google-Attributes: gid110ea8,public
X-Google-Thread: 109e56,8a31c3a56595988c
X-Google-Attributes: gid109e56,public
X-Google-ArrivalTime: 2002-04-24 14:14:33 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!195.40.4.120.MISMATCH!easynet-quince!easynet.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!news.software.ibm.com!not-for-mail
From: "Anthony Pomtree" <apomtree@yahoo.com>
Newsgroups: ibm.software.vajava.beans,ibm.software.vajava.enterprise,ibm.software.vajava.enterprise.wte,ibm.software.websphere.commerce-suite
Subject: Re: Customize bean extending Commerce Bean
Date: Wed, 24 Apr 2002 16:02:49 -0500
Organization: IBM News Server
Lines: 76
Message-ID: <aa766v$1484$1@news.boulder.ibm.com>
References: <aa6oeu$165a$1@news.boulder.ibm.com> <aa7065$19ns$1@news.boulder.ibm.com>
NNTP-Posting-Host: ddsg.dillards.com
X-Trace: news.boulder.ibm.com 1019681823 37124 12.30.184.75 (24 Apr 2002 20:57:03 GMT)
X-Complaints-To: mattgar@us.ibm.com, tlew@us.ibm.com
NNTP-Posting-Date: 24 Apr 2002 20:57:03 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000