This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.joda.time.{DateTime, DateTimeConstants, Period => JodaPeriod} | |
import org.joda.time.format.ISOPeriodFormat | |
object waiverSetting extends StringField(this, 32) { | |
override def optional_? = true | |
override def displayName = "Waiver Period" | |
val periodFormatter = ISOPeriodFormat.standard | |
override def defaultValue = periodFormatter.print(new JodaPeriod) | |
def period: JodaPeriod = periodFormatter.parsePeriod(value) | |
def setFromForm(d: Int, h: Int, m: Int) = setBox(Full( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.liftweb.util.ActorPing | |
import net.liftweb.common.Logger | |
class Boot extends Logger { | |
def boot { | |
// where to search snippet | |
LiftRules.addToPackages("your.package") | |
... | |
val myActor = new MyActor | |
myActor ! Msg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
H2 has it's own connection pool manager that H2 claims [1] is faster than using | |
DriverManager.getConnection(). Here's how to configure it for use in a Lift app. | |
/** | |
* H2 db connection manager | |
*/ | |
object H2DBVendor extends ConnectionManager { | |
// create the connection pool | |
private val cp = org.h2.jdbcx.JdbcConnectionPool.create( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To use the H2 console servlet in your Lift app add the following to your web.xml | |
and Boot.scala files. Then you can access it via /console. | |
web.xml: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE web-app | |
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" | |
"http://java.sun.com/dtd/web-app_2_3.dtd"> |
NewerOlder