Mind Bridge-

I'm a relative newbie to Tapestry.
I'm not sure how to access the table object, which is now I believe setup
using jwc files.  

I want to access this table object within our base report class.
There is an authentication java class that is called when the sorting link
is clicked.

There I have access to the RequestCycle object.
I'm not sure what to do from there.

Any help would be greatly appreciated.

Dan

-----Original Message-----
From: Mind Bridge [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 08, 2005 2:20 PM
To: Danielcummings
Subject: Re: Need Sorting Link to refetch the data

Yes: getState().getSortingState(). From there you can do getSortColumn() and
getSortOrder().


----- Original Message ----- 
From: "Danielcummings" <[EMAIL PROTECTED]>
To: "Mind Bridge" <[EMAIL PROTECTED]>
Sent: Saturday, July 09, 2005 1:09 AM
Subject: Re: Need Sorting Link to refetch the data


> Thanks.
>
> That is very helpful.
>
> I'm curious.
>
> In the DAO using the simpletablemodel, is it possible to get at the
current sort order?
>
> TIA
>
> Dan
>
> -----Original message-----
> From: "Mind Bridge" [EMAIL PROTECTED]
> Date: Fri,  8 Jul 2005 13:58:25 -0700
> To: "Tapestry users" [email protected]
> Subject: Re: Need Sorting Link to refetch the data
>
> > Hi,
> >
> > I would suggest to pass the data using the 'source' and 'columns'
> > parameters, rather than using 'model'.
> >
> > This helps in two ways:
> >
> > - 'source' is evaluated at every request, so there is no stale data to
be
> > displayed -- the data is consistently refetched.
> >
> > - 'source' normally accepts a list of data, but it can also accept an
object
> > implementing the IBasicTableModel interface. That interface tells you
the
> > currently selected page and the current sorting, and hence it allows you
to
> > have the database perform the paging and sorting e.g. using the  ORDER
BY,
> > LIMIT, and OFFSET clauses in SQL. In this way you return only the items
that
> > are to be displayed by the table.
> >
> >
> > Please tell me if this approach does not do what you want. You may still
use
> > the SimpleTableModel method, but in your case that would require you to
use
> > the  'tableSessionStateManager' parameter and doing that might require a
bit
> > more time if you do not have a flying start...
> >
> > Also, if this is helpful, here is the link to the Table reference:
> >
http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/contrib.Tabl
e.html
> >
> > Best regards,
> > -mb
> >
> > ----- Original Message ----- 
> > From: "Danielcummings" <[EMAIL PROTECTED]>
> > To: "Tapestry development" <[email protected]>
> > Sent: Saturday, July 09, 2005 12:03 AM
> > Subject: Re: Need Sorting Link to refetch the data
> >
> >
> > > Jamie-
> > >
> > > Thanks for responding so quickly.
> > > Right now, we don't have time to implement a custom model.
> > >
> > > We're using the SimpleTableModel.
> > >
> > > Is there a quick and dirty way to cause the sort link to re-fetch the
> > data?
> > >
> > > TIA
> > >
> > > Dan
> > >
> > >
> > > -----Original message-----
> > > From: Jamie Orchard-Hays [EMAIL PROTECTED]
> > > Date: Fri,  8 Jul 2005 12:19:23 -0700
> > > To: "Tapestry development" [email protected]
> > > Subject: Re: Need Sorting Link to refetch the data
> > >
> > > > You'll probably need a custom table model. Have a look at
> > > > SimpleTableModel and SqlTableModel for some ideas.
> > > >
> > > > Jamie
> > > > On Jul 8, 2005, at 4:09 PM, Danielcummings wrote:
> > > >
> > > > > We're only bringing 200 rows at a time to improve peroformance.
> > > > > But the sorting won't be correct because it only sorts the cached
> > > > > data.
> > > > >
> > > > > We need to refetch the data each time the user clicks the sort
link.
> > > > >
> > > > > Is there an easy way to do this?
> > > > >
> > > > > TIA
> > > > >
> > > > > Dan
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to