Permalink
Browse files

Moved to http://github.com/lift/lift_sbt_prototype

  • Loading branch information...
dpp committed Jul 18, 2010
1 parent 4042aa3 commit dcf16d59f01b0f1c5a686e1073824cbc9bcf762f
View
20 README
@@ -1,19 +1 @@
-Install Java, Simple Build Tool, and Git
-
-Clone this repository with:
-
-git clone git://github.com/dpp/lift_sbt_prototype.git
-
-Then cd into lift_sbt_prototype and type:
-sbt
-
-At the sbt prompt, type:
-update
-
-Then:
-jetty-run
-
-Point your browser to:
-http://localhost:8080/
-
-Voila a running Lift app
+This repository has been superceded by http://github.com/lift/lift_sbt_prototype
View
@@ -1,9 +0,0 @@
-#Project properties
-#Fri Apr 23 11:24:20 PDT 2010
-project.organization=Lift
-project.name=Lift SBT Tempalte
-sbt.version=0.7.4
-project.version=0.1
-def.scala.version=2.7.7
-build.scala.versions=2.7.7
-project.initialize=false
@@ -1,20 +0,0 @@
-import sbt._
-
-class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
- val mavenLocal = "Local Maven Repository" at
- "file://"+Path.userHome+"/.m2/repository"
-
- val scalatools_release = "Scala Tools Snapshot" at
- "http://scala-tools.org/repo-releases/"
-
- val liftVersion = "2.0"
-
- override def libraryDependencies = Set(
- "net.liftweb" % "lift-webkit" % liftVersion % "compile->default",
- "net.liftweb" % "lift-mapper" % liftVersion % "compile->default",
- "org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
- "junit" % "junit" % "4.5" % "test->default",
- "org.scala-tools.testing" % "specs" % "1.6.2.1" % "test->default",
- "com.h2database" % "h2" % "1.2.121"
- ) ++ super.libraryDependencies
-}
View
No changes.
No changes.
@@ -1,70 +0,0 @@
-package bootstrap.liftweb
-
-import _root_.net.liftweb.util._
-import _root_.net.liftweb.common._
-import _root_.net.liftweb.http._
-import _root_.net.liftweb.http.provider._
-import _root_.net.liftweb.sitemap._
-import _root_.net.liftweb.sitemap.Loc._
-import Helpers._
-import _root_.net.liftweb.mapper.{DB, ConnectionManager, Schemifier, DefaultConnectionIdentifier, StandardDBVendor}
-import _root_.java.sql.{Connection, DriverManager}
-import _root_.code.model._
-
-
-/**
- * A class that's instantiated early and run. It allows the application
- * to modify lift's environment
- */
-class Boot {
- def boot {
- if (!DB.jndiJdbcConnAvailable_?) {
- val vendor =
- new StandardDBVendor(Props.get("db.driver") openOr "org.h2.Driver",
- Props.get("db.url") openOr
- "jdbc:h2:lift_proto.db;AUTO_SERVER=TRUE",
- Props.get("db.user"), Props.get("db.password"))
-
- LiftRules.unloadHooks.append(vendor.closeAllConnections_! _)
-
- DB.defineConnectionManager(DefaultConnectionIdentifier, vendor)
- }
-
- // where to search snippet
- LiftRules.addToPackages("code")
- Schemifier.schemify(true, Schemifier.infoF _, User)
-
- // Build SiteMap
- val entries = Menu(Loc("Home", List("index"), "Home")) ::
- Menu(Loc("Static", Link(List("static"), true, "/static/index"),
- "Static Content")) ::
- User.sitemap
-
- LiftRules.setSiteMap(SiteMap(entries:_*))
-
- /*
- * 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)
-
- LiftRules.early.append(makeUtf8)
-
- LiftRules.loggedInTest = Full(() => User.loggedIn_?)
-
- S.addAround(DB.buildLoanWrapper)
- }
-
- /**
- * Force the request to be UTF-8
- */
- private def makeUtf8(req: HTTPRequest) {
- req.setCharacterEncoding("UTF-8")
- }
-}
No changes.
@@ -1,57 +0,0 @@
-package code {
-package lib {
-
-import net.liftweb._
-import http._
-import util._
-import common._
-import _root_.java.util.Date
-
-/**
- * A factory for generating new instances of Date. You can create
- * factories for each kind of thing you want to vend in your application.
- * An example is a payment gateway. You can change the default implementation,
- * or override the default implementation on a session, request or current call
- * stack basis.
- */
-object DependencyFactory extends Factory {
- implicit object time extends FactoryMaker(Helpers.now _)
-
- /**
- * objects in Scala are lazily created. The init()
- * method creates a List of all the objects. This
- * results in all the objects getting initialized and
- * registering their types with the dependency injector
- */
- private def init() {
- List(time)
- }
- init()
-}
-
-/*
-/**
- * Examples of changing the implementation
- */
-sealed abstract class Changer {
- def changeDefaultImplementation() {
- DependencyFactory.time.default.set(() => new Date())
- }
-
- def changeSessionImplementation() {
- DependencyFactory.time.session.set(() => new Date())
- }
-
- def changeRequestImplementation() {
- DependencyFactory.time.request.set(() => new Date())
- }
-
- def changeJustForCall(d: Date) {
- DependencyFactory.time.doWith(d) {
- // perform some calculations here
- }
- }
-}
-*/
-}
-}
@@ -1,38 +0,0 @@
-package code {
-package model {
-
-import _root_.net.liftweb.mapper._
-import _root_.net.liftweb.util._
-import _root_.net.liftweb.common._
-
-/**
- * The singleton that has methods for accessing the database
- */
-object User extends User with MetaMegaProtoUser[User] {
- override def dbTableName = "users" // define the DB table name
- override def screenWrap = Full(<lift:surround with="default" at="content">
- <lift:bind /></lift:surround>)
- // define the order fields will appear in forms and output
- override def fieldOrder = List(id, firstName, lastName, email,
- locale, timezone, password, textArea)
-
- // comment this line out to require email validations
- override def skipEmailValidation = true
-}
-
-/**
- * An O-R mapped "User" class that includes first name, last name, password and we add a "Personal Essay" to it
- */
-class User extends MegaProtoUser[User] {
- def getSingleton = User // what's the "meta" server
-
- // define an additional field for a personal essay
- object textArea extends MappedTextarea(this, 2048) {
- override def textareaRows = 10
- override def textareaCols = 50
- override def displayName = "Personal Essay"
- }
-}
-
-}
-}
@@ -1,25 +0,0 @@
-package code {
-package snippet {
-
-import _root_.scala.xml.{NodeSeq, Text}
-import _root_.net.liftweb.util._
-import _root_.net.liftweb.common._
-import _root_.java.util.Date
-import code.lib._
-import Helpers._
-
-class HelloWorld {
- lazy val date: Box[Date] = DependencyFactory.inject[Date] // inject the date
-
- def howdy(in: NodeSeq): NodeSeq =
- Helpers.bind("b", in, "time" -> date.map(d => Text(d.toString)))
-
- /*
- lazy val date: Date = DependencyFactory.time.vend // create the date via factory
-
- def howdy(in: NodeSeq): NodeSeq = Helpers.bind("b", in, "time" -> date.toString)
- */
-}
-
-}
-}
No changes.
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!DOCTYPE web-app
-PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-"http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-<filter>
- <filter-name>LiftFilter</filter-name>
- <display-name>Lift Filter</display-name>
- <description>The Filter that intercepts lift calls</description>
- <filter-class>net.liftweb.http.LiftFilter</filter-class>
-</filter>
-
-
-<filter-mapping>
- <filter-name>LiftFilter</filter-name>
- <url-pattern>/*</url-pattern>
-</filter-mapping>
-
-</web-app>
Binary file not shown.
@@ -1,9 +0,0 @@
-<lift:surround with="default" at="content">
- <h2>Welcome to your project!</h2>
- <p>
- <lift:helloWorld.howdy>
- <span>Welcome to app at <b:time/></span>
- </lift:helloWorld.howdy>
- </p>
-</lift:surround>
-
@@ -1,5 +0,0 @@
-<lift:surround with="default" at="content">
- Static content... everything you put in the /static
- directory will be served without additions to SiteMap
-</lift:surround>
-
@@ -1,86 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:lift="http://liftweb.net/">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="" />
- <meta name="keywords" content="" />
-
- <title>code:app:0.1-SNAPSHOT</title>
- <lift:CSS.blueprint />
- <lift:CSS.fancyType />
- <script id="jquery" src="/classpath/jquery.js" type="text/javascript"/>
- <script id="json" src="/classpath/json.js" type="text/javascript"/>
- <style type="text/css">
-/* <![CDATA[ */
-.edit_error_class {
- display: block;
- color: red;
-}
-
-.sidebar ul {
- margin:0;
- padding:0;
- border-bottom:1px solid #ccc;
-}
-
-
-.sidebar ul li {
- margin:0;
- padding:0;
- list-style:none;
- border:1px solid #ccc;
- border-bottom:none;
-}
-
-.sidebar ul li a {
- display:block;
- padding:3px;
- text-indent:30px;
- text-decoration:none;
-}
-
-.sidebar ul li span {
- display:block;
- padding:3px;
- text-indent:30px;
- text-decoration:none;
-}
-
-.sidebar ul li a:hover {
- background-color: #eee;
-}
-
-
- /* ]]> */
- </style>
- </head>
- <body>
- <div class="container">
- <div class="column span-12 last" style="text-align: right">
- <h1 class="alt">app<img alt="" id="ajax-loader" style="display:none; margin-bottom: 0px; margin-left: 5px" src="/images/ajax-loader.gif"/></h1>
- </div>
-
- <hr/>
-
- <div class="column span-6 colborder sidebar">
- <hr class="space" />
- <lift:Menu.builder />
- <div>
- <lift:Msgs showAll="true"/>
- <hr class="space" />
- </div>
- </div>
-
- <div class="column span-17 last">
- <lift:bind name="content" />
- </div>
-
- <hr />
- <div class="column span-23 last" style="text-align: center">
- <h4 class="alt">
- <a href="http://www.liftweb.net"><i>Lift</i></a>
- is Copyright 2007-2010 WorldWide Conferencing, LLC. Distributed under an Apache 2.0 License.</h4>
- </div>
-
- </div>
- </body>
-</html>
@@ -1,21 +0,0 @@
-<div>
- <div>Page <wizard:screen_number/> of <wizard:total_screens/></div>
- <wizard:wizard_top> <div> <wizard:bind/> </div> </wizard:wizard_top>
- <wizard:screen_top> <div> <wizard:bind/> </div> </wizard:screen_top>
- <wizard:errors> <div> <ul> <wizard:item> <li> <wizard:bind/> </li> </wizard:item> </ul> </div> </wizard:errors>
- <div> <wizard:fields>
- <table>
- <wizard:line>
- <tr>
- <td>
- <wizard:label error_style="error"/> <wizard:help/> <wizard:field_errors> <ul> <wizard:error> <li> <wizard:bind/> </li> </wizard:error> </ul> </wizard:field_errors>
- </td>
- <td> <wizard:form/> </td>
- </tr>
- </wizard:line>
- </table>
- </wizard:fields> </div>
- <div> <table> <tr> <td> <wizard:prev/> </td> <td> <wizard:cancel/> </td> <td> <wizard:next/> </td> </tr> </table> </div>
- <wizard:screen_bottom> <div> <wizard:bind/> </div> </wizard:screen_bottom>
- <wizard:wizard_bottom> <div> <wizard:bind/> </div> </wizard:wizard_bottom>
-</div>
View
No changes.
Oops, something went wrong.

0 comments on commit dcf16d5

Please sign in to comment.