The default binding for rowsPerPage is to a static default .... 20.
Unless you bind rowsPerPage to a property, it stays bound to the default.
Most non-property bindings are readonly.
Chainging rowsPerPage means writing a value through the binding ...
here changing the field attempts to up∂ate the binding, which doesn't
support it.
On 6/21/07, Martin Dietze <[EMAIL PROTECTED]> wrote:
Hi,
consider the following code:
[ in the template ]
| <table t:type="grid"
| t:id="EntryGrid"
| row="entry"
| source="entries"
| model="entriesRowModel">
[ in the page class ]
| @Component(id = "EntryGrid")
| private Grid _grid;
[...]
| private int _rowsPerPage;
[...]
| public void onSuccessFromGridForm() {
| _rowsPerPage = getNewRowsPerPage();
| _grid.setRowsPerPage(_rowsPerPage);
| }
Whenever I call `_grid.setRowsPerPage()' I get the following
exception:
| org.apache.tapestry.ioc.internal.util.TapestryException
| Failure writing parameter rowsPerPage of component MyForm:entrygrid: Binding
| [EMAIL PROTECTED] is read-only.
| Stack trace
| *
org.apache.tapestry.internal.bindings.AbstractBinding.set(AbstractBinding.java:46)
| *
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.writeParameter(InternalComponentResourcesImpl.java:235)
| *
org.apache.tapestry.corelib.components.Grid._$update_parameter_rowsPerPage(Grid.java)
| * org.apache.tapestry.corelib.components.Grid.setRowsPerPage(Grid.java:268)
What am I doing wrong?
Cheers,
Martin
--
----------- / http://herbert.the-little-red-haired-girl.org / -------------
=+=
Interested in sophisticated fun? You, hubby, girl friends. The more the
merrier. Get in touch with Kirby, through WASTE only, Box 7391, L.A.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]