If you want to "transpose" your table (ie: change the rows and columns)
then it turn this implies that you want to change the structure of the
table both the format and the model.
ie: You need to provide new columns and new data model.

You would do so in 2 steps:
1) Create the new table with the new columns
2) Provide it the new data model

Then use the addOrReplace("tableId", transposedTableRef) and you're done.

Otherwise... look at transposing your table in jQuery alone on the client
side and not on the server side.

On Fri, Oct 3, 2014 at 11:53 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> We have a html table in wicket implemented as:
>
> foreach :: listview of table rows {
>   ..
>   foreach :: list view of table cells {
>      ..
>   }
> }
>
> (note: that was pseudocode)
>
>
> What we would like to do, is offer users possibility to transpose the
> table, however, with minimum changes to the code.
>
> Anybody done this? Any insights?
>
> We acknowledge that there are some inherent differences in the transposed
> versions of a html table. For example table rows can be ajax updated but
> table columns cannot. This might suggest that a div suitable layout should
> be used? Or should we simply
> ajaxRequestTarget.addComponent(xx::foreach::firstChildOfRow)  visit each
> first child of '*row*' when transposed?
>
> Maybe the transpose could be done using a simple onrender string replace
> operation (think along the lines of a "*complex regexp operation*").
>
> Any ideas, comments?
>
> Would be nice to accomplish this with a neat trick... NOT looking for a js
> gimmick because that will be slow with our heavy duty tables.
>
> Some references:
>
>    -
>
> http://assaneonline.blogspot.fi/2011/02/looking-for-simpler-way-to-transpose.html
>    -
>
> http://adomas.eu/transposing-html-table-even-with-colspan-and-rowspan-used-with-jquery-javascript-code/
>
>
> **
> Martin
>

Reply via email to