You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2004/10/25 14:42:15 UTC

Table vs. FormTable question

I am working on an archivation system where documents can be placed in
folders and folders may contain subfolders, much like in an ordinary
file system. I use the contrib:Table component to display the contents
of a folder. My page has a property called 'selectedFolder' that
specifies the folder to display.

Now I ran into the following problem: When I want to navigate to
another page within the same folder the 'selectedFolder' property gets
lost and the root folder is displayed instead. In order to preserve
the 'selectedFolder' property between invocations I tried to use a
FormTable instead of the Table. That works as intended, but the
FormTable preserves far to much information between invocation. Every
table row is stored in a hidden field, which is not acceptable for my
application.

Is there an easy way to work around this?

Markus

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


Re: Table vs. FormTable question

Posted by Mind Bridge <mi...@yahoo.com>.
It is easy to resolve this using a custom layout.

Table and FormTable consist of pretty much the same sub-components. You can
pick and choose the behaviour you want as a result.
I would recommend to replace the Table component with those lower-level
components, e.g.

<span jwcid="@contrib:TableView" ....> <!-- place the parameters you give to
table here -->
<span jwcid="@contrib:TableFormPages"/>
<table>
<tr><span jwcid="tableColumns"/></tr>
<tr jwcid="@contrib:TableRows"><td jwcid="@contrib:TableValues"/></tr>
<!-- if you use the 'row' parameter, place it in TableRows -->
</table>
</span>


Using TableFormPages rather than TablePages ensures that the form will be
submitted when you change page.
Not using TableFormView ensures that no Hidden fields will be generated.

Also, make sure you prefix your column definition string with a '*' to make
sure that the form is submitted when you change ordering (click on a column
header) as well.


----- Original Message ----- 
From: "Markus Wiederkehr" <ma...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, October 25, 2004 3:42 PM
Subject: Table vs. FormTable question


> I am working on an archivation system where documents can be placed in
> folders and folders may contain subfolders, much like in an ordinary
> file system. I use the contrib:Table component to display the contents
> of a folder. My page has a property called 'selectedFolder' that
> specifies the folder to display.
>
> Now I ran into the following problem: When I want to navigate to
> another page within the same folder the 'selectedFolder' property gets
> lost and the root folder is displayed instead. In order to preserve
> the 'selectedFolder' property between invocations I tried to use a
> FormTable instead of the Table. That works as intended, but the
> FormTable preserves far to much information between invocation. Every
> table row is stored in a hidden field, which is not acceptable for my
> application.
>
> Is there an easy way to work around this?
>
> Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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