Yes, pagination is required as well.  :)

On Mar 16, 12:23 pm, Walter Lee Davis <[email protected]> wrote:
> On Mar 16, 2011, at 3:02 PM, Tuishimi wrote:
>
>
>
>
>
> > I have a model that contains mostly ID values that link it to other
> > tables.  Users want to be able to view the "pretty" data, not IDs.
> > That is easy to do (in table-plus, view fields things like
> > "xyz.name").
>
> > But, they also want to search and sort on those "pretty values."  For
> > example.  FOO_ID points to table FOO, which has a field called BAR
> > that contains a nice long string.  My table plus field contains a
> > reference to "foo.bar" to pull that data into the table view.  Let's
> > say out of 1000 rows, 10 contain the string "squirrels eat nuts".  The
> > user wants to be able to type in "squirrels" in the search box and
> > find all rows with that value.  But what happens is the search fails
> > because there is no such field called foo.bar, it's a magical
> > reference that rails works hard to fill in for me during the process
> > of displaying the page.  The REAL value is FOO_ID which is some
> > numeric value.
>
> > What is the best way to approach this?  How do I even begin?  I also
> > need to sort on these same fields (and I want to sort by the text, not
> > the ID values).
>
> > Any thoughts, pointers on where to look for examples of this same
> > thing would be welcomed!
>
> Kind of a hack, but you might want to do this in the view, with  
> JavaScript. Are you paginating these results? That would be a non-
> starter then, but you can use Tablekit to sort by columns, and I have  
> a fast "live search" function I could point you to if you're  
> interested. It loops through a table or list and hides all the fields  
> that don't match the search input. Example 
> here:http://files.libertyfund.org/pll/pages/subjects.html
>
> Walter
>
>
>
>
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "Hobo Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected]
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/hobousers?hl=en
> > .- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to