You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eldred Mullany <el...@easypay.co.za> on 2010/01/11 12:10:11 UTC
Filter grid component using a textfield and listener method
Hi,
I would like to filter a grid component by typing in a string into a
text field that has listener method that filters the results dynamically
without any method calls to the database. Even with a search
functionality, my result set returned from the search will still be very
big. So by allowing the user to type in the specific value,that would
filter the list more effectively.
Is this possible in T5.0.1.5?
Thanking you in advance.
Eldred
Re: Filter grid component using a textfield and listener method
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 11 Jan 2010 09:10:11 -0200, Eldred Mullany
<el...@easypay.co.za> escreveu:
> Hi,
Hi!
> I would like to filter a grid component by typing in a string into a
> text field that has listener method that filters the results dynamically
> without any method calls to the database.
Tapestry does not support this out of the box yet. One suggestion: put
your Grid inside a Zone. Use a Form to update this zone automatically.
Then use a little bit of JavaScript to submit the form when the text field
is updated. Some not tested code:
<form t:type="Form" t:zone="zone">
<input t:type="TextField" t:id="search" id="search">
<input type="submit" id="submitForm"/>
<script type="text/javascript">
Event.observe('search', 'keyup', function() {
$('submitForm').click();
});
</script>
</form>
<div t:type="Zone" t:id="zone">
<table t:type="Grid" ...>
</table>
</div>
> Even with a search
> functionality, my result set returned from the search will still be very
> big.
Take a look at GridDataSource to allow efficient searches.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org