ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Maves" <nathan.ma...@gmail.com>
Subject Re: Dynamically set ORDER BY sort Column and its order
Date Wed, 30 Aug 2006 15:20:39 GMT
So is your issue resolved?


On 8/29/06, kiran.gutta@wipro.com <kiran.gutta@wipro.com> wrote:
>
>  Thanks for the reply.
> Ours is Web Application (using JSF). The data to be displayed can be huge
> (upto 20,000 records). So we have pagination to our data list and we are
> using PaginatedList of iBATIS and query data for each page.
>  When ever a column is sorted, we have to sort the entire data, not just
> the data displayed in the current page. So, we think it would be efficient
> and easy to implement if we use query to sort the data. As we use
> PaginatedList, we dont have entire data in view side to sort.
>
> Regards,
> Kiran
>
>
>  -----Original Message-----
> *From:* Nathan Maves [mailto:nathan.maves@gmail.com]
> *Sent:* Tuesday, August 29, 2006 9:11 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Dynamically set ORDER BY sort Column and its order
>
> This can easily be done in ibatis but I might suggest other ways of doing
> this.  In ibatis you could send the name of the column or even the number
> value in as a parameter.  Then just have a dynamic section on the end.
>
> ...
> ORDER BY $sortByColumn$
>
> Since your results will always be the same there is no need to remap the
> results.
>
> IMHO I would just use a sorting option on the view side.  This could be
> implementing sorting on a JTable for a swing view or using JavaScript to
> sort a table in html.  Both options allow for a faster UI with less DB
> queries.
>
> My 2 cents.
>
> Nathan
>
>
> On 8/29/06, kiran.gutta@wipro.com < kiran.gutta@wipro.com> wrote:
> >
> >  Hi,
> >
> > I have sortable columns in data list. When ever a column is sorted, I
> > need to redisplay the data list sorting the selected column (toggle it if
> > selected again).
> > I want to use one query by parameterizing the sorting column and its
> > order (Asc or Dsc).
> > Please help me how to do it in iBATIS. We are using 2.1.7.
> >
> > Regards,
> > Kiran
> >
> > The information contained in this electronic message and any attachments
> > to this message are intended for the exclusive use of the addressee(s) and
> > may contain proprietary, confidential or privileged information. If you are
> > not the intended recipient, you should not disseminate, distribute or copy
> > this e-mail. Please notify the sender immediately and destroy all copies of
> > this message and any attachments.
> >
> > WARNING: Computer viruses can be transmitted via email. The recipient
> > should check this email and any attachments for the presence of viruses. The
> > company accepts no liability for any damage caused by any virus transmitted
> > by this email.
> >
> > www.wipro.com
> >
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>

Mime
View raw message