Well, the funny thing is that I was able to download a copy from github
and that included the LocGroup (I wanted to see how it was implemented).
I've even done a mvn install on that and still I get:
[INFO] Compiling 11 source files to /private/var/www/wapbis/target/classes
[WARNING]
/private/var/www/wapbis/src/main/scala/bootstrap/liftweb/Boot.scala:32:
error: type mismatch;
[WARNING] found : net.liftweb.sitemap.Loc.LocGroup
[WARNING] required: net.liftweb.sitemap.Loc.LocStuff
[WARNING] val entries = Menu(Loc("home", List("index"), "Home",
LocGroup("global"))) ::
[WARNING] ^
[WARNING] one error found
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
Here is the file:
package bootstrap.liftweb
import net.liftweb.util._
import net.liftweb.http._
import net.liftweb.sitemap._
import net.liftweb.sitemap.Loc._
import Helpers._
import net.liftweb.mapper.{DB, ConnectionManager, Schemifier,
DefaultConnectionIdentifier, ConnectionIdentifier}
import java.sql.{Connection, DriverManager}
import org.xxx.model._
import org.xxx.comet._
class Boot {
def boot {
if (!DB.jndiJdbcConnAvailable_?)
DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor)
Schemifier.schemify(true, Log.infoF _, User)
LiftRules.addToPackages("org.xxx")
// Build SiteMap
val entries = Menu(Loc("home", List("index"), "Home",
LocGroup("global"))) ::
Menu(Loc("about", List("about", "index"), "About")) ::
Menu(Loc("contact", List("contact", "index"), "Contact")) ::
Menu(Loc("privacy_policy", List("privacy_policy", "index"),
"Privacy Policy")) ::
Menu(Loc("terms_of_use", List("terms_of_use", "index"),
"Terms of Use")) ::
Nil
LiftRules.setSiteMap(SiteMap(entries:_*))
}
}
object DBVendor extends ConnectionManager {
def newConnection(name: ConnectionIdentifier): Can[Connection] = {
try {
Class.forName("org.postgresql.Driver")
val dm =
DriverManager.getConnection("jdbc:postgresql://localhost/x",
"y",
"z")
Full(dm)
} catch {
case e : Exception => e.printStackTrace; Empty
}
}
def releaseConnection(conn: Connection) {conn.close}
}
Thanks.
Chas.
David Pollak wrote:
> Charles,
>
> That should work. There was a Hudson build at 5:39 that should have
> included these changes:
> http://scala-tools.org/hudson/job/lift/141/
>
> Can you include the file that's not compiling and the error?
>
> Thanks,
>
> David
>
> On Mon, Sep 22, 2008 at 6:51 PM, Charles F. Munat <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
> If I want to try these new features, how do I get my app to use the
> latest and greatest Lift? I tried mvn jetty:run -U, and when that didn't
> work I blew away .m2 and tried again, but I'm still getting an error
> that it doesn't recognize LocGroup.
>
> This is the dependency in pom.xml:
>
> <dependency>
> <groupId>net.liftweb</groupId>
> <artifactId>lift-core</artifactId>
> <version>0.10-SNAPSHOT</version>
> </dependency>
>
> What am I screwing up here?
>
> Thanks.
>
> Chas.
>
>
> David Pollak wrote:
> > Folks,
> >
> > I've radically enhanced the robustness of Lift's Ajax support.
> >
> > Previously, Lift's Ajax calls would silently fail and would not
> be retried.
> >
> > Now, Ajax calls are retried 3 times (tunable in
> > LiftRules.ajaxRetryCount). The delay between calls is 2 ^ (cnt - 1)
> > seconds. So, the first retry will be delayed 1 second, the second
> > return will delayed 2 seconds, the third return will be delayed 4
> > seconds, etc.
> >
> > It's possible to have a spiffy "working ajax spinner" displayed
> during
> > Ajax calls. LiftRules.ajaxStart: Can[() => JsCmd] and
> > LiftRules.ajaxEnd: Can[() => JsCmd] control what's displayed. So:
> > /*
> > * Show the spinny image when an Ajax call starts
> > */
> > LiftRules.ajaxStart =
> > Full(() => LiftRules.jsArtifacts.show("ajax-loader").cmd)
> >
> > /*
> > * Make the spinny image go away when it ends
> > */
> > LiftRules.ajaxEnd =
> > Full(() => LiftRules.jsArtifacts.hide("ajax-loader").cmd)
> >
> > Will show and hide an element with the id "ajax-loader" If you
> have a
> > spinning animated GIF in that HTML, it will be shown/hidden
> during Ajax
> > transactions.
> >
> > You can control what is displayed if the Ajax call fails with:
> >
> > LiftRules.ajaxDefaultFailure: Can[() => JsCmd] =
> > Full(() => JsCmds.Alert(S.??("The server cannot be contacted
> at this
> > time")))
> >
> > If you have a JSON call, you can have an optional customer error
> > handler. For example, if you've got a Comet Chat app, in your
> CometActor:
> >
> > override def onJsonError: Can[JsCmd] = Full(Alert("Server
> communication
> > error. Your chat message was not sent."))
> >
> > Also, note that the calls made by the Comet long poll mechanism have
> > their own failure fallback and that's not changed.
> >
> > There are some breaking changes in SHtml:
> > ajaxCall() now takes and returns a JsExp (JavaScript Expression)
> > ajaxInvoke() now returns a JsExp (not a String)
> >
> > I've built off Charles' excellent idea of Location Groups in SiteMap.
> > You can have Loc("foo", List("foo"), "Foo",* LocGroup("sales",
> "fun")*)
> >
> > There's a new Menu snippet <lift:Menu.group group="sales"
> > a:class="menu"><li><menu:bind/></li></lift:Menu.group>
> >
> > All the menu items in the "sales" group will be displayed inside an
> > <li/> and with the class attribute on the <a> tag set to "menu".
> >
> > Thanks,
> >
> > David
> >
> > --
> > Lift, the simply functional web framework http://liftweb.net
> > Collaborative Task Management http://much4.us
> > Follow me: http://twitter.com/dpp
> > Git some: http://github.com/dpp
> >
> > >
>
>
>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Collaborative Task Management http://much4.us
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---