Em Mon, 11 Jan 2010 09:10:11 -0200, Eldred Mullany <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to