Well this is not Lift's fault ... Lift application is initialized only
once as the servlet filter is. Running boot more then once per context
may lead to unexpected behaviors and in LiftRules we have a guard for
RuleSeq that they can not be changed after boot is executed.

You could however dynamically re-set the SiteMap ... something like

LiftRules.siteMap.map(sm => LiftRules.setSiteMap(SiteMap((sm.menus ++
some_otherMenus):_*))

where some_otherMenus is a List[Menu] (I haven't actually compiled the
code but you get the idea)

But this is not quite what you want and I'm not even convinced that we
should allow things like this.

Br's,
Marius

On Oct 4, 6:11 pm, Alex Black <a...@alexblack.ca> wrote:
> Thanks Tim and Viktor.. Thats disappointing, I was hoping I wouldn't
> have to restart the jetty server if when I added a new view.
>
> Maybe there is a creative way around this? E.g. is there a way to get
> a new view/page into lift without modifying Boot.scala?
>
> - Alex
>
> On Oct 4, 11:09 am, Timothy Perrett <timo...@getintheloop.eu> wrote:
>
> > Agreed - changes that modify lifts enviroment require restarting  
> > jetty. It's not ideal perhaps, but it's with good reason.
>
> > Cheers, Tim
>
> > Sent from my iPhone
>
> > On 4 Oct 2009, at 11:24, Viktor Klang <viktor.kl...@gmail.com> wrote:
>
> > > Boot is just executed at webapp init, hence the observed behavior.
> > > Changing this is a tricky thing
>
> > >> On Oct 4, 2009 4:35 AM, "Alex Black" <a...@alexblack.ca> wrote:
>
> > >> I'm just getting started with Lift and Scala, and I'm excited about
> > >> using JavaRebel to avoid waiting to restart Jetty every time I make a
> > >> change.
>
> > >> It seems to be working well: I can see changes made to snippets for
> > >> example right away, I'm running "mvn scala:cc: and I see it pick up
> > >> the changes.
>
> > >> However, if I add a new view say test2.html, then modify the sitemap
> > >> Boot.scala, I can't access test2 until I restart Jetty, even though I
> > >> saw that scala.cc picked up  the change and recompiled Boot.scala.
>
> > >> Should this be possible? Thanks!
>
> > >> - Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to