Problem with issue 182

5 views
Skip to first unread message

Jeppe Nejsum Madsen

unread,
Nov 17, 2009, 10:01:10 AM11/17/09
to lif...@googlegroups.com
Hi,

Just updated to latest snapshot and noticed
http://github.com/dpp/liftweb/issues/closed/#issue/182

Imo, this is a bad idea since it makes it impossible to mixin Crudify
to get easy user editing/listing.

It's not a big problem for me since I have made my own Crudify....just
noticed it since I started out based on the original code :-)

/jeppe

David Pollak

unread,
Nov 17, 2009, 11:50:06 AM11/17/09
to lif...@googlegroups.com

Good catch.

Derek opened the ticket... it's his call as to what to do about this one.
 

/jeppe

--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=.





--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Derek Chen-Becker

unread,
Nov 19, 2009, 4:51:37 PM11/19/09
to lif...@googlegroups.com
I hadn't though about mixing in CRUDify with users. I suppose we should just pull it out and leave sitemap as the sole menuing method. Jeppe, can you open a ticket?

Jeppe Nejsum Madsen

unread,
Nov 19, 2009, 5:36:38 PM11/19/09
to lif...@googlegroups.com
Derek Chen-Becker <dchen...@gmail.com> writes:

> I hadn't though about mixing in CRUDify with users. I suppose we should just
> pull it out and leave sitemap as the sole menuing method. Jeppe, can you
> open a ticket?

Sure: http://github.com/dpp/liftweb/issues/#issue/200

/Jeppe

Derek Chen-Becker

unread,
Nov 23, 2009, 7:22:18 PM11/23/09
to lif...@googlegroups.com
OK, thinking about this a little further, technically it would be a breaking change to remove the menus method from MetaMegaProtoUser. Would it be better to simply introduce a MenuGenerator trait, a la

trait MenuGenerator {
  def menus : List[Menu]
}

And add that to CRUDify and MetaMegaProtoUser?



Jeppe Nejsum Madsen

unread,
Nov 24, 2009, 4:15:35 AM11/24/09
to lif...@googlegroups.com
Derek Chen-Becker <dchen...@gmail.com> writes:

> OK, thinking about this a little further, technically it would be a breaking
> change to remove the menus method from MetaMegaProtoUser.

Yes, but is that really an issue here?

> Would it be better to simply introduce a MenuGenerator trait, a la
>
> trait MenuGenerator {
> def menus : List[Menu]
> }
>
> And add that to CRUDify and MetaMegaProtoUser?

Maybe I'm overlooking something obvious, but how will this solve the
problem? I guess I can override the menus method in my singleton, but I
would still need to get the menus from both CRUDify and
MetaMegaProtoUser so they'll have to be named something different in
order not to clash, no?

/Jeppe

Derek Chen-Becker

unread,
Nov 24, 2009, 11:29:21 AM11/24/09
to lif...@googlegroups.com
I was thinking something along the lines of:

override def menus = super[MegaMetaProtoUser].menus ::: super[CRUDify].menus

if you need both, but I suppose it's simpler to just remove it. I'll code up the change and send out a breaking changes announcement.

Derek


/Jeppe

--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.



Jeppe Nejsum Madsen

unread,
Nov 24, 2009, 11:52:19 AM11/24/09
to lif...@googlegroups.com
Derek Chen-Becker <dchen...@gmail.com> writes:

> I was thinking something along the lines of:
>
> override def menus = super[MegaMetaProtoUser].menus ::: super[CRUDify].menus

Ahh yes, didn't think of this "super" syntax


> if you need both, but I suppose it's simpler to just remove it. I'll code up
> the change and send out a breaking changes announcement.

Dunno. It seems like there's a (perhaps rare) need for something that
could unify this mixin style. Eventually I would like to see e.g CRUDify
broken down into smaller traits that can be mixed and matched (and then
the default CRUDify that just contains everything). But I think this
will require each "little" trait to hook up to the menuing system if
usage should be easy.....


/Jeppe

Derek Chen-Becker

unread,
Nov 24, 2009, 12:52:25 PM11/24/09
to lif...@googlegroups.com
Anyone else want to chime in with an opinion on this? I've got the code in place to remove the "menus" def from MetaMegaProtoUser, but if there's a desire it would be equally simple to add a MenuGenerator trait to net.liftweb.sitemap and apply it to the relevant traits.

Derek



/Jeppe

Reply all
Reply to author
Forward
0 new messages