Not really, I did that for adding new rules to a data table (only I added to
the top and made the row editable).
Simply put, edit your DataProvider and make it return an extra "row" in your
element collection. It will screw up your pagination (but then again, you
might want that especially if you want to expand/collapse details on more
items.).

If you need more details I can show you some code snippets...

Another idea is to populate your details cell with a hidden panel that spans
all the rows in the table.
When the link is selected, you toggle its visibility to true and refresh the
table.

~ Thank you,
  Paul Bors

-----Original Message-----
From: Bill Speirs [mailto:bill.spe...@gmail.com] 
Sent: Tuesday, October 09, 2012 4:22 PM
To: users@wicket.apache.org
Subject: Re: Dynamically Toggling a Details Row in a DataTable

Paul-

Thanks for the response... yea, we'd like to see another row below the
current one, and in an single column. This way we can put whatever
component/panel we'd like in that new row. Any suggestions on where to get
started? I feel as though I'm going to need to re-work (more than simply
extend) DataTable as I'll need to add additional rows.

Thanks!

Bill-

On Tue, Oct 9, 2012 at 4:14 PM, Paul Bors <p...@bors.ws> wrote:

> Must it be in a separate row? It doesn't make much sense to have 
> details in a separate row unless you want to show the same columns.
> And if you are going to show details for the same columns, then why 
> not just toggle each of the cell component between a simplified and 
> detailed view?
> I do it all the time when editing a table row, I toggle between labels 
> and form fields to set the contents of the table row.
>
> If you do want to show extra details that do not match the columns in 
> your table, use a pop-up or modal pop-up.
>
>
> ~ Thank you,
>   Paul Bors
>
> -----Original Message-----
> From: William Speirs [mailto:wspe...@apache.org]
> Sent: Tuesday, October 09, 2012 3:01 PM
> To: users@wicket.apache.org
> Subject: Dynamically Toggling a Details Row in a DataTable
>
> I would like to create a component that generates an additional row in 
> a DataTable for each existing row. This additional row will contain
"details"
> for the above row. I would like to have a column in the DataTable that 
> contains a link/button/etc which controls the visibility (display: 
> hidden for that row) of the details row. Inside the details row, the 
> colspan would be set to the # of columns and contain an 
> AjaxLazyLoadPanel such that when the row is displayed the 
> getLazyLoadComponent() method is called, generating and fetching the 
> proper component.
>
> So the DataTable will look like a normal DataTable, except when you 
> click the link/button/etc a new row is shown and displays the 
> Component returned from the call to the getLazyLoadComponent() method.
>
> How would I go about implementing this type of DataTable?
>
> Thanks in advance...
>
> Bill-
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to