Gary,

No, I understood what you meant.  I really do think that that is out of the
scope.  The main point of display tag is to take the contents of a list and
display it and provide a high degree of flexibility and configurability in
that display.  As soon as you start to add manipulation of the data onto
that task, the other functionality is going to suffer.  Especially as soon
as you start to talk about using Ajax to handle the updates!  A nice
technology, but still a nightmare to work with, IMO...

Also, it's really a violation of the model and view separation paradigm.
The display (ANY display, not just display tag) really shouldn't be in the
business of manipulating and selecting data.  That's a metaphysical question
of course (is filtering "manipulating"?  I'd say yes, you might say no :^).

But fear not, there's a simple way to deal with your issue.  Add a text box
at the top of your table (you can even put it in the displaytag.properties
resources so that it'll always appear in the table header).  Add something
to your controllers to handle submitted filter requests.  We have this sort
of thing all over our code.  Basically we have drop-down lists that let you
view items by date submitted, type of product, etc. (we don't have a text
box that allows free entry, but at the controller level, there's really no
difference).  To preserve sorting and ordering params from displaytag, we
recycle the parameters using a function on the controller that cooks up the
action url for the filter handler.  Then when we redirect back to the actual
display page, those all get stuck on the end of the URL along with the new
filter criteria.

In the end, I think it's much better to handle the filtering yourself
anyways.  We usually just let the database handle it by specifying a WHERE
clause.  Yeah, we could do the filtering ourselves, but that's what the
database is for.  In other cases where the work of doing a query would
outweigh doing the filtering ourselves, we just do it ourselves, but it's
pretty straightforward (regex matching, criteria ranges, etc.).

Rick Herrick
[EMAIL PROTECTED]


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:displaytag-user-
> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, February 16, 2006 11:46 AM
> To: [email protected]
> Subject: RE: [displaytag-user] Filters/searches on columns
> 
> Rick,
> 
> I don't believe I have explained it correctly.
> 
> What we use at the moment is the eXtreme Table at
> http://extremecomponents.org/extremesite/welcome.jsp
> 
> If you notice at the top of the columns, they have a text box where the
> user can enter data and filter / search a column for data.
> This lets the user drill down quickly to the item the need.
> 
> We started out with the display tag and believe that it has a better look
> and feel, but it did not do this filtering for us.
> 
> Maybe you are right and this is out of the scope of the display tag.  I
> could see a way you might be able to edit the list behind the scenes
> (AJAX?) and
> wrap that around the display tag and make it appear like it is doing the
> filtering / searching.
> 
> 
> Gary Woodbridge
> Application Development Analyst - Consulting
> JPMorgan Chase Securities Safekeeping
> Phone    405-440-8674
> Fax         405-440-8676
> EMail     [EMAIL PROTECTED]
> 
> 
> |---------+------------------------------------------->
> |         |           "Rick Herrick"                  |
> |         |           <[EMAIL PROTECTED]>        |
> |         |           Sent by:                        |
> |         |           [EMAIL PROTECTED]|
> |         |           ceforge.net                     |
> |         |                                           |
> |         |                                           |
> |         |           02/16/2006 12:19 PM             |
> |         |           Please respond to               |
> |         |           displaytag-user                 |
> |---------+------------------------------------------->
>   >-----------------------------------------------------------------------
> -------------------------------------------------------|
>   |
> |
>   |       To:       <[email protected]>
> |
>   |       cc:
> |
>   |       Subject:  RE: [displaytag-user] Filters/searches on columns
> |
>   >-----------------------------------------------------------------------
> -------------------------------------------------------|
> 
> 
> 
> 
> That's really outside the scope of display tag.  It'll handle whatever you
> put in the list, so you should filter the list going into the display tag.
> Display tag is for DISPLAYING (thus the name :^).  How you handle data
> sets
> should dealt with elsewhere.
> 
> So... not being on the project team, I really shouldn't speak for them,
> but
> I can say with about 99% certainty that there are no plans to add this in
> the future.
> 
> Rick Herrick
> [EMAIL PROTECTED]
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> [mailto:displaytag-user-
> > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> > Sent: Thursday, February 16, 2006 10:03 AM
> > To: [email protected]
> > Subject: [displaytag-user] Filters/searches on columns
> >
> > With display tag, can you filter a column?
> >
> > We moved away from display tag because we could not find a way for the
> > user
> > to enter some search criteria into a field and limit what they see in
> the
> > table.
> >
> > But, beside that, we would want to use displaytag.
> >
> > Any plans to add this in the future?
> >
> > Thanks,
> > Gary Woodbridge
> > Application Development Analyst - Consulting
> > JPMorgan Chase Securities Safekeeping
> > Phone    405-440-8674
> > Fax         405-440-8676
> > EMail     [EMAIL PROTECTED]
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> > _______________________________________________
> > displaytag-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to