You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Didi Chow <d....@iliuk.com> on 2006/10/25 15:33:52 UTC

Paging with contrib.tableview

Hi everyone!

This may be a very simple issue, but since I'm new with Tapestry, I'm
kinda stuck at this point:

I'm displaying the results of a query with the tableview thingy. The
HTML-code looks like this:
<table jwcid="tableView" width="100%" class="formArea">
	<span jwcid="tableColumns"/>
	<span jwcid="tableRows">
		<span jwcid="tableValues@contrib:TableValues"/>
	</span>
	<tr>
		<td colspan="6" style="width:100%; text-align: center;">
			Resultpages: <span
jwcid="tablePages@contrib:TableFormPages"/>
		</td>   
	</tr>
</table>

The .page stuff looks this way:
<property-specification name="dataItems" type="java.util.Vector"
persistent="yes"/>
<component id="tableView" type="contrib:TableView">
	<binding name="source" expression="dataItems"/>
	<static-binding name="columns"
		value="Application_name, Ili_no, Description,
Ts_created, Cust_ref_no, User_name"/>
	<binding name="pageSize" expression="15"/>
	<static-binding  name="initialSortColumn" value="ILI_No"/>
</component>
        
<component id="tableColumns" type="contrib:TableColumns">
	<static-binding name="class" value="list_header2"/>
	<static-binding name="element" value="th"/>
</component>

<component id="tableRows" type="contrib:TableRows">
	<binding name="class"
expression="'list_row_'+beans.evenOdd.next"/>
</component>  

In the code-behind, I'm populating "dataItems" with a vector of the
query-results, that are fired, when submitting a search form that is
displayed above the result table.
Everything looks pretty fine. The problem that I have is, that if I go
to - let's say - page 2 and then enter new search criteria, the search
result is also correct, but I end up on page 2, instead of page 1.

Also, if I hit the "Back Button" after the first search, enter new
search conditions and submit the form, I'll get:

"You have clicked on a stale link.

Rewind of form Tracking/$Form expected only 7 form elements, but an
additional id was requested by component
Tracking/tablePages.hiddenCurrentPage. "

Is there a way around this?

Sorry, if this question has been asked before, but maybe someone can
still point me into the right direction.

Best regards,
Didi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org