[Lift] Re: Recent presentation to the Boulder JUG

2009-08-17 Thread marius d.

Great talk Derek !!!

Br's,
Marius

On Aug 18, 2:46 am, Derek Chen-Becker  wrote:
> http://blip.tv/file/2485411
>
> A big thanks to BJUG and especially Fred Jean for recording this. I'll be
> giving another talk in December to the Denver Open Source User Group
> (DOSUG). Hopefully we'll have some exciting announcements concerning 1.1 by
> then!
>
> Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Getting started: Rendering a template (Definitive Guide)

2009-08-17 Thread Morris Jones

Great suggestion, and I'd love to do that.  When I changed the versions 
to 1.1-SNAPSHOT in the POM file, maven wasn't able to find them at 
scala-tools.org.

I guess I need to add another repository.  I'll look into that.

Thanks,
Mojo

David Pollak wrote:
> It's also a really, really good idea to use Lift 1.1-SNAPSHOT or Lift 
> 1.1-M4.  There's a polite error message when in development mode that 
> points out that the particular page needs to be added to SiteMap.
> 
> Derek & Co.  Any way to update the PDF book to use 1.1-/something/?
> 
> On Sun, Aug 16, 2009 at 11:25 PM, Morris Jones  > wrote:
> 
> 
> marius d. wrote:
>  > I believe the book describes the SiteMap quite extensively. Yes, if
>  > you are using SiteMap then you have to add your new page to the
>  > SiteMap.
> 
> I have no doubt that it's there in great detail.  I just stumbled trying
> to experiment with it before I knew what I was doing, or got to that
> chapter.  :)  Thanks ...


-- 
Morris Jones
Monrovia, CA
http://www.whiteoaks.com
Old Town Astronomers: http://www.otastro.org
http://twitter.com/mojo_la

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Deploying

2009-08-17 Thread Peter Robinett

Timothy,

I'm just starting to learn how to use Nginx and would love to some
pointers. How did you set up Nginx? How to do you launch your Jetty
instances?

Peter

On Aug 17, 3:34 pm, Timothy Perrett  wrote:
> I run several sizable applications with NGINX and Jetty... Works like a
> dream.
>
> On 17/08/2009 18:55, "Peter Robinett"  wrote:
>
> > I know David likes running Nginx in front of Jetty
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Symlinks and Javascript Files

2009-08-17 Thread Peter Robinett

mvn -Dorg.mortbay.util.FileResource.checkAliases=False  jetty:run lead
to:

HTTP ERROR 503

Problem accessing /jquery.sparkline.js. Reason:

java.lang.IllegalStateException: Alias checking disabled

Is is just for the symlin in the webroot – requsting the one in the js
subdirectory still causes Lift to say it isn't in the SiteMap.

Any ideas? Thanks?

Peter

On Aug 16, 7:13 am, Derek Chen-Becker  wrote:
> OK, this is not Lift's error message, but rather Jetty's. You need to set
> the following property to tell Jetty not to check symlinks:
>
> -Dorg.mortbay.util.FileResource.checkAliases=False
>
> Derek
>
> On Fri, Aug 14, 2009 at 1:28 PM, Peter Robinett 
> wrote:
>
>
>
> > It is not in my site map. I did try the ResourceServer with the
> > symlinked script in the 'js' subdir.
>
> > Peter
>
> > On Aug 14, 6:43 am, Derek Chen-Becker  wrote:
> > > Is the path to that file defined in your SiteMap?  In the case of using
> > > ResourceServer, the "js" that you've tried means that the script should
> > be
> > > under a "js" subdir.
>
> > > Derek
>
> > > On Thu, Aug 13, 2009 at 7:57 PM, Peter Robinett  > >wrote:
>
> > > > My Lift project is in a git repository and to the repository I've
> > > > added a submodule. Since right now I only want one javascript file
> > > > from this submodule, my thought was to make the directory src/main/
> > > > webroot/js and then make a symbolic link to the javascript file in
> > > > question. Unfortunately, when I try to request the file at
> > > >http://localhost:9090/js/jquery.sparkline.js, I get a 403 response
> > > > that says the page is not defined in my sitemap. There was no note of
> > > > the request in the stdout.
>
> > > > Thinking that the js subdirectory is the problem, I then tried making
> > > > the symlink in the webroot directory and got a 404 error. On stdout it
> > > > said:
> > > > 2009-08-13 18:38:23.051::WARN:  Aliased resource: file:/Users/peter/
> > > > Sites/Equal%20Networks/server/src/main/webapp/
> > > > jquery.sparkline.js==file:/Users/peter/Sites/Equal%20Networks/server/
> > > > vendors/dashboard/www/jquery.sparkline.js
>
> > > > From this I gather than Lift is troubled by the presence of a symlink
> > > > and refused to acknowledge its presence. Is this true? If so, why?
>
> > > > From the thread last week on ExtJS I see a discussion on loading files
> > > > in webroot, including supporting a css directory by adding the
> > > > following to Boot.scala:
> > > > ResourceServer.allow {
> > > >  case "css" :: _ => true
> > > > }
>
> > > > I already have a css file being served from a directory in the exact
> > > > same location without any additions to Boot.scala. Nonetheless, I
> > > > tried the following:
> > > > ResourceServer.allow {
> > > >  case "js" :: _ => true
> > > > }
>
> > > > Unfortunately, this had no effect. So, how can I get my symlinked
> > > > javascript to be server? Or should I just give up on symlinks
> > > > altogether (I'm not a git master, so perhaps that was the wrong
> > > > approach anyway).
>
> > > > Peter Robinett
>
> > > > PS I'm on 1.1-SNAPSHOT.
> > > > PPS The YUI Compressor works well. Very cool.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Recent presentation to the Boulder JUG

2009-08-17 Thread David Pollak
Cool beans!

On Mon, Aug 17, 2009 at 4:46 PM, Derek Chen-Becker wrote:

> http://blip.tv/file/2485411
>
> A big thanks to BJUG and especially Fred Jean for recording this. I'll be
> giving another talk in December to the Denver Open Source User Group
> (DOSUG). Hopefully we'll have some exciting announcements concerning 1.1 by
> then!
>
> Derek
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Recent presentation to the Boulder JUG

2009-08-17 Thread Derek Chen-Becker
http://blip.tv/file/2485411

A big thanks to BJUG and especially Fred Jean for recording this. I'll be
giving another talk in December to the Denver Open Source User Group
(DOSUG). Hopefully we'll have some exciting announcements concerning 1.1 by
then!

Derek

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: makeUtf8 and HttpServletRequest broken in new build???

2009-08-17 Thread Timothy Perrett

They would still output the same of course ­ I just see a need for a few
more starting points and I don¹t want to clutter the main codebase so a
little bit of housekeeping is in order :-)

Cheers, Tim

On 17/08/2009 23:43, "David Pollak"  wrote:

> As long as you don't mess with the Basic archetype... I'm cool.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: makeUtf8 and HttpServletRequest broken in new build???

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 3:32 PM, Timothy Perrett wrote:

>
> I think his point is that he wants it added by default, rather than there
> is any problem. Personally, I don’t see the point of adding it by default...
> But hey.
>

It is done by default in the Basic archetype.


>
>
> On this note, I’ve been thinking of perhaps having a re-shuffle in the code
> base to group the archetypes together in a module and add a bunch of other
> archetypes for various things such as:
>
> PayPal
> Akka
> AMQP
> Etc.
>
> Thoughts?
>

As long as you don't mess with the Basic archetype... I'm cool.


>
>
> Cheers, Tim
>
> On 17/08/2009 18:10, "David Pollak"  wrote:
>
> I'm able to create a new "Basic" Lift app from archetypes... and it works
> just fine.  Can you tell us what command you typed to get an archetype that
> did not work?
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Deploying

2009-08-17 Thread Timothy Perrett


I run several sizable applications with NGINX and Jetty... Works like a
dream.

On 17/08/2009 18:55, "Peter Robinett"  wrote:

> I know David likes running Nginx in front of Jetty



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: makeUtf8 and HttpServletRequest broken in new build???

2009-08-17 Thread Timothy Perrett

I think his point is that he wants it added by default, rather than there is
any problem. Personally, I don¹t see the point of adding it by default...
But hey.

On this note, I¹ve been thinking of perhaps having a re-shuffle in the code
base to group the archetypes together in a module and add a bunch of other
archetypes for various things such as:

PayPal
Akka
AMQP
Etc.

Thoughts?

Cheers, Tim

On 17/08/2009 18:10, "David Pollak"  wrote:

> I'm able to create a new "Basic" Lift app from archetypes... and it works just
> fine.  Can you tell us what command you typed to get an archetype that did not
> work?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: CMS for Lift?

2009-08-17 Thread Ewan

Also opencms and alfresco both Java/J2EE

On Aug 17, 7:09 pm, Stefan Scott  wrote:
> I'll chime in here since I've been evaluating several CMSs lately.
>
> I previously used Drupal and WordPress as my CMSs - now however I'm
> moving everything to MODx because of the increased flexibility and
> more-logical organization, and I'm also impressed with the demos of
> SilverStripe, TypoLight Typo3 - and LifeRay, which is written in Java
> instead of PHP. (LifeRay seems to be much more than a CMS - it claims
> to offer collaboration and social networking.)
>
> Some on-line demos here:
>
> MODx -http://trymodx.com/
> SilverStripe -http://demo.silverstripe.com/
> TypoLight -http://www.typolight.org/demo.html
> Typo3 -http://testsite.punkt.de/
> LifeRay -http://demo.liferay.net/web/guest/home
>
> It would be good to take a look at these additional CMSs as they offer
> some capabilities beyond WordPress and Drupal.
>
> Drupal in particular is wildly popular but it may no longer be the
> best candidate to imitate, as it is less well-organized and less
> flexible/customizable (compared say to MODx, which lets you take CSS
> from an existing site and use it for your site, and which lets you
> apply a template to a single document, unlike Drupal where a theme
> applies to the entire site). To keep up with advanced CMSs, Drupal has
> evolved to use a bunch of (often redundant or competing) modules which
> are not always compatible with current releases. Examples of things
> that Drupal treats as "add-ons" (modules) are: custom content (the
> "CCK/Views" modules, with their confusing albeit AJAX-y interface),
> multi-language, and photo galleries (I gave up on Drupal after a few
> days of trying out various photo gallery modules, none of which I
> could understand). Finally, it seems odd that Drupal, as a "content
> management system", lacks something all advanced CMSs have: a
> *treeview* of the overall site content. Instead, it only has a jumbled
> *list* of content, sorted by not by location but by last edited (!),
> with all translations also scattered through the list based on last-
> edited date, and this list is buried several levels deep in the admin
> navigation system, unlike the site content treeview navigator which is
> prominently displayed (usually on the left) in advanced CMSs. (Of
> course, I don't want to veer off-topic here and start a CMS flame war
> here in this liftweb discussion. :-)
>
> Regarding "dynamic site map" creation - I do know that MODx has
> something like this, using WayFinder to create a menu from selected
> branches of the site's document tree, automatically including any
> updated sub-branches, and I believe most other advanced CMSs have
> something like this too.
>
> LifeRay seems very intriguing - it claims to do a lot beyond just CMS.
> Since it's written in Java (not PHP), who knows if some of its code
> could be leveraged in Scala.
>
> So these might be some additional interesting CMSs to keep in mind
> (beyond Drupal and WordPress) when building a new CMS using liftweb.
>
> - Stefan Scott
>
> On Aug 16, 3:13 pm, glenn  wrote:
>
>
>
> > Philip,
>
> > I'm working on a cms system in Lift. Right now, it allows for content
> > creation using wymeditor, which can be
> > tagged and displayed as an atom feed. This code is runnable, simple as
> > it is. I'm working on adding dynamic site map creation as well. Is
> > this kind
> > of what you have in mind by a CMS system.
>
> > I'm very interested in workiing with others on a CMS that can compete
> > with any of the PHP varieties out there, such as Drupal and Wordpress.
> > Most of these simply use plugins from one ore more javascript
> > libraries out there for site creation, and Lift certainly  can do
> > javascript as well as, if not
> > better than, these systems.
>
> > Glenn...
>
> > On Aug 15, 11:08 pm, philip  wrote:
>
> > > Hi,
>
> > > Has anyone made a CMS for Liftweb? or I should say, in liftweb.
>
> > > Thanks, Philip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Test mail

2009-08-17 Thread Naftoli Gugenheim
Neat, thanks!

On Mon, Aug 17, 2009 at 4:40 PM, Ryan Donahue  wrote:

>
> I use a "fake" smtp server called Dumbster:
> http://quintanasoft.com/dumbster/
>
> If run.mode is development or test, my app starts an embedded instance
> of dumbster on an unused port and configures Mailer to connect to that
> port.  Any email sent by the app is received by dumbster (and not
> relayed).  If run.mode=development, I use ActorPing to periodically
> iterate over the received messages and log them.  If run.mode=test,
> then I leave the messages alone so unit tests can check the message
> count and inspect the messages.
>
> Here's some code to get started.
>
> Put this somewhere it'll get executed early (e.g. in Boot):
>
>  Props.mode match {
>case Props.RunModes.Test => LocalSmtp.start(mailPort.get,
> LocalSmtp.Mode.Queue)
>case Props.RunModes.Development => LocalSmtp.start(mailPort.get)
>  }
>
> And here's a wrapper around Dumbster's SimpleSmtpServer for easy
> access to the messages and logging and some other tricks to pop
> messages as they are read:
>
> object LocalSmtp extends Actor {
>
>  private var server : Box[SimpleSmtpServer] = Empty
>  private val log = LogBoot.loggerByName("LocalSmtp")
>  private val logInterval = Helpers.TimeSpan(Helpers.seconds(5))
>
>  var mode : Mode.Value = Mode.Log
>  var port : Int = 7725
>
>  object Mode extends Enumeration {
>val Queue = Value(1, "Queue")
>val Log = Value(2, "Log")
>  }
>
>  def start(port:Int) : Unit = {
>this.port = port
>start
>  }
>
>  def start(port:Int, mode:Mode.Value) : Unit = {
>this.port = port
>this.mode = mode
>start
>  }
>
>  override def start = {
>restartServer
>if (mode == Mode.Log) {
>  ActorPing.scheduleAtFixedRate(this, LogMessagesEvent,
> logInterval, logInterval)
>}
>super.start
>  }
>
>  override def exit = {
>stopServer
>super.exit
>  }
>
>  private def restartServer {
>stopServer
>server = Full(SimpleSmtpServer.start(port))
>  }
>
>  private def stopServer {
>server.map(_.stop)
>server = Empty
>  }
>
>  def messages : Iterator[SmtpMessage] = {
>server match {
>  case Full(s) => {
>import Conversions._
>val msgs = new IteratorWrapper(s.getReceivedEmail.asInstanceOf
> [java.util.Iterator[SmtpMessage]])
>restartServer
>msgs
>  }
>  case _ => Seq[SmtpMessage]().elements
>}
>  }
>
>  def msgCount = server match {
>case Full(s) => s.getReceivedEmailSize
>case _ => 0
>  }
>
>  def act = {
>loop {
>  react {
>case LogMessagesEvent => if (msgCount > 0) for(msg <-
> messages) {
>  log.info("RECEIVED EMAIL
> ---")
>  log.info("From: " + msg.getHeaderValue("From"))
>  log.info("To: " + msg.getHeaderValue("To"))
>  log.info("Subject: " + msg.getHeaderValue("Subject"))
>  log.info("Body: " + msg.getBody)
>  log.info
> ("--")
>}
>case Scheduled => log.info("LocalSmtp logging is scheduled")
>case any => log.error("LocalSmtp actor received invalid event:
> "+any.asInstanceOf[Object].getClass.getName)
>  }
>}
>  }
>
>  case object LogMessagesEvent
> }
>
> On Aug 17, 3:41 pm, Naftoli Gugenheim  wrote:
> > How can I test mailing when offline? (Besides having a switch in my
> program
> > to output mailed emails.)It would be nice if you could have all mails
> > logged, with all their headers and body, and whether it was sent,
> preferably
> > to a separate log file.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] GitHub markup

2009-08-17 Thread Naftoli Gugenheim
I wrote (in a major rush) an example of using Paginator on the wiki.
http://wiki.github.com/dpp/liftweb/example-paginating-mapper-based-snippets-with-sortable-headersI
haven't figured out the markup too well though so it's not displaying
correctly. Can someone fix it? Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Test mail

2009-08-17 Thread Ryan Donahue

I use a "fake" smtp server called Dumbster:
http://quintanasoft.com/dumbster/

If run.mode is development or test, my app starts an embedded instance
of dumbster on an unused port and configures Mailer to connect to that
port.  Any email sent by the app is received by dumbster (and not
relayed).  If run.mode=development, I use ActorPing to periodically
iterate over the received messages and log them.  If run.mode=test,
then I leave the messages alone so unit tests can check the message
count and inspect the messages.

Here's some code to get started.

Put this somewhere it'll get executed early (e.g. in Boot):

  Props.mode match {
case Props.RunModes.Test => LocalSmtp.start(mailPort.get,
LocalSmtp.Mode.Queue)
case Props.RunModes.Development => LocalSmtp.start(mailPort.get)
  }

And here's a wrapper around Dumbster's SimpleSmtpServer for easy
access to the messages and logging and some other tricks to pop
messages as they are read:

object LocalSmtp extends Actor {

  private var server : Box[SimpleSmtpServer] = Empty
  private val log = LogBoot.loggerByName("LocalSmtp")
  private val logInterval = Helpers.TimeSpan(Helpers.seconds(5))

  var mode : Mode.Value = Mode.Log
  var port : Int = 7725

  object Mode extends Enumeration {
val Queue = Value(1, "Queue")
val Log = Value(2, "Log")
  }

  def start(port:Int) : Unit = {
this.port = port
start
  }

  def start(port:Int, mode:Mode.Value) : Unit = {
this.port = port
this.mode = mode
start
  }

  override def start = {
restartServer
if (mode == Mode.Log) {
  ActorPing.scheduleAtFixedRate(this, LogMessagesEvent,
logInterval, logInterval)
}
super.start
  }

  override def exit = {
stopServer
super.exit
  }

  private def restartServer {
stopServer
server = Full(SimpleSmtpServer.start(port))
  }

  private def stopServer {
server.map(_.stop)
server = Empty
  }

  def messages : Iterator[SmtpMessage] = {
server match {
  case Full(s) => {
import Conversions._
val msgs = new IteratorWrapper(s.getReceivedEmail.asInstanceOf
[java.util.Iterator[SmtpMessage]])
restartServer
msgs
  }
  case _ => Seq[SmtpMessage]().elements
}
  }

  def msgCount = server match {
case Full(s) => s.getReceivedEmailSize
case _ => 0
  }

  def act = {
loop {
  react {
case LogMessagesEvent => if (msgCount > 0) for(msg <-
messages) {
  log.info("RECEIVED EMAIL
---")
  log.info("From: " + msg.getHeaderValue("From"))
  log.info("To: " + msg.getHeaderValue("To"))
  log.info("Subject: " + msg.getHeaderValue("Subject"))
  log.info("Body: " + msg.getBody)
  log.info
("--")
}
case Scheduled => log.info("LocalSmtp logging is scheduled")
case any => log.error("LocalSmtp actor received invalid event:
"+any.asInstanceOf[Object].getClass.getName)
  }
}
  }

  case object LogMessagesEvent
}

On Aug 17, 3:41 pm, Naftoli Gugenheim  wrote:
> How can I test mailing when offline? (Besides having a switch in my program
> to output mailed emails.)It would be nice if you could have all mails
> logged, with all their headers and body, and whether it was sent, preferably
> to a separate log file.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift templates lack obvious stuff (?)

2009-08-17 Thread incarn...@whiteants.net

Oh, it certainly make more sense now, thanks a lot. My only concern is
that "with-param" is not very self-descripting name for this feature.
I would suggest something like

  
...
  

Any markup should be readable and have some semantics. And it should
be documented in very basics, I presume.
Thanks again, Mr. Marius.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SHtml.a generating an with bad attributes

2009-08-17 Thread marius d.

Ok .. I think I know what it is ... I'll try to fix it tomorrow
(unless Dave thinks of something sooner). The attributes or surround
are temporary added inside processSurroundAndInclude and for lift
builtin snippets using S.attrs or S.attrsToMetaData etc. the surround
attributes are merged with lift:a attributes for some reason.


Dave did you add this recently ? ... I mean the call to S.setVars
(elm.attributes) {processSurroundAndInclude(...) } inside
LiftSession.processSurroundAndInclude (LiftSession line 935)


Br's,
Marius

On Aug 17, 11:14 pm, "marius d."  wrote:
> Looks like a bug to me
>
> Br's,
> Marius
>
> On Aug 17, 11:04 pm, harryh  wrote:
>
> > Further information:
>
> > Stripping things down to almost nothing, a test.html:
>
> > 
> >  ignore
> > 
>
> > Generates the following HTML:
>
> >  > key="xxx">ignore
>
> > Still confused on how the "with" and "at" attributes are getting added
> > to the  tag.
>
> > -harryh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Invoking Views

2009-08-17 Thread Naftoli Gugenheim
Sorry, I didn't notice that you were using views.

On Mon, Aug 17, 2009 at 4:17 PM, Michel Klijn wrote:

>
> Thank you, one thing though. The expression: "MyView" :: _  didn't
> convert into a Link object with directory listing true. So instead I
> used:
> Menu(Loc("MyView",new Link("MyView" :: Nil, true),"MyView"))
>
> I thought that all the views were implicitly mapped to viewClass/
> method. I understand now that i'll have to use the sitemap
>
> cheers,
>
> Michel
>
> On Aug 17, 1:54 pm, "marius d."  wrote:
> > Please add the path to your SiteMap.
> >
> > Menu(Loc("MyView", "MyView" :: _, "MyView"))
> >
> > Br's,
> > Marius
> >
> > On Aug 17, 8:25 pm, Michel Klijn  wrote:
> >
> >
> >
> > > Hi,
> >
> > > I'm new to Lift and I've been fooling around with all it's cool
> > > features.
> >
> > > At the moment, I'm trying to access MyView that I have defined in the
> > > view package. When I try to access the view via the URL:"
> http://localhost:8080/MyView/hi"; I get the following message:
> > > The requested page was not defined in your SiteMap, so access was
> > > blocked.
> >
> > > According to the view chapter (3.7)  in the book(Exploring Lift August
> > > 12, 2009) I downloaded from Github, it should work this way.
> >
> > > I'm a bit lost... what is it that I'm doing wrong?
> >
> > > thanks,
> >
> > > Michel
> >
> > > P.S snippets,and comets do work
> >
> > > package net.mkl.zooloretto.view
> > > import ...
> > > class MyView extends LiftView{
> >
> > > override def dispatch = {
> > >  case "hi" => doRender _
> > > }
> >
> > > def doRender () : NodeSeq = {
> > > 
> > > hai!
> > > 
> >
> > > }
> >
> > > }
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SHtml.a generating an with bad attributes

2009-08-17 Thread harryh

> Looks like a bug to me

It does to me as well. And a somewhat serious one.  FYI this bug (if
it is indeed a bug) does *not* occur in Lift 1.0, but does in 1.1-M1
and later versions.

-harryh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Invoking Views

2009-08-17 Thread Michel Klijn

Thank you, one thing though. The expression: "MyView" :: _  didn't
convert into a Link object with directory listing true. So instead I
used:
Menu(Loc("MyView",new Link("MyView" :: Nil, true),"MyView"))

I thought that all the views were implicitly mapped to viewClass/
method. I understand now that i'll have to use the sitemap

cheers,

Michel

On Aug 17, 1:54 pm, "marius d."  wrote:
> Please add the path to your SiteMap.
>
> Menu(Loc("MyView", "MyView" :: _, "MyView"))
>
> Br's,
> Marius
>
> On Aug 17, 8:25 pm, Michel Klijn  wrote:
>
>
>
> > Hi,
>
> > I'm new to Lift and I've been fooling around with all it's cool
> > features.
>
> > At the moment, I'm trying to access MyView that I have defined in the
> > view package. When I try to access the view via the 
> > URL:"http://localhost:8080/MyView/hi"; I get the following message:
> > The requested page was not defined in your SiteMap, so access was
> > blocked.
>
> > According to the view chapter (3.7)  in the book(Exploring Lift August
> > 12, 2009) I downloaded from Github, it should work this way.
>
> > I'm a bit lost... what is it that I'm doing wrong?
>
> > thanks,
>
> > Michel
>
> > P.S snippets,and comets do work
>
> > package net.mkl.zooloretto.view
> > import ...
> > class MyView extends LiftView{
>
> >         override def dispatch = {
> >                  case "hi" => doRender _
> >         }
>
> >         def doRender () : NodeSeq = {
> >                 
> >                         hai!
> >                 
>
> >         }
>
> > }

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SHtml.a generating an with bad attributes

2009-08-17 Thread marius d.

Looks like a bug to me


Br's,
Marius

On Aug 17, 11:04 pm, harryh  wrote:
> Further information:
>
> Stripping things down to almost nothing, a test.html:
>
> 
>  ignore
> 
>
> Generates the following HTML:
>
>  key="xxx">ignore
>
> Still confused on how the "with" and "at" attributes are getting added
> to the  tag.
>
> -harryh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SHtml.a generating an with bad attributes

2009-08-17 Thread harryh

Further information:

Stripping things down to almost nothing, a test.html:


 ignore


Generates the following HTML:

ignore

Still confused on how the "with" and "at" attributes are getting added
to the  tag.

-harryh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Attributes question

2009-08-17 Thread marius d.

One small advice ... your code would probably be be read by more
people if some minimal formatting is applied :) ... I can imagine you
didn't do it on purpose though :)

Actually I like it.

Just something really unimportant and subjective: how do you feel
about ->> instead of %> ? (I understood your rationale of choosing %)

Br's,
Marius

On Aug 17, 10:02 pm, Naftoli Gugenheim  wrote:
> Hi, sorry, not sure why I didn't see your message earlier. Strange... Has
> anyone written any code to address this topic in the meantime? In case not,
> here's all the code I've written for such purposes; tell me what you think.
>
> def keepAttrs(elem: Elem) = (ns: NodeSeq) => BindHelpers.currentNode match {
> case Full(inElem) => elem % inElem.attributes case other => elem } protected
> class Keepable(elem: Elem) { def %% = keepAttrs(elem) } implicit def
> elemToKeepable(elem: Elem): Keepable = new Keepable(elem) protected class
> KeepBind(name: String) { val emptyFn: NodeSeq=>NodeSeq = _ => NodeSeq.Empty
> import scala.xml.{Node, Text} import net.liftweb.util.Bindable def %>(in:
> Elem) = FuncBindParam(name, keepAttrs(in)) def %>(in: Box[Elem]) =
> FuncBindParam(name, in.map(keepAttrs) openOr emptyFn) def %>(in:
> Option[Elem]) = FuncBindParam(name, in.map(keepAttrs) getOrElse emptyFn) }
> implicit def strToKeepAssoc(name: String): KeepBind = new KeepBind(name)
>
> keepAttrs could actually be implemented shorter:
>
> elem currentNode.map(_.attributes).openOr(scala.xml.Null))
>
> etc.
>
> On Fri, Aug 14, 2009 at 4:50 PM, marius d.  wrote:
>
> > IMHO:
>
> > The problem with
>
> > "name" some_new_operator_beside_-> expr
>
> > would lead to a handful of overloading as -> in SuperArrowAssoc. Looks
> > a little messy to me.
>
> > Looks like we already have a way to do this:
>
> > import Helpers._
>
> > "name" -> {node: NodeSeq => mixinAttributes(expr _that_yields_an_Elem)
> > (node)}
>
> > Would that be too ... boilerplate for you?
>
> > Br's,
> > Marius
>
> > On Aug 14, 11:18 pm, Naftoli Gugenheim  wrote:
> > > As I mentioned, I wrote some code that allows you to use %> instead of ->
> > to preserve the attributes. (I chose it because the % symbol is used to
> > merge attributes to an Elem.) The right side can be an Elem or a Box/Option
> > of an Elem.
> > > What do people think of this syntax?
> > > P.S. Another way is to append ".%%" to an Elem making it into a NodeSeq
> > function.
>
> > > -
>
> > > marius d. wrote:
>
> > > The book exposes current functionality for Lift 1.0. If functionality
> > > X was not intended to be there is a different story, but regardless it
> > > is there and the way I see it it is OK to be in the book.
>
> > > Personally I don't see it as defect as preserving attributes (to the
> > > top level resulting NodeSeq) may be quite handy in certain situations
> > > even that contradicts David's design intent. But this is just a
> > > personal opinion. After David removes this, a helper to copy
> > > attributes is needed IMO. So Naftoli if you want to do this please go
> > > ahead ... or if you don't want it I'll do it.
>
> > > Br's,
> > > Marius
>
> > > On Aug 14, 7:43 pm, Naftoli Gugenheim  wrote:
>
> > > > The book seems to think it's intentional!
> > > > But why can't unprefixed nodes by preserved automatically? Maybe there
> > could be a setting?
> > > > Thanks.
>
> > > > -
>
> > > > David Pollak wrote:
>
> > > > On Fri, Aug 14, 2009 at 9:23 AM, Naftoli Gugenheim <
> > naftoli...@gmail.com>wrote:
>
> > > > > Exactly!
>
> > > > > -
> > > > > Derek Chen-Becker wrote:
>
> > > > > Basically, you're asking why a bind tag like
>
> > > > > 
>
> > > > > doesn't preserve the id and class attrs when it binds, but
>
> > > > > 
>
> > > > > does?
>
> > > > If bind("ledger", ,
> > > > "entry" -> )
> > > > results in anything other than  it's a defect.
>
> > > > Wow... looks like it does... it's a defect and I'll fix it.
>
> > > > > Derek
>
> > > > > On Fri, Aug 14, 2009 at 10:08 AM, Naftoli Gugenheim <
> > naftoli...@gmail.com
> > > > > >wrote:
>
> > > > > > Of course you can access it from the snippet. But if you want it to
> > be
> > > > > > output automatically, then you prefix it with whatever the node's
> > prefix
> > > > > is.
> > > > > > In other words, by default it's not outputted.
>
> > > > > > -
> > > > > > David Pollak wrote:
>
> > > > > > On Thu, Aug 13, 2009 at 9:06 PM, Naftoli Gugenheim <
> > naftoli...@gmail.com
> > > > > > >wrote:
>
> > > > > > > What I would like to do:
> > > > > > > Name  > size="10"
> > > > > > > class="special" style="vertical-align: top" maxlength="5"
> > tabindex="1"
> > > > > />
> > > > > > > Okay, just a little contrived...
> > > > > > > My understanding is you can do this by prefixing the attribute
> > with
> > > > > > > "lift:"; otherwise it will not be output but is available to the
> > > > > snippet
> > > > > > > code, i.e

[Lift] Re: bind implicits

2009-08-17 Thread Naftoli Gugenheim
How about BindPlus? BindUtil(s)? Better name anyone?I could put bindSwitch*
there too, as well as other specialized binds. bindSwitch isn't too useful
without chaining.
*bindSwitch lets you have two or more parts of the view which act as a
switch -- only one is visible at a time -- even if they each have different
bind logic. It lets you write:
// with implicit: xhtml.bindSwitch("prefix", ...
// without implicit:
bindSwitch("prefix", xhtml,
  Seq("noResults", "hasResults")) {
results.size match {
  case 0 => 0 -> bind("prefix2", xhtml, "link" -> SHtml.link(...)
  case 1 => 1 -> bind("prefix2", xhtml, ...)
}
}

Also, maybe I should put keepAttrs (wraps an Elem in a NodeSeq=>NodeSeq that
preserves the attributes) in BindHelpers,
Then I could put an implicit in the new object that lets you write more
concisely:
bind("prefix", xhtml,
  "edit"  %>  SHtml.text(...)
)
This will let you put attributes in the view. For example,




On Mon, Aug 17, 2009 at 3:49 PM, David Pollak  wrote:

>
>
> On Mon, Aug 17, 2009 at 12:48 PM, Naftoli Gugenheim 
> wrote:
>
>> Should I leave it in view.Util? Or is there a better place? Because I
>> really meant it (actually the whole view package) to support Mapper-based
>> views, and this isn't related to Mapper.
>
>
> Yeah... put them in a separate object (Not Helpers or a trait that gets
> rolled into Helpers) in net.liftweb.util
>
>
>>
>>
>>
>> On Mon, Aug 17, 2009 at 3:46 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Aug 17, 2009 at 12:44 PM, Naftoli Gugenheim <
>>> naftoli...@gmail.com> wrote:
>>>
 What do people think of the following? I wrote some implicits that allow
 you to call bind as a method on a NodeSeq, allowing you to chain several
 bind statements.For example:
   def edit(xhtml: NodeSeq) =
 xhtml.bind("prefix1",
   "label1" -> value1,
   "label2" -> value2
 ).bind("prefix2",
   "label1" -> value3,
   "label2" -> value4
 )

 This already exists in net.liftweb.mapper.view.Util.
 My question is whether I should put it into BindHelpers so it would
 always be available.

>>>
>>> I would prefer that it's not automatically imported when you import
>>> Helpers._
>>>
>>>
  Thanks.




>>>
>>>
>>> --
>>> Lift, the simply functional web framework http://liftweb.net
>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>> Follow me: http://twitter.com/dpp
>>> Git some: http://github.com/dpp
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> 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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ws-generated code in lift

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 11:50 AM, Naftoli Gugenheim wrote:

> Does that imply any reason not to have %> as a bind-with-attributes
> syntax? See
> http://groups.google.com/group/liftweb/msg/1fbf7df2009abf9e?hl=en
>

No.  The two concepts are very far apart (and %> is a work-in-progress
operator)


>
>
> On Mon, Aug 17, 2009 at 1:20 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker > > wrote:
>>
>>> I think that that's a general issue with SOAP, not particular to Lift ;)
>>>
>>>
>>> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett
>>>  wrote:
>>>

 Id be interested to hear those stories... all the ones i've heard so
 far that involve anything to do with SOAP have usually been tales of
 woe ;-)

>>>
>> With Goat Rodeo, you can define message flow with an abstract source
>> (input) and sink (output) in the form:
>>
>> Foo %> Bar %> (Baz * Distribution)
>>
>> You can define fork/join constructs, tee constructs, etc. in the high
>> level flow description.  The flow description defines the type-safe
>> progression from each logic unit.  The location of each logic unit and the
>> threading/transport model is decided at runtime.  This means that you can
>> define logic models and plug in an "Akka distribution and threading"
>> strategy for production or a "single threaded" strategy for your local test
>> harness.
>>
>> You'll also be able to register the composed modules that can be composed
>> into larger flows.
>>
>> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
>> and sink for the logic flow.
>>
>>
>>
>>>
 Cheers, Tim

 On Aug 15, 6:47 pm, David Pollak 
 wrote:
 > I think there will be an important Goat Rodeo/Lift/SOAP story that
 I'll be
 > able to tell in a week or so... integrating WS into Lift (rather than
 > running on the side) will, I think, have benefits.
 >
 > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
 wrote:
 >
 > > Sounds like a classic situation what is technically possible is
 > > one thing but what you should do to preserve your sanity is most
 > > probably another ;-)
 >
 > > Good luck!
 >
 > > Cheers, Tim
 >
 > > On Aug 15, 4:29 am, Meredith Gregory 
 wrote:
 > > > Tim, Viktor,
 >
 > > > Thanks for the insights and sharing of experience. i'm in a
 situation
 > > where
 > > > i'm working with legacy stuff. i was just wondering how deeply
 into lift
 > > i
 > > > could push the WSDL-based Java handlers.
 >
 > > > Best wishes,
 >
 > > > --greg
 >
 > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
 >>> > > >wrote:
 >
 > > > > I agree with Viktor - in a similar vein, this is exactly what I
 > > > > implemented with Akka; the servlet runs in conjunction with
 lifts
 > > > > filter and lift just hands off stuff it doesnt know what to do
 with.
 > > > > So if you want to use AxisServlet or whatever its real easy.
 >
 > > > > From my point of view, you'd need a good reason to bring the
 SOAP
 > > > > stuff into lift; right now i havent found one... I write a lot
 of lift
 > > > > apps that consume SOAP services, but as yet have no good reason
 to
 > > > > write a SOAP serving app with lift - If i were to do one, id do
 > > > > exactly as with the JAX-RS stuff in Akka and
 passNotFoundToChain.
 >
 > > > > Cheers, Tim
 >
 > > > > On Aug 14, 10:24 pm, Viktor Klang 
 wrote:
 > > > > > Gregory,
 >
 > > > > > Depending on what WS-* stuff you're using, you _should_ be
 able to
 > > wire
 > > > > the
 > > > > > AxisServlet in web.xml under /ws/* or something like that, and
 then
 > > have
 > > > > > lift passNotFoundToChain=true
 >
 > > > > > But I guess it boils down to what liftiness you're planning to
 do.
 > > Can
 > > > > you
 > > > > > elaborate a bit on what you're aiming for?
 >
 > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
 > > > > > wrote:
 >
 > > > > > > Tim, Viktor,
 >
 > > > > > > Do you wire your SOAP services into lift or do you keep that
 > > > > independent? i
 > > > > > > was just talking to DPP and according to him it appears you
 can
 > > > > successfully
 > > > > > > wire WS-generated code anywhere along in the http-request
 > > processing
 > > > > > > pipeline. He pointed out a gotcha that i think can be
 circumvented
 > > with
 > > > > > > HttpServletResponse trampoline. Both lift and the
 WS-generated code
 > > are
 > > > > > > likely to want to be in the driver's seat regarding who's
 returning
 > > the
 > > > > > > bytes. But, i think you can just fool the WS-generated code
 into
 > > > > thinking
 > > > > > > it's got an HttpServletRespons

[Lift] Re: bind implicits

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 12:48 PM, Naftoli Gugenheim wrote:

> Should I leave it in view.Util? Or is there a better place? Because I
> really meant it (actually the whole view package) to support Mapper-based
> views, and this isn't related to Mapper.


Yeah... put them in a separate object (Not Helpers or a trait that gets
rolled into Helpers) in net.liftweb.util


>
>
>
> On Mon, Aug 17, 2009 at 3:46 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Mon, Aug 17, 2009 at 12:44 PM, Naftoli Gugenheim > > wrote:
>>
>>> What do people think of the following? I wrote some implicits that allow
>>> you to call bind as a method on a NodeSeq, allowing you to chain several
>>> bind statements.For example:
>>>   def edit(xhtml: NodeSeq) =
>>> xhtml.bind("prefix1",
>>>   "label1" -> value1,
>>>   "label2" -> value2
>>> ).bind("prefix2",
>>>   "label1" -> value3,
>>>   "label2" -> value4
>>> )
>>>
>>> This already exists in net.liftweb.mapper.view.Util.
>>> My question is whether I should put it into BindHelpers so it would
>>> always be available.
>>>
>>
>> I would prefer that it's not automatically imported when you import
>> Helpers._
>>
>>
>>>  Thanks.
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Git some: http://github.com/dpp
>>
>>
>>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: bind implicits

2009-08-17 Thread Naftoli Gugenheim
Should I leave it in view.Util? Or is there a better place? Because I really
meant it (actually the whole view package) to support Mapper-based views,
and this isn't related to Mapper.


On Mon, Aug 17, 2009 at 3:46 PM, David Pollak  wrote:

>
>
> On Mon, Aug 17, 2009 at 12:44 PM, Naftoli Gugenheim 
> wrote:
>
>> What do people think of the following? I wrote some implicits that allow
>> you to call bind as a method on a NodeSeq, allowing you to chain several
>> bind statements.For example:
>>   def edit(xhtml: NodeSeq) =
>> xhtml.bind("prefix1",
>>   "label1" -> value1,
>>   "label2" -> value2
>> ).bind("prefix2",
>>   "label1" -> value3,
>>   "label2" -> value4
>> )
>>
>> This already exists in net.liftweb.mapper.view.Util.
>> My question is whether I should put it into BindHelpers so it would always
>> be available.
>>
>
> I would prefer that it's not automatically imported when you import
> Helpers._
>
>
>>  Thanks.
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> 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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: lift-openid broken

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 12:35 PM, marius d.  wrote:

>
> Done.


Tnx


>
>
> Br's,
> Marius
>
> On Aug 17, 9:39 pm, David Pollak 
> wrote:
> > On Sun, Aug 16, 2009 at 11:52 PM, marius d. 
> wrote:
> >
> > > Thank you for pointing this out. Most likely I'll make the corrections
> > > today.
> >
> > Please let us know when the changes are rolled in.
> >
> >
> >
> >
> >
> > > Br's,
> > > Marius
> >
> > > On Aug 17, 1:48 am, Vassil  wrote:
> > > > Hello guys,
> >
> > > > It seems the HTTP refactoring around 10 days ago broke OpenId. Here's
> > > > a small patch that made it work for me:
> >
> > > > --- dpp-liftweb-e845b3c129baf16bc35b46df9ee5b5049d4aee3a/lift-openid/
> > > > src/main/scala/net/liftweb/openid/OpenId.scala 2009-08-16
> > > > 17:36:58.0 +0300
> > > > +++ dpp-liftweb-fixed/lift-openid/src/main/scala/net/liftweb/openid/
> > > > OpenId.scala2009-08-17 01:43:46.0 +0300
> > > > @@ -267,7 +267,7 @@
> >
> > > >  // retrieve the previously stored discovery information
> > > >  val discovered = httpReq.session.attribute("openid-disc") match
> {
> > > > -  case Full(d: DiscoveryInformation)=> d
> > > > +  case d: DiscoveryInformation=> d
> > > >case _ => throw ResponseShortcutException.redirect("/")
> > > >  }
> >
> > > > @@ -275,7 +275,7 @@
> > > >  var receivingURL = httpReq.url
> > > >  val queryString = httpReq.queryString openOr ""
> > > >  if (queryString != null && queryString.length() > 0) {
> > > > -  receivingURL += "?" + httpReq.queryString;
> > > > +  receivingURL += "?" + queryString;
> > > >  }
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: bind implicits

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 12:44 PM, Naftoli Gugenheim wrote:

> What do people think of the following? I wrote some implicits that allow
> you to call bind as a method on a NodeSeq, allowing you to chain several
> bind statements.For example:
>   def edit(xhtml: NodeSeq) =
> xhtml.bind("prefix1",
>   "label1" -> value1,
>   "label2" -> value2
> ).bind("prefix2",
>   "label1" -> value3,
>   "label2" -> value4
> )
>
> This already exists in net.liftweb.mapper.view.Util.
> My question is whether I should put it into BindHelpers so it would always
> be available.
>

I would prefer that it's not automatically imported when you import
Helpers._


> Thanks.
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] bind implicits

2009-08-17 Thread Naftoli Gugenheim
What do people think of the following? I wrote some implicits that allow you
to call bind as a method on a NodeSeq, allowing you to chain several bind
statements.For example:
  def edit(xhtml: NodeSeq) =
xhtml.bind("prefix1",
  "label1" -> value1,
  "label2" -> value2
).bind("prefix2",
  "label1" -> value3,
  "label2" -> value4
)

This already exists in net.liftweb.mapper.view.Util.
My question is whether I should put it into BindHelpers so it would always
be available.
Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Test mail

2009-08-17 Thread Naftoli Gugenheim
How can I test mailing when offline? (Besides having a switch in my program
to output mailed emails.)It would be nice if you could have all mails
logged, with all their headers and body, and whether it was sent, preferably
to a separate log file.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: lift-openid broken

2009-08-17 Thread marius d.

Done.

Br's,
Marius

On Aug 17, 9:39 pm, David Pollak 
wrote:
> On Sun, Aug 16, 2009 at 11:52 PM, marius d.  wrote:
>
> > Thank you for pointing this out. Most likely I'll make the corrections
> > today.
>
> Please let us know when the changes are rolled in.
>
>
>
>
>
> > Br's,
> > Marius
>
> > On Aug 17, 1:48 am, Vassil  wrote:
> > > Hello guys,
>
> > > It seems the HTTP refactoring around 10 days ago broke OpenId. Here's
> > > a small patch that made it work for me:
>
> > > --- dpp-liftweb-e845b3c129baf16bc35b46df9ee5b5049d4aee3a/lift-openid/
> > > src/main/scala/net/liftweb/openid/OpenId.scala     2009-08-16
> > > 17:36:58.0 +0300
> > > +++ dpp-liftweb-fixed/lift-openid/src/main/scala/net/liftweb/openid/
> > > OpenId.scala        2009-08-17 01:43:46.0 +0300
> > > @@ -267,7 +267,7 @@
>
> > >      // retrieve the previously stored discovery information
> > >      val discovered = httpReq.session.attribute("openid-disc") match {
> > > -      case Full(d: DiscoveryInformation)=> d
> > > +      case d: DiscoveryInformation=> d
> > >        case _ => throw ResponseShortcutException.redirect("/")
> > >      }
>
> > > @@ -275,7 +275,7 @@
> > >      var receivingURL = httpReq.url
> > >      val queryString = httpReq.queryString openOr ""
> > >      if (queryString != null && queryString.length() > 0) {
> > > -      receivingURL += "?" + httpReq.queryString;
> > > +      receivingURL += "?" + queryString;
> > >      }
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> 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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: slow down ajax?

2009-08-17 Thread marius d.

I don't see in your code the use of the overloaded ajaxText that I
posted. Have you tried it?

Marius

On Aug 17, 10:20 pm, g-man  wrote:
> OK, thanks for checking back...
>
> Snippet:
> swappable({task.dueOn.toString},
>               {ajaxText(task.dueOn.toString,
>                   v => { task.dueOn(v.toLong).save; reDrawTasks();
>                   }) % ("size" -> "10")})
>
> JS:
> $chgDueon // jQuery selection for text field
>     .datepicker({dateFormat:'m-d-yy', minDate: +1})
>     .blur(function(){$chgDueon.val(parseDate($chgDueon.val()));});
> // works well to pick a new date and change it to millis for save
>
> Emitted XHTML:
> 
>            onclick="jQuery('#'+'F111290299287IBE').hide();
>           jQuery('#'+'F1112902992880KN').show().each(function(i) {
>               var t = this; setTimeout(function() { t.focus(); },
> 200);});return false;;">
>        1248493271843
>           onblur="jQuery('#'+'F111290299287IBE').show();
>           jQuery('#'+'F1112902992880KN').hide();">
>                 type="text" value="1248493271843"
>          onkeypress="lift_blurIfReturn(event)" size="10" />
>     
> 
>
> So, all the parts work well together, but Lift's ajax just takes off
> too quickly, and cannot read the new value.
>
> On Aug 16, 11:02 pm, "marius d."  wrote:
>
> > You can probably use this definition of ajaxText:
>
> > def ajaxText(value: String, jsFunc: Call, func: String => JsCmd)
>
> > See the jsFunc parameter. Essentially you are specifying your function
> > call that may have one parameter. To your parameter list List we'll
> > add a new parameter which is the ajax invocation function. In other
> > words your code gets that function that does the ajax call meaning
> > that you have the control over when the ajax call is made.
>
> > Br's,
> > Marius
>
> > On Aug 17, 8:55 am, "marius d."  wrote:
>
> > > Would you please post a code snippet with what you're doing? (a
> > > minimalistic example)
>
> > > Br's,
> > > Marius
>
> > > On Aug 17, 7:41 am, g-man  wrote:
>
> > > > I am moving nicely with my 'save all dates as millis and let the
> > > > client localize for display' project, learning while enhancing the
> > > > ToDo sample app.
>
> > > > I have added a 'dueOn' field, and that is displayed as swappable
> > > > ajaxText, similar to the other fields in the tutorial.
>
> > > > I have enabled datepicker for the ajaxText field via jQuery, and have
> > > > a parsing function attached an event listener, so when datepicker
> > > > finishes, the date is converted to millis, ready for Lift to send back
> > > > to the server and save.
>
> > > > So far, all good.
>
> > > > The problem is that Lift's ajax starts ('onblur') before it has a
> > > > chance to see the new date value, so the new value is never saved.
>
> > > > What I need is a way to tell Lift to wait until after my parser has
> > > > had a chance to write the changed value.
>
> > > > I like the ajax style, so I don't want to make a 'submit' form, and
> > > > 'onchange' won't do it either, because the value is actually changed
> > > > twice (once to a formatted date, once to millis).
>
> > > > What I need is some way to say, 'OK to start ajax now'!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Case insensitive LIKE query

2009-08-17 Thread Naftoli Gugenheim
I'm using H2, and LIKE queries seem to be case sensitive. What should I do
to search fields without being case sensitive?For example, right now I have:
Client.findAll(Like(field, "%"+v+"%"))
In SQL I can write SELECT FIRST FROM CLIENT WHERE UPPER(FIRST) LIKE '%A%';
So is there a way to specify a database function in a query (without using
SQL)?
Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: slow down ajax?

2009-08-17 Thread g-man

OK, thanks for checking back...

Snippet:
swappable({task.dueOn.toString},
  {ajaxText(task.dueOn.toString,
  v => { task.dueOn(v.toLong).save; reDrawTasks();
  }) % ("size" -> "10")})

JS:
$chgDueon // jQuery selection for text field
.datepicker({dateFormat:'m-d-yy', minDate: +1})
.blur(function(){$chgDueon.val(parseDate($chgDueon.val()));});
// works well to pick a new date and change it to millis for save

Emitted XHTML:

   
   1248493271843
   
  



So, all the parts work well together, but Lift's ajax just takes off
too quickly, and cannot read the new value.


On Aug 16, 11:02 pm, "marius d."  wrote:
> You can probably use this definition of ajaxText:
>
> def ajaxText(value: String, jsFunc: Call, func: String => JsCmd)
>
> See the jsFunc parameter. Essentially you are specifying your function
> call that may have one parameter. To your parameter list List we'll
> add a new parameter which is the ajax invocation function. In other
> words your code gets that function that does the ajax call meaning
> that you have the control over when the ajax call is made.
>
> Br's,
> Marius
>
> On Aug 17, 8:55 am, "marius d."  wrote:
>
> > Would you please post a code snippet with what you're doing? (a
> > minimalistic example)
>
> > Br's,
> > Marius
>
> > On Aug 17, 7:41 am, g-man  wrote:
>
> > > I am moving nicely with my 'save all dates as millis and let the
> > > client localize for display' project, learning while enhancing the
> > > ToDo sample app.
>
> > > I have added a 'dueOn' field, and that is displayed as swappable
> > > ajaxText, similar to the other fields in the tutorial.
>
> > > I have enabled datepicker for the ajaxText field via jQuery, and have
> > > a parsing function attached an event listener, so when datepicker
> > > finishes, the date is converted to millis, ready for Lift to send back
> > > to the server and save.
>
> > > So far, all good.
>
> > > The problem is that Lift's ajax starts ('onblur') before it has a
> > > chance to see the new date value, so the new value is never saved.
>
> > > What I need is a way to tell Lift to wait until after my parser has
> > > had a chance to write the changed value.
>
> > > I like the ajax style, so I don't want to make a 'submit' form, and
> > > 'onchange' won't do it either, because the value is actually changed
> > > twice (once to a formatted date, once to millis).
>
> > > What I need is some way to say, 'OK to start ajax now'!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] SHtml.a generating an with bad attributes

2009-08-17 Thread harryh

I'm getting HTML like this (which fails to render):

ignore

when, down in the guts of a page I have something like this:


  


in Page.tips(xhtml: NodeSeq) I have:

bind("tip", xhtml, ...
  "ignore_link" -> a(Text("ignore")){
// some other stuff
JsCmds.JsHideId("tip"+tip.id)
  })

Note that I am using  to surround the entire page with
"chrome.html" (in templates hidden), and this bit of HTML is also
ed with section.html.

This is with Lift 1.1-M4.

Any idea what might be going on here?  This is very mysterious to me.

-harryh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Attributes question

2009-08-17 Thread Naftoli Gugenheim
Hi, sorry, not sure why I didn't see your message earlier. Strange... Has
anyone written any code to address this topic in the meantime? In case not,
here's all the code I've written for such purposes; tell me what you think.

def keepAttrs(elem: Elem) = (ns: NodeSeq) => BindHelpers.currentNode match {
case Full(inElem) => elem % inElem.attributes case other => elem } protected
class Keepable(elem: Elem) { def %% = keepAttrs(elem) } implicit def
elemToKeepable(elem: Elem): Keepable = new Keepable(elem) protected class
KeepBind(name: String) { val emptyFn: NodeSeq=>NodeSeq = _ => NodeSeq.Empty
import scala.xml.{Node, Text} import net.liftweb.util.Bindable def %>(in:
Elem) = FuncBindParam(name, keepAttrs(in)) def %>(in: Box[Elem]) =
FuncBindParam(name, in.map(keepAttrs) openOr emptyFn) def %>(in:
Option[Elem]) = FuncBindParam(name, in.map(keepAttrs) getOrElse emptyFn) }
implicit def strToKeepAssoc(name: String): KeepBind = new KeepBind(name)


keepAttrs could actually be implemented shorter:

elem currentNode.map(_.attributes).openOr(scala.xml.Null))

etc.


On Fri, Aug 14, 2009 at 4:50 PM, marius d.  wrote:

>
> IMHO:
>
> The problem with
>
> "name" some_new_operator_beside_-> expr
>
> would lead to a handful of overloading as -> in SuperArrowAssoc. Looks
> a little messy to me.
>
> Looks like we already have a way to do this:
>
> import Helpers._
>
> "name" -> {node: NodeSeq => mixinAttributes(expr _that_yields_an_Elem)
> (node)}
>
> Would that be too ... boilerplate for you?
>
> Br's,
> Marius
>
> On Aug 14, 11:18 pm, Naftoli Gugenheim  wrote:
> > As I mentioned, I wrote some code that allows you to use %> instead of ->
> to preserve the attributes. (I chose it because the % symbol is used to
> merge attributes to an Elem.) The right side can be an Elem or a Box/Option
> of an Elem.
> > What do people think of this syntax?
> > P.S. Another way is to append ".%%" to an Elem making it into a NodeSeq
> function.
> >
> > -
> >
> > marius d. wrote:
> >
> > The book exposes current functionality for Lift 1.0. If functionality
> > X was not intended to be there is a different story, but regardless it
> > is there and the way I see it it is OK to be in the book.
> >
> > Personally I don't see it as defect as preserving attributes (to the
> > top level resulting NodeSeq) may be quite handy in certain situations
> > even that contradicts David's design intent. But this is just a
> > personal opinion. After David removes this, a helper to copy
> > attributes is needed IMO. So Naftoli if you want to do this please go
> > ahead ... or if you don't want it I'll do it.
> >
> > Br's,
> > Marius
> >
> > On Aug 14, 7:43 pm, Naftoli Gugenheim  wrote:
> >
> > > The book seems to think it's intentional!
> > > But why can't unprefixed nodes by preserved automatically? Maybe there
> could be a setting?
> > > Thanks.
> >
> > > -
> >
> > > David Pollak wrote:
> >
> > > On Fri, Aug 14, 2009 at 9:23 AM, Naftoli Gugenheim <
> naftoli...@gmail.com>wrote:
> >
> > > > Exactly!
> >
> > > > -
> > > > Derek Chen-Becker wrote:
> >
> > > > Basically, you're asking why a bind tag like
> >
> > > > 
> >
> > > > doesn't preserve the id and class attrs when it binds, but
> >
> > > > 
> >
> > > > does?
> >
> > > If bind("ledger", ,
> > > "entry" -> )
> > > results in anything other than  it's a defect.
> >
> > > Wow... looks like it does... it's a defect and I'll fix it.
> >
> > > > Derek
> >
> > > > On Fri, Aug 14, 2009 at 10:08 AM, Naftoli Gugenheim <
> naftoli...@gmail.com
> > > > >wrote:
> >
> > > > > Of course you can access it from the snippet. But if you want it to
> be
> > > > > output automatically, then you prefix it with whatever the node's
> prefix
> > > > is.
> > > > > In other words, by default it's not outputted.
> >
> > > > > -
> > > > > David Pollak wrote:
> >
> > > > > On Thu, Aug 13, 2009 at 9:06 PM, Naftoli Gugenheim <
> naftoli...@gmail.com
> > > > > >wrote:
> >
> > > > > > What I would like to do:
> > > > > > Name  size="10"
> > > > > > class="special" style="vertical-align: top" maxlength="5"
> tabindex="1"
> > > > />
> > > > > > Okay, just a little contrived...
> > > > > > My understanding is you can do this by prefixing the attribute
> with
> > > > > > "lift:"; otherwise it will not be output but is available to the
> > > > snippet
> > > > > > code, i.e., without the prefix you are making an attribute
> available to
> > > > > the
> > > > > > snippet but that's it.
> >
> > > > > I'm sorry, but I'm still clueless about what you're talking about.
> >
> > > > > Do you want to bind to  and add the attributes in the
> > > > >  element to the resulting element?
> >
> > > > > The lift prefix has nothing to do with binding.  Binding is done in
> > > > > net.liftweb.util and is purely a way of substituting dynamic XML
> into
> > > > well
> > > > > defined points in a NodeSeq.
> >
> > > > > 

[Lift] Re: ws-generated code in lift

2009-08-17 Thread Naftoli Gugenheim
Does that imply any reason not to have %> as a bind-with-attributes
syntax? See
http://groups.google.com/group/liftweb/msg/1fbf7df2009abf9e?hl=en

On Mon, Aug 17, 2009 at 1:20 PM, David Pollak  wrote:

>
>
> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker 
> wrote:
>
>> I think that that's a general issue with SOAP, not particular to Lift ;)
>>
>>
>> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett > > wrote:
>>
>>>
>>> Id be interested to hear those stories... all the ones i've heard so
>>> far that involve anything to do with SOAP have usually been tales of
>>> woe ;-)
>>>
>>
> With Goat Rodeo, you can define message flow with an abstract source
> (input) and sink (output) in the form:
>
> Foo %> Bar %> (Baz * Distribution)
>
> You can define fork/join constructs, tee constructs, etc. in the high level
> flow description.  The flow description defines the type-safe progression
> from each logic unit.  The location of each logic unit and the
> threading/transport model is decided at runtime.  This means that you can
> define logic models and plug in an "Akka distribution and threading"
> strategy for production or a "single threaded" strategy for your local test
> harness.
>
> You'll also be able to register the composed modules that can be composed
> into larger flows.
>
> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
> and sink for the logic flow.
>
>
>
>>
>>> Cheers, Tim
>>>
>>> On Aug 15, 6:47 pm, David Pollak 
>>> wrote:
>>> > I think there will be an important Goat Rodeo/Lift/SOAP story that I'll
>>> be
>>> > able to tell in a week or so... integrating WS into Lift (rather than
>>> > running on the side) will, I think, have benefits.
>>> >
>>> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
>>> wrote:
>>> >
>>> > > Sounds like a classic situation what is technically possible is
>>> > > one thing but what you should do to preserve your sanity is most
>>> > > probably another ;-)
>>> >
>>> > > Good luck!
>>> >
>>> > > Cheers, Tim
>>> >
>>> > > On Aug 15, 4:29 am, Meredith Gregory 
>>> wrote:
>>> > > > Tim, Viktor,
>>> >
>>> > > > Thanks for the insights and sharing of experience. i'm in a
>>> situation
>>> > > where
>>> > > > i'm working with legacy stuff. i was just wondering how deeply into
>>> lift
>>> > > i
>>> > > > could push the WSDL-based Java handlers.
>>> >
>>> > > > Best wishes,
>>> >
>>> > > > --greg
>>> >
>>> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>>> >> > > >wrote:
>>> >
>>> > > > > I agree with Viktor - in a similar vein, this is exactly what I
>>> > > > > implemented with Akka; the servlet runs in conjunction with lifts
>>> > > > > filter and lift just hands off stuff it doesnt know what to do
>>> with.
>>> > > > > So if you want to use AxisServlet or whatever its real easy.
>>> >
>>> > > > > From my point of view, you'd need a good reason to bring the SOAP
>>> > > > > stuff into lift; right now i havent found one... I write a lot of
>>> lift
>>> > > > > apps that consume SOAP services, but as yet have no good reason
>>> to
>>> > > > > write a SOAP serving app with lift - If i were to do one, id do
>>> > > > > exactly as with the JAX-RS stuff in Akka and passNotFoundToChain.
>>> >
>>> > > > > Cheers, Tim
>>> >
>>> > > > > On Aug 14, 10:24 pm, Viktor Klang 
>>> wrote:
>>> > > > > > Gregory,
>>> >
>>> > > > > > Depending on what WS-* stuff you're using, you _should_ be able
>>> to
>>> > > wire
>>> > > > > the
>>> > > > > > AxisServlet in web.xml under /ws/* or something like that, and
>>> then
>>> > > have
>>> > > > > > lift passNotFoundToChain=true
>>> >
>>> > > > > > But I guess it boils down to what liftiness you're planning to
>>> do.
>>> > > Can
>>> > > > > you
>>> > > > > > elaborate a bit on what you're aiming for?
>>> >
>>> > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
>>> > > > > > wrote:
>>> >
>>> > > > > > > Tim, Viktor,
>>> >
>>> > > > > > > Do you wire your SOAP services into lift or do you keep that
>>> > > > > independent? i
>>> > > > > > > was just talking to DPP and according to him it appears you
>>> can
>>> > > > > successfully
>>> > > > > > > wire WS-generated code anywhere along in the http-request
>>> > > processing
>>> > > > > > > pipeline. He pointed out a gotcha that i think can be
>>> circumvented
>>> > > with
>>> > > > > > > HttpServletResponse trampoline. Both lift and the
>>> WS-generated code
>>> > > are
>>> > > > > > > likely to want to be in the driver's seat regarding who's
>>> returning
>>> > > the
>>> > > > > > > bytes. But, i think you can just fool the WS-generated code
>>> into
>>> > > > > thinking
>>> > > > > > > it's got an HttpServletResponse that is really a widget that
>>> will
>>> > > just
>>> > > > > write
>>> > > > > > > into the one lift returns. In this way you can write a
>>> > > 1-size-fits-all
>>> > > > > > > return adapter. Is this what you guys are doing, or am i
>>> making
>>> > > this
>>> > > > > too
>>> > > > > > > complicated?
>>> >
>>> > > > > > > Best wishes,
>>>

[Lift] Re: lift-openid broken

2009-08-17 Thread David Pollak
On Sun, Aug 16, 2009 at 11:52 PM, marius d.  wrote:

>
> Thank you for pointing this out. Most likely I'll make the corrections
> today.


Please let us know when the changes are rolled in.


>
>
> Br's,
> Marius
>
> On Aug 17, 1:48 am, Vassil  wrote:
> > Hello guys,
> >
> > It seems the HTTP refactoring around 10 days ago broke OpenId. Here's
> > a small patch that made it work for me:
> >
> > --- dpp-liftweb-e845b3c129baf16bc35b46df9ee5b5049d4aee3a/lift-openid/
> > src/main/scala/net/liftweb/openid/OpenId.scala 2009-08-16
> > 17:36:58.0 +0300
> > +++ dpp-liftweb-fixed/lift-openid/src/main/scala/net/liftweb/openid/
> > OpenId.scala2009-08-17 01:43:46.0 +0300
> > @@ -267,7 +267,7 @@
> >
> >  // retrieve the previously stored discovery information
> >  val discovered = httpReq.session.attribute("openid-disc") match {
> > -  case Full(d: DiscoveryInformation)=> d
> > +  case d: DiscoveryInformation=> d
> >case _ => throw ResponseShortcutException.redirect("/")
> >  }
> >
> > @@ -275,7 +275,7 @@
> >  var receivingURL = httpReq.url
> >  val queryString = httpReq.queryString openOr ""
> >  if (queryString != null && queryString.length() > 0) {
> > -  receivingURL += "?" + httpReq.queryString;
> > +  receivingURL += "?" + queryString;
> >  }
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ws-generated code in lift

2009-08-17 Thread Meredith Gregory
David,

Go for it, Dude! Who knows, you might come up with something new. With a
Scala encoding as the 'informal spec' i can tell you what semantics are
already out there and how yours compares.

Best wishes,

--greg

On Mon, Aug 17, 2009 at 11:19 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Aug 17, 2009 at 10:37 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Dear David,
>>
>> *This* is a can of night-crawlers. Do you have a specification of the
>> abstract syntax of your flow language? Do you have a semantics?
>
>
> No & No.  Flying by the seat of my pants (as usual).  Always happy for
> pointers to the works of people with bigger brains than me.
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> On Mon, Aug 17, 2009 at 10:20 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker <
>>> dchenbec...@gmail.com> wrote:
>>>
 I think that that's a general issue with SOAP, not particular to Lift ;)


 On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett
  wrote:

>
> Id be interested to hear those stories... all the ones i've heard so
> far that involve anything to do with SOAP have usually been tales of
> woe ;-)
>

>>> With Goat Rodeo, you can define message flow with an abstract source
>>> (input) and sink (output) in the form:
>>>
>>> Foo %> Bar %> (Baz * Distribution)
>>>
>>> You can define fork/join constructs, tee constructs, etc. in the high
>>> level flow description.  The flow description defines the type-safe
>>> progression from each logic unit.  The location of each logic unit and the
>>> threading/transport model is decided at runtime.  This means that you can
>>> define logic models and plug in an "Akka distribution and threading"
>>> strategy for production or a "single threaded" strategy for your local test
>>> harness.
>>>
>>> You'll also be able to register the composed modules that can be composed
>>> into larger flows.
>>>
>>> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
>>> and sink for the logic flow.
>>>
>>>
>>>

> Cheers, Tim
>
> On Aug 15, 6:47 pm, David Pollak 
> wrote:
> > I think there will be an important Goat Rodeo/Lift/SOAP story that
> I'll be
> > able to tell in a week or so... integrating WS into Lift (rather than
> > running on the side) will, I think, have benefits.
> >
> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
> wrote:
> >
> > > Sounds like a classic situation what is technically possible is
> > > one thing but what you should do to preserve your sanity is most
> > > probably another ;-)
> >
> > > Good luck!
> >
> > > Cheers, Tim
> >
> > > On Aug 15, 4:29 am, Meredith Gregory 
> wrote:
> > > > Tim, Viktor,
> >
> > > > Thanks for the insights and sharing of experience. i'm in a
> situation
> > > where
> > > > i'm working with legacy stuff. i was just wondering how deeply
> into lift
> > > i
> > > > could push the WSDL-based Java handlers.
> >
> > > > Best wishes,
> >
> > > > --greg
> >
> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>  > > >wrote:
> >
> > > > > I agree with Viktor - in a similar vein, this is exactly what I
> > > > > implemented with Akka; the servlet runs in conjunction with
> lifts
> > > > > filter and lift just hands off stuff it doesnt know what to do
> with.
> > > > > So if you want to use AxisServlet or whatever its real easy.
> >
> > > > > From my point of view, you'd need a good reason to bring the
> SOAP
> > > > > stuff into lift; right now i havent found one... I write a lot
> of lift
> > > > > apps that consume SOAP services, but as yet have no good reason
> to
> > > > > write a SOAP serving app with lift - If i were to do one, id do
> > > > > exactly as with the JAX-RS stuff in Akka and
> passNotFoundToChain.
> >
> > > > > Cheers, Tim
> >
> > > > > On Aug 14, 10:24 pm, Viktor Klang 
> wrote:
> > > > > > Gregory,
> >
> > > > > > Depending on what WS-* stuff you're using, you _should_ be
> able to
> > > wire
> > > > > the
> > > > > > AxisServlet in web.xml under /ws/* or something like that,
> and then
> > > have
> > > > > > lift passNotFoundToChain=true
> >
> > > > > > But I guess it boils down to what liftiness you're planning
> to do.
> > > Can
> > > > > you
> > > > > > elaborate a bit on what you're aiming for?
> >
> > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
> > > > > > wrote:
> >
> > > > > > > Tim, Viktor,
> >
> > > > > > > Do you wire your SOAP services into lift or do you keep
> that
> > > > > independent? i
> > > > > > > was just talking to DPP and according to him it appears y

[Lift] Re: ws-generated code in lift

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 10:37 AM, Meredith Gregory  wrote:

> Dear David,
>
> *This* is a can of night-crawlers. Do you have a specification of the
> abstract syntax of your flow language? Do you have a semantics?


No & No.  Flying by the seat of my pants (as usual).  Always happy for
pointers to the works of people with bigger brains than me.


>
>
> Best wishes,
>
> --greg
>
> On Mon, Aug 17, 2009 at 10:20 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker > > wrote:
>>
>>> I think that that's a general issue with SOAP, not particular to Lift ;)
>>>
>>>
>>> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett
>>>  wrote:
>>>

 Id be interested to hear those stories... all the ones i've heard so
 far that involve anything to do with SOAP have usually been tales of
 woe ;-)

>>>
>> With Goat Rodeo, you can define message flow with an abstract source
>> (input) and sink (output) in the form:
>>
>> Foo %> Bar %> (Baz * Distribution)
>>
>> You can define fork/join constructs, tee constructs, etc. in the high
>> level flow description.  The flow description defines the type-safe
>> progression from each logic unit.  The location of each logic unit and the
>> threading/transport model is decided at runtime.  This means that you can
>> define logic models and plug in an "Akka distribution and threading"
>> strategy for production or a "single threaded" strategy for your local test
>> harness.
>>
>> You'll also be able to register the composed modules that can be composed
>> into larger flows.
>>
>> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
>> and sink for the logic flow.
>>
>>
>>
>>>
 Cheers, Tim

 On Aug 15, 6:47 pm, David Pollak 
 wrote:
 > I think there will be an important Goat Rodeo/Lift/SOAP story that
 I'll be
 > able to tell in a week or so... integrating WS into Lift (rather than
 > running on the side) will, I think, have benefits.
 >
 > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
 wrote:
 >
 > > Sounds like a classic situation what is technically possible is
 > > one thing but what you should do to preserve your sanity is most
 > > probably another ;-)
 >
 > > Good luck!
 >
 > > Cheers, Tim
 >
 > > On Aug 15, 4:29 am, Meredith Gregory 
 wrote:
 > > > Tim, Viktor,
 >
 > > > Thanks for the insights and sharing of experience. i'm in a
 situation
 > > where
 > > > i'm working with legacy stuff. i was just wondering how deeply
 into lift
 > > i
 > > > could push the WSDL-based Java handlers.
 >
 > > > Best wishes,
 >
 > > > --greg
 >
 > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
 >>> > > >wrote:
 >
 > > > > I agree with Viktor - in a similar vein, this is exactly what I
 > > > > implemented with Akka; the servlet runs in conjunction with
 lifts
 > > > > filter and lift just hands off stuff it doesnt know what to do
 with.
 > > > > So if you want to use AxisServlet or whatever its real easy.
 >
 > > > > From my point of view, you'd need a good reason to bring the
 SOAP
 > > > > stuff into lift; right now i havent found one... I write a lot
 of lift
 > > > > apps that consume SOAP services, but as yet have no good reason
 to
 > > > > write a SOAP serving app with lift - If i were to do one, id do
 > > > > exactly as with the JAX-RS stuff in Akka and
 passNotFoundToChain.
 >
 > > > > Cheers, Tim
 >
 > > > > On Aug 14, 10:24 pm, Viktor Klang 
 wrote:
 > > > > > Gregory,
 >
 > > > > > Depending on what WS-* stuff you're using, you _should_ be
 able to
 > > wire
 > > > > the
 > > > > > AxisServlet in web.xml under /ws/* or something like that, and
 then
 > > have
 > > > > > lift passNotFoundToChain=true
 >
 > > > > > But I guess it boils down to what liftiness you're planning to
 do.
 > > Can
 > > > > you
 > > > > > elaborate a bit on what you're aiming for?
 >
 > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
 > > > > > wrote:
 >
 > > > > > > Tim, Viktor,
 >
 > > > > > > Do you wire your SOAP services into lift or do you keep that
 > > > > independent? i
 > > > > > > was just talking to DPP and according to him it appears you
 can
 > > > > successfully
 > > > > > > wire WS-generated code anywhere along in the http-request
 > > processing
 > > > > > > pipeline. He pointed out a gotcha that i think can be
 circumvented
 > > with
 > > > > > > HttpServletResponse trampoline. Both lift and the
 WS-generated code
 > > are
 > > > > > > likely to want to be in the driver's seat regarding who's
 returning
 > > the
 > > > > > > bytes. But, i think you can just fool the WS-generated code

[Lift] Re: CMS for Lift?

2009-08-17 Thread Stefan Scott

I'll chime in here since I've been evaluating several CMSs lately.

I previously used Drupal and WordPress as my CMSs - now however I'm
moving everything to MODx because of the increased flexibility and
more-logical organization, and I'm also impressed with the demos of
SilverStripe, TypoLight Typo3 - and LifeRay, which is written in Java
instead of PHP. (LifeRay seems to be much more than a CMS - it claims
to offer collaboration and social networking.)

Some on-line demos here:

MODx - http://trymodx.com/
SilverStripe - http://demo.silverstripe.com/
TypoLight - http://www.typolight.org/demo.html
Typo3 - http://testsite.punkt.de/
LifeRay - http://demo.liferay.net/web/guest/home

It would be good to take a look at these additional CMSs as they offer
some capabilities beyond WordPress and Drupal.

Drupal in particular is wildly popular but it may no longer be the
best candidate to imitate, as it is less well-organized and less
flexible/customizable (compared say to MODx, which lets you take CSS
from an existing site and use it for your site, and which lets you
apply a template to a single document, unlike Drupal where a theme
applies to the entire site). To keep up with advanced CMSs, Drupal has
evolved to use a bunch of (often redundant or competing) modules which
are not always compatible with current releases. Examples of things
that Drupal treats as "add-ons" (modules) are: custom content (the
"CCK/Views" modules, with their confusing albeit AJAX-y interface),
multi-language, and photo galleries (I gave up on Drupal after a few
days of trying out various photo gallery modules, none of which I
could understand). Finally, it seems odd that Drupal, as a "content
management system", lacks something all advanced CMSs have: a
*treeview* of the overall site content. Instead, it only has a jumbled
*list* of content, sorted by not by location but by last edited (!),
with all translations also scattered through the list based on last-
edited date, and this list is buried several levels deep in the admin
navigation system, unlike the site content treeview navigator which is
prominently displayed (usually on the left) in advanced CMSs. (Of
course, I don't want to veer off-topic here and start a CMS flame war
here in this liftweb discussion. :-)

Regarding "dynamic site map" creation - I do know that MODx has
something like this, using WayFinder to create a menu from selected
branches of the site's document tree, automatically including any
updated sub-branches, and I believe most other advanced CMSs have
something like this too.

LifeRay seems very intriguing - it claims to do a lot beyond just CMS.
Since it's written in Java (not PHP), who knows if some of its code
could be leveraged in Scala.

So these might be some additional interesting CMSs to keep in mind
(beyond Drupal and WordPress) when building a new CMS using liftweb.

- Stefan Scott

On Aug 16, 3:13 pm, glenn  wrote:
> Philip,
>
> I'm working on a cms system in Lift. Right now, it allows for content
> creation using wymeditor, which can be
> tagged and displayed as an atom feed. This code is runnable, simple as
> it is. I'm working on adding dynamic site map creation as well. Is
> this kind
> of what you have in mind by a CMS system.
>
> I'm very interested in workiing with others on a CMS that can compete
> with any of the PHP varieties out there, such as Drupal and Wordpress.
> Most of these simply use plugins from one ore more javascript
> libraries out there for site creation, and Lift certainly  can do
> javascript as well as, if not
> better than, these systems.
>
> Glenn...
>
> On Aug 15, 11:08 pm, philip  wrote:
>
>
>
> > Hi,
>
> > Has anyone made a CMS for Liftweb? or I should say, in liftweb.
>
> > Thanks, Philip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Debug log level

2009-08-17 Thread Naftoli Gugenheim
Well for some reason it didn't work until I put "default." in the name, like
you said.

On Mon, Aug 17, 2009 at 2:12 AM, Derek Chen-Becker wrote:

> log4j itself looks for a log4j.properties or log4j.xml file in the
> classpath, so that would work whether you're using Lift or not.
>
> Derek
>
>
> On Sun, Aug 16, 2009 at 6:14 PM, Naftoli Gugenheim 
> wrote:
>
>>
>> Thanks. The book makes it sound like the file should be called
>> log4j.props, and the repository has files called log4j.properties. I haven't
>> used log4j before, but apparently putting one of the log4j.properties files
>> in, named default.log4j.props, worked, so I guess it needed that prefix.
>>
>>
>> -
>> Derek Chen-Becker wrote:
>>
>> Provide your own log4j configuration. IIRC, you should be able to create a
>> default.log4j.xml or default.log4j.props file and put it in
>> src/main/resources/props/ to customize the log4j config.
>>
>> Derek
>>
>> On Sun, Aug 16, 2009 at 3:48 PM, Naftoli Gugenheim > >wrote:
>>
>> >
>> > How do you set the log level to include debug output?
>> >
>> > >
>> >
>>
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Deploying

2009-08-17 Thread Naftoli Gugenheim
Thanks everyone.This webapp is not going to be used very heavily or have a
very demanding customer base. It's for an organization that will have around
5 people using it total, not necessarily at the same time. So I don't need
any fancy setup like continuous integration etc.
It's also the second version of the first webapp I've written (the first was
in PHP).
After I sent the question, I came across a thread from David (it was on
Nabbles, I would guess from this group) where he described how to use nginx
as the frontend web server and Jetty as the backend.
I should probably ask this on that thread, but [when] would I want to use
nginx and not just Jetty? (Nothing else needs to be running on the server.)
Also, what's the difference between the Jetty download link it had (
www.tunaforcats.com/deploy_jetty.tgz) and something you can download from
Jetty's site? (And what exactly *is* tunaforcats.com ??!)


Question 2:
Any reason to run H2 either as a separate process or as part of the webapp?

Thanks.

On Mon, Aug 17, 2009 at 3:00 AM, Jeppe Nejsum Madsen wrote:

>
> Naftoli Gugenheim  writes:
>
> > What's the best way to get a lift app running on a Ubuntu web server I
> can SSH into with full permissions? It came with almost nothing installed.
> > Thanks.
>
> It may be overkill for you if it's just a one time install, but I've had
> great success with Chef (http://wiki.opscode.com/display/chef/Home) to
> do automatic provisioning of servers/services/deployment.
>
> Some time ago, I wrote a series of articles that describes a basic setup
> to deploy a basic "Hello World" Lift app to EC2. If you skip the EC2
> part, you may find something useful:
>
> http://jeppenejsum.wordpress.com/2009/05/03/ec2-continuous-deployment-hello-world/
>
>
> /Jeppe
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Invoking Views

2009-08-17 Thread Naftoli Gugenheim
Are you coming from an MVC framework? Many of them use the approach you
described, but Lift does not."MyView.hi" (under the covers MyView.doRender
of course) is a snippet. Snippets are XML transformers.
On the other hand, the page you put into your SiteMap should refer to an
x(h)tml document, which may contain snippet tags, such as .
These will be intercepted by Lift and and transformed by your snippet.


On Mon, Aug 17, 2009 at 1:25 PM, Michel Klijn wrote:

>
> Hi,
>
> I'm new to Lift and I've been fooling around with all it's cool
> features.
>
> At the moment, I'm trying to access MyView that I have defined in the
> view package. When I try to access the view via the URL:"
> http://localhost:8080/MyView/hi " I get the following message:
> The requested page was not defined in your SiteMap, so access was
> blocked.
>
> According to the view chapter (3.7)  in the book(Exploring Lift August
> 12, 2009) I downloaded from Github, it should work this way.
>
> I'm a bit lost... what is it that I'm doing wrong?
>
> thanks,
>
> Michel
>
> P.S snippets,and comets do work
>
> package net.mkl.zooloretto.view
> import ...
> class MyView extends LiftView{
>
>override def dispatch = {
> case "hi" => doRender _
>}
>
>def doRender () : NodeSeq = {
>
>hai!
>
>
>}
> }
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Deploying

2009-08-17 Thread Peter Robinett

I know David likes running Nginx in front of Jetty

On Aug 17, 12:00 am, Jeppe Nejsum Madsen  wrote:
> Naftoli Gugenheim  writes:
> > What's the best way to get a lift app running on a Ubuntu web server I can 
> > SSH into with full permissions? It came with almost nothing installed.
> > Thanks.
>
> It may be overkill for you if it's just a one time install, but I've had
> great success with Chef (http://wiki.opscode.com/display/chef/Home) to
> do automatic provisioning of servers/services/deployment.
>
> Some time ago, I wrote a series of articles that describes a basic setup
> to deploy a basic "Hello World" Lift app to EC2. If you skip the EC2
> part, you may find something 
> useful:http://jeppenejsum.wordpress.com/2009/05/03/ec2-continuous-deployment...
>
> /Jeppe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Invoking Views

2009-08-17 Thread marius d.

Please add the path to your SiteMap.

Menu(Loc("MyView", "MyView" :: _, "MyView"))

Br's,
Marius

On Aug 17, 8:25 pm, Michel Klijn  wrote:
> Hi,
>
> I'm new to Lift and I've been fooling around with all it's cool
> features.
>
> At the moment, I'm trying to access MyView that I have defined in the
> view package. When I try to access the view via the 
> URL:"http://localhost:8080/MyView/hi"; I get the following message:
> The requested page was not defined in your SiteMap, so access was
> blocked.
>
> According to the view chapter (3.7)  in the book(Exploring Lift August
> 12, 2009) I downloaded from Github, it should work this way.
>
> I'm a bit lost... what is it that I'm doing wrong?
>
> thanks,
>
> Michel
>
> P.S snippets,and comets do work
>
> package net.mkl.zooloretto.view
> import ...
> class MyView extends LiftView{
>
>         override def dispatch = {
>                  case "hi" => doRender _
>         }
>
>         def doRender () : NodeSeq = {
>                 
>                         hai!
>                 
>
>         }
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Invoking Views

2009-08-17 Thread Michel Klijn

Hi,

I'm new to Lift and I've been fooling around with all it's cool
features.

At the moment, I'm trying to access MyView that I have defined in the
view package. When I try to access the view via the URL:"
http://localhost:8080/MyView/hi " I get the following message:
The requested page was not defined in your SiteMap, so access was
blocked.

According to the view chapter (3.7)  in the book(Exploring Lift August
12, 2009) I downloaded from Github, it should work this way.

I'm a bit lost... what is it that I'm doing wrong?

thanks,

Michel

P.S snippets,and comets do work

package net.mkl.zooloretto.view
import ...
class MyView extends LiftView{

override def dispatch = {
 case "hi" => doRender _
}

def doRender () : NodeSeq = {

hai!


}
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ws-generated code in lift

2009-08-17 Thread Meredith Gregory
Dear David,

*This* is a can of night-crawlers. Do you have a specification of the
abstract syntax of your flow language? Do you have a semantics?

Best wishes,

--greg

On Mon, Aug 17, 2009 at 10:20 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker 
> wrote:
>
>> I think that that's a general issue with SOAP, not particular to Lift ;)
>>
>>
>> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett > > wrote:
>>
>>>
>>> Id be interested to hear those stories... all the ones i've heard so
>>> far that involve anything to do with SOAP have usually been tales of
>>> woe ;-)
>>>
>>
> With Goat Rodeo, you can define message flow with an abstract source
> (input) and sink (output) in the form:
>
> Foo %> Bar %> (Baz * Distribution)
>
> You can define fork/join constructs, tee constructs, etc. in the high level
> flow description.  The flow description defines the type-safe progression
> from each logic unit.  The location of each logic unit and the
> threading/transport model is decided at runtime.  This means that you can
> define logic models and plug in an "Akka distribution and threading"
> strategy for production or a "single threaded" strategy for your local test
> harness.
>
> You'll also be able to register the composed modules that can be composed
> into larger flows.
>
> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
> and sink for the logic flow.
>
>
>
>>
>>> Cheers, Tim
>>>
>>> On Aug 15, 6:47 pm, David Pollak 
>>> wrote:
>>> > I think there will be an important Goat Rodeo/Lift/SOAP story that I'll
>>> be
>>> > able to tell in a week or so... integrating WS into Lift (rather than
>>> > running on the side) will, I think, have benefits.
>>> >
>>> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
>>> wrote:
>>> >
>>> > > Sounds like a classic situation what is technically possible is
>>> > > one thing but what you should do to preserve your sanity is most
>>> > > probably another ;-)
>>> >
>>> > > Good luck!
>>> >
>>> > > Cheers, Tim
>>> >
>>> > > On Aug 15, 4:29 am, Meredith Gregory 
>>> wrote:
>>> > > > Tim, Viktor,
>>> >
>>> > > > Thanks for the insights and sharing of experience. i'm in a
>>> situation
>>> > > where
>>> > > > i'm working with legacy stuff. i was just wondering how deeply into
>>> lift
>>> > > i
>>> > > > could push the WSDL-based Java handlers.
>>> >
>>> > > > Best wishes,
>>> >
>>> > > > --greg
>>> >
>>> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>>> >> > > >wrote:
>>> >
>>> > > > > I agree with Viktor - in a similar vein, this is exactly what I
>>> > > > > implemented with Akka; the servlet runs in conjunction with lifts
>>> > > > > filter and lift just hands off stuff it doesnt know what to do
>>> with.
>>> > > > > So if you want to use AxisServlet or whatever its real easy.
>>> >
>>> > > > > From my point of view, you'd need a good reason to bring the SOAP
>>> > > > > stuff into lift; right now i havent found one... I write a lot of
>>> lift
>>> > > > > apps that consume SOAP services, but as yet have no good reason
>>> to
>>> > > > > write a SOAP serving app with lift - If i were to do one, id do
>>> > > > > exactly as with the JAX-RS stuff in Akka and passNotFoundToChain.
>>> >
>>> > > > > Cheers, Tim
>>> >
>>> > > > > On Aug 14, 10:24 pm, Viktor Klang 
>>> wrote:
>>> > > > > > Gregory,
>>> >
>>> > > > > > Depending on what WS-* stuff you're using, you _should_ be able
>>> to
>>> > > wire
>>> > > > > the
>>> > > > > > AxisServlet in web.xml under /ws/* or something like that, and
>>> then
>>> > > have
>>> > > > > > lift passNotFoundToChain=true
>>> >
>>> > > > > > But I guess it boils down to what liftiness you're planning to
>>> do.
>>> > > Can
>>> > > > > you
>>> > > > > > elaborate a bit on what you're aiming for?
>>> >
>>> > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
>>> > > > > > wrote:
>>> >
>>> > > > > > > Tim, Viktor,
>>> >
>>> > > > > > > Do you wire your SOAP services into lift or do you keep that
>>> > > > > independent? i
>>> > > > > > > was just talking to DPP and according to him it appears you
>>> can
>>> > > > > successfully
>>> > > > > > > wire WS-generated code anywhere along in the http-request
>>> > > processing
>>> > > > > > > pipeline. He pointed out a gotcha that i think can be
>>> circumvented
>>> > > with
>>> > > > > > > HttpServletResponse trampoline. Both lift and the
>>> WS-generated code
>>> > > are
>>> > > > > > > likely to want to be in the driver's seat regarding who's
>>> returning
>>> > > the
>>> > > > > > > bytes. But, i think you can just fool the WS-generated code
>>> into
>>> > > > > thinking
>>> > > > > > > it's got an HttpServletResponse that is really a widget that
>>> will
>>> > > just
>>> > > > > write
>>> > > > > > > into the one lift returns. In this way you can write a
>>> > > 1-size-fits-all
>>> > > > > > > return adapter. Is this what you guys are doing, or am i
>>> making
>>> > > this
>>> > > > > too
>>> > > > >

[Lift] Re: Getting started: Rendering a template (Definitive Guide)

2009-08-17 Thread David Pollak
It's also a really, really good idea to use Lift 1.1-SNAPSHOT or Lift
1.1-M4.  There's a polite error message when in development mode that points
out that the particular page needs to be added to SiteMap.

Derek & Co.  Any way to update the PDF book to use 1.1-*something*?

On Sun, Aug 16, 2009 at 11:25 PM, Morris Jones  wrote:

>
> marius d. wrote:
> > I believe the book describes the SiteMap quite extensively. Yes, if
> > you are using SiteMap then you have to add your new page to the
> > SiteMap.
>
> I have no doubt that it's there in great detail.  I just stumbled trying
> to experiment with it before I knew what I was doing, or got to that
> chapter.  :)  Thanks ...
>
> Cheers,
> Mojo
> --
> Morris Jones
> Monrovia, CA
> http://www.whiteoaks.com
> Old Town Astronomers: http://www.otastro.org
> http://twitter.com/mojo_la
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ws-generated code in lift

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker wrote:

> I think that that's a general issue with SOAP, not particular to Lift ;)
>
>
> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett 
> wrote:
>
>>
>> Id be interested to hear those stories... all the ones i've heard so
>> far that involve anything to do with SOAP have usually been tales of
>> woe ;-)
>>
>
With Goat Rodeo, you can define message flow with an abstract source (input)
and sink (output) in the form:

Foo %> Bar %> (Baz * Distribution)

You can define fork/join constructs, tee constructs, etc. in the high level
flow description.  The flow description defines the type-safe progression
from each logic unit.  The location of each logic unit and the
threading/transport model is decided at runtime.  This means that you can
define logic models and plug in an "Akka distribution and threading"
strategy for production or a "single threaded" strategy for your local test
harness.

You'll also be able to register the composed modules that can be composed
into larger flows.

So, how does this work with SOAP?  Well.. the SOAP piece is just a source
and sink for the logic flow.



>
>> Cheers, Tim
>>
>> On Aug 15, 6:47 pm, David Pollak 
>> wrote:
>> > I think there will be an important Goat Rodeo/Lift/SOAP story that I'll
>> be
>> > able to tell in a week or so... integrating WS into Lift (rather than
>> > running on the side) will, I think, have benefits.
>> >
>> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
>> wrote:
>> >
>> > > Sounds like a classic situation what is technically possible is
>> > > one thing but what you should do to preserve your sanity is most
>> > > probably another ;-)
>> >
>> > > Good luck!
>> >
>> > > Cheers, Tim
>> >
>> > > On Aug 15, 4:29 am, Meredith Gregory 
>> wrote:
>> > > > Tim, Viktor,
>> >
>> > > > Thanks for the insights and sharing of experience. i'm in a
>> situation
>> > > where
>> > > > i'm working with legacy stuff. i was just wondering how deeply into
>> lift
>> > > i
>> > > > could push the WSDL-based Java handlers.
>> >
>> > > > Best wishes,
>> >
>> > > > --greg
>> >
>> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>> > > > >wrote:
>> >
>> > > > > I agree with Viktor - in a similar vein, this is exactly what I
>> > > > > implemented with Akka; the servlet runs in conjunction with lifts
>> > > > > filter and lift just hands off stuff it doesnt know what to do
>> with.
>> > > > > So if you want to use AxisServlet or whatever its real easy.
>> >
>> > > > > From my point of view, you'd need a good reason to bring the SOAP
>> > > > > stuff into lift; right now i havent found one... I write a lot of
>> lift
>> > > > > apps that consume SOAP services, but as yet have no good reason to
>> > > > > write a SOAP serving app with lift - If i were to do one, id do
>> > > > > exactly as with the JAX-RS stuff in Akka and passNotFoundToChain.
>> >
>> > > > > Cheers, Tim
>> >
>> > > > > On Aug 14, 10:24 pm, Viktor Klang  wrote:
>> > > > > > Gregory,
>> >
>> > > > > > Depending on what WS-* stuff you're using, you _should_ be able
>> to
>> > > wire
>> > > > > the
>> > > > > > AxisServlet in web.xml under /ws/* or something like that, and
>> then
>> > > have
>> > > > > > lift passNotFoundToChain=true
>> >
>> > > > > > But I guess it boils down to what liftiness you're planning to
>> do.
>> > > Can
>> > > > > you
>> > > > > > elaborate a bit on what you're aiming for?
>> >
>> > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
>> > > > > > wrote:
>> >
>> > > > > > > Tim, Viktor,
>> >
>> > > > > > > Do you wire your SOAP services into lift or do you keep that
>> > > > > independent? i
>> > > > > > > was just talking to DPP and according to him it appears you
>> can
>> > > > > successfully
>> > > > > > > wire WS-generated code anywhere along in the http-request
>> > > processing
>> > > > > > > pipeline. He pointed out a gotcha that i think can be
>> circumvented
>> > > with
>> > > > > > > HttpServletResponse trampoline. Both lift and the WS-generated
>> code
>> > > are
>> > > > > > > likely to want to be in the driver's seat regarding who's
>> returning
>> > > the
>> > > > > > > bytes. But, i think you can just fool the WS-generated code
>> into
>> > > > > thinking
>> > > > > > > it's got an HttpServletResponse that is really a widget that
>> will
>> > > just
>> > > > > write
>> > > > > > > into the one lift returns. In this way you can write a
>> > > 1-size-fits-all
>> > > > > > > return adapter. Is this what you guys are doing, or am i
>> making
>> > > this
>> > > > > too
>> > > > > > > complicated?
>> >
>> > > > > > > Best wishes,
>> >
>> > > > > > > --greg
>> >
>> > > > > > > --
>> > > > > > > L.G. Meredith
>> > > > > > > Managing Partner
>> > > > > > > Biosimilarity LLC
>> > > > > > > 1219 NW 83rd St
>> > > > > > > Seattle, WA 98117
>> >
>> > > > > > > +1 206.650.3740
>> >
>> > > > > > >http://biosimilarity.blogspot.com
>> >
>> > > > > > --
>> > > > > > Viktor Klang
>> >
>> > > > > > Rogue Scala-head
>>

[Lift] Re: makeUtf8 and HttpServletRequest broken in new build???

2009-08-17 Thread David Pollak
On Mon, Aug 17, 2009 at 9:42 AM, glenn  wrote:

>
> Is anyone planning on fixing the archetype snapshots to add
> this change, and "import provider._"  in  Boot.scala.


I'm able to create a new "Basic" Lift app from archetypes... and it works
just fine.  Can you tell us what command you typed to get an archetype that
did not work?


>
>
> Thanks in advance,
>
> Glenn...
>
> On Aug 10, 10:36 am, "marius d."  wrote:
> > Your makeUTF8 should look like this:
> >
> >   private def makeUtf8(req: HTTPRequest): Unit =
> > {req.setCharacterEncoding("UTF-8")}
> >
> > just use HTTPRequest instead of HttpServletRequest.
> >
> > Br's,
> > Marius
> >
> > On Aug 10, 7:49 pm, glenn  wrote:
> >
> > > I just got a type mismatch found error in LiftRules.early.append
> > > (makeUtf8) in Boot.scala.
> >
> > > It's now looking for an net.liftweb.http.provider.HTTPRequest instead
> > > of a javax.servlet.http.HttpServletRequest.
> >
> > > Is this a new change, and if so, where is the
> > > net.liftweb.http.provider package?
> >
> > > Glenn...
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: IMPORTANT for H2 users

2009-08-17 Thread David Pollak
On Sun, Aug 16, 2009 at 10:32 PM, Naftoli Gugenheim wrote:

>
> I fixed the H2 default schema to be PUBLIC (top level in H2 console is
> PUBLIC) rather than Empty (username).
> This bug prevented one from schemifying a new database without creating the
> schema of the username first, and using the schema in the url.
> However, if you use the schema in the URL lift may not be happy anymore.
> Please inform the list of any related problem.
> David, is there a way to override the connection's schema?


If you implement newSuperconnection in ConnectionManager, you can define the
schema name in the SuperConnection


>
> Thanks.
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: makeUtf8 and HttpServletRequest broken in new build???

2009-08-17 Thread glenn

Is anyone planning on fixing the archetype snapshots to add
this change, and "import provider._"  in  Boot.scala.

Thanks in advance,

Glenn...

On Aug 10, 10:36 am, "marius d."  wrote:
> Your makeUTF8 should look like this:
>
>   private def makeUtf8(req: HTTPRequest): Unit =
> {req.setCharacterEncoding("UTF-8")}
>
> just use HTTPRequest instead of HttpServletRequest.
>
> Br's,
> Marius
>
> On Aug 10, 7:49 pm, glenn  wrote:
>
> > I just got a type mismatch found error in LiftRules.early.append
> > (makeUtf8) in Boot.scala.
>
> > It's now looking for an net.liftweb.http.provider.HTTPRequest instead
> > of a javax.servlet.http.HttpServletRequest.
>
> > Is this a new change, and if so, where is the
> > net.liftweb.http.provider package?
>
> > Glenn...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: IMPORTANT for H2 users

2009-08-17 Thread Naftoli Gugenheim
Yes, I see that David added a method to ConnectionManager:

  def newSuperConnection(name: ConnectionIdentifier):
Box[SuperConnection] = Empty

which you can override using his new SuperConnection constructor:

class SuperConnection(val connection: Connection,val releaseFunc: ()
=> Unit, val schemaName: Box[String]) {
  def this(c: Connection, rf: () => Unit) = this(c, rf, Empty)
...

and specify the schema name.
So if you've been using H2 and don't want to switch to the default schema,
just override it in your ConnectionManager class (often called DBVendor,
which you pass to DB.defineConnectionManager).
Thanks, David!


On Mon, Aug 17, 2009 at 12:31 PM, Derek Chen-Becker
wrote:

> I think that you'd have to do it programmatically in the connection setup
> (in ConnectionManager).
>
>
> On Mon, Aug 17, 2009 at 12:32 AM, Naftoli Gugenheim 
> wrote:
>
>>
>> I fixed the H2 default schema to be PUBLIC (top level in H2 console is
>> PUBLIC) rather than Empty (username).
>> This bug prevented one from schemifying a new database without creating
>> the schema of the username first, and using the schema in the url.
>> However, if you use the schema in the URL lift may not be happy anymore.
>> Please inform the list of any related problem.
>> David, is there a way to override the connection's schema?
>> Thanks.
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: H2 schema

2009-08-17 Thread David Pollak
On Sat, Aug 15, 2009 at 7:47 PM, Naftoli Gugenheim wrote:

>
> There was a bug discussed recently about connecting to H2 with a username
> and not being able to schemify, caused by the schema defaulting to the
> username, a schema that does not exist. I just learned that H2's default
> schema is actually "public"--go to the H2 console, create table public.bar
> ..., you'll see it on the top level.
> So could someone copy the line from PostgreSqlDriver in
> lift-mapper/src/main/scala/net/liftweb/mapper/Driver.scala that sets the
> schema to public into H2Driver?
> If not I'll try to push it tomorrow.


Cool.  I also added (in response to your ticket) a bunch of ways to define
the default schema name including a global in DB and a per-connection name.


>
> Thanks.
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: IMPORTANT for H2 users

2009-08-17 Thread Derek Chen-Becker
I think that you'd have to do it programmatically in the connection setup
(in ConnectionManager).

On Mon, Aug 17, 2009 at 12:32 AM, Naftoli Gugenheim wrote:

>
> I fixed the H2 default schema to be PUBLIC (top level in H2 console is
> PUBLIC) rather than Empty (username).
> This bug prevented one from schemifying a new database without creating the
> schema of the username first, and using the schema in the url.
> However, if you use the schema in the URL lift may not be happy anymore.
> Please inform the list of any related problem.
> David, is there a way to override the connection's schema?
> Thanks.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ws-generated code in lift

2009-08-17 Thread Derek Chen-Becker
I think that that's a general issue with SOAP, not particular to Lift ;)

On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett wrote:

>
> Id be interested to hear those stories... all the ones i've heard so
> far that involve anything to do with SOAP have usually been tales of
> woe ;-)
>
> Cheers, Tim
>
> On Aug 15, 6:47 pm, David Pollak 
> wrote:
> > I think there will be an important Goat Rodeo/Lift/SOAP story that I'll
> be
> > able to tell in a week or so... integrating WS into Lift (rather than
> > running on the side) will, I think, have benefits.
> >
> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett  >wrote:
> >
> > > Sounds like a classic situation what is technically possible is
> > > one thing but what you should do to preserve your sanity is most
> > > probably another ;-)
> >
> > > Good luck!
> >
> > > Cheers, Tim
> >
> > > On Aug 15, 4:29 am, Meredith Gregory  wrote:
> > > > Tim, Viktor,
> >
> > > > Thanks for the insights and sharing of experience. i'm in a situation
> > > where
> > > > i'm working with legacy stuff. i was just wondering how deeply into
> lift
> > > i
> > > > could push the WSDL-based Java handlers.
> >
> > > > Best wishes,
> >
> > > > --greg
> >
> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>  > > >wrote:
> >
> > > > > I agree with Viktor - in a similar vein, this is exactly what I
> > > > > implemented with Akka; the servlet runs in conjunction with lifts
> > > > > filter and lift just hands off stuff it doesnt know what to do
> with.
> > > > > So if you want to use AxisServlet or whatever its real easy.
> >
> > > > > From my point of view, you'd need a good reason to bring the SOAP
> > > > > stuff into lift; right now i havent found one... I write a lot of
> lift
> > > > > apps that consume SOAP services, but as yet have no good reason to
> > > > > write a SOAP serving app with lift - If i were to do one, id do
> > > > > exactly as with the JAX-RS stuff in Akka and passNotFoundToChain.
> >
> > > > > Cheers, Tim
> >
> > > > > On Aug 14, 10:24 pm, Viktor Klang  wrote:
> > > > > > Gregory,
> >
> > > > > > Depending on what WS-* stuff you're using, you _should_ be able
> to
> > > wire
> > > > > the
> > > > > > AxisServlet in web.xml under /ws/* or something like that, and
> then
> > > have
> > > > > > lift passNotFoundToChain=true
> >
> > > > > > But I guess it boils down to what liftiness you're planning to
> do.
> > > Can
> > > > > you
> > > > > > elaborate a bit on what you're aiming for?
> >
> > > > > > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
> > > > > > wrote:
> >
> > > > > > > Tim, Viktor,
> >
> > > > > > > Do you wire your SOAP services into lift or do you keep that
> > > > > independent? i
> > > > > > > was just talking to DPP and according to him it appears you can
> > > > > successfully
> > > > > > > wire WS-generated code anywhere along in the http-request
> > > processing
> > > > > > > pipeline. He pointed out a gotcha that i think can be
> circumvented
> > > with
> > > > > > > HttpServletResponse trampoline. Both lift and the WS-generated
> code
> > > are
> > > > > > > likely to want to be in the driver's seat regarding who's
> returning
> > > the
> > > > > > > bytes. But, i think you can just fool the WS-generated code
> into
> > > > > thinking
> > > > > > > it's got an HttpServletResponse that is really a widget that
> will
> > > just
> > > > > write
> > > > > > > into the one lift returns. In this way you can write a
> > > 1-size-fits-all
> > > > > > > return adapter. Is this what you guys are doing, or am i making
> > > this
> > > > > too
> > > > > > > complicated?
> >
> > > > > > > Best wishes,
> >
> > > > > > > --greg
> >
> > > > > > > --
> > > > > > > L.G. Meredith
> > > > > > > Managing Partner
> > > > > > > Biosimilarity LLC
> > > > > > > 1219 NW 83rd St
> > > > > > > Seattle, WA 98117
> >
> > > > > > > +1 206.650.3740
> >
> > > > > > >http://biosimilarity.blogspot.com
> >
> > > > > > --
> > > > > > Viktor Klang
> >
> > > > > > Rogue Scala-head
> >
> > > > > > Blog: klangism.blogspot.com
> > > > > > Twttr: viktorklang
> >
> > > > --
> > > > L.G. Meredith
> > > > Managing Partner
> > > > Biosimilarity LLC
> > > > 1219 NW 83rd St
> > > > Seattle, WA 98117
> >
> > > > +1 206.650.3740
> >
> > > >http://biosimilarity.blogspot.com
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > 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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: CMS for Lift?

2009-08-17 Thread Giuseppe Fogliazza

Tim,
Mapper is mixing inestricably persistence and visualization+validation
semantics, and effectively this is something that slow down my
implementation effort. I look forward for your blog post on backend
implementation.

Regards
Giuseppe

On 17 Ago, 17:58, Timothy Perrett  wrote:
> Giuseppe,
>
> Im sure you already know this, but be carfull when comparing mapper to
> record... There implementations (whilst similar) are semantically
> different... Certainly that's been my experience whilst implementing a
> custom backend for Record (blog post coming soon)
>
> Cheers, Tim
>
> On 17/08/2009 15:44, "Giuseppe Fogliazza"  wrote:
>
>
>
> > I confirm that there are some efforts in progress. Particularly I am
> > writing a jsr 170 (jackrabbit) backend for Record. It is taking longer
> > than expected because I am extending Record with reference field and
> > multivalued field that are of paramount relevance in domain modeling.
> > I studied recent extension to Mapper (TableEditor, OneToMany,
> > ManyToMany) as a starting point.
>
> > Regards
> > Giuseppe
>
> > On 16 Ago, 12:00, Timothy Perrett  wrote:
> >> Short answer: "no".
>
> >> Long answer: There are a couple of efforts in progress, but this are
> >> early, early stages (not even runnable code).
>
> >> Cheers, Tim
>
> >> On Aug 16, 7:08 am, philip  wrote:
>
> >>> Hi,
>
> >>> Has anyone made a CMS for Liftweb? or I should say, in liftweb.
>
> >>> Thanks, Philip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: CMS for Lift?

2009-08-17 Thread Timothy Perrett


Giuseppe,

Im sure you already know this, but be carfull when comparing mapper to
record... There implementations (whilst similar) are semantically
different... Certainly that's been my experience whilst implementing a
custom backend for Record (blog post coming soon)

Cheers, Tim

On 17/08/2009 15:44, "Giuseppe Fogliazza"  wrote:

> 
> I confirm that there are some efforts in progress. Particularly I am
> writing a jsr 170 (jackrabbit) backend for Record. It is taking longer
> than expected because I am extending Record with reference field and
> multivalued field that are of paramount relevance in domain modeling.
> I studied recent extension to Mapper (TableEditor, OneToMany,
> ManyToMany) as a starting point.
> 
> Regards
> Giuseppe
> 
> On 16 Ago, 12:00, Timothy Perrett  wrote:
>> Short answer: "no".
>> 
>> Long answer: There are a couple of efforts in progress, but this are
>> early, early stages (not even runnable code).
>> 
>> Cheers, Tim
>> 
>> On Aug 16, 7:08 am, philip  wrote:
>> 
>>> Hi,
>> 
>>> Has anyone made a CMS for Liftweb? or I should say, in liftweb.
>> 
>>> Thanks, Philip
> 
> > 
> 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Scala Lifftoff (Reston, VA)

2009-08-17 Thread David Pollak
-- Forwarded message --
From: Josh Suereth 
Date: Sun, Aug 16, 2009 at 8:40 PM
Subject: [scala-user] Scala Lifftoff (Reston, VA)
To: Scala User 


Greetings All!

We're organizing a Scala Lift-Off "unconference" event for Friday, October
30th in Reston, VA (A Short hop away for those attending the OOPSLA
conference).  For those of you who may be unfamiliar with the unconference
phenomenon, here's a PDF  that outlines the process.

Topics likely to include:

   - Initial Steps in Lift
   - New Features to 2.8.0 -> How can we leverage them?
   - Functional Library Design
   - Continuation Based Programming
   - Concurrency Paradigms in Scala (STM, Actors, etc.)
   - Binary Incompatibilities -> Dealing with an evolving Scala Ecosystem
   - "Whittling an API" -> Crafting DSLs in Scala (Thanks Nathan for the
   great name!)
   - Scala Integrations -> Using Scala with existing projects, e.g. EJBs,
   Seam, Spring, Hibernate, Wicket 
   - Scala Build tools -> Which should I use?
   - What IDE should I pick and how to become effective with it


Sign up is available here.
(More website remodeling to come in future weeks).


There is a discount available for full-time students/academics, please email
me for the discount code.


This event is being sponsored by FGM, Inc.  They are located at 12021 Sunset
Hills Rd #400, Reston VA.  A Special Thanks for all their support of the
Scala community!


We look forward to your participation!

- The Scala Liftoff Planning Team



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: CMS for Lift?

2009-08-17 Thread Naftoli Gugenheim

Note that there have been some fixes to OneToMany, LongMappedForeignMapper, and 
ManyToMany recently.
Also, if you like it fine, but keep in mind that I'm not a professional 
programmer with years of experience, nor is the implementation a result of any 
sort of research. I simply wished to have such functionality in a reusable 
format and mentioned my work on the list, and David invited me to share it. 
(That's why I'm fixing bugs now, after I got to the part of my project that 
uses it heavily.) So if you have another approach don't assume mine is "proven" 
or better!


-
Giuseppe Fogliazza wrote:


I confirm that there are some efforts in progress. Particularly I am
writing a jsr 170 (jackrabbit) backend for Record. It is taking longer
than expected because I am extending Record with reference field and
multivalued field that are of paramount relevance in domain modeling.
I studied recent extension to Mapper (TableEditor, OneToMany,
ManyToMany) as a starting point.

Regards
Giuseppe

On 16 Ago, 12:00, Timothy Perrett  wrote:
> Short answer: "no".
>
> Long answer: There are a couple of efforts in progress, but this are
> early, early stages (not even runnable code).
>
> Cheers, Tim
>
> On Aug 16, 7:08 am, philip  wrote:
>
> > Hi,
>
> > Has anyone made a CMS for Liftweb? or I should say, in liftweb.
>
> > Thanks, Philip



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How do I add jar files to my app?

2009-08-17 Thread Timothy Perrett


You can specify this in maven, but make sure you set the scope:

provided

Cheers, Tim

On 17/08/2009 15:04, "marius d."  wrote:

> 
> The JDBC driver should not be in the applications class-path (WEB-INF/
> lib) but in container's classpath. Say jetty's lib folder.
> 
> Br's,
> Marius
> 
> On Aug 17, 2:24 pm, Goldfish  wrote:
>> I am trying to point my app at an Oracle database, but am getting
>> ClassNotFound exceptions:
>> 
>> [INFO] Scanning for projects...
>> [INFO]
>> 
>> [INFO] Building cims2
>> [INFO]    task-segment: [jetty:run]
>> [INFO]
>> 
>> [INFO] Preparing jetty:run
>> [INFO] [resources:resources {execution: default-resources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 1 resource
>> [INFO] [yuicompressor:compress {execution: default}]
>> [INFO] nb warnings: 0, nb errors: 0
>> [INFO] [compiler:compile {execution: default-compile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [scala:compile {execution: default}]
>> [INFO] Checking for multiple versions of scala
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources {execution: default-testResources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 0 resource
>> [INFO] [compiler:testCompile {execution: default-testCompile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [scala:testCompile {execution: default}]
>> [INFO] Checking for multiple versions of scala
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [jetty:run {execution: default-cli}]
>> [INFO] Configuring Jetty for project: cims2
>> [INFO] Webapp source directory = H:\lift\cims2\src\main\webapp
>> [INFO] Reload Mechanic: automatic
>> [INFO] Classes = H:\lift\cims2\target\classes
>> 2009-08-17 07:20:58.078::INFO:  Logging to STDERR via
>> org.mortbay.log.StdErrLog
>> [INFO] Context path = /
>> [INFO] Tmp directory =  determined at runtime
>> [INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
>> [INFO] Web overrides =  none
>> [INFO] web.xml file = H:\lift\cims2\src\main\webapp\WEB-INF\web.xml
>> [INFO] Webapp directory = H:\lift\cims2\src\main\webapp
>> [INFO] Starting jetty 6.1.19 ...
>> 2009-08-17 07:20:58.296::INFO:  jetty-6.1.19
>> 2009-08-17 07:20:59.000::INFO:  No Transaction manager found - if your
>> webapp re
>> quires one, please configure one.
>> java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> 
>> I put ojdbc.jar in both src/webapp and src/webapp/WEB-INF and it makes
>> no difference. I dug into the code so that I could figure out how to
>> use props files instead of editing Boot.scala too much, and managed to
>> define src/main/resources/default.props, which I can tell is read,
>> because it is obviously trying to load in
>> oracle.jdbc.driver.OracleDriver, which came from my props file. My
>> Boot.scala file looks like:
>> 
>> 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.mapper.{DB, ConnectionManager, Schemifier,
>> DefaultConnectionIdentifier, ConnectionIdentifier}
>> import _root_.java.sql.{Connection, DriverManager}
>> import _root_.com.harris.cims.model._
>> import _root_.javax.servlet.http.{HttpServletRequest}
>> 
>> /**
>>   * A class that's instantiated early and run.  It allows the
>> application
>>   * to modify lift's environment
>>   */
>> class Boot {
>>   def boot {
>>     if (!DB.jndiJdbcConnAvailable_?)
>>       DB.defineConnectionManager(DefaultConnectionIdentifier,
>> DBVendor)
>> 
>>     // where to search snippet
>>     LiftRules.addToPackages("com.harris.cims")
>>     Schemifier.schemify(false, Log.infoF _, User, CarrierAccount)
>> 
>>     // Build SiteMap
>>     val entries = Menu(Loc("Home", List("index"), "Home")) ::
>> 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)
>> 
>>     S.addAround(DB.buildLoanWrapper)
>>   }
>> 
>>   

[Lift] Re: CMS for Lift?

2009-08-17 Thread Giuseppe Fogliazza

I confirm that there are some efforts in progress. Particularly I am
writing a jsr 170 (jackrabbit) backend for Record. It is taking longer
than expected because I am extending Record with reference field and
multivalued field that are of paramount relevance in domain modeling.
I studied recent extension to Mapper (TableEditor, OneToMany,
ManyToMany) as a starting point.

Regards
Giuseppe

On 16 Ago, 12:00, Timothy Perrett  wrote:
> Short answer: "no".
>
> Long answer: There are a couple of efforts in progress, but this are
> early, early stages (not even runnable code).
>
> Cheers, Tim
>
> On Aug 16, 7:08 am, philip  wrote:
>
> > Hi,
>
> > Has anyone made a CMS for Liftweb? or I should say, in liftweb.
>
> > Thanks, Philip

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Using mapper for calculated field?

2009-08-17 Thread Jeppe Nejsum Madsen

Hi,

In my data model I have:

contractStart extends MappedDate
contractLength extends MappedInt

In some views I would like to show contractEnd which is
contractStart+contractEnd. 

It would be nice if I could reuse all the mapper functionality for
converting to html/json/forms etc, but I can't seem to figure out if
this is possible with the existing code or even by creating a subclass
of MappedField

If add a mapped field with a non-existing column name, I get an
error. If I add a mapped field with the same column name as en existing
field, the original column is not loaded correctly.

Any hints?

/Jeppe



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How do I add jar files to my app?

2009-08-17 Thread marius d.

The JDBC driver should not be in the applications class-path (WEB-INF/
lib) but in container's classpath. Say jetty's lib folder.

Br's,
Marius

On Aug 17, 2:24 pm, Goldfish  wrote:
> I am trying to point my app at an Oracle database, but am getting
> ClassNotFound exceptions:
>
> [INFO] Scanning for projects...
> [INFO]
> 
> [INFO] Building cims2
> [INFO]    task-segment: [jetty:run]
> [INFO]
> 
> [INFO] Preparing jetty:run
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] Copying 1 resource
> [INFO] [yuicompressor:compress {execution: default}]
> [INFO] nb warnings: 0, nb errors: 0
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [scala:compile {execution: default}]
> [INFO] Checking for multiple versions of scala
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [scala:testCompile {execution: default}]
> [INFO] Checking for multiple versions of scala
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [jetty:run {execution: default-cli}]
> [INFO] Configuring Jetty for project: cims2
> [INFO] Webapp source directory = H:\lift\cims2\src\main\webapp
> [INFO] Reload Mechanic: automatic
> [INFO] Classes = H:\lift\cims2\target\classes
> 2009-08-17 07:20:58.078::INFO:  Logging to STDERR via
> org.mortbay.log.StdErrLog
> [INFO] Context path = /
> [INFO] Tmp directory =  determined at runtime
> [INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
> [INFO] Web overrides =  none
> [INFO] web.xml file = H:\lift\cims2\src\main\webapp\WEB-INF\web.xml
> [INFO] Webapp directory = H:\lift\cims2\src\main\webapp
> [INFO] Starting jetty 6.1.19 ...
> 2009-08-17 07:20:58.296::INFO:  jetty-6.1.19
> 2009-08-17 07:20:59.000::INFO:  No Transaction manager found - if your
> webapp re
> quires one, please configure one.
> java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>
> I put ojdbc.jar in both src/webapp and src/webapp/WEB-INF and it makes
> no difference. I dug into the code so that I could figure out how to
> use props files instead of editing Boot.scala too much, and managed to
> define src/main/resources/default.props, which I can tell is read,
> because it is obviously trying to load in
> oracle.jdbc.driver.OracleDriver, which came from my props file. My
> Boot.scala file looks like:
>
> 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.mapper.{DB, ConnectionManager, Schemifier,
> DefaultConnectionIdentifier, ConnectionIdentifier}
> import _root_.java.sql.{Connection, DriverManager}
> import _root_.com.harris.cims.model._
> import _root_.javax.servlet.http.{HttpServletRequest}
>
> /**
>   * A class that's instantiated early and run.  It allows the
> application
>   * to modify lift's environment
>   */
> class Boot {
>   def boot {
>     if (!DB.jndiJdbcConnAvailable_?)
>       DB.defineConnectionManager(DefaultConnectionIdentifier,
> DBVendor)
>
>     // where to search snippet
>     LiftRules.addToPackages("com.harris.cims")
>     Schemifier.schemify(false, Log.infoF _, User, CarrierAccount)
>
>     // Build SiteMap
>     val entries = Menu(Loc("Home", List("index"), "Home")) ::
> 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)
>
>     S.addAround(DB.buildLoanWrapper)
>   }
>
>   /**
>    * Force the request to be UTF-8
>    */
>   private def makeUtf8(req: HttpServletRequest) {
>     req.setCharacterEncoding("UTF-8")
>   }
>
> }
>
> /**
> * Database connection calculation
> */
> object DBVendor extends ConnectionManager {
>   private var pool: List[C

[Lift] Re: CMS for Lift?

2009-08-17 Thread Adam Strickland

Ditto

On Aug 17, 6:43 am, Jefken De Vleesetenden Boterham
 wrote:
> thirded, I'd try to help out a bit
>
> On Sun, Aug 16, 2009 at 11:53 PM, TylerWeir wrote:
>
> >> @Glenn - is your project public?
>
> > Seconded, toss it up on github and let the community start helping
> > out.
>
> --http://pmonnaie.blogspot.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] How do I add jar files to my app?

2009-08-17 Thread Goldfish

I am trying to point my app at an Oracle database, but am getting
ClassNotFound exceptions:

[INFO] Scanning for projects...
[INFO]

[INFO] Building cims2
[INFO]task-segment: [jetty:run]
[INFO]

[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources,
i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] [yuicompressor:compress {execution: default}]
[INFO] nb warnings: 0, nb errors: 0
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:testCompile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] Nothing to compile - all classes are up to date
[INFO] [jetty:run {execution: default-cli}]
[INFO] Configuring Jetty for project: cims2
[INFO] Webapp source directory = H:\lift\cims2\src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = H:\lift\cims2\target\classes
2009-08-17 07:20:58.078::INFO:  Logging to STDERR via
org.mortbay.log.StdErrLog
[INFO] Context path = /
[INFO] Tmp directory =  determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] web.xml file = H:\lift\cims2\src\main\webapp\WEB-INF\web.xml
[INFO] Webapp directory = H:\lift\cims2\src\main\webapp
[INFO] Starting jetty 6.1.19 ...
2009-08-17 07:20:58.296::INFO:  jetty-6.1.19
2009-08-17 07:20:59.000::INFO:  No Transaction manager found - if your
webapp re
quires one, please configure one.
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

I put ojdbc.jar in both src/webapp and src/webapp/WEB-INF and it makes
no difference. I dug into the code so that I could figure out how to
use props files instead of editing Boot.scala too much, and managed to
define src/main/resources/default.props, which I can tell is read,
because it is obviously trying to load in
oracle.jdbc.driver.OracleDriver, which came from my props file. My
Boot.scala file looks like:

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.mapper.{DB, ConnectionManager, Schemifier,
DefaultConnectionIdentifier, ConnectionIdentifier}
import _root_.java.sql.{Connection, DriverManager}
import _root_.com.harris.cims.model._
import _root_.javax.servlet.http.{HttpServletRequest}

/**
  * A class that's instantiated early and run.  It allows the
application
  * to modify lift's environment
  */
class Boot {
  def boot {
if (!DB.jndiJdbcConnAvailable_?)
  DB.defineConnectionManager(DefaultConnectionIdentifier,
DBVendor)

// where to search snippet
LiftRules.addToPackages("com.harris.cims")
Schemifier.schemify(false, Log.infoF _, User, CarrierAccount)

// Build SiteMap
val entries = Menu(Loc("Home", List("index"), "Home")) ::
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)

S.addAround(DB.buildLoanWrapper)
  }

  /**
   * Force the request to be UTF-8
   */
  private def makeUtf8(req: HttpServletRequest) {
req.setCharacterEncoding("UTF-8")
  }

}

/**
* Database connection calculation
*/
object DBVendor extends ConnectionManager {
  private var pool: List[Connection] = Nil
  private var poolSize = 0
  private val maxPoolSize = 4

  private def createOne: Box[Connection] = try {
val driverName: String = Props.get("db.driver") openOr
"org.apache.derby.jdbc.EmbeddedDriver"

val dbUrl: String = Props.get("db.url") openOr
"jdbc:derby:lift_example;create=true"

Class.forName(driverName)

val dm = (Props.get("db.user"), Props.get("db.password")) match {

[Lift] Re: CMS for Lift?

2009-08-17 Thread Jefken De Vleesetenden Boterham

thirded, I'd try to help out a bit

On Sun, Aug 16, 2009 at 11:53 PM, TylerWeir wrote:
>
>> @Glenn - is your project public?
>
> Seconded, toss it up on github and let the community start helping
> out.
>
> >
>



-- 
http://pmonnaie.blogspot.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] How to get list of mapped fields from MetaMapper?

2009-08-17 Thread Jeppe Nejsum Madsen

hi

I'm trying to create an application specific CRUDify but I can't
figure out how to get the list of mapped fields from a MetaMapper.

MetaMapper has a mappedFieldList, but it is package private for some
reason??

mappedFields doesn't have the type info, nor does BaseMappedField have
the relevant methods (see below)

On a related note, why aren't many of the methods/fields in TypedField
in BaseMappedField instead? It would seem that stuff like displayName,
dbDisplay_?, dbIncludeInForm_? etc would be more appropropriate there
and doesn't rely on the type of field??

For now, my work around is to put my trait in the net.liftweb.mapper
package. Not ideal :-)

/Jeppe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Deploying

2009-08-17 Thread Jeppe Nejsum Madsen

Naftoli Gugenheim  writes:

> What's the best way to get a lift app running on a Ubuntu web server I can 
> SSH into with full permissions? It came with almost nothing installed.
> Thanks.

It may be overkill for you if it's just a one time install, but I've had
great success with Chef (http://wiki.opscode.com/display/chef/Home) to
do automatic provisioning of servers/services/deployment.

Some time ago, I wrote a series of articles that describes a basic setup
to deploy a basic "Hello World" Lift app to EC2. If you skip the EC2
part, you may find something useful:
http://jeppenejsum.wordpress.com/2009/05/03/ec2-continuous-deployment-hello-world/


/Jeppe


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---