Currently my menu setup is similar to some examples in that it uses one
"edit" template for editing existing items as well as creating new items.
Clicking on the menu link directly instantiates a fresh snippet which
instantiates a new mapper instance, while clicking an 'edit' link from the
"list" page loads a mapper instance into the StatefulSnippet or RequestVar
and so the same snippet ends up actually editing an existing item.
The advantage of this "reuse" is of course the fact that there's essentially
no difference between the template or logic whether editing a new or
existing mapper - the only difference really is whether the provided mapper
instance is created or loaded.
However the problem with this approach is this. Say you click the edit link
next to a particular item in the index. Now you cannot click the "new" link
in the menu because the menu knows your on that page.
So I'm looking for 1 of 2 solutions (although 2 of 2 is appreciated :) ) -
(1) optional - tell menu to display the menu item as a link even when it's
the current page; or better yet, (2) have two menus that point to the same
template (in this particular example one would be hidden). Optionally one
menu item could have some initialization code before processing the menu
(e.g., registering a stateful snippet).
Thanks!

--

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


Reply via email to