[Lift] Re: buttons and textbox

2009-05-03 Thread Meredith Gregory
Lifted,

When i look at the button behavior using firebug, this is the following
error i see.

F891109765602PT1 is not defined
onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
(F891109765602PT1, lift_ajaxHand...whatField).attr(value), null, null));

It would appear that however the

ajaxCall(JsRaw($('#whatField').attr('value'))

is working it is setting up a handle that is stale by the time the behavior
is actually invoked. This is behind-the-scenes stuff for a programmer like
me. It's part of what lift is s'posed to provide. Moreover, i get no help
from the compiler. The code i have written is well-typed. Any help would be
greatly appreciated.

Best wishes,

--greg


On Sat, May 2, 2009 at 8:50 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Lifted,

 i'm putting together a little lift-based testharness in which to evaluate
 various solutions to the challenge Martin posted recently regarding scalable
 abstractions for a little lambda interpreter. You can get a copy of the app
 here http://svn.biosimilarity.com/src/open/rlambda/trunk/. (Please note:
 this is a testharness and not a proposed solution. i've got a couple of
 solutions in mind, but before i post them, i'd like to put them in a web
 container.) As usual, i'm running into problems on the frontend. i'm not
 getting expected callback behavior, and, moreover, the code i'm using used
 to work fine.

 The snippet code is included below this email's closing. The relevant
 fragment is listed just below. The behavior i see is that the button
 produces no behavior on the server at all. The CR/LF event on the text field
 causes updateWhat to be called twice. Any advice on the frontend behavior
 would be greatly appreciated.

 def whatNode(termStr : String) = {
 theTerm = termStr
 theClientRequestStr = evalStr()
 var theParseResponseStr : String =
   (failure:  + theClientRequestStr + \n);
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
   println( parsed :  + theParseResponseStr );
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }

   def updateWhat(str: String): JsCmd = {
 println(updateWhat with  + str)
 JsCmds.SetHtml(parseTree, whatNode(str))
   }

   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group
   label for=whatFieldTerm :/label
   { text(lambda x.x, (updateWhat _)) % (size - 60) % (id -
 whatField) }
   { button type=button{?(Go)}/button %
(onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
 updateWhat(s))) }
   br/
   div id=parseTree{whatNode(evalStr())}/div
 /xml:group
   }

 Best wishes,

 --greg

 package com.biosimilarity.reflection.snippet

 import net.liftweb._
 import http._
 import S._
 import SHtml._
 import util._
 import Helpers._
 import mapper._
 import textile._
 import js.{JE, JsCmd, JsCmds}
 import JsCmds._
 import JE._

 import com.biosimilarity.reflection.model.REPL

 import scala.xml._

 class REPLForm {
   val theREPL = new REPL()
   var theTerm : String = lambda x.x
   var theClientRequestStr : String = evalStr()

   def evalStr() = theTerm
   def clientRequestRequest() = theClientRequestStr

   def parseTreeNode(clientRequestStr : String) = {
 theClientRequestStr = clientRequestStr.replace( \n,  );
 var theParseResponseStr : String =
   ( failure:  + theClientRequestStr + \n );
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }

   def whatNode(termStr : String) = {
 theTerm = termStr
 theClientRequestStr = evalStr()
 var theParseResponseStr : String =
   (failure:  + theClientRequestStr + \n);
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
   println( parsed :  + theParseResponseStr );
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }

   def updateWhat(str: String): JsCmd = {
 println(updateWhat with  + str)
 JsCmds.SetHtml(parseTree, whatNode(str))
   }

   def show(xhtml: NodeSeq): NodeSeq = {
 

[Lift] Re: buttons and textbox

2009-05-03 Thread marius d.

Greg,

ajaxCall returns a tuple (String, JsExp) ... so when you use it try
something like:

 (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
updateWhat(s))._2)

Br's,
Marius

On May 3, 9:00 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
 Lifted,

 When i look at the button behavior using firebug, this is the following
 error i see.

 F891109765602PT1 is not defined
 onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
 (F891109765602PT1, lift_ajaxHand...whatField).attr(value), null, null));

 It would appear that however the

 ajaxCall(JsRaw($('#whatField').attr('value'))

 is working it is setting up a handle that is stale by the time the behavior
 is actually invoked. This is behind-the-scenes stuff for a programmer like
 me. It's part of what lift is s'posed to provide. Moreover, i get no help
 from the compiler. The code i have written is well-typed. Any help would be
 greatly appreciated.

 Best wishes,

 --greg

 On Sat, May 2, 2009 at 8:50 PM, Meredith Gregory
 lgreg.mered...@gmail.comwrote:



  Lifted,

  i'm putting together a little lift-based testharness in which to evaluate
  various solutions to the challenge Martin posted recently regarding scalable
  abstractions for a little lambda interpreter. You can get a copy of the app
  here http://svn.biosimilarity.com/src/open/rlambda/trunk/. (Please note:
  this is a testharness and not a proposed solution. i've got a couple of
  solutions in mind, but before i post them, i'd like to put them in a web
  container.) As usual, i'm running into problems on the frontend. i'm not
  getting expected callback behavior, and, moreover, the code i'm using used
  to work fine.

  The snippet code is included below this email's closing. The relevant
  fragment is listed just below. The behavior i see is that the button
  produces no behavior on the server at all. The CR/LF event on the text field
  causes updateWhat to be called twice. Any advice on the frontend behavior
  would be greatly appreciated.

  def whatNode(termStr : String) = {
      theTerm = termStr
      theClientRequestStr = evalStr()
      var theParseResponseStr : String =
        (failure:  + theClientRequestStr + \n);
      try {
        theParseResponseStr =
      theREPL.showClientRequestParseTree(theClientRequestStr)
        println( parsed :  + theParseResponseStr );
      //theREPL.readEvalPrint(theClientRequestStr)
      }
      catch {
        case e = {
      val sw : java.io.StringWriter =    new java.io.StringWriter( );
      e.printStackTrace( new java.io.PrintWriter( sw, true ) );
      theParseResponseStr = theParseResponseStr + e.toString
        }
      }
      div id=parseTree{theParseResponseStr}/div
    }

    def updateWhat(str: String): JsCmd = {
      println(updateWhat with  + str)
      JsCmds.SetHtml(parseTree, whatNode(str))
    }

    def show(xhtml: NodeSeq): NodeSeq = {
      xml:group
        label for=whatFieldTerm :/label
        { text(lambda x.x, (updateWhat _)) % (size - 60) % (id -
  whatField) }
        { button type=button{?(Go)}/button %
         (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
  updateWhat(s))) }
        br/
        div id=parseTree{whatNode(evalStr())}/div
      /xml:group
    }

  Best wishes,

  --greg

  package com.biosimilarity.reflection.snippet

  import net.liftweb._
  import http._
  import S._
  import SHtml._
  import util._
  import Helpers._
  import mapper._
  import textile._
  import js.{JE, JsCmd, JsCmds}
  import JsCmds._
  import JE._

  import com.biosimilarity.reflection.model.REPL

  import scala.xml._

  class REPLForm {
    val theREPL = new REPL()
    var theTerm : String = lambda x.x
    var theClientRequestStr : String = evalStr()

    def evalStr() = theTerm
    def clientRequestRequest() = theClientRequestStr

    def parseTreeNode(clientRequestStr : String) = {
      theClientRequestStr = clientRequestStr.replace( \n,  );
      var theParseResponseStr : String =
        ( failure:  + theClientRequestStr + \n );
      try {
        theParseResponseStr =
      theREPL.showClientRequestParseTree(theClientRequestStr)
      //theREPL.readEvalPrint(theClientRequestStr)
      }
      catch {
        case e = {
      val sw : java.io.StringWriter =    new java.io.StringWriter( );
      e.printStackTrace( new java.io.PrintWriter( sw, true ) );
      theParseResponseStr = theParseResponseStr + e.toString
        }
      }
      div id=parseTree{theParseResponseStr}/div
    }

    def whatNode(termStr : String) = {
      theTerm = termStr
      theClientRequestStr = evalStr()
      var theParseResponseStr : String =
        (failure:  + theClientRequestStr + \n);
      try {
        theParseResponseStr =
      theREPL.showClientRequestParseTree(theClientRequestStr)
        println( parsed :  + theParseResponseStr );
      //theREPL.readEvalPrint(theClientRequestStr)
      }
      catch {
        case e = {
      val sw : java.io.StringWriter =    new 

[Lift] Re: buttons and textbox

2009-05-03 Thread marius d.

First of all instead of:

 (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
updateWhat(s))._2)

I would use:

 (onclick - ajaxCall(ValById(whatField), s = updateWhat(s))._2)


That should work  I think in your case you are setting the value
attribute of the text field to lambda.x.x and $('#whatField').attr
('value') is just returning the 'value' attribute of the whatField
node. This returns the value set statically which is different from
document.getElementById(whatField).value. I know it's a bit odd ...

Br's,
Marius

On May 3, 10:51 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
 Marius,

 Thanks for the tip! That gets me a little further. However, what i really
 don't understand is why it is that after i have modified the textbox from
 lambda x.x to lambda x.(x x), then when i type
 $('#whatField').attr('value') in the javascript evaluation window in firebug
 it's returning lambda x.x. How do i access the contents of the textbox
 except by that call?

 Best wishes,

 --greg



 On Sun, May 3, 2009 at 12:11 AM, marius d. marius.dan...@gmail.com wrote:

  Greg,

  ajaxCall returns a tuple (String, JsExp) ... so when you use it try
  something like:

   (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
  updateWhat(s))._2)

  Br's,
  Marius

  On May 3, 9:00 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
   Lifted,

   When i look at the button behavior using firebug, this is the following
   error i see.

   F891109765602PT1 is not defined
   onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
   (F891109765602PT1, lift_ajaxHand...whatField).attr(value), null,
  null));

   It would appear that however the

   ajaxCall(JsRaw($('#whatField').attr('value'))

   is working it is setting up a handle that is stale by the time the
  behavior
   is actually invoked. This is behind-the-scenes stuff for a programmer
  like
   me. It's part of what lift is s'posed to provide. Moreover, i get no help
   from the compiler. The code i have written is well-typed. Any help would
  be
   greatly appreciated.

   Best wishes,

   --greg

   On Sat, May 2, 2009 at 8:50 PM, Meredith Gregory
   lgreg.mered...@gmail.comwrote:

Lifted,

i'm putting together a little lift-based testharness in which to
  evaluate
various solutions to the challenge Martin posted recently regarding
  scalable
abstractions for a little lambda interpreter. You can get a copy of the
  app
here http://svn.biosimilarity.com/src/open/rlambda/trunk/. (Please
  note:
this is a testharness and not a proposed solution. i've got a couple of
solutions in mind, but before i post them, i'd like to put them in a
  web
container.) As usual, i'm running into problems on the frontend. i'm
  not
getting expected callback behavior, and, moreover, the code i'm using
  used
to work fine.

The snippet code is included below this email's closing. The relevant
fragment is listed just below. The behavior i see is that the button
produces no behavior on the server at all. The CR/LF event on the text
  field
causes updateWhat to be called twice. Any advice on the frontend
  behavior
would be greatly appreciated.

def whatNode(termStr : String) = {
    theTerm = termStr
    theClientRequestStr = evalStr()
    var theParseResponseStr : String =
      (failure:  + theClientRequestStr + \n);
    try {
      theParseResponseStr =
    theREPL.showClientRequestParseTree(theClientRequestStr)
      println( parsed :  + theParseResponseStr );
    //theREPL.readEvalPrint(theClientRequestStr)
    }
    catch {
      case e = {
    val sw : java.io.StringWriter =    new java.io.StringWriter( );
    e.printStackTrace( new java.io.PrintWriter( sw, true ) );
    theParseResponseStr = theParseResponseStr + e.toString
      }
    }
    div id=parseTree{theParseResponseStr}/div
  }

  def updateWhat(str: String): JsCmd = {
    println(updateWhat with  + str)
    JsCmds.SetHtml(parseTree, whatNode(str))
  }

  def show(xhtml: NodeSeq): NodeSeq = {
    xml:group
      label for=whatFieldTerm :/label
      { text(lambda x.x, (updateWhat _)) % (size - 60) % (id
  -
whatField) }
      { button type=button{?(Go)}/button %
       (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s
  =
updateWhat(s))) }
      br/
      div id=parseTree{whatNode(evalStr())}/div
    /xml:group
  }

Best wishes,

--greg

package com.biosimilarity.reflection.snippet

import net.liftweb._
import http._
import S._
import SHtml._
import util._
import Helpers._
import mapper._
import textile._
import js.{JE, JsCmd, JsCmds}
import JsCmds._
import JE._

import com.biosimilarity.reflection.model.REPL

import scala.xml._

class REPLForm {
  val theREPL = new REPL()
  var theTerm : String 

[Lift] Re: buttons and textbox

2009-05-03 Thread Meredith Gregory
Marius,

Thanks! That works much better. One final question, if i wanted to have the
CR/LF event on the textbox have the same behavior as the button, what would
be the simplest approach? Currently, i have

{ text(evalStr(), (updateWhat _)) % (size - 60) % (id - whatField)
}

which always reverts back to the initla value of the textbox.

Best wishes,

--greg

On Sun, May 3, 2009 at 1:08 AM, marius d. marius.dan...@gmail.com wrote:


 First of all instead of:

  (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
 updateWhat(s))._2)

 I would use:

  (onclick - ajaxCall(ValById(whatField), s = updateWhat(s))._2)


 That should work  I think in your case you are setting the value
 attribute of the text field to lambda.x.x and $('#whatField').attr
 ('value') is just returning the 'value' attribute of the whatField
 node. This returns the value set statically which is different from
 document.getElementById(whatField).value. I know it's a bit odd ...

 Br's,
 Marius

 On May 3, 10:51 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Marius,
 
  Thanks for the tip! That gets me a little further. However, what i really
  don't understand is why it is that after i have modified the textbox from
  lambda x.x to lambda x.(x x), then when i type
  $('#whatField').attr('value') in the javascript evaluation window in
 firebug
  it's returning lambda x.x. How do i access the contents of the textbox
  except by that call?
 
  Best wishes,
 
  --greg
 
 
 
  On Sun, May 3, 2009 at 12:11 AM, marius d. marius.dan...@gmail.com
 wrote:
 
   Greg,
 
   ajaxCall returns a tuple (String, JsExp) ... so when you use it try
   something like:
 
(onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
   updateWhat(s))._2)
 
   Br's,
   Marius
 
   On May 3, 9:00 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
Lifted,
 
When i look at the button behavior using firebug, this is the
 following
error i see.
 
F891109765602PT1 is not defined
onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
(F891109765602PT1, lift_ajaxHand...whatField).attr(value), null,
   null));
 
It would appear that however the
 
ajaxCall(JsRaw($('#whatField').attr('value'))
 
is working it is setting up a handle that is stale by the time the
   behavior
is actually invoked. This is behind-the-scenes stuff for a programmer
   like
me. It's part of what lift is s'posed to provide. Moreover, i get no
 help
from the compiler. The code i have written is well-typed. Any help
 would
   be
greatly appreciated.
 
Best wishes,
 
--greg
 
On Sat, May 2, 2009 at 8:50 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:
 
 Lifted,
 
 i'm putting together a little lift-based testharness in which to
   evaluate
 various solutions to the challenge Martin posted recently regarding
   scalable
 abstractions for a little lambda interpreter. You can get a copy of
 the
   app
 here http://svn.biosimilarity.com/src/open/rlambda/trunk/.
 (Please
   note:
 this is a testharness and not a proposed solution. i've got a
 couple of
 solutions in mind, but before i post them, i'd like to put them in
 a
   web
 container.) As usual, i'm running into problems on the frontend.
 i'm
   not
 getting expected callback behavior, and, moreover, the code i'm
 using
   used
 to work fine.
 
 The snippet code is included below this email's closing. The
 relevant
 fragment is listed just below. The behavior i see is that the
 button
 produces no behavior on the server at all. The CR/LF event on the
 text
   field
 causes updateWhat to be called twice. Any advice on the frontend
   behavior
 would be greatly appreciated.
 
 def whatNode(termStr : String) = {
 theTerm = termStr
 theClientRequestStr = evalStr()
 var theParseResponseStr : String =
   (failure:  + theClientRequestStr + \n);
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
   println( parsed :  + theParseResponseStr );
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }
 
   def updateWhat(str: String): JsCmd = {
 println(updateWhat with  + str)
 JsCmds.SetHtml(parseTree, whatNode(str))
   }
 
   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group
   label for=whatFieldTerm :/label
   { text(lambda x.x, (updateWhat _)) % (size - 60) %
 (id
   -
 whatField) }
   { button type=button{?(Go)}/button %
(onclick -
 ajaxCall(JsRaw($('#whatField').attr('value')), 

[Lift] Re: Localize an image

2009-05-03 Thread marius d.

As a continuation to Tim's notes. You can have templates suffixed with
the locale suffix. So for the template applicable for one locale or
another just use different CSS files.

I guess you can also use chooseTemplate to render different variants
of the markup in question.

Br's,
Marius

On May 1, 6:52 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Can you not just apply a CSS class dynamically to that element and write the
 appropriate CSS?

 Thanks, Tim

 On 01/05/2009 16:42, bradford fingerm...@gmail.com wrote:



  lift localization is going very smoothly -- thank you all for your
  efforts put into this.  Does anyone know if it is possible to localize
  an image, for example have search.gif and search_fr_FR.gif?  My
  template should be the same for all languages except for this one
  button image:  f:submit f:id=searchbutton f:type=image
  f:alt=Search f:src=/img/search.gif /.
--~--~-~--~~~---~--~~
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: stuck on some scala while using jpa

2009-05-03 Thread TSP

OK to answer own question in case anyone has similar problems:
ScalaEntityManager returns a bufferWrapper from the jcl.Conversions
not a List. However, it can be treated as a Seq[Postcode]
--~--~-~--~~~---~--~~
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] Do you guys ever use lift:a key=... ... in your templates?

2009-05-03 Thread Marius

Hi,

I'm asking this because SHtml.a is a bit a-typical in the sense of
producing lift:a that will render the ajax link eventually.

I don't quite see the point of lift:a since it needs a key
impersonating the user's function name which is unknown in the
template ... well unless you are using attribute snippets.

Br's,
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: how to add object into session scope in lift

2009-05-03 Thread Andrew Scherpbier

David Pollak wrote:


 On Thu, Apr 30, 2009 at 10:48 PM, Andrew Scherpbier 
 and...@scherpbier.org mailto:and...@scherpbier.org wrote:


 The Getting Started document got me hooked on Lift.  :-)
 I guess I'll report my struggles from there.  I don't know if what
 I did
 is typical.

 After actually running the two examples from the Getting Started
 docs,
 I looked and found some other examples, did some looking around in the
 mailing list archives and started reading the Exploring Lift book.
 As a starting application of lift, I want to write a simple purchase
 order tracking webapp.  It was easy enough to figure out how to
 hook up
 PostgreSQL instead of Derby.  I started experimenting with the CRUDify
 trait and got several tables working, but then I got stuck trying to
 make a more cohesive app.  What I could not figure out was how to use
 CRUDify's functionality without having to put all the options in the
 SiteMap.  So I spent a lot of time trying to figure out the SiteMap
 class.  I have since come to the realization that I probably shouldn't
 be using CRUDify, as non of the examples actually use it.  I have also
 realized that I should be putting rules in LiftRules.rewrite.


 I don't think so.  I think that you should be using SiteMap.  SiteMap 
 is the best tool for defining site navigation and access control rules 
 around.

 CRUDify and ProtoUser are like scaffolding... they get you some pieces 
 really quickly, but you'll ultimately need to replace them.  You 
 should never have to replace SiteMap.

 So... what's the specific challenge you're running into with SiteMap?
  
The first challenge I had was trying to figure out how to keep the 
functionality of CRUDify, but not the menu items.  The docs state that 
you can override defs.  ie:

*createMenuLoc* |def createMenuLoc|
The menu item for listing items (make this Empty to disable)
Box javascript:void[Menu javascript:void]


But I don't want to disable it, just hide it from the menu.
Then, failing that, I wanted to put the menu items in a sub-menu in the 
SiteMap.  I wasn't able to accomplish this while keeping the CRUDify 
functionality functioning.  (The submenu seems to always to add a level 
to URI but the CRUDify trait doesn't know about that?  I could be 
grossly wrong, of course!)
Ultimately, in the app I'm trying to build, CRUDify would only be useful 
for the main record type.  Most other records have a 1-n relationship 
with the main record.  It is unclear to me how to use CRUDify in this 
situation.  (I can use CRUDify to add a PO, but how do I use CRUDify to 
add SKUs to a specific PO?)

So, looking at the pocketchange app which has this kind of record 
relationship as well, I figured that CRUDify was not the right 
solution.  (I hope I'm wrong, because I like what CRUDify provides!)


 So, my point, I guess, is that it was never clear to me what request
 rewriting was all about.  I didn't understand the explanations and
 basically just skipped it and tried to do everything with SiteMap.
 What I have taken away from this:  Request Rewriting sounds very
 advanced and made me think of sendmail rewriting rules!  (Yuck!)
 Maybe it would be good to have some blurbs on Lift for JEE
 developers.  What is the equivalent of mapping a URL to a servlet and
 how do you deal with the URL pattern matching.  (I want to map
 /foo/*
 to a some soft of action)

 So that would then be a nice lead-in to coverage of
 net.liftweb.http.S,
 right?

 Anyway, back to API docs, it never occurred to be to look at the docs
 for net.liftweb.http.LiftRules!  There are actually lots of comments
 there.  The rewrite is kinda hidden there, so it probably should be
 called out in the class docs.  Then for the actual rewrite docs, it
 would be nice to give some examples of what should go in there or
 provide a link to external docs showing the same.

 How have other people tackled the learning curve of lift?

 --Andrew

 Derek Chen-Becker wrote:
  In terms of the API docs part of it would just be expanding on the
  current scaladoc to provider better explanation. Obviously there
 are a
  ton of classes to document, so I'd like to focus efforts on getting
  the most bang for the buck. I was thinking of starting with
  net.liftweb.http.{LiftRules,S,SHtml} and making the documentation on
  them *outstanding*. We can branch out from there. If you're
 coming to
  Lift new, it would also be helpful to find out what we're missing or
  need to cover better in the Getting Started document on the web
  site. If you want to read through that and provide feedback here on
  the list that would be great.
 
  Derek
 
  On Thu, Apr 30, 2009 at 12:20 PM, Andrew Scherpbier
  and...@scherpbier.org mailto:and...@scherpbier.org
 

[Lift] Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread Dunsun

Hi,

I'm very new to lift and scala.

I have made some Grails intranet applications but sadly Grails or
better say GSP rendering part which is completely written in Groovy is
a very slow beast (even in comparison with Rails or Django).

For my future big project (heavy loaded site) I need something much
faster.

So I have made some quick and dirty Lift benchmarks using ApacheBench
+ Tomcat, GlassFish (from netbeans) and even Jetty.
My machine - AMD X2 @ 2500Mhz, 4 GB RAM

LIFT BASIC SAMPLE:
ab -c 10 -n 3000 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
50 req/s

LIFT BLANK SAMPLE:
ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
120 req/s

Obtained numbers were similar for all 3 servers.

Using Stripes and rendering similar simple pages I'm getting much much
higher scores (600 req/s).
Using Grails I'm getting little worse results but I would say it is
same league.
I would expect much better performance from Lift which is written in
scala.

Why am I getting these low numbers ?
Am I doing something wrong ?
Any suggestion is very welcome.

regards
Daniel

--~--~-~--~~~---~--~~
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] Logging Exception

2009-05-03 Thread sailormoo...@gmail.com

Hello:

I got an exception

2009-05-03 10:31:23.203::WARN:  failed LiftFilter
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at net.liftweb.util.Slf4jLogBoot$.net$liftweb$util$Slf4jLogBoot
$$_logger
ByName(Slf4jLog.scala:59)

while I added


class Boot {
  def boot {
Slf4jLogBoot.enable()
  }
}

from the Lift Book, did I miss any dependency?
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] User model

2009-05-03 Thread ishaaq

Hi all,
I've just started playing with Lift so forgive me if this question
seems a bit naive - that would be because I am a newbie :)

I am trying to build a webapp with user authentication. However, I
don't want to use ProtoUser because I want to key it by the userid -
which is a unique String not a Long.

Since the doco is a bit sparse I am at a bit of a loss at how to get
user authentication done without using ProtoUser. Any pointers would
be appreciated.

Thanks,
Ishaaq

--~--~-~--~~~---~--~~
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: objet vs class for snippets

2009-05-03 Thread David Pollak
Tim,
Dispatching snippets by registering with LiftRules is much faster than the
by convention mechanism of looking up the class name.  It's also type-safe
(an issue that Greg Meredith ran into last week.)  So, it's a few more lines
of code, but better.  Unless you've got a Stateful Snippet, you shouldn't be
keeping any state information in the snippet instance and thus object is
better than class.

Thanks,

David

On Sat, May 2, 2009 at 7:27 AM, Timothy Perrett timo...@getintheloop.euwrote:


 Guys,

 I noticed that the internal lift snippets (msgs et al) have been moved
 to objects rather than classes - there are obvious benefits
 performance wise for this, but what should we be supplying to new-
 comers as the de-facto snippet implementation style? I know the answer
 is unlikely to be clean cut, but perhaps we should document the pros /
 cons of both approaches?

 Thanks, Tim
 



-- 
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: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread David Pollak
Are you running Lift in production or development mode?
I typically see 300 pages/second to 800 pages/second when I do benchmarks on
dual core opteron machines.

I'll look into this, but you should be seeing north of 300 pages per second
with simple pages in Lift.

On Sat, May 2, 2009 at 1:32 PM, Dunsun dun...@gmail.com wrote:


 Hi,

 I'm very new to lift and scala.

 I have made some Grails intranet applications but sadly Grails or
 better say GSP rendering part which is completely written in Groovy is
 a very slow beast (even in comparison with Rails or Django).

 For my future big project (heavy loaded site) I need something much
 faster.

 So I have made some quick and dirty Lift benchmarks using ApacheBench
 + Tomcat, GlassFish (from netbeans) and even Jetty.
 My machine - AMD X2 @ 2500Mhz, 4 GB RAM

 LIFT BASIC SAMPLE:
 ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
 50 req/s

 LIFT BLANK SAMPLE:
 ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
 120 req/s

 Obtained numbers were similar for all 3 servers.

 Using Stripes and rendering similar simple pages I'm getting much much
 higher scores (600 req/s).
 Using Grails I'm getting little worse results but I would say it is
 same league.
 I would expect much better performance from Lift which is written in
 scala.

 Why am I getting these low numbers ?
 Am I doing something wrong ?
 Any suggestion is very welcome.

 regards
 Daniel

 



-- 
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: User model

2009-05-03 Thread David Pollak
On Sun, May 3, 2009 at 3:48 AM, ishaaq ish...@gmail.com wrote:


 Hi all,
 I've just started playing with Lift so forgive me if this question
 seems a bit naive - that would be because I am a newbie :)

 I am trying to build a webapp with user authentication. However, I
 don't want to use ProtoUser because I want to key it by the userid -
 which is a unique String not a Long.

 Since the doco is a bit sparse I am at a bit of a loss at how to get
 user authentication done without using ProtoUser. Any pointers would
 be appreciated.


There's no such thing as user authentication built into Lift.  Lift has no
concept of a User.  All code for authentication is built on top of simple
Lift constructs.

Lift has a concept called a SessionVar which allows you to put a type-safe
value into a place that's session-specific.  In MegaProtoUser:

  private object curUserId extends SessionVar[Box[String]](Empty)

  def currentUserId: Box[String] = curUserId.is

  private object curUser extends
RequestVar[Box[ModelType]](currentUserId.flatMap(id =
getSingleton.find(id)))


  def currentUser: Box[ModelType] = curUser.is

So, the curUserId SessionVar stores the currently logged in User's id (as a
String).  The curUser RequestVar is the current User object, but calculated
on a request-by-request basis.

This is all you need for your own authentication mechanism.

Thanks,

David



 Thanks,
 Ishaaq

 



-- 
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: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread Daniel Guryca
Anybody ?

I have spent more then month testing various frameworks.
Just found lift and spent the whole Friday by learning scala. I liked it.

Time is not my friend ... I just have to choose the right language +
framework combo for my 3 other colleges and our coming project.

Any comment is welcome.

Thank you
Daniel

On Sat, May 2, 2009 at 10:32 PM, Dunsun dun...@gmail.com wrote:

 Hi,

 I'm very new to lift and scala.

 I have made some Grails intranet applications but sadly Grails or
 better say GSP rendering part which is completely written in Groovy is
 a very slow beast (even in comparison with Rails or Django).

 For my future big project (heavy loaded site) I need something much
 faster.

 So I have made some quick and dirty Lift benchmarks using ApacheBench
 + Tomcat, GlassFish (from netbeans) and even Jetty.
 My machine - AMD X2 @ 2500Mhz, 4 GB RAM

 LIFT BASIC SAMPLE:
 ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
 50 req/s

 LIFT BLANK SAMPLE:
 ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
 120 req/s

 Obtained numbers were similar for all 3 servers.

 Using Stripes and rendering similar simple pages I'm getting much much
 higher scores (600 req/s).
 Using Grails I'm getting little worse results but I would say it is
 same league.
 I would expect much better performance from Lift which is written in
 scala.

 Why am I getting these low numbers ?
 Am I doing something wrong ?
 Any suggestion is very welcome.

 regards
 Daniel

--~--~-~--~~~---~--~~
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: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread Daniel Guryca
Hi David,

Thank you for your reply.

How and where can I set production vs development mode in lift ?

Thank you again.
Daniel

On Sun, May 3, 2009 at 3:12 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 Are you running Lift in production or development mode?
 I typically see 300 pages/second to 800 pages/second when I do benchmarks
 on dual core opteron machines.

 I'll look into this, but you should be seeing north of 300 pages per second
 with simple pages in Lift.


 On Sat, May 2, 2009 at 1:32 PM, Dunsun dun...@gmail.com wrote:


 Hi,

 I'm very new to lift and scala.

 I have made some Grails intranet applications but sadly Grails or
 better say GSP rendering part which is completely written in Groovy is
 a very slow beast (even in comparison with Rails or Django).

 For my future big project (heavy loaded site) I need something much
 faster.

 So I have made some quick and dirty Lift benchmarks using ApacheBench
 + Tomcat, GlassFish (from netbeans) and even Jetty.
 My machine - AMD X2 @ 2500Mhz, 4 GB RAM

 LIFT BASIC SAMPLE:
 ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
 50 req/s

 LIFT BLANK SAMPLE:
 ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
 120 req/s

 Obtained numbers were similar for all 3 servers.

 Using Stripes and rendering similar simple pages I'm getting much much
 higher scores (600 req/s).
 Using Grails I'm getting little worse results but I would say it is
 same league.
 I would expect much better performance from Lift which is written in
 scala.

 Why am I getting these low numbers ?
 Am I doing something wrong ?
 Any suggestion is very welcome.

 regards
 Daniel





 --
 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: how to add object into session scope in lift

2009-05-03 Thread David Pollak
On Sat, May 2, 2009 at 12:35 PM, Andrew Scherpbier and...@scherpbier.orgwrote:


 David Pollak wrote:
 
 
  On Thu, Apr 30, 2009 at 10:48 PM, Andrew Scherpbier
  and...@scherpbier.org mailto:and...@scherpbier.org wrote:
 
 
  The Getting Started document got me hooked on Lift.  :-)
  I guess I'll report my struggles from there.  I don't know if what
  I did
  is typical.
 
  After actually running the two examples from the Getting Started
  docs,
  I looked and found some other examples, did some looking around in
 the
  mailing list archives and started reading the Exploring Lift book.
  As a starting application of lift, I want to write a simple purchase
  order tracking webapp.  It was easy enough to figure out how to
  hook up
  PostgreSQL instead of Derby.  I started experimenting with the
 CRUDify
  trait and got several tables working, but then I got stuck trying to
  make a more cohesive app.  What I could not figure out was how to use
  CRUDify's functionality without having to put all the options in the
  SiteMap.  So I spent a lot of time trying to figure out the SiteMap
  class.  I have since come to the realization that I probably
 shouldn't
  be using CRUDify, as non of the examples actually use it.  I have
 also
  realized that I should be putting rules in LiftRules.rewrite.
 
 
  I don't think so.  I think that you should be using SiteMap.  SiteMap
  is the best tool for defining site navigation and access control rules
  around.
 
  CRUDify and ProtoUser are like scaffolding... they get you some pieces
  really quickly, but you'll ultimately need to replace them.  You
  should never have to replace SiteMap.
 
  So... what's the specific challenge you're running into with SiteMap?
 
 The first challenge I had was trying to figure out how to keep the
 functionality of CRUDify, but not the menu items.  The docs state that
 you can override defs.  ie:

 *createMenuLoc* |def createMenuLoc|
 The menu item for listing items (make this Empty to disable)
Box javascript:void[Menu javascript:void]


 But I don't want to disable it, just hide it from the menu.
 Then, failing that, I wanted to put the menu items in a sub-menu in the
 SiteMap.  I wasn't able to accomplish this while keeping the CRUDify
 functionality functioning.  (The submenu seems to always to add a level
 to URI but the CRUDify trait doesn't know about that?  I could be
 grossly wrong, of course!)


Super-menus and sub-menus share no URL information with each other.  A
super-menu could be at /foo/bar/baz/super and sub-menus could be at /dog and
/cat



 Ultimately, in the app I'm trying to build, CRUDify would only be useful
 for the main record type.  Most other records have a 1-n relationship
 with the main record.  It is unclear to me how to use CRUDify in this
 situation.  (I can use CRUDify to add a PO, but how do I use CRUDify to
 add SKUs to a specific PO?)


CRUDify is for building simple CRUD apps.  It's not meant for complex
relationships.  Until someone comes up with something better, you'll have to
hand-code the relationships and the screens for the relationships.



 So, looking at the pocketchange app which has this kind of record
 relationship as well, I figured that CRUDify was not the right
 solution.  (I hope I'm wrong, because I like what CRUDify provides!)


Sorry.

David



 
 
  So, my point, I guess, is that it was never clear to me what request
  rewriting was all about.  I didn't understand the explanations and
  basically just skipped it and tried to do everything with SiteMap.
  What I have taken away from this:  Request Rewriting sounds very
  advanced and made me think of sendmail rewriting rules!  (Yuck!)
  Maybe it would be good to have some blurbs on Lift for JEE
  developers.  What is the equivalent of mapping a URL to a servlet
 and
  how do you deal with the URL pattern matching.  (I want to map
  /foo/*
  to a some soft of action)
 
  So that would then be a nice lead-in to coverage of
  net.liftweb.http.S,
  right?
 
  Anyway, back to API docs, it never occurred to be to look at the docs
  for net.liftweb.http.LiftRules!  There are actually lots of comments
  there.  The rewrite is kinda hidden there, so it probably should be
  called out in the class docs.  Then for the actual rewrite docs, it
  would be nice to give some examples of what should go in there or
  provide a link to external docs showing the same.
 
  How have other people tackled the learning curve of lift?
 
  --Andrew
 
  Derek Chen-Becker wrote:
   In terms of the API docs part of it would just be expanding on the
   current scaladoc to provider better explanation. Obviously there
  are a
   ton of classes to document, so I'd like to focus efforts on getting
   the most bang for the buck. I was thinking of starting with
   

[Lift] Re: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread David Pollak
On Sun, May 3, 2009 at 6:18 AM, Daniel Guryca dun...@gmail.com wrote:

 Hi David,

 Thank you for your reply.

 How and where can I set production vs development mode in lift ?


Set the run.mode system property to production  I do that with
-Drun.mode=production when I start Jetty, but you may do it differently.

Also, In the basic app, there's an RDBMS request for the User object on each
page load and if you've got Derby configured, that's going to slow things
down.




 Thank you again.
 Daniel

 On Sun, May 3, 2009 at 3:12 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Are you running Lift in production or development mode?
 I typically see 300 pages/second to 800 pages/second when I do benchmarks
 on dual core opteron machines.

 I'll look into this, but you should be seeing north of 300 pages per
 second with simple pages in Lift.


 On Sat, May 2, 2009 at 1:32 PM, Dunsun dun...@gmail.com wrote:


 Hi,

 I'm very new to lift and scala.

 I have made some Grails intranet applications but sadly Grails or
 better say GSP rendering part which is completely written in Groovy is
 a very slow beast (even in comparison with Rails or Django).

 For my future big project (heavy loaded site) I need something much
 faster.

 So I have made some quick and dirty Lift benchmarks using ApacheBench
 + Tomcat, GlassFish (from netbeans) and even Jetty.
 My machine - AMD X2 @ 2500Mhz, 4 GB RAM

 LIFT BASIC SAMPLE:
 ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
 50 req/s

 LIFT BLANK SAMPLE:
 ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
 120 req/s

 Obtained numbers were similar for all 3 servers.

 Using Stripes and rendering similar simple pages I'm getting much much
 higher scores (600 req/s).
 Using Grails I'm getting little worse results but I would say it is
 same league.
 I would expect much better performance from Lift which is written in
 scala.

 Why am I getting these low numbers ?
 Am I doing something wrong ?
 Any suggestion is very welcome.

 regards
 Daniel





 --
 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: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread Bryan.

Hi Daniel,

You can pass the following to mvn:  -Drun.mode=production.

--Bryan

On May 3, 9:18 am, Daniel Guryca dun...@gmail.com wrote:
 Hi David,

 Thank you for your reply.

 How and where can I set production vs development mode in lift ?

 Thank you again.
 Daniel

 On Sun, May 3, 2009 at 3:12 PM, David Pollak
 feeder.of.the.be...@gmail.comwrote:

  Are you running Lift in production or development mode?
  I typically see 300 pages/second to 800 pages/second when I do benchmarks
  on dual core opteron machines.

  I'll look into this, but you should be seeing north of 300 pages per second
  with simple pages in Lift.

  On Sat, May 2, 2009 at 1:32 PM, Dunsun dun...@gmail.com wrote:

  Hi,

  I'm very new to lift and scala.

  I have made some Grails intranet applications but sadly Grails or
  better say GSP rendering part which is completely written in Groovy is
  a very slow beast (even in comparison with Rails or Django).

  For my future big project (heavy loaded site) I need something much
  faster.

  So I have made some quick and dirty Lift benchmarks using ApacheBench
  + Tomcat, GlassFish (from netbeans) and even Jetty.
  My machine - AMD X2 @ 2500Mhz, 4 GB RAM

  LIFT BASIC SAMPLE:
  ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
  50 req/s

  LIFT BLANK SAMPLE:
  ab -c 10 -n 3000http://localhost:8080/liftblank-1.0/
  120 req/s

  Obtained numbers were similar for all 3 servers.

  Using Stripes and rendering similar simple pages I'm getting much much
  higher scores (600 req/s).
  Using Grails I'm getting little worse results but I would say it is
  same league.
  I would expect much better performance from Lift which is written in
  scala.

  Why am I getting these low numbers ?
  Am I doing something wrong ?
  Any suggestion is very welcome.

  regards
  Daniel

  --
  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: Lift documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread David Pollak
On Sun, May 3, 2009 at 6:33 AM, Axel Rose axel.roesl...@googlemail.comwrote:


 Hello Charles,

 I know I'm a bit late for your request to consolidate the lift wiki.

 Anyway:
 It's really puzzling to me to get the version numbers right, when creating
 a new
 archetype with maven.

 The Maven mini guide at http://wiki.liftweb.net/index.php/Maven_Mini_Guide
 is not so helpful.

 Perhaps it would be good to color the version numbers and clearly state
 what
 will be downloaded from maven and what to do if I wanted to use snapshots.
 Does pom.xml need to be changed?

 A howto for Google App Engine usage is missing. Here I'd need to use
 snapshots.


 Also:
 Make it easier for guests to put suggestions into the wiki. I'm too
 lazy to register.


We've done just the opposite.  You can only get an account if you make a
request (Derek and I create the accounts).  We've had far too much
wiki vandalism and are clamping down by making sure everybody who has
write-access to the wiki is willing to ask for an account.






 Regards,
 Axel.

 



-- 
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: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread Daniel Guryca
Hey ..  I'm not saying that you anwered my questione slowly ! I'm very
impressed that you are dealing with mailing list even on your free time on
weekend !

I just wanted to clear up why I'm in hurry.

regards
Daniel

On Sun, May 3, 2009 at 3:34 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:



 On Sun, May 3, 2009 at 6:17 AM, Daniel Guryca dun...@gmail.com wrote:

 Anybody ?


 New user posts to this list are moderated (it cuts down on spam).  There
 are three of use who moderate the list, but a posting on Saturday night may
 not get moderated for 12 hours.

 Also, while we do intend to be responsive to user requests, expect that
 turn-around for answers, especially to non-trivial questions, may not be in
 2 or 3 hours.  In this case, a 9 hour delay in answering on a weekend
 strikes me as fast not slow.

 Thanks,

 David



 I have spent more then month testing various frameworks.
 Just found lift and spent the whole Friday by learning scala. I liked it.

 Time is not my friend ... I just have to choose the right language +
 framework combo for my 3 other colleges and our coming project.

 Any comment is welcome.

 Thank you
 Daniel


 On Sat, May 2, 2009 at 10:32 PM, Dunsun dun...@gmail.com wrote:

 Hi,

 I'm very new to lift and scala.

 I have made some Grails intranet applications but sadly Grails or
 better say GSP rendering part which is completely written in Groovy is
 a very slow beast (even in comparison with Rails or Django).

 For my future big project (heavy loaded site) I need something much
 faster.

 So I have made some quick and dirty Lift benchmarks using ApacheBench
 + Tomcat, GlassFish (from netbeans) and even Jetty.
 My machine - AMD X2 @ 2500Mhz, 4 GB RAM

 LIFT BASIC SAMPLE:
 ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
 50 req/s

 LIFT BLANK SAMPLE:
 ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
 120 req/s

 Obtained numbers were similar for all 3 servers.

 Using Stripes and rendering similar simple pages I'm getting much much
 higher scores (600 req/s).
 Using Grails I'm getting little worse results but I would say it is
 same league.
 I would expect much better performance from Lift which is written in
 scala.

 Why am I getting these low numbers ?
 Am I doing something wrong ?
 Any suggestion is very welcome.

 regards
 Daniel







 --
 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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread richard.car...@me.com

My personal view is that a worked example of a fully featured
eCommerce type site would be most useful. Even something as simple as
a cut down Amazon style store with inventory management would be a
great start. That would be a useful foundation for the rest of Lift's
features (add-ons such as online chat style help).

I'm looking at technologies for rewriting a web site with a lot of
dynamic content, currently written entirely in Java 1.4 and JSPs.
Scala and Lift look promising, but the lack of documentation and non
trivial worked examples mean that despite Lift's 1.0 status, I don't
feel I could use it in its current form.

Hope this is of some help,

Regards

Richard

--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Bryan.

I'd like to help with the wiki as well.  Let me know if there is
anything in particular that you would like me to do.

--Bryan

On May 3, 9:46 am, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Sun, May 3, 2009 at 6:33 AM, Axel Rose axel.roesl...@googlemail.comwrote:





  Hello Charles,

  I know I'm a bit late for your request to consolidate the lift wiki.

  Anyway:
  It's really puzzling to me to get the version numbers right, when creating
  a new
  archetype with maven.

  The Maven mini guide athttp://wiki.liftweb.net/index.php/Maven_Mini_Guide
  is not so helpful.

  Perhaps it would be good to color the version numbers and clearly state
  what
  will be downloaded from maven and what to do if I wanted to use snapshots.
  Does pom.xml need to be changed?

  A howto for Google App Engine usage is missing. Here I'd need to use
  snapshots.

  Also:
  Make it easier for guests to put suggestions into the wiki. I'm too
  lazy to register.

 We've done just the opposite.  You can only get an account if you make a
 request (Derek and I create the accounts).  We've had far too much
 wiki vandalism and are clamping down by making sure everybody who has
 write-access to the wiki is willing to ask for an account.



  Regards,
  Axel.

 --
 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: How to handle refresh with S.redirectTo with state?

2009-05-03 Thread Bryan.

I believe I am doing #1 now with no luck.  Let me know if this is
correct:

class Cars {
  // ...
  object locationQuery extends RequestVar[Box[LocationQuery]](Empty)

  def search(xhtml: NodeSeq): NodeSeq = {
def processSearch() = {
  // ...
  val lq = new LocationQuery(validPickupDate.open_!,
validDropoffDate.open_!, city, city)
  S.redirectTo(/select, () = { locationQuery(Full(lq));
requestReference(Full(requestRef)) })
}

// binds are here
  }

  def selectedLocation(xhtml: NodeSeq): NodeSeq = {
if (locationQuery.isDefined) {
  val selectedCity = locationQuery.open_!.pickupLocation
  Text(selectedCity.name + ,  + selectedCity.region)
} else {
  Text()
}
  }

  // ...
}

Thanks,
Bryan

On May 3, 11:46 am, marius d. marius.dan...@gmail.com wrote:
 Oh.. 1  2 are unrelated ... just slightly different approaches.

 On May 3, 6:45 pm, marius d. marius.dan...@gmail.com wrote:

  Well instead of open_1 use openOr so that you wont get exceptions when
  the Box is Empty. Also if you want when you to the redirect you could
  propagate those RequestsVars as well so that your browser re-send
  them. Now sure if this is what you'd want but should help avoiding
  Empty request vars. But what I'd do is:

  1. Since you are doing redirect with state in the function passed to
  S.redirectTo you can set relevant values to your RequestVar's .. hence
  when your page is rendered your request vars have the old values
  potentially.
  2. Use a StatefulSnippet and call redirectTo from the StatefulSnippet
  not S. Hence you can save state inside your snippet and when redirect
  happens, the same snippet instance would be used.

  Br's,
  Marius

  On May 3, 6:08 pm, Bryan germ...@gmail.com wrote:

   I have a snippet that calls S.redirectTo with state.  In this same
   snippet class I have a few functions to show the values of the
   processed RequestVar's.  This works fine until I refresh the page,
   because in these functions I call .open_! on some now Empty
   RequestVar's.  It is simple enough to show Text() when the box is
   not Full, but now I have a problem with the page not showing useful
   data.

   What are some suggestions for handling this?  Should I just add code
   to each of my many snippet functions to redirect to / when the
   RequestVar's are empty?

   Thanks,
   Bryan

--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Timothy Perrett


Wow! Too lazy to register?! IMO, registration is a one-time event and is
needed to combat spam / bot activity. Rather than having a system where
people complain / suggest alterations, we prefer people to just get on and
change them... Power to the people!

On 03/05/2009 14:33, Axel Rose axel.roesl...@googlemail.com wrote:

 Also:
 Make it easier for guests to put suggestions into the wiki. I'm too
 lazy to register.



--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Timothy Perrett


Richard, its a shame you feel like that. Your comments about examples are
noted, however you must bear in mind that both scala and lift are young
(relatively speaking) and a lot of the applications that are out there, are
behind corporate firewalls (including mine) - so don't be fooled into
thinking lift is not production ready or feeling that its not usable, were
just a little lacking right now in the documentation, but 100% *not* lacking
in the implementation (lift rocks out)

Stuff like ecommerce will grow up around lift as more people adopt it - the
same was true for rails... When I started using rails there were naff all
examples out there, so we just had to get on and make some - years later and
the story is very different. The same will no doubt happen for Lift... Its
just a waiting game - its people like your good self who can help with this:
invest a bit of time and write some examples for the benefit and learning of
all.

Let me just say this, as its probably the best advice I can give: If you do
decide to go with lift, you will not regret it. The rest of the lift team
are some of the best developers and architects I have ever had the fortune
to work with - and they all give up large amounts of their time to
participate and help the community... To that end the lift community is one
of the most intelligent and welcoming out there. Over the past two years
this has pretty much been my experience and im sure others will concur.

Good luck with your project and I hope you might reconsider your viewpoint
on lift.

Cheers, Tim

On 03/05/2009 15:58, richard.car...@me.com richard.car...@me.com wrote:

 I'm looking at technologies for rewriting a web site with a lot of
 dynamic content, currently written entirely in Java 1.4 and JSPs.
 Scala and Lift look promising, but the lack of documentation and non
 trivial worked examples mean that despite Lift's 1.0 status, I don't
 feel I could use it in its current form.




--~--~-~--~~~---~--~~
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: Do you guys ever use lift:a key=... ... in your templates?

2009-05-03 Thread Timothy Perrett

Marius,

To clarify, your saying that you'd like to get rid of lift:a and move
the functionality into SHtml or something?

Thanks, Tim

On May 3, 11:51 am, Marius marius.dan...@gmail.com wrote:
 Hi,

 I'm asking this because SHtml.a is a bit a-typical in the sense of
 producing lift:a that will render the ajax link eventually.

 I don't quite see the point of lift:a since it needs a key
 impersonating the user's function name which is unknown in the
 template ... well unless you are using attribute snippets.

 Br's,
 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: Do you guys ever use lift:a key=... ... in your templates?

2009-05-03 Thread marius d.

Well SHtml.a yields a lift:a and processed in its own snippet now. I
guess I'm only challenging the need for lift:a ... and try to
understand in what context people really use it.

Br's,
Marius

On May 3, 11:12 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Marius,

 To clarify, your saying that you'd like to get rid of lift:a and move
 the functionality into SHtml or something?

 Thanks, Tim

 On May 3, 11:51 am, Marius marius.dan...@gmail.com wrote:

  Hi,

  I'm asking this because SHtml.a is a bit a-typical in the sense of
  producing lift:a that will render the ajax link eventually.

  I don't quite see the point of lift:a since it needs a key
  impersonating the user's function name which is unknown in the
  template ... well unless you are using attribute snippets.

  Br's,
  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: Do you guys ever use lift:a key=... ... in your templates?

2009-05-03 Thread Timothy Perrett

So your trying to asscertain if people use lift:a directly in there
template code?

On May 3, 9:35 pm, marius d. marius.dan...@gmail.com wrote:
 Well SHtml.a yields a lift:a and processed in its own snippet now. I
 guess I'm only challenging the need for lift:a ... and try to
 understand in what context people really use it.

--~--~-~--~~~---~--~~
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] Article about URL rewriting in Lift

2009-05-03 Thread Timothy Perrett

Guys,

Thought people might find this an interesting article about lift's URL
rewriting system and help out some newbies :-)

http://is.gd/wq4K

Cheers, Tim
--~--~-~--~~~---~--~~
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: Logging Exception

2009-05-03 Thread Timothy Perrett

Have you configured your dependencies? Perhaps this will help:

http://scala-tools.org/mvnsites-snapshots/liftweb/lift-util/scaladocs/net/liftweb/util/Slf4jLogBoot$object.html

Cheers, Tim

On May 3, 3:35 am, sailormoo...@gmail.com sailormoo...@gmail.com
wrote:
 Hello:

 I got an exception

 2009-05-03 10:31:23.203::WARN:  failed LiftFilter
 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
         at net.liftweb.util.Slf4jLogBoot$.net$liftweb$util$Slf4jLogBoot
 $$_logger
 ByName(Slf4jLog.scala:59)

 while I added

 class Boot {
   def boot {
     Slf4jLogBoot.enable()
   }

 }

 from the Lift Book, did I miss any dependency?
 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: Lift documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Charles F. Munat

Thanks, Axel. Will take this under consideration.

Chas.

Axel Rose wrote:
 Hello Charles,
 
 I know I'm a bit late for your request to consolidate the lift wiki.
 
 Anyway:
 It's really puzzling to me to get the version numbers right, when creating a 
 new
 archetype with maven.
 
 The Maven mini guide at http://wiki.liftweb.net/index.php/Maven_Mini_Guide
 is not so helpful.
 
 Perhaps it would be good to color the version numbers and clearly state what
 will be downloaded from maven and what to do if I wanted to use snapshots.
 Does pom.xml need to be changed?
 
 A howto for Google App Engine usage is missing. Here I'd need to use 
 snapshots.
 
 
 Also:
 Make it easier for guests to put suggestions into the wiki. I'm too
 lazy to register.
 
 
 Regards,
 Axel.
 
  

--~--~-~--~~~---~--~~
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] textarea overrides?

2009-05-03 Thread Meredith Gregory
Lifted,

i gave up on trying to understand how to to the brain-dead simple version of
what i was trying to do and went for a more complex version. This works
(better, anyways). However, i notice that despite the instructions to render
the textarea with 1 row, it is rendering it with about 10 rows. Anybody have
any clues as to why?

lift:surround with=default at=content
h1R-E-P-L/h1
lift:REPLForm.show
  json:script/
  select id=json_verb
option value=parseParse term/option
option value=evaluateEvaluate term/option
option value=typeType term/option
  /select
  br /
  textarea id=expression rows=1lambda x.x/textarea
  br /
  button json:onclick=onclickGo/button
  br /
  div id=result/div
/lift:REPLForm.show
/lift:surround

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

--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Charles F. Munat

Thanks, Richard. Very helpful.

Chas.

richard.car...@me.com wrote:
 My personal view is that a worked example of a fully featured
 eCommerce type site would be most useful. Even something as simple as
 a cut down Amazon style store with inventory management would be a
 great start. That would be a useful foundation for the rest of Lift's
 features (add-ons such as online chat style help).
 
 I'm looking at technologies for rewriting a web site with a lot of
 dynamic content, currently written entirely in Java 1.4 and JSPs.
 Scala and Lift look promising, but the lack of documentation and non
 trivial worked examples mean that despite Lift's 1.0 status, I don't
 feel I could use it in its current form.
 
 Hope this is of some help,
 
 Regards
 
 Richard
 
  

--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Charles F. Munat

Thanks! Will do!

Chas.

Bryan. wrote:
 I'd like to help with the wiki as well.  Let me know if there is
 anything in particular that you would like me to do.
 
 --Bryan
 
 On May 3, 9:46 am, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Sun, May 3, 2009 at 6:33 AM, Axel Rose 
 axel.roesl...@googlemail.comwrote:





 Hello Charles,
 I know I'm a bit late for your request to consolidate the lift wiki.
 Anyway:
 It's really puzzling to me to get the version numbers right, when creating
 a new
 archetype with maven.
 The Maven mini guide athttp://wiki.liftweb.net/index.php/Maven_Mini_Guide
 is not so helpful.
 Perhaps it would be good to color the version numbers and clearly state
 what
 will be downloaded from maven and what to do if I wanted to use snapshots.
 Does pom.xml need to be changed?
 A howto for Google App Engine usage is missing. Here I'd need to use
 snapshots.
 Also:
 Make it easier for guests to put suggestions into the wiki. I'm too
 lazy to register.
 We've done just the opposite.  You can only get an account if you make a
 request (Derek and I create the accounts).  We've had far too much
 wiki vandalism and are clamping down by making sure everybody who has
 write-access to the wiki is willing to ask for an account.



 Regards,
 Axel.
 --
 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: textarea overrides?

2009-05-03 Thread TylerWeir

If you're using the standard CSS, it's likely blueprint is controlling
the size:
http://blueprintcss.org/blueprint/src/forms.css



On May 3, 6:16 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
 Lifted,

 i gave up on trying to understand how to to the brain-dead simple version of
 what i was trying to do and went for a more complex version. This works
 (better, anyways). However, i notice that despite the instructions to render
 the textarea with 1 row, it is rendering it with about 10 rows. Anybody have
 any clues as to why?

 lift:surround with=default at=content
     h1R-E-P-L/h1
     lift:REPLForm.show
       json:script/
       select id=json_verb
     option value=parseParse term/option
     option value=evaluateEvaluate term/option
     option value=typeType term/option
       /select
       br /
       textarea id=expression rows=1lambda x.x/textarea
       br /
       button json:onclick=onclickGo/button
       br /
       div id=result/div
     /lift:REPLForm.show
 /lift:surround

 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
--~--~-~--~~~---~--~~
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: textarea overrides?

2009-05-03 Thread Meredith Gregory
Tyler, Charles,

Thanks for the tip!

i decided that it looks like i've intended for people to input more complex
expressions. So, i've left the size the way it is. (You know in jazz when
you play a wrong note once, it's a mistake, but if you keep hammering it,
it's what you meant to do. i'm improvising, sort of. ;-) That begs another
question, however. Is there a more complex text edit widge, like the one
around the edit area in gmail. Is there a jquery widget that handles most of
this?

Best wishes,

--greg

On Sun, May 3, 2009 at 4:28 PM, Charles F. Munat c...@munat.com wrote:


 It's not likely, it IS blueprint, which in it's infinite wisdom, sets
 the height and width of textareas in pixels.

 You can override it generically in CSS, or you could add a class (or id)
 attribute to that specific textarea and then set it with CSS.

 (There are some things I really don't like about Blueprint, and default
 sizes on the textareas is at the top of my list.)

 Chas.

 TylerWeir wrote:
  If you're using the standard CSS, it's likely blueprint is controlling
  the size:
  http://blueprintcss.org/blueprint/src/forms.css
 
 
 
  On May 3, 6:16 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Lifted,
 
  i gave up on trying to understand how to to the brain-dead simple
 version of
  what i was trying to do and went for a more complex version. This works
  (better, anyways). However, i notice that despite the instructions to
 render
  the textarea with 1 row, it is rendering it with about 10 rows. Anybody
 have
  any clues as to why?
 
  lift:surround with=default at=content
  h1R-E-P-L/h1
  lift:REPLForm.show
json:script/
select id=json_verb
  option value=parseParse term/option
  option value=evaluateEvaluate term/option
  option value=typeType term/option
/select
br /
textarea id=expression rows=1lambda x.x/textarea
br /
button json:onclick=onclickGo/button
br /
div id=result/div
  /lift:REPLForm.show
  /lift:surround
 
  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
  

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.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] Re: textarea overrides?

2009-05-03 Thread Charles F. Munat

Do you mean a rich text editor? Something like TinyMCE?

http://tinymce.moxiecode.com/

Or something less bulky than that?

Chas.

Meredith Gregory wrote:
 Tyler, Charles,
 
 Thanks for the tip!
 
 i decided that it looks like i've intended for people to input more 
 complex expressions. So, i've left the size the way it is. (You know in 
 jazz when you play a wrong note once, it's a mistake, but if you keep 
 hammering it, it's what you meant to do. i'm improvising, sort of. ;-) 
 That begs another question, however. Is there a more complex text edit 
 widge, like the one around the edit area in gmail. Is there a jquery 
 widget that handles most of this?
 
 Best wishes,
 
 --greg
 
 On Sun, May 3, 2009 at 4:28 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 It's not likely, it IS blueprint, which in it's infinite wisdom, sets
 the height and width of textareas in pixels.
 
 You can override it generically in CSS, or you could add a class (or id)
 attribute to that specific textarea and then set it with CSS.
 
 (There are some things I really don't like about Blueprint, and default
 sizes on the textareas is at the top of my list.)
 
 Chas.
 
 TylerWeir wrote:
   If you're using the standard CSS, it's likely blueprint is
 controlling
   the size:
   http://blueprintcss.org/blueprint/src/forms.css
  
  
  
   On May 3, 6:16 pm, Meredith Gregory lgreg.mered...@gmail.com
 mailto:lgreg.mered...@gmail.com wrote:
   Lifted,
  
   i gave up on trying to understand how to to the brain-dead
 simple version of
   what i was trying to do and went for a more complex version.
 This works
   (better, anyways). However, i notice that despite the
 instructions to render
   the textarea with 1 row, it is rendering it with about 10 rows.
 Anybody have
   any clues as to why?
  
   lift:surround with=default at=content
   h1R-E-P-L/h1
   lift:REPLForm.show
 json:script/
 select id=json_verb
   option value=parseParse term/option
   option value=evaluateEvaluate term/option
   option value=typeType term/option
 /select
 br /
 textarea id=expression rows=1lambda x.x/textarea
 br /
 button json:onclick=onclickGo/button
 br /
 div id=result/div
   /lift:REPLForm.show
   /lift:surround
  
   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
   
 
 
 
 
 
 -- 
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117
 
 +1 206.650.3740
 
 http://biosimilarity.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] Re: textarea overrides?

2009-05-03 Thread Meredith Gregory
Charles,

That's pretty cool. i'll give it a whirl. It's a little bulky, but bulk can
have it's merits (although i'm told it's not the meat, it's the motion ;-).

Best wishes,

--greg

On Sun, May 3, 2009 at 6:20 PM, Charles F. Munat c...@munat.com wrote:


 Do you mean a rich text editor? Something like TinyMCE?

 http://tinymce.moxiecode.com/

 Or something less bulky than that?

 Chas.

 Meredith Gregory wrote:
  Tyler, Charles,
 
  Thanks for the tip!
 
  i decided that it looks like i've intended for people to input more
  complex expressions. So, i've left the size the way it is. (You know in
  jazz when you play a wrong note once, it's a mistake, but if you keep
  hammering it, it's what you meant to do. i'm improvising, sort of. ;-)
  That begs another question, however. Is there a more complex text edit
  widge, like the one around the edit area in gmail. Is there a jquery
  widget that handles most of this?
 
  Best wishes,
 
  --greg
 
  On Sun, May 3, 2009 at 4:28 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  It's not likely, it IS blueprint, which in it's infinite wisdom, sets
  the height and width of textareas in pixels.
 
  You can override it generically in CSS, or you could add a class (or
 id)
  attribute to that specific textarea and then set it with CSS.
 
  (There are some things I really don't like about Blueprint, and
 default
  sizes on the textareas is at the top of my list.)
 
  Chas.
 
  TylerWeir wrote:
If you're using the standard CSS, it's likely blueprint is
  controlling
the size:
http://blueprintcss.org/blueprint/src/forms.css
   
   
   
On May 3, 6:16 pm, Meredith Gregory lgreg.mered...@gmail.com
  mailto:lgreg.mered...@gmail.com wrote:
Lifted,
   
i gave up on trying to understand how to to the brain-dead
  simple version of
what i was trying to do and went for a more complex version.
  This works
(better, anyways). However, i notice that despite the
  instructions to render
the textarea with 1 row, it is rendering it with about 10 rows.
  Anybody have
any clues as to why?
   
lift:surround with=default at=content
h1R-E-P-L/h1
lift:REPLForm.show
  json:script/
  select id=json_verb
option value=parseParse term/option
option value=evaluateEvaluate term/option
option value=typeType term/option
  /select
  br /
  textarea id=expression rows=1lambda x.x/textarea
  br /
  button json:onclick=onclickGo/button
  br /
  div id=result/div
/lift:REPLForm.show
/lift:surround
   
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

 
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  1219 NW 83rd St
  Seattle, WA 98117
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
  

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.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] Re: textarea overrides?

2009-05-03 Thread Charles F. Munat

I wasn't recommending it, just using it as an example. What you probably 
want is this:

http://dev.jquery.com/wiki/Plugins/tinyMCE

There's also a version for YUI, I think.

Chas.

Meredith Gregory wrote:
 Charles,
 
 That's pretty cool. i'll give it a whirl. It's a little bulky, but bulk 
 can have it's merits (although i'm told it's not the meat, it's the 
 motion ;-).
 
 Best wishes,
 
 --greg
 
 On Sun, May 3, 2009 at 6:20 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 Do you mean a rich text editor? Something like TinyMCE?
 
 http://tinymce.moxiecode.com/
 
 Or something less bulky than that?
 
 Chas.
 
 Meredith Gregory wrote:
   Tyler, Charles,
  
   Thanks for the tip!
  
   i decided that it looks like i've intended for people to input more
   complex expressions. So, i've left the size the way it is. (You
 know in
   jazz when you play a wrong note once, it's a mistake, but if you keep
   hammering it, it's what you meant to do. i'm improvising, sort
 of. ;-)
   That begs another question, however. Is there a more complex text
 edit
   widge, like the one around the edit area in gmail. Is there a jquery
   widget that handles most of this?
  
   Best wishes,
  
   --greg
  
   On Sun, May 3, 2009 at 4:28 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com
   mailto:c...@munat.com mailto:c...@munat.com wrote:
  
  
   It's not likely, it IS blueprint, which in it's infinite
 wisdom, sets
   the height and width of textareas in pixels.
  
   You can override it generically in CSS, or you could add a
 class (or id)
   attribute to that specific textarea and then set it with CSS.
  
   (There are some things I really don't like about Blueprint,
 and default
   sizes on the textareas is at the top of my list.)
  
   Chas.
  
   TylerWeir wrote:
 If you're using the standard CSS, it's likely blueprint is
   controlling
 the size:
 http://blueprintcss.org/blueprint/src/forms.css



 On May 3, 6:16 pm, Meredith Gregory
 lgreg.mered...@gmail.com mailto:lgreg.mered...@gmail.com
   mailto:lgreg.mered...@gmail.com
 mailto:lgreg.mered...@gmail.com wrote:
 Lifted,

 i gave up on trying to understand how to to the brain-dead
   simple version of
 what i was trying to do and went for a more complex version.
   This works
 (better, anyways). However, i notice that despite the
   instructions to render
 the textarea with 1 row, it is rendering it with about 10
 rows.
   Anybody have
 any clues as to why?

 lift:surround with=default at=content
 h1R-E-P-L/h1
 lift:REPLForm.show
   json:script/
   select id=json_verb
 option value=parseParse term/option
 option value=evaluateEvaluate term/option
 option value=typeType term/option
   /select
   br /
   textarea id=expression rows=1lambda
 x.x/textarea
   br /
   button json:onclick=onclickGo/button
   br /
   div id=result/div
 /lift:REPLForm.show
 /lift:surround

 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
 
  
  
  
  
  
   --
   L.G. Meredith
   Managing Partner
   Biosimilarity LLC
   1219 NW 83rd St
   Seattle, WA 98117
  
   +1 206.650.3740
  
   http://biosimilarity.blogspot.com
  
   
 
 
 
 
 
 -- 
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117
 
 +1 206.650.3740
 
 http://biosimilarity.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 would I call a template from another template?

2009-05-03 Thread EmEhRKay

Very simple idea - I have a tags template that I put in the templates-
hidden directory, it creates a list of tags. In one of my public
templates I want to be able to call that template to display the tags
(I'm sure it has been done before and I cannot find in either book
where this is covered). How would I do this?

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: How to handle refresh with S.redirectTo with state?

2009-05-03 Thread Bryan.

Would that mean that the state of the RequestVar could accidentally be
shared with multiple requests?

On May 3, 1:51 pm, marius d. marius.dan...@gmail.com wrote:
 Hmmm ... the code seems to be fine (as far as I can tell from the code
 snippet)

 Can you perhaps declare your RequestVars outside of Cars scope?

 just

 object locationQuery extends RequestVar[Box[LocationQuery]](Empty)

 class Cars {
   ...

 }

 .. personally I would avoid using open_! unless I'm really sure that
 the Box is not Empty.

 Br's,
 Marius

 On May 3, 7:08 pm, Bryan. germ...@gmail.com wrote:

  I believe I am doing #1 now with no luck.  Let me know if this is
  correct:

  class Cars {
    // ...
    object locationQuery extends RequestVar[Box[LocationQuery]](Empty)

    def search(xhtml: NodeSeq): NodeSeq = {
      def processSearch() = {
        // ...
        val lq = new LocationQuery(validPickupDate.open_!,
  validDropoffDate.open_!, city, city)
        S.redirectTo(/select, () = { locationQuery(Full(lq));
  requestReference(Full(requestRef)) })
      }

      // binds are here
    }

    def selectedLocation(xhtml: NodeSeq): NodeSeq = {
      if (locationQuery.isDefined) {
        val selectedCity = locationQuery.open_!.pickupLocation
        Text(selectedCity.name + ,  + selectedCity.region)
      } else {
        Text()
      }
    }

    // ...

  }

  Thanks,
  Bryan

  On May 3, 11:46 am, marius d. marius.dan...@gmail.com wrote:

   Oh.. 1  2 are unrelated ... just slightly different approaches.

   On May 3, 6:45 pm, marius d. marius.dan...@gmail.com wrote:

Well instead of open_1 use openOr so that you wont get exceptions when
the Box is Empty. Also if you want when you to the redirect you could
propagate those RequestsVars as well so that your browser re-send
them. Now sure if this is what you'd want but should help avoiding
Empty request vars. But what I'd do is:

1. Since you are doing redirect with state in the function passed to
S.redirectTo you can set relevant values to your RequestVar's .. hence
when your page is rendered your request vars have the old values
potentially.
2. Use a StatefulSnippet and call redirectTo from the StatefulSnippet
not S. Hence you can save state inside your snippet and when redirect
happens, the same snippet instance would be used.

Br's,
Marius

On May 3, 6:08 pm, Bryan germ...@gmail.com wrote:

 I have a snippet that calls S.redirectTo with state.  In this same
 snippet class I have a few functions to show the values of the
 processed RequestVar's.  This works fine until I refresh the page,
 because in these functions I call .open_! on some now Empty
 RequestVar's.  It is simple enough to show Text() when the box is
 not Full, but now I have a problem with the page not showing useful
 data.

 What are some suggestions for handling this?  Should I just add code
 to each of my many snippet functions to redirect to / when the
 RequestVar's are empty?

 Thanks,
 Bryan

--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Axel Rose

Formalities or content?

http://wiki.liftweb.net/index.php/Maven_Mini_Guide
must be improved. For people not accustomed to maven it is very hard
to grasp the versions/release/snapshot/pom dependencies.

Various articles use various version numbers when building examples.
I, personally, got lost.


How does a user learns from reading the wiki how to register?


Regards
Axel

--~--~-~--~~~---~--~~
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: Cannot access html files other than index.html in GAE using lift

2009-05-03 Thread Dan Greening

I just broke my teeth on this problem also (and 2 days wasted later I
discover this thread).  I would say Doh!, but this is hardly a Doh
type of thing.

Security is important, but also as a new framework, you want rapid
uptake by people who won't read 5 chapters of a book before trying
something out.  Many of us (most of us?) read the minimum amount
before jumping in and trying something.

Here is my proposed user story:  As a new Lift user, I can copy-paste
lift-archetype-blank files into my existing web site and gradually add
Lift functionality while unmodified static and JSP content continues
to work.

Perhaps this could be done by having a simple method on SiteMap to
disable access control.  (And then use it in lift-archetype-blank,
with comments of course.)

Many people will likely do what I did, trying to figure out how to
turn on logging levels, etc. because the behavior they expect is not
what Lift delivers, and then they blame themselves for doing something
obviously stupid.  (But failing to read 5 chapters is not obviously
stupid.)

Dan Greening

On Apr 23, 10:01 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Apr 23, 2009 at 9:59 AM, Lee Mighdoll leemighd...@gmail.com wrote:
  Ah, thanks for the explanation.

  Perhaps a site map entry for /static in the default archtetype?

 K... added





  Lee

  On Thu, Apr 23, 2009 at 9:51 AM, David Pollak 
  feeder.of.the.be...@gmail.com wrote:

  On Thu, Apr 23, 2009 at 9:48 AM, Lee Mighdoll leemighd...@gmail.comwrote:

  Since lift is a servlet filter, can it simply pass through requests for
  unmapped html pages and let the web container serve them or send a 404?  I
  don't quite understand the security issue, though.

  Security issues:

     - Serving turd pages left behind by the developers or from an older
     version of the app
     - Serving pages that can only be viewed if you're logged in

  Lee

  re: documentation, I tripped on this getting started as well.

  On Thu, Apr 23, 2009 at 8:45 AM, David Pollak 
  feeder.of.the.be...@gmail.com wrote:

  On Thu, Apr 23, 2009 at 8:30 AM, Andrew Scherpbier 
  and...@scherpbier.org wrote:

  Hi kkarad,
  I'm a fellow newbie to lift (and scala) and ran into the same issue.  I
  believe the solution is simple:  You need to create entries in your
  SiteMap for every page.  You'll need to do that in your Boot.scala.
  Make them Hidden if you don't want them displayed in the menu; you
  still
  need those entries though.

  I suggest reading chapter 5 in the Exploring Lift book that is
  available as a draft PDF.
  BTW, to the authors of that book:  I spent a lot of time trying to
  figure out this exact same issue.  Could you make this more prominent?
  Some examples of using multiple pages would be helpful.  Since the
  SiteMap is so important, I think it would be good to add more coverage
  of it in chapter 3.

  Andrew,

  Thanks for your comments.

  There's a tension in Lift between quick  simple and maintainable 
  secure.  SiteMap is a little heavier weight than simple routing tables 
  (or
  doing things by default).  On the other hand, SiteMap gives you security,
  menu generation, bread crumbs, and much, much more.  Perhaps I'll add
  something to the 404 when running in development mode (or bespin mode).

  Thanks,

  David

  Cheers!

  --Andrew

  kkarad wrote:
   Hi all,

   I am new to lift web framework. Recently I started working on a test
   project using google app engine for java and lift. I followed the
   Atsuhiko Yamanaka's instructions and I was able to deploy and run the
   helloworld example on the google app cloud.

   The problem I am facing now is that I cannot access deployed html
   files other than the default (index.html). The problem occurs in the
   dev_appserver provided by the google app engine sdk.

   For instance, the fileupload.xthml file under the webapp folder
  cannot
   be accessed using thehttp://localhost:8080/fileupload[or with the
   suffix]. The error message I get back is: The Requested URL / was not
   found on this server

   Due to my lack of lift knowledge I am not able to identify if its a
   lift or gae/j problem. Could you please help me?

   Bellow I include the content of web.xml, appengine-web.xml and the
   tree structue of the webapp folder in maven.

   web-app
       filter
           filter-nameLiftFilter/filter-name
           display-nameLift Filter/display-name
           descriptionThe Filter that intercepts lift calls/
   description
           filter-classnet.liftweb.http.LiftFilter/filter-class
       /filter

       filter-mapping
           filter-nameLiftFilter/filter-name
           url-pattern/*/url-pattern
       /filter-mapping

       welcome-file-list
           welcome-fileindex.html/welcome-file
       /welcome-file-list

   /web-app

  

   appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
     applicationfoo/application
    

[Lift] Re: Lift documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Tom Arnold
Hello List!

I might as well share my thoughts about docs.

I think as with Scala and Lift you should try to beat the best that is out
there. And from all the user made language/API/framework wikis I have seen
the one from a  now pretty unpopular game is by far the best:
http://wiki.secondlife.com/wiki/LSL_Portal   It is one page and you have
_all_ the infos you need. Everything. Even in different languages. And
_EVERY_ function as good exampleS to go along with it. That wiki is way
better than any other IMNSHO. _Easily_ beats the ROR wiki.  You just go to
that page and boom you get everything there is to know PERIOD No unanswered
questions.
I hope the current API docs will be integrated into the wiki. Because those
sure are not newbie friendly and lack explaination and examples.

With similar docs lift will be the most popular web framework in no time,
but I think with mandatory registration it will not happen. That does not
scale and discourages people. At some point you need a real wiki (one that
everyone can edit.)

Cheers,

- Tom -

--~--~-~--~~~---~--~~
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: Article about URL rewriting in Lift

2009-05-03 Thread Andrew Scherpbier

Wow, this is awesome!  Can a link to this be provided from the 
wiki/getting started guide/api docs?

--Andrew

Timothy Perrett wrote:
 Guys,

 Thought people might find this an interesting article about lift's URL
 rewriting system and help out some newbies :-)

 http://is.gd/wq4K

 Cheers, Tim



--~--~-~--~~~---~--~~
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] Is there a bulk update function ?

2009-05-03 Thread sailormoo...@gmail.com

Hi :

  From the Lift Book, there is a bulk delete function.

Expense.bulkDelete_!!(By_(Expense.dateOf, date))

  However, I want a bulk update function, is there one or if I must to
update it one by one?
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: Sample applications are somewhat slow - is Lift slow ?

2009-05-03 Thread David Pollak
On Sun, May 3, 2009 at 4:11 PM, Daniel Guryca dun...@gmail.com wrote:

 I have just tried mvn -Drun.mode=production jetty:run  ... but sadly still
 getting same performance.


I ran a simple test (the same command line as you) on my 2.67 Ghz Core i7
machine and saw 600 pages per second.  Granted, my machine's faster, but not
10x.

I'll spend some time putting together a complete benchmark tomorrow so we
can share the same executable and hopefully see the same results.




 Daniel


 On Sun, May 3, 2009 at 3:31 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Sun, May 3, 2009 at 6:18 AM, Daniel Guryca dun...@gmail.com wrote:

 Hi David,

 Thank you for your reply.

 How and where can I set production vs development mode in lift ?


 Set the run.mode system property to production  I do that with
 -Drun.mode=production when I start Jetty, but you may do it differently.

 Also, In the basic app, there's an RDBMS request for the User object on
 each page load and if you've got Derby configured, that's going to slow
 things down.




 Thank you again.
 Daniel

 On Sun, May 3, 2009 at 3:12 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Are you running Lift in production or development mode?
 I typically see 300 pages/second to 800 pages/second when I do
 benchmarks on dual core opteron machines.

 I'll look into this, but you should be seeing north of 300 pages per
 second with simple pages in Lift.


 On Sat, May 2, 2009 at 1:32 PM, Dunsun dun...@gmail.com wrote:


 Hi,

 I'm very new to lift and scala.

 I have made some Grails intranet applications but sadly Grails or
 better say GSP rendering part which is completely written in Groovy is
 a very slow beast (even in comparison with Rails or Django).

 For my future big project (heavy loaded site) I need something much
 faster.

 So I have made some quick and dirty Lift benchmarks using ApacheBench
 + Tomcat, GlassFish (from netbeans) and even Jetty.
 My machine - AMD X2 @ 2500Mhz, 4 GB RAM

 LIFT BASIC SAMPLE:
 ab -c 10 -n 3000
 http://localhost:8080/liftbasic-1.0-SNAPSHOT/user_mgt/login
 50 req/s

 LIFT BLANK SAMPLE:
 ab -c 10 -n 3000 http://localhost:8080/liftblank-1.0/
 120 req/s

 Obtained numbers were similar for all 3 servers.

 Using Stripes and rendering similar simple pages I'm getting much much
 higher scores (600 req/s).
 Using Grails I'm getting little worse results but I would say it is
 same league.
 I would expect much better performance from Lift which is written in
 scala.

 Why am I getting these low numbers ?
 Am I doing something wrong ?
 Any suggestion is very welcome.

 regards
 Daniel





 --
 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




 



-- 
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Charles F. Munat

Tom,

Thanks for this link! The Second Life wiki is very interesting, and 
makes it obvious that one can do a lot with MediaWiki. I'll definitely 
spend some time exploring it.

Chas.

Tom Arnold wrote:
 Hello List!
 
 I might as well share my thoughts about docs.
 
 I think as with Scala and Lift you should try to beat the best that is 
 out there. And from all the user made language/API/framework wikis I 
 have seen the one from a  now pretty unpopular game is by far the best: 
 http://wiki.secondlife.com/wiki/LSL_Portal   It is one page and you have 
 _all_ the infos you need. Everything. Even in different languages. And 
 _EVERY_ function as good exampleS to go along with it. That wiki is way 
 better than any other IMNSHO. _Easily_ beats the ROR wiki.  You just go 
 to that page and boom you get everything there is to know PERIOD No 
 unanswered questions.
 I hope the current API docs will be integrated into the wiki. Because 
 those sure are not newbie friendly and lack explaination and examples.
 
 With similar docs lift will be the most popular web framework in no 
 time, but I think with mandatory registration it will not happen. That 
 does not scale and discourages people. At some point you need a real 
 wiki (one that everyone can edit.)
 
 Cheers,
 
 - Tom -
 
  
 
  

--~--~-~--~~~---~--~~
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 documentation -- Attention newcomers (and everyone else)!

2009-05-03 Thread Charles F. Munat

James,

This looks more like about $20, but I'm not complaining. Your thoughts 
mirror mine in many ways. #4 is a very good idea. Even just a list of 
what is needed. Folks could add to a documentation wishlist, and then 
anyone who thought he or she could tackle an item could just do it.

I'm glad that people are finally responding to this thread. I was 
beginning to think that I was on my own...

Chas.

James Matlik wrote:
 Hello Charles,
 
 This is good news.  I'm sorry I didn't see your initial email going out, 
 but I would guess it is better late than never.  I think the first thing 
 that needs to be done is to clearly define what is to be documented in 
 the wiki and where.  Here is my 2 cents:
 
1. There should be a page linked to the wiki's main page providing
   marketing style information.  This could be a kind of About Lift
   page on steroids.  What makes Lift novel?  What features does it
   provide that simplify the state of the art in web development? 
   How easily can the technology be integrated with legacy
   deployments?  What design goals does Lift strive for and why? 
   Does Lift have a viable future?  What is Lift's stance on KIR
   support?  Once an official release is made public, will bug fixes
   be applied to that version going forward and for how long?  How
   stable is the API?
2. A brief description of the Lift culture could be beneficial; a
   kind of welcome to the party, this is how we roll for the
   uninitiated (I'm still figuring it out). 
3. Make a clearly defined section for people developing applications
   with Lift.  Give a 100ft view of the code/compile/deploy/test
   development cycle, then delve into the tools that make this cycle
   simpler.  Provide the basics on Maven, what it is, what it does
   for Lift, and the commands of interest for Lift development. 
   Describe how Maven is not required for the Maven adverse, and
   provide instructions on how to proceed without Maven (maybe an
   opportunity for sbaz?).  Up-to-date HowTo documents on standing up
   different editors (Nebeans, Eclipse, Idea, etc.) are important.
   How should Lift be deployed?  What are the required dependencies? 
   Is it reasonable to simply use Maven's jetty:run target for a
   production deployment?  What are the common configuration settings
   for various servlet containers for development vs. production
   deployments.  What architectures should be used for scaling out
   deployments for redundancy and performance (serialization,
   Terracotta, load balancing, etc.)?  Development, deployment and
   KIR overview for those familiar with Rails but not with Java.
4. A documentation TODO list for people to contribute.
5. Are there any best practices?  Some good topics could be I18N, how
   to avoid introducing security vulnerabilities like cross site
   scripting or SQL injection attacks, how best to leverage templates
   for CMS-like systems with very large numbers of unique pages vs.
   applications with a relatively short list of screens, security and
   performance tuning.
6. There needs to be a very clear division between documentation for
   public reference and works in progress/new feature collaboration
   that would only confuse people. 
7. There is a lot of good example code in the lift demo app.  It
   might be nice to provide some supplemental annotated documentation
   in the wiki (a lot of people don't turn to the code by default). 
   This could be a kind of recipes for Lift section that could
   contain all kinds of examples including those in the demo app.  As
   people contribute creative solutions or solutions to common
   problems, they could eventually be pulled into the demo app.
 
 I'm sure some of this already exists on the wiki, but it would nice if 
 the navigation made it easier to find. 
 
 As for registering with the wiki, could OpenID be supported for the wiki 
 account?  I'm seriously tired of creating new accounts all the time with 
 the same unchanging handful of passwords that I regularly have to cycle 
 through when accessing my account.  I'd like to see OpenID implemented 
 everywhere.
 
 On Tue, Apr 21, 2009 at 3:38 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 I am charged with coming up with a site map/information architecture for
 our hopefully-soon-to-be-updated wiki.
 
 What would most benefit you on a documentation wiki? What sorts of
 things are you having the most problems with?
 
 Please submit suggestions for a wiki outline, as well as any other ideas
 you have. For example, ideas on wiki structure are welcome. You could
 even suggest your own outline.
 
 Please participate! Yes, you, lurker! We want to know what you need.
 
 I'll collect all the ideas this weekend, consolidate them,