Rendering transposed tables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Rendering transposed tables

Esteban A. Maringolo
I have a list of objects and I need to render them in a transposed table, it is, one object per column instead of object per row as it would be easiest way to do it.

Did anybody create a set of utility methods to render a table this way? 

Ideally without big library dependencies (I'm using Seaside to render the HTML, but the output if for reporting/email).

Thanks!


Esteban A. Maringolo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Rendering transposed tables

Karsten Kusche
Esteban,

if it’s easier to render objects per row, why not create an object for this purpose? Then you can use the new objects like you’d expect and create them from the existing objects.

Kind Regards
Karsten



Am 22. Januar 2019 um 14:42:49, Esteban Maringolo ([hidden email]) schrieb:

I have a list of objects and I need to render them in a transposed table, it is, one object per column instead of object per row as it would be easiest way to do it.

Did anybody create a set of utility methods to render a table this way? 

Ideally without big library dependencies (I'm using Seaside to render the HTML, but the output if for reporting/email).

Thanks!


Esteban A. Maringolo
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Rendering transposed tables

Esteban A. Maringolo
I was asking just to avoid doing it again myself, creating the needed abstractions is not hard at all.

I could even use DataFrame[1], but I was going for a more lean approach, since I'm not doing it with Pharo and DataFrame is not available in VW.


Esteban A. Maringolo


El mar., 22 ene. 2019 a las 10:46, Karsten Kusche (<[hidden email]>) escribió:
Esteban,

if it’s easier to render objects per row, why not create an object for this purpose? Then you can use the new objects like you’d expect and create them from the existing objects.

Kind Regards
Karsten



Am 22. Januar 2019 um 14:42:49, Esteban Maringolo ([hidden email]) schrieb:

I have a list of objects and I need to render them in a transposed table, it is, one object per column instead of object per row as it would be easiest way to do it.

Did anybody create a set of utility methods to render a table this way? 

Ideally without big library dependencies (I'm using Seaside to render the HTML, but the output if for reporting/email).

Thanks!


Esteban A. Maringolo
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Rendering transposed tables

Siemen Baader
In reply to this post by Karsten Kusche
I think you could do it with two do: loops, an outer iterating the message selectors and an inner iterating the objects. Then you just render a td element containing what the object responds to #perform selector. 
Wrap the inner loop in a tr block to create table rows. 

If you revers the order of the loops you get the regular order of one row per object. 

Hth
Siemen 


Sent from my iPhone

On 22 Jan 2019, at 14.46, Karsten Kusche <[hidden email]> wrote:

Esteban,

if it’s easier to render objects per row, why not create an object for this purpose? Then you can use the new objects like you’d expect and create them from the existing objects.

Kind Regards
Karsten



Am 22. Januar 2019 um 14:42:49, Esteban Maringolo ([hidden email]) schrieb:

I have a list of objects and I need to render them in a transposed table, it is, one object per column instead of object per row as it would be easiest way to do it.

Did anybody create a set of utility methods to render a table this way? 

Ideally without big library dependencies (I'm using Seaside to render the HTML, but the output if for reporting/email).

Thanks!


Esteban A. Maringolo
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside