You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Thomas Beckmann <th...@freiheit.com> on 2007/06/11 11:44:01 UTC

how to use Grid component

Hi,

we want to use Grid component but I can't find any example code.
Current issues are:
-	how do I select columns to not show all of the classes properties and how do
	I set labels different from the getter methods?
-	how do I connect paging with paging on database level (in our case it's
	hibernate)?

Many thanks in advance

Thomas

-- 
Thomas Beckmann
Dipl.-Math.

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20
HRB Hamburg 70814

DB48 4B15 11BA 9268 B74B  64A0 48AE 80AB C86A 46A3
Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof

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


Re: how to use Grid component

Posted by Eugene Lozovan <eu...@gmail.com>.
>
> "-       how do I select columns to not show all of the classes properties
> and how do
>         I set labels different from the getter methods?"


You can use either  @NonVisual annotation for a setter or grid's "model"
attribute (
http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html)
:

<table t:type="grid" rowsPerPage="5" row="tUser" source="usersList"
model="model">
... some code here
        </table>

    void pageLoaded()
      {
        _model = _beanModelSource.create(TUser.class, true, _resources);
        _model.remove("password");
      }

As for labels - it might be possible to use . properies file like
src\main\resources\org\example\myapp\pages\PageClassName.properties:

userName-label= Login name
firstName-label= First name

Here is a very simple T5 application, just a couple of pages with
screencasts examples -   http://www.box.net/shared/jk4blh9chu , Home page
uses Grid.

E.L.

On 11/06/07, Thomas Beckmann <th...@freiheit.com> wrote:
>
> Hi,
>
> we want to use Grid component but I can't find any example code.
> Current issues are:
> -       how do I select columns to not show all of the classes properties
> and how do
>         I set labels different from the getter methods?
> -       how do I connect paging with paging on database level (in our case
> it's
>         hibernate)?
>
> Many thanks in advance
>
> Thomas
>
> --
> Thomas Beckmann
> Dipl.-Math.
>
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> HRB Hamburg 70814
>
> DB48 4B15 11BA 9268 B74B  64A0 48AE 80AB C86A 46A3
> Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: how to use Grid component

Posted by Erik Vullings <er...@gmail.com>.
Hi Thomas,

Have a look at Howard's screencasts, esp. #5, for an introduction (
http://tapestry.apache.org/tapestry5/screencast.html)

- In case you need to hide properties, the @NonVisual annotation should do
the trick (before the property declaration).
- Different labels: I haven't tried it with the Grid component, but for the
BeanEditForm, setting the beaneditform.properties did the trick, e.g. prop
firstName --> firstName-label=Vorname (btw, these can be localized if you
use beaneditform_de.properties too). In the beaneditform screencast, an
example is given by Howard too.

 I can't help you on the 3rd issue, though.

Cheers
Erik



On 6/11/07, Thomas Beckmann <th...@freiheit.com> wrote:
>
> Hi,
>
> we want to use Grid component but I can't find any example code.
> Current issues are:
> -       how do I select columns to not show all of the classes properties
> and how do
>        I set labels different from the getter methods?
> -       how do I connect paging with paging on database level (in our case
> it's
>        hibernate)?
>
> Many thanks in advance
>
> Thomas
>
> --
> Thomas Beckmann
> Dipl.-Math.
>
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> HRB Hamburg 70814
>
> DB48 4B15 11BA 9268 B74B  64A0 48AE 80AB C86A 46A3
> Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>