You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Justus <cj...@alceatech.com> on 2003/06/13 16:01:14 UTC
Table problem...
Hello,
I've got a webapp with a form, a search button, and a table that gets
populated with the results of a search...
The problem I've got is that the table is not displaying the most recent
results, but from the query before that...
Ie.
1) Initially table is blank...
2) User enters criteria, presses search...
3) Page redisplayed, table is still blank [Expecting 3 rows here...]
4) User enters other criteria presses search...
5) Page redisplayed, table shows 3 rows [Expecting 2 rows here...]
... [The pattern would continue] ...
When I set some breakpoints, during item (2), tapestry does a rewind,
calling my getTableModel() method... The search executes, by internal
Vector (siteList) gets populated, but tapestry never requests my
tableModel again (my table model gets rebuilt when the siteList is
populated...)
I'm using tapestry 2.3... I've had tables working in other areas of my
webapp, but wanted to try combining a couple of pages (search / result
display) on a single page...
Here's the table part of my .page file (taken largely from the tutorial...)
<component id="table" type="Contrib:Table">
<binding name="tableModel" expression="tableModel"/>
</component>
<component id="tableView" type="Contrib:TableView">
<binding name="tableModel" expression="tableModel"/>
<binding name="tableSessionStateManager"
expression="tableSessionStateManager"/>
</component>
<component id="checkbox" type="Checkbox">
<binding name="selected" expression="false"/>
</component>
<component id="tablePages" type="Contrib:TablePages"/>
<component id="tableColumns" type="Contrib:TableColumns"/>
<component id="tableRows" type="Contrib:TableRows">
<binding name="row" expression="site"/>
</component>
<component id="tableValues" type="Contrib:TableValues"/>
<component id="radioGroup" type="RadioGroup">
<binding name="selected" expression='selectedSite'/>
</component>
<component id="insertRadioButton" type="Radio">
<binding name="value" expression='site'/>
</component>
I've got the associated getters/setters... My problem is that my
tableModel gets recreated if the list that it is displaying is
updated... And tapestry is requesting the tableModel object before this
list has been updated... When I look at the call diagrams in chapter 4
of the Tapestry Developer's Guide, is would appear that the properties
should get set before the rendering occurs... (where I would expect it
to re-request the tableModel object...)
If someone could help me understand what I'm missing, I would appreciate
it...
Thanks!
Chris