You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Pardeike <an...@pardeike.net> on 2005/01/06 21:33:03 UTC

Re: I'm lost - contrib:TableView fails on subsequent pages (SOLVED, but why?)

On 6 jan 2005, at 20.24, Andreas Pardeike wrote:

> I have now searched and tested my guts in and out and I cannot track 
> the
> following problem down. What I have and did so far:
>
> My goal is to have a generic table component that I only feed a cayenne
> select query and the basic table parameters and it should do the rest.
>
> I got the table working (including overwriting some contrib html to 
> style
> it my way) and so I placed it into my own component that I then put on 
> a
> page. It works fine and displays the table as it should (including 
> populating
> it with the query result as I want) but only for the initial page. As 
> soon
> as I click on a page number or sort a column, it throws a
>
> ## Either the tableModel parameter or both source and columns 
> parameters
> ## must be specified by component Home/t1.table

I've solved my own problem but I am still unclear WHY this actually 
solves
the problem and why I have to fix this in first place.

The fix was to change the method

	public String getColumns()
	{
		return _columnStr;
	}

to

	public String getColumns()
	{
		if(_columnStr == null)
			return "";
		return _columnStr;
	}

inside FSGenericTable.java. Seems like this returns null somewhere 
in-between
the page preparation and TableView does not like this. Returning an 
empty
column definition string fixes it because (at it seems) the final 
request for
the columns parameter seems to return the correct string and that makes 
the
table show up correctly.

Why is that so?

Regards,
Andreas Pardeike


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