RE: How Can I Implement a Dynamic Table?

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Thanks,
this a nice workaround I mean to put component.setvisible(false) depending of
some parameters value.
the only not convenient  thing is, I belevie, that the application load
anyway a lot of useless data from database.
In reality I think that in the future ListView component should be just a
little bit more flexible
Thanks a lot indeed
Andrea


-Original Message-
From: Peter Thomas [mailto:[EMAIL PROTECTED] 
Sent: 10 August 2007 15:23
To: users@wicket.apache.org
Subject: Re: How Can I Implement a Dynamic Table?


On 8/10/07, Pantaleoni, Andrea (KCTU) <[EMAIL PROTECTED]> wrote:
>
> Normally you put in  the wicket:id of the listview component and 
> in  the single component previously added in the listview
> How could you manage that with two listview in the manner you indicate??
> Have you ever tried that? are you sure?
> Anyway I guess the problem of the match between components in form object
> and
> markup do not change
> when you create a list view implicit you define a fix number of columns
> thet
> you add to the listview which in turn you add to the form.
> Please, if you can, post the code you used to solve the problem or try to
> sketch it.
> thanks


Here's a real-life example of a table with dynamic columns:

http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac
/wicket/ItemListPanel.java?r=trunk

line 226 is the outer ListView for the  and line 239 is the inner
ListView for the coumns.  Link to the html below:

http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac
/wicket/ItemListPanel.html?r=trunk

Hope this helps.  This is btw a totally custom data-table with sorting and
even the pagination done from scratch - but all this is very easy with
Wicket :)

Regards,

Peter.

-Original Message-
> From: Paolo Di Tommaso [mailto:[EMAIL PROTECTED]
> Sent: 10 August 2007 14:41
> To: users@wicket.apache.org
> Subject: Re: How Can I Implement a Dynamic Table?
>
>
> There are many ways ..
>
> For example you can have two nested ListView, for example:
>
> 
> 
>value 
> 
> 
>
> The first iterate over the row as usual, and the second over the columns.
>
> The problem can be reduced to have a valid model to specify the columns.
> This could be done, with a simple array of bean attribute names or using
> reflection to extract bean getter ... or some other complex way ..
>
>
> - Paolo (at fao.org)
>
>
>
>
> On 8/10/07, Pantaleoni, Andrea (KCTU) <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> > I have to implement a dynamic table: depending on user choices or values
> > of
> > fields in database, the number of columns could change.
> > e.g. In same case I can have 3 columns containing Labels or in other
> cases
> > 5
> > containing Labels and form components(and so on).
> > To do that I'm using a ListView inside a WebMarkupContainer(I need to
> > implements some ajax behavior too)
> > The problems is that wicket require a exact match between components
> added
> > to
> > the form object or page and markup items inside the relative html page
> > Someone of you has already faced that problems?
> > Any suggestion?
> >
> > Many Thanks
> > Andrea
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How Can I Implement a Dynamic Table?

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Normally you put in  the wicket:id of the listview component and in 
the single component previously added in the listview
How could you manage that with two listview in the manner you indicate??
Have you ever tried that? are you sure?
Anyway I guess the problem of the match between components in form object and
markup do not change 
when you create a list view implicit you define a fix number of columns thet
you add to the listview which in turn you add to the form. 
Please, if you can, post the code you used to solve the problem or try to
sketch it. 
thanks

-Original Message-
From: Paolo Di Tommaso [mailto:[EMAIL PROTECTED] 
Sent: 10 August 2007 14:41
To: users@wicket.apache.org
Subject: Re: How Can I Implement a Dynamic Table?


There are many ways ..

For example you can have two nested ListView, for example:



   value 



The first iterate over the row as usual, and the second over the columns.

The problem can be reduced to have a valid model to specify the columns.
This could be done, with a simple array of bean attribute names or using
reflection to extract bean getter ... or some other complex way ..


- Paolo (at fao.org)




On 8/10/07, Pantaleoni, Andrea (KCTU) <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I have to implement a dynamic table: depending on user choices or values
> of
> fields in database, the number of columns could change.
> e.g. In same case I can have 3 columns containing Labels or in other cases
> 5
> containing Labels and form components(and so on).
> To do that I'm using a ListView inside a WebMarkupContainer(I need to
> implements some ajax behavior too)
> The problems is that wicket require a exact match between components added
> to
> the form object or page and markup items inside the relative html page
> Someone of you has already faced that problems?
> Any suggestion?
>
> Many Thanks
> Andrea
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: getting component parent

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Actually I'm using use 1.2


-Original Message-
From: Will Jaynes [mailto:[EMAIL PROTECTED] 
Sent: 10 August 2007 13:52
To: users@wicket.apache.org
Subject: getting component parent


Using 1.3. I have a panel which needs to create different internal 
components depending on who it's parent is. However, calling getParent() 
in the constructor gives me null. I can make a constuctor that passes in 
the parent. But I wonder if there is a different way. Is there some 
other point where I could call getParent(), get the parent, and then 
construct the components for the panel?

Will

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How Can I Implement a Dynamic Table?

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Hello,
I have to implement a dynamic table: depending on user choices or values of
fields in database, the number of columns could change.
e.g. In same case I can have 3 columns containing Labels or in other cases 5
containing Labels and form components(and so on).
To do that I'm using a ListView inside a WebMarkupContainer(I need to
implements some ajax behavior too)
The problems is that wicket require a exact match between components added to
the form object or page and markup items inside the relative html page
Someone of you has already faced that problems?
Any suggestion?

Many Thanks 
Andrea