I emailed you privately an simple chat application that has the
MenuWidget in it. I had no problem with putting it.

If you stil can't figure it out please email me a minimalistic lift
app where it just doesn't work.

Br's,
Marius

On May 20, 10:04 pm, Gonzalo N <[email protected]> wrote:
> After using firebug and putting the URI "localhost:8080/classpath/menu/
> superfish.js",as weel as the css and the jquery.hoverintent, all are
> being seen by the browser and in the terminal shell it doesn't return
> errors when reading/locating those files.
> In the pom I added the dependency:
>     <dependency>
>       <groupId>net.liftweb</groupId>
>       <artifactId>lift-widgets</artifactId>
>       <version>1.1-M1</version>
>     </dependency>
>
> I've putted the version 1.1-M1, because it was the last I've search in
> the lift repo.
> Do you think I should change to another version?
> And also added the snapshot repository:
> <repositories>
>     <repository>
>       <id>scala-tools.org</id>
>       <name>Scala-Tools Maven2 Repository</name>
>       <url>http://scala-tools.org/repo-releases</url>
>     </repository>
>     <repository>
>       <id>scala-tools.org.snapshots</id>
>       <name>Scala Tools Maven2 Repository</name>
>       <url>http://scala-tools.org/repo-snapshots</url>
>       <snapshots />
>     </repository>
>   </repositories>
>
> Actually, I cannot see what am I doing wrong, that was why I was
> asking if there was a "step-by-step" tutorial to the menu widget only.
> In the Lift-book group, I've read the Exploring Lift tutorial and in
> the widgets section, there is no reference to this widget.
>
> Many thanks,
> GonzaloN
>
> On May 20, 7:24 pm, "marius d." <[email protected]> wrote:
>
> > It looks like the CSS and potentially the JSdependecies are not seen
> > by the browser ...
>
> > From your page rendered take the URI for the superfish CSS and JS and
> > put it in your browser and see if they are seen. Also firebug should
> > yell if the CSS/JS is can not be loaded
>
> > I assume that lift-widgets is in your app pom :) (dumb question ...)
>
> > Br's,
> > Marius
>
> > On May 20, 8:58 pm, Gonzalo N <[email protected]> wrote:
>
> > > 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