matrix tag?

13 views
Skip to first unread message

Scott Cytacki

unread,
Oct 4, 2011, 5:16:52 PM10/4/11
to hobo...@googlegroups.com
Hi y'all

I've just got into Hobo, and I really like it.  By way of introduction, I work at an education technology research group called the Concord Consortium, and we've done a lot with Rails, Java, and SproutCore. 

Before I go off and try to make one I wanted to check if anyone has created a 'matrix' DRYML tag.  
By matrix I mean something like a pivot table.  So for example say I have 3 models:
Tablet
Feature
TabletFeature

And I want to display that as a table with Features across the top and Tablets on the side.  Then I want to put a view of TabletFeature in the cells.  There will only be a small number of Tablets and Features so showing all of each will fit on a page.

Thanks for any pointers,

Scott Cytacki

kevinpfromnm

unread,
Oct 4, 2011, 6:47:55 PM10/4/11
to hobo...@googlegroups.com
I haven't seen anything like that though it shouldn't be too hard with a table tag:
  • tablets being context
  • features used for fields attr (plus an initial 'this' so the tablet name/link gets first column)
  • custom tag for field-tag attr that checks for inclusion of said feature.

Scott Cytacki

unread,
Oct 5, 2011, 11:36:02 PM10/5/11
to hobo...@googlegroups.com
I made a repo that has an example app with a hard coded matrix.  The two models are Products and Devices.  So the matrix is intended to show which Devices each Product works with.  

The repo is here:

And here is the commit containing the hard coded matrix:

I looked into reusing the fields of the table tag but didn't see how it would work if I passed objects (Products) as fields.  The hard coded version is concise enough that I'm just going to use that for now. 

Scott

CharlieMagee

unread,
Oct 6, 2011, 5:43:33 PM10/6/11
to Hobo Users
Hi Scott,

I downloaded your app, ran it on localhost and added some products and
devices. Your matrix is working fine. With a little styling, you're
off and running.

I might be able to use that sometime, thanks,

Charlie Magee

On Oct 5, 8:36 pm, Scott Cytacki <scyta...@concord.org> wrote:

>
> The repo is here:https://github.com/scytacki/hobo-matrix-example/
>

>
> Scott
Reply all
Reply to author
Forward
0 new messages