Thanks for the quick response.
Yes, I've initialised the widget in the boot with Widget init

****** In boot.scala: *****
package bootstrap.liftweb

import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import _root_.net.liftweb.sitemap._
import _root_.net.liftweb.sitemap.Loc._
import Helpers._
import _root_.net.liftweb.widgets.menu.MenuWidget

object MenuInfo {
    import Loc._

    def menu: List[Menu] = Menu(Loc("Home", List("index"), "Home"),
                           Menu(Loc("overview", List("overview"),
"Overview")),
                           Menu(Loc("documentation", List
("documentation"), "Documentation")),
                           Menu(Loc("investigators", List
("investigators"), "Investigators"))) ::
        Menu(Loc("models", List("models","index"), "Models"),
                 Menu(Loc("createM", List("models","create"), "Create
Model")) ::
        Nil
}

class Boot {

    def boot {
        // where to search snippet
        LiftRules.addToPackages("pt.cnbc.wikimodels")

        // Build SiteMap
        LiftRules.setSiteMap(SiteMap(MenuInfo.menu:_*))

        MenuWidget init;
    }
}

****** In a snippet --> MenuSnippet.scala: *******
package pt.cnbc.wikimodels.snippet

import _root_.scala.xml.NodeSeq
import _root_.net.liftweb.widgets.menu._

class MenuSnippet {

  def render(xhtml: NodeSeq) :NodeSeq = {
      MenuWidget()
  }
}

***** in "templates-hidden/default.html": *****
....
<head>
...
</head>
<body>
....
<div>
<lift:MenuSnippet.render />
</div>
....
</body>
</html>

It's basically equal with the example, just adapted to "/src/main"
instead of "src/test"
Do you think it's probably any error in my pom? Or with the reference
in the css and js files (I've putted them in the path "/src/main/
webapp/classpath" and "../classpath/menu", or should I put them in the
"../main/resources/toserve/menu" and reference them in the pom.xml)?
Hope you understand.

Thanks,
GonzaloN


On May 20, 6:26 pm, "marius d." <[email protected]> wrote:
> Could you please post your code ? ... Are you initializing the widget
> in your boot ?
>
> Br's,
> Marius
>
> On May 20, 7:52 pm, Gonzalo N <[email protected]> wrote:
>
> > Hi,
>
> > I've recently started using Lift in a project and probably my
> > difficulty is basic, but I've tried the Widgets that are uploaded in
> > the github web page. When I run the example, it all worked fine, the
> > menu did have the drop-down sub-menus, but when I integrate the code
> > of the menu (to be more specific, I want to integrate the MenuWidget)
> > to my project, it doesn't work like in the widgets example, ie it
> > prints as a list of links with bullet-marks, like the basic menu style
> > and I've changed the Boot.scala, added the snippet MenuSnippet.scala,
> > added the "callback" in the default.html, added the respective css and
> > js files in the respective folders and added the dependency:
> > <dependency>
> >       <groupId>net.liftweb</groupId>
> >       <artifactId>lift-widgets</artifactId>
> >       <version>1.1-SNAPSHOT</version>
> >     </dependency>
> > , but still nothing.
>
> > I've noticed that the example is run under the "<project>/src/test/"
> > path and it is referenced in the pom.xml file, but in my project I
> > wanted it to run in the "<project>/src/main" path, so I didn't add
> > that reference in my pom.xml.
> > If possible, I really would like that someone could explain a working
> > "step-by-step" of how to integrate the menu widget to a project in the
> > "/src/main" path.
>
> > Sorry if this topic was already explained in another post, but I
> > didn't found the solution after a search. The only thing I've found,
> > was a brief reference to this problem, and I've done what was
> > suggested, but it didn't worked. The 
> > link:http://groups.google.com/group/liftweb/browse_thread/thread/33b6f9f5e...
>
> > Thanks in advance for the help.
>
> > Cheers,
> > GonzaloN

--~--~---------~--~----~------------~-------~--~----~
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