[Lift] Re: Highlighting even/odd rows in a table

2009-12-17 Thread Timothy Perrett
Personally, I would just go with this:

http://franca.exofire.net/jq/colorize

I've used it very successfully on one of my projects.

Cheers, Tim

On Dec 17, 2:07 am, Ross Mellgren dri...@gmail.com wrote:
 Oh, speaking of jquery, tablesorter also has a zebra plugin that does this, 
 so if you're tablesorter you can use that also.

 -Ross

 On Dec 16, 2009, at 9:01 PM, Alex Boisvert wrote:



  Or delegate the work to the browser using jQuery + CSS
 http://docs.jquery.com/Selectors/odd

  alex

  On Wed, Dec 16, 2009 at 4:04 PM, Ross Mellgren dri...@gmail.com wrote:
  You could use customers.zipWithIndex.flatMap({ case (customer, index)
  = ... instead of customers.flatMap(customer = to get the index, and
  then use index % 2 == 0 to see if it's an even row or an odd row. How
  you get that style into your template is up to you -- using an
  attribute bind param would probably be pretty easy, or emitting the
  td straight out of the snippet.

  If you need more guidance give a shout and I'll write you up some
  example code.

  Note that zipWithIndex only works on List, and it regenerates the
  list, so if you have a bunch of customers on the page and are
  concerned about performance you might want to do something different
  (and less convenient).

  -Ross

  On Dec 16, 2009, at 5:59 PM, Stevo wrote:

   Say for a second that in one of my Snippets I have the following
   binding:

         def view(xhtml: NodeSeq): NodeSeq =
         {
                 val entries: NodeSeq = Customer.findAll() match
                 {
                         case Nil = Text(No customers currently defined)
                         case customers =
                                 customers.flatMap(customer = bind(cust, 
   chooseTemplate
   (customer, entry, xhtml),
                                         name - 
   Text(emptyIfNull(customer.name.is)),
                                         address - Text
   (customer.workAddress.obj.open_!.singleTextLine),
                                         phone - 
   Text(emptyIfNull(customer.workPhone.is)),
                                         other - 
   Text(emptyIfNull(customer.other.is)),
                                         fax - 
   Text(emptyIfNull(customer.workFax.is)),
                                         email - 
   Text(emptyIfNull(customer.email.is)),
                                         url - 
   Text(emptyIfNull(customer.email.is
                 }
                 bind(customer, xhtml, entry - entries)
         }

   Is there a way that I could apply a style to a complete customer:entry
   with the goal of highlighting even/odd rows?

   Let me know and best regards to all,

   Steve

   --

   --

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

  --

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

  --

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

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: Latest API Documentation

2009-12-17 Thread Timothy Perrett
As Indrajit already pointed out, the aggregation feature is something
experimental in vscaladoc so not something that we can include in our
build process just yet. We appreciate that people want these, but its
not feasible yet so I guess we'll be doing it for major releases until
its feasible to make it an automated process.

Perhaps davidB can shed some light on when this will be a proper part
of vscaladoc

Cheers, Tim

On Dec 17, 7:18 am, Vesa brut...@gmail.com wrote:
 I would also appreciate aggregated docs. It would be great to have
 these at least for the M-releases..

 - Vesa

 On 7 marras, 05:47, aw anth...@whitford.com wrote:



  OK, so I can go tohttp://scala-tools.org/mvnsites/liftweb-1.1-7/
  but I am not finding a comprehensive ScalaDoc similar to what is
  available here:http://scala-tools.org/scaladocs/liftweb/1.0/

  It is hard (and SLOW) for me to figure out which component a class/
  object might reside, and find its corresponding ScalaDoc...  Or am I
  not seeing it?

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Is this a defect at JqJsCmds.ModalDialog

2009-12-17 Thread Xuefeng Wu
Hi Alex,

I found new ModalDialog(html: NodeSeq, css: Box[JsObj]),
 the parameter 'css' type is JsObj instead of String.

Could you tell me the reason?

I'm working on a customer widgets and have the same case.


On Thu, Dec 3, 2009 at 10:37 PM, Alex Boisvert alex.boisv...@gmail.comwrote:

 On Thu, Dec 3, 2009 at 12:40 AM, Xuefeng Wu ben...@gmail.com wrote:

 Hi,

 When I use ModalDialog I want to setup the css but fail,
 My code would be:
 ModalDialog(someHtml, top: '10px')

 I found the ModalDialog code at Lift:
 class ModalDialog(html: NodeSeq, css: Box[String]) extends JsCmd {
 val toJsCmd = jQuery.blockUI({ message:  +
 AltXML.toXML(Group(S.session.map(s =
 s.fixHtml(s.processSurroundAndInclude(Modal Dialog,
 html))).openOr(html)), false, true, S.ieMode).encJs +
 (css.map(w = ,  css: ' + w + ' ).openOr()) + });
   }

 the css is wrap by  '  '  ,
 but I found http://malsup.com/jquery/block/#demos
 the css is wraped by { }


 Is this a defect at JqJsCmds.ModalDialog or I do something wrong?


 Yes, it looks like a bug.   I'm guessing the code may have been written for
 BlockUI v1.x and that the API may have changed in 2.x.Please open a
 ticket and I'll fix it.

 alex

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




-- 
Scala中文社区:  http://groups.google.com/group/scalacn

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Is this a defect at JqJsCmds.ModalDialog

2009-12-17 Thread Xuefeng Wu
OK, I found the JsObj is useful, Thanks.

On Thu, Dec 17, 2009 at 5:28 PM, Xuefeng Wu ben...@gmail.com wrote:

 Hi Alex,

 I found new ModalDialog(html: NodeSeq, css: Box[JsObj]),
  the parameter 'css' type is JsObj instead of String.

 Could you tell me the reason?

 I'm working on a customer widgets and have the same case.


 On Thu, Dec 3, 2009 at 10:37 PM, Alex Boisvert alex.boisv...@gmail.comwrote:

 On Thu, Dec 3, 2009 at 12:40 AM, Xuefeng Wu ben...@gmail.com wrote:

 Hi,

 When I use ModalDialog I want to setup the css but fail,
 My code would be:
 ModalDialog(someHtml, top: '10px')

 I found the ModalDialog code at Lift:
 class ModalDialog(html: NodeSeq, css: Box[String]) extends JsCmd {
 val toJsCmd = jQuery.blockUI({ message:  +
 AltXML.toXML(Group(S.session.map(s =
 s.fixHtml(s.processSurroundAndInclude(Modal Dialog,
 html))).openOr(html)), false, true, S.ieMode).encJs +
 (css.map(w = ,  css: ' + w + ' ).openOr()) + });
   }

 the css is wrap by  '  '  ,
 but I found http://malsup.com/jquery/block/#demos
 the css is wraped by { }


 Is this a defect at JqJsCmds.ModalDialog or I do something wrong?


 Yes, it looks like a bug.   I'm guessing the code may have been written
 for BlockUI v1.x and that the API may have changed in 2.x.Please open a
 ticket and I'll fix it.

 alex

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




 --
 Scala中文社区:  http://groups.google.com/group/scalacn




-- 
Scala中文社区:  http://groups.google.com/group/scalacn

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread Jarod Liu
The same code works fine in 1.1M7. Anyone know what causes the
problem. Or maybe a bug in 1.1M8?

boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
(com.mysql.jdbc.Driver,
  jdbc:mysql://
localhost/mydb?autoReconnectForPools=true,
  root, ))


the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
failed to find either a JNDI data source with the name lift or a lift
connection manager with the correct name/pre/ph3Caused by:/
h3prejava.lang.NullPointerException: Looking for Connection
Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
data source with the name lift or a lift connection manager with the
correct name
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
97)
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
(DB.scala:160)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
$1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
$31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
$anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
(S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
(S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39$$anonfun$apply$40.apply(S.scala:1173)
at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:252)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
$apply$39.apply(S.scala:1172)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38.apply
(S.scala:1171)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1.apply(S.scala:1170)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$._init(S.scala:1169)
at net.liftweb.http.S$.init(S.scala:825)
at net.liftweb.http.S$.initIfUninitted(S.scala:1514)
at net.liftweb.http.Req$.apply(Req.scala:140)
at net.liftweb.http.provider.HTTPProvider$class.service
(HTTPProvider.scala:52)
at net.liftweb.http.LiftFilter.service(LiftServlet.scala:523)
at net.liftweb.http.provider.servlet.ServletFilterProvider
$class.protected$service(ServletFilterProvider.scala:43)
at 

Re: [Lift] Skittr example in bad shape

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 4:35 AM, Vesa brut...@gmail.com wrote:

 Hi,

 I was trying to run the skittr example from the lift-examples and it
 doesn't seem to work. It's demonstrating usage of comet but it doesn't
 get that far as the comet actor never receives any messages due to a
 bug. Also the indentation is a mix of spaces and tabs of different
 width and looks quite messed up. How should I deliver a fix when I'm
 done?


There's a single simple bug.  When we moved from Scala Actors to Lift
Actors, we moved from a case object AddTimelineViewer to case class
AddTimelineViewer(who: SimpleActor[Any])  Unfortunately, the compiler didn't
flag the actor ! AddTimelineViewer line as a bug... it converted the line to
actor ! (who = AddTimelineViewer.apply) and passed a function as a
message.  I've fixed the code locally (WatchUser.scala lines 49-52 become):

  override def localSetup {
userActor = name.flatMap(name = UserList.find(name))
userActor.foreach{ua = ua ! AddTimelineViewer(this) ;  messages = (ua
!? GetTimeline) match {case Timeline(m) = m; case _ = Nil}}
  }

I'll get a patch onto review board by end of day today.




 - Vesa

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: Funny behavior of head merging with nested head blocks

2009-12-17 Thread greekscala
Hello,

I have a head element in my default template with a standard title
element.
When I define a head element in my snippet with a new title element,
it is appended into the head section of my resulting html.

Now there are two title element and the browser uses the first one.
I thought the title element in my default template will be replaced
with the one I defined in my snippet.

Is there another way to achieve this?

with best regards

On 16 Dez., 21:54, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Wed, Dec 16, 2009 at 11:55 AM, Ross Mellgren dri...@gmail.com wrote:
  I was diagnosing some incorrect HTML in our application using Lift,
  and I found a strange behavior of head merging (I assume) when you
  emit a head tag into a head tag from the snippet. The code speaks
  better than I do about this:

  ...
  object Dialog extends DispatchSnippet {
      val standardDialogOptions: JsObj = JsObj(
          autoOpen  - false,
          bgiframe  - true,
          modal     - true,
          resizable - false
      )

      val dispatch: DispatchIt = {
          case head = renderHead
          case render = render
      }

      def renderHead(ns: NodeSeq): NodeSeq =
          head{ Script { JsCrVar(pxStandardDialogOptions,
  Dialog.standardDialogOptions) } }/head
  ...
  }

          LiftRules.snippetDispatch.append {
  ...
              case Dialog           = Dialog
  ...
          }

  lift:surround with=default at=content
      head
          titleEmail Editor/title
          lift:Dialog.head /
      /head
  /lift:surround

  I agree I'm doing the wrong thing here -- the lift:Dialog.head / tag
  rightly should be outside of the head block, or the snippet should not
  emit head. However, the resulting behavior is funny (certainly more
  funny than I'd expect):

  html xmlns:lift=http://liftweb.net/; xmlns=http://www.w3.org/1999/xhtml
  
  head
  ...
  titleEmail Editor/title

  script type=text/javascript
  // ![CDATA[
  var pxStandardDialogOptions = {autoOpen: false, bgiframe: true,
  modal: true, resizable: false};
  // ]]
  /script

  headscript type=text/javascript
  // ![CDATA[
  var pxStandardDialogOptions = {autoOpen: false, bgiframe: true,
  modal: true, resizable: false};
  // ]]
  /script/head

  /head
  ...
  /html

  Ideally I'd like this to just work so that it doesn't matter
  precisely where the snippet is called, though it would be some special
  magic just to work around an erroneous case. But, the behavior that
  does happen seems odd, duplicating the markup inside the head?

  Should I file a bug? Just smile and nod?

 If we had to recursively check all the head tags for head tags, that
 would significantly increase the overhead of the rewrite phase.  I would
 suggest using the new Helpers.stripHead() call to remove head tags from
 stuff you already know is in a head tag.





  -Ross

  --

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

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Is this a defect at JqJsCmds.ModalDialog

2009-12-17 Thread Alex Boisvert
Good to hear.  Yes, it felt more natural to pass a Json object since that's
what the BlockUI API expects.

alex


On Thu, Dec 17, 2009 at 1:41 AM, Xuefeng Wu ben...@gmail.com wrote:

 OK, I found the JsObj is useful, Thanks.


 On Thu, Dec 17, 2009 at 5:28 PM, Xuefeng Wu ben...@gmail.com wrote:

 Hi Alex,

 I found new ModalDialog(html: NodeSeq, css: Box[JsObj]),
  the parameter 'css' type is JsObj instead of String.

 Could you tell me the reason?

 I'm working on a customer widgets and have the same case.


 On Thu, Dec 3, 2009 at 10:37 PM, Alex Boisvert 
 alex.boisv...@gmail.comwrote:

 On Thu, Dec 3, 2009 at 12:40 AM, Xuefeng Wu ben...@gmail.com wrote:

 Hi,

 When I use ModalDialog I want to setup the css but fail,
 My code would be:
 ModalDialog(someHtml, top: '10px')

 I found the ModalDialog code at Lift:
 class ModalDialog(html: NodeSeq, css: Box[String]) extends JsCmd {
 val toJsCmd = jQuery.blockUI({ message:  +
 AltXML.toXML(Group(S.session.map(s =
 s.fixHtml(s.processSurroundAndInclude(Modal Dialog,
 html))).openOr(html)), false, true, S.ieMode).encJs +
 (css.map(w = ,  css: ' + w + ' ).openOr()) + });
   }

 the css is wrap by  '  '  ,
 but I found http://malsup.com/jquery/block/#demos
 the css is wraped by { }


 Is this a defect at JqJsCmds.ModalDialog or I do something wrong?


 Yes, it looks like a bug.   I'm guessing the code may have been written
 for BlockUI v1.x and that the API may have changed in 2.x.Please open a
 ticket and I'll fix it.

 alex

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




 --
 Scala中文社区:  http://groups.google.com/group/scalacn




 --
 Scala中文社区:  http://groups.google.com/group/scalacn

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


--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Funny behavior of head merging with nested head blocks

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 7:32 AM, greekscala hellectro...@gmail.com wrote:

 Hello,

 I have a head element in my default template with a standard title
 element.
 When I define a head element in my snippet with a new title element,
 it is appended into the head section of my resulting html.

 Now there are two title element and the browser uses the first one.
 I thought the title element in my default template will be replaced
 with the one I defined in my snippet.

 Is there another way to achieve this?


The short answer is no.  Lift's head support de-dups top-level tags in
head but does not overwrite a tag.



 with best regards

 On 16 Dez., 21:54, David Pollak feeder.of.the.be...@gmail.com wrote:
  On Wed, Dec 16, 2009 at 11:55 AM, Ross Mellgren dri...@gmail.com
 wrote:
   I was diagnosing some incorrect HTML in our application using Lift,
   and I found a strange behavior of head merging (I assume) when you
   emit a head tag into a head tag from the snippet. The code speaks
   better than I do about this:
 
   ...
   object Dialog extends DispatchSnippet {
   val standardDialogOptions: JsObj = JsObj(
   autoOpen  - false,
   bgiframe  - true,
   modal - true,
   resizable - false
   )
 
   val dispatch: DispatchIt = {
   case head = renderHead
   case render = render
   }
 
   def renderHead(ns: NodeSeq): NodeSeq =
   head{ Script { JsCrVar(pxStandardDialogOptions,
   Dialog.standardDialogOptions) } }/head
   ...
   }
 
   LiftRules.snippetDispatch.append {
   ...
   case Dialog   = Dialog
   ...
   }
 
   lift:surround with=default at=content
   head
   titleEmail Editor/title
   lift:Dialog.head /
   /head
   /lift:surround
 
   I agree I'm doing the wrong thing here -- the lift:Dialog.head / tag
   rightly should be outside of the head block, or the snippet should not
   emit head. However, the resulting behavior is funny (certainly more
   funny than I'd expect):
 
   html xmlns:lift=http://liftweb.net/; xmlns=
 http://www.w3.org/1999/xhtml
   
   head
   ...
   titleEmail Editor/title
 
   script type=text/javascript
   // ![CDATA[
   var pxStandardDialogOptions = {autoOpen: false, bgiframe: true,
   modal: true, resizable: false};
   // ]]
   /script
 
   headscript type=text/javascript
   // ![CDATA[
   var pxStandardDialogOptions = {autoOpen: false, bgiframe: true,
   modal: true, resizable: false};
   // ]]
   /script/head
 
   /head
   ...
   /html
 
   Ideally I'd like this to just work so that it doesn't matter
   precisely where the snippet is called, though it would be some special
   magic just to work around an erroneous case. But, the behavior that
   does happen seems odd, duplicating the markup inside the head?
 
   Should I file a bug? Just smile and nod?
 
  If we had to recursively check all the head tags for head tags, that
  would significantly increase the overhead of the rewrite phase.  I would
  suggest using the new Helpers.stripHead() call to remove head tags from
  stuff you already know is in a head tag.
 
 
 
 
 
   -Ross
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] mysql database password

2009-12-17 Thread itsjar
Hi, I've added the following code to change the database to mysql.
However our code is open source and is freely browsable so It would be
nice to hash the password somehow.

Does anybody have an idea how to do this in LIFT?

Thanks,
itsjar

object DBArxum extends ConnectionManager {
  def newConnection(name : ConnectionIdentifier): Box[Connection] = {
try {
  Class.forName(com.mysql.jdbc.Driver)
  val dm = DriverManager.getConnection(jdbc:mysql://localhost/
arxum?user=rootpassword=blablablabla)
Full(dm)
} catch {
  case e : Exception = e.printStackTrace; Empty
}
  }
  def releaseConnection(conn: Connection) {conn.close}
}

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: mysql database password

2009-12-17 Thread Peter Robinett
Use a properties file and don't include that in your source code
commits. Here's another thread on it:
http://groups.google.com/group/liftweb/browse_thread/thread/c156b9de99f3bce/

On Dec 17, 8:22 am, itsjar its...@gmail.com wrote:
 Hi, I've added the following code to change the database to mysql.
 However our code is open source and is freely browsable so It would be
 nice to hash the password somehow.

 Does anybody have an idea how to do this in LIFT?

 Thanks,
 itsjar

 object DBArxum extends ConnectionManager {
   def newConnection(name : ConnectionIdentifier): Box[Connection] = {
     try {
       Class.forName(com.mysql.jdbc.Driver)
       val dm = DriverManager.getConnection(jdbc:mysql://localhost/
 arxum?user=rootpassword=blablablabla)
         Full(dm)
     } catch {
       case e : Exception = e.printStackTrace; Empty
     }
   }
   def releaseConnection(conn: Connection) {conn.close}



 }

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Highlighting even/odd rows in a table

2009-12-17 Thread Alex Boisvert
I can recommend it too.  I've just used it in an open-source project
soon-to-be-released.

alex

On Thu, Dec 17, 2009 at 1:14 AM, Timothy Perrett timo...@getintheloop.euwrote:

 Personally, I would just go with this:

 http://franca.exofire.net/jq/colorize

 I've used it very successfully on one of my projects.

 Cheers, Tim

 On Dec 17, 2:07 am, Ross Mellgren dri...@gmail.com wrote:
  Oh, speaking of jquery, tablesorter also has a zebra plugin that does
 this, so if you're tablesorter you can use that also.
 
  -Ross
 
  On Dec 16, 2009, at 9:01 PM, Alex Boisvert wrote:
 
 
 
   Or delegate the work to the browser using jQuery + CSS
  http://docs.jquery.com/Selectors/odd
 
   alex
 
   On Wed, Dec 16, 2009 at 4:04 PM, Ross Mellgren dri...@gmail.com
 wrote:
   You could use customers.zipWithIndex.flatMap({ case (customer, index)
   = ... instead of customers.flatMap(customer = to get the index, and
   then use index % 2 == 0 to see if it's an even row or an odd row. How
   you get that style into your template is up to you -- using an
   attribute bind param would probably be pretty easy, or emitting the
   td straight out of the snippet.
 
   If you need more guidance give a shout and I'll write you up some
   example code.
 
   Note that zipWithIndex only works on List, and it regenerates the
   list, so if you have a bunch of customers on the page and are
   concerned about performance you might want to do something different
   (and less convenient).
 
   -Ross
 
   On Dec 16, 2009, at 5:59 PM, Stevo wrote:
 
Say for a second that in one of my Snippets I have the following
binding:
 
  def view(xhtml: NodeSeq): NodeSeq =
  {
  val entries: NodeSeq = Customer.findAll() match
  {
  case Nil = Text(No customers currently
 defined)
  case customers =
  customers.flatMap(customer =
 bind(cust, chooseTemplate
(customer, entry, xhtml),
  name - Text(emptyIfNull(
 customer.name.is)),
  address - Text
(customer.workAddress.obj.open_!.singleTextLine),
  phone - Text(emptyIfNull(
 customer.workPhone.is)),
  other - Text(emptyIfNull(
 customer.other.is)),
  fax - Text(emptyIfNull(
 customer.workFax.is)),
  email - Text(emptyIfNull(
 customer.email.is)),
  url - Text(emptyIfNull(
 customer.email.is
  }
  bind(customer, xhtml, entry - entries)
  }
 
Is there a way that I could apply a style to a complete
 customer:entry
with the goal of highlighting even/odd rows?
 
Let me know and best regards to all,
 
Steve
 
--
 
--
 
You received this message because you are subscribed to the Google
Groups Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
.
For more options, visit this group athttp://
 groups.google.com/group/liftweb?hl=en
.
 
   --
 
   You received this message because you are subscribed to the Google
 Groups Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group athttp://
 groups.google.com/group/liftweb?hl=en.
 
   --
 
   You received this message because you are subscribed to the Google
 Groups Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group athttp://
 groups.google.com/group/liftweb?hl=en.

 --

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




--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] Problem in Lift 1.1-SNAPSHOT ?

2009-12-17 Thread earthling_paul
While compiling my samples with Lift 1.1-SNAPSHOT I get this Compiler-
Error:

[ERROR] D:\Projekte\TestProjects\hello-lift-11\src\main\scala\net
\liftweb\hello\snippet\TD.scala:76: error: object creation impossible,
since method doSync in trait AnyVarTrait of type [F](= F)F is not
defined
[INFO] object QueryNotDone extends SessionVar(false)

Any ideas ?
Regards Paul

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Problem in Lift 1.1-SNAPSHOT ?

2009-12-17 Thread David Pollak
Did you do an mvn clean compile?

On Thu, Dec 17, 2009 at 9:27 AM, earthling_paul paul.ber...@gmail.comwrote:

 While compiling my samples with Lift 1.1-SNAPSHOT I get this Compiler-
 Error:

 [ERROR] D:\Projekte\TestProjects\hello-lift-11\src\main\scala\net
 \liftweb\hello\snippet\TD.scala:76: error: object creation impossible,
 since method doSync in trait AnyVarTrait of type [F](= F)F is not
 defined
 [INFO] object QueryNotDone extends SessionVar(false)

 Any ideas ?
 Regards Paul

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] heapsize

2009-12-17 Thread jack
How do I increase the heapsize in Lift?

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Confused about validation

2009-12-17 Thread Alex Boisvert
Indeed, if you're building a lot of forms, you quickly realize that Lift
currently requires fair amount of code for forms that are not backed by
mapper elements.  There's space there for better abstrations / DSL
improvements to reduce boilerplate -- similar to what David has built for
the new wizard.

alex


On Wed, Dec 16, 2009 at 8:47 AM, greekscala hellectro...@gmail.com wrote:

 Hello lift people,

 lift seems very promising. I am trying to make some tests
 and examples because I am new to lift.
 I wanted to add some validation to a form element and show
 the validation error to the user.
 But after little searching I was a little disappointet to see that
 there
 is no such support, exept when using Mapper. I do not want to use
 Mapper.  I want only simple field validation with the errors messages
 printed in a feedback panel.

 Before lift I was using Wicket. I think they did a good job with the
 validators.

 I try to understand why lift has not such support? I do not want to
 code
 everything in my submit method and validate things there.

 best regards

 --

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




--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] heapsize

2009-12-17 Thread Alex Boisvert
On Thu, Dec 17, 2009 at 10:56 AM, jack jack.wid...@gmail.com wrote:

 How do I increase the heapsize in Lift?


Nothing Lift-specific here.  Just the usual java -Xmx2048m (or whichever
amount you need).  If your starting Lift via Tomcat/Jetty, then usually you
place this in one of the startup scripts, or as JAVA_OPTS environment
variable.

e.g., export JAVA_OPTS=-Xmx2048m

alex

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Confused about validation

2009-12-17 Thread Naftoli Gugenheim
What would such an abstraction do?
What code would you like to write (including templates) and what should it do?

-
Alex Boisvertalex.boisv...@gmail.com wrote:

Indeed, if you're building a lot of forms, you quickly realize that Lift
currently requires fair amount of code for forms that are not backed by
mapper elements.  There's space there for better abstrations / DSL
improvements to reduce boilerplate -- similar to what David has built for
the new wizard.

alex


On Wed, Dec 16, 2009 at 8:47 AM, greekscala hellectro...@gmail.com wrote:

 Hello lift people,

 lift seems very promising. I am trying to make some tests
 and examples because I am new to lift.
 I wanted to add some validation to a form element and show
 the validation error to the user.
 But after little searching I was a little disappointet to see that
 there
 is no such support, exept when using Mapper. I do not want to use
 Mapper.  I want only simple field validation with the errors messages
 printed in a feedback panel.

 Before lift I was using Wicket. I think they did a good job with the
 validators.

 I try to understand why lift has not such support? I do not want to
 code
 everything in my submit method and validate things there.

 best regards

 --

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




--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.


--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Confused about validation

2009-12-17 Thread Alex Boisvert
I think the idea is to be a little more declarative on defining the form and
separate the low-level concerns of handling all the events to a more generic
form handler,

object ShipToForm extends Form {
  val name = Variable[String](customerName)
  val address1: Variable[String]()
  val address2: Variable[String]()
  val state: Variable[String]()
  val zip: Variable[String]()

  val form =
TextField(Name, name, StringLengthValidator(30)) ++
TextField(Address 1, address1, StringLengthValidator(20)) ++
TextField(Address 2, address2, StringLengthValiator(20)) ++
TextField(State, state, listOfStates) ++
TextField(Zip, zip, ZipCodeValidator) ++
  )  ++ FullAddressValidator(address1, address2, state, zip)

  val onSubmit = {
// everything has been validated
  }
}

bind(shipTo, AjaxifyForm(ShipToForm))

or

bind(shipTo, PlainOldForm(ShipToForm))

alex

On Thu, Dec 17, 2009 at 11:07 AM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 What would such an abstraction do?
 What code would you like to write (including templates) and what should it
 do?

 -
 Alex Boisvertalex.boisv...@gmail.com wrote:

 Indeed, if you're building a lot of forms, you quickly realize that Lift
 currently requires fair amount of code for forms that are not backed by
 mapper elements.  There's space there for better abstrations / DSL
 improvements to reduce boilerplate -- similar to what David has built for
 the new wizard.

 alex


 On Wed, Dec 16, 2009 at 8:47 AM, greekscala hellectro...@gmail.com
 wrote:

  Hello lift people,
 
  lift seems very promising. I am trying to make some tests
  and examples because I am new to lift.
  I wanted to add some validation to a form element and show
  the validation error to the user.
  But after little searching I was a little disappointet to see that
  there
  is no such support, exept when using Mapper. I do not want to use
  Mapper.  I want only simple field validation with the errors messages
  printed in a feedback panel.
 
  Before lift I was using Wicket. I think they did a good job with the
  validators.
 
  I try to understand why lift has not such support? I do not want to
  code
  everything in my submit method and validate things there.
 
  best regards
 
  --
 
  You received this message because you are subscribed to the Google Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
  .
  For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
 
 

 --

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




--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: Highlighting even/odd rows in a table

2009-12-17 Thread Stevo
Thanks for the JQuery recommendations - I really like the way these
are done and will pursue whichever is least intrusive in my project.

Thanks again and best regards,


Steve Thompson

--

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] use S and templating without state?

2009-12-17 Thread harryh
I have a simple web page that is not based on any session state, only
on the provided params and the contents of the datastore:

http://foursquare.com/iphone/achievements?uid=209cityid=22

Can I serve this page from Lift's statelessDispatchTable and still
using templating (and possibly S?) so that no Lift/Jetty session is
created when serving this page?

-harryh

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: Problem in Lift 1.1-SNAPSHOT ?

2009-12-17 Thread ngocdaothanh
I checkout the source code from GitHub, do mvn clean compile and the
output is:

lift-modules/lift-jta/src/main/scala/net/liftweb/transaction/
TransactionContext.scala:206: error: class TransactionContext needs to
be abstract, since method getUnitName in trait ScalaEMFactory of type
= String is not defined
class TransactionContext(private implicit val transactionService:
TransactionService)
  ^
one error found

The source code from GitHub is not always compilable.


On Dec 18, 3:17 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Did you do an mvn clean compile?

 On Thu, Dec 17, 2009 at 9:27 AM, earthling_paul paul.ber...@gmail.comwrote:



  While compiling my samples with Lift 1.1-SNAPSHOT I get this Compiler-
  Error:

  [ERROR] D:\Projekte\TestProjects\hello-lift-11\src\main\scala\net
  \liftweb\hello\snippet\TD.scala:76: error: object creation impossible,
  since method doSync in trait AnyVarTrait of type [F](= F)F is not
  defined
  [INFO] object QueryNotDone extends SessionVar(false)

  Any ideas ?
  Regards Paul

  --

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

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
I think I'm nearly there (that is a working equivalent of your sample) with 
G-d's help...

-
Mariusmarius.dan...@gmail.com wrote:

Let me know when you have something.

Br's,
Marius

On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 I'm thinking of an approach to writing a DSL with a much cleaner syntax. I'll 
 try to put something together.

 -

 Marius Danciumarius.dan...@gmail.com wrote:

 All,

 I just want to see if there is any interest in the approach discussed here.
 As you know Lift has some interesting support for building JavaScript
 constructs from Scala code usig JsExp, JsCmd etc classes. I used quite a lot
 this support and it's great but if your JS code that you want to send down
 to the browser (say as an Ajax or Comet partial update response) gets a bit
 more complicated then constructing the JS fragment leads IMO to some
 cumbersome Scala code. I found myselft in quite a few situation to use JsRaw
 to write the JavaScript fragment in order for the code reader to understand
 what JavaScript code will be generated. But of course with JsRaw we put
 everything into a String so I'm not a big fan of this approach. So I started
 to define a JavaScript like DSL that IMO is closer to JavaScript form.
 Attached is a source code smaple of how this looks like, so for instance we
 can have something like:

 val js = JsFunc('myFunc, 'param1, 'param2) {
     JsIf('param1 __ 30) {
         Var('home) := Wrap(234 __- 3) __/ 2 `;`
         Var('someArray) := JsArray(1, 2, 3, 4, 5) `;`
         'myFunc(1, 2, do it, 'home) `;`
         $(#myID)  'attr(value, 123) `;`
       } ~
       JsForEach(Var('i) in 'someArray) {
         'console  'log(Hi there  __+ 'i) `;`
       } ~
       JsAnonFunc('arg1, 'arg2) {
        'alert(Anonymous function  __+ 'arg1 __+ 'arg2)
       }(1, 2) `;`
     }

     println(js.toJs)

 this yields the following JavaScript code:

 function myFunc( param1, param2 ) {
 if (param1  30) {
 var home = ( 234 - 3 ) / 2;
 var someArray = [ 1, 2, 3, 4, 5 ];
 myFunc(1, 2, do it, home);
 $(#myID).attr(value, 123);}

 for (var i in someArray) {
 console.log(Hi there  + i);}

 function ( arg1, arg2 ) {
 alert(Anonymous function  + arg1 + arg2)

 }(1, 2);
 }

 ... ok I just droped nonsense code in there for exemplification. A few
 words:

 1. JsIf, JsForEach describe JavaScript if and for(each) statements
 2. Functions like __, __, ... __+, __- are function that alows definition
 of boolean and/or algebraic expressions.
 3. Wrap just wraps an expression into ()
 4. Var defined a variable
 5 := defines an assignment
 6. JsFunc declares a JS function
 7. JsAnonFunc declares an anonymous function
 8. 'myFunc(1, 2, do it, 'home)  is simply a javascript function invocation
 by providing 4 parameter.
 9. ~ is just a function that chains statements that don;t necessarily end in
 ;

 Do you think that something like this would be usable in Lift?

 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 lift...@googlegroups.com.
 To unsubscribe from this group, send email to 
 liftweb+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/liftweb?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.


--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] Generalized jQuery function missing?

2009-12-17 Thread Jonathan Hoffman
Does something like this exist?  I didn't see it, but maybe it was in my blind 
spot

case class JqFunc(function:String, params:JsExp*) extends JsExp with 
JQueryRight with JQueryLeft {
override val toJsCmd = function + ( + params.map(_.toJsCmd).mkString(,) 
+ )
}

If not, i'll put in a ticket and add it.  Would be very useful for non common 
functions.

= Jon

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: use S and templating without state?

2009-12-17 Thread Peter Robinett
Harry, isn't it just the same as if you were serving, say, a REST api
request? Add your Req case to the statelessDispatchTable and have it
call a method of your choosing like so: case r @ Req(iphone ::
achievements :: Nil, , GetRequest) = () = showAchievements(r). r
is a Req instance and showAchievements get request params from it
right like you would with S.param().

Peter

On Dec 17, 1:28 pm, harryh har...@gmail.com wrote:
 I have a simple web page that is not based on any session state, only
 on the provided params and the contents of the datastore:

 http://foursquare.com/iphone/achievements?uid=209cityid=22

 Can I serve this page from Lift's statelessDispatchTable and still
 using templating (and possibly S?) so that no Lift/Jetty session is
 created when serving this page?

 -harryh

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Generalized jQuery function missing?

2009-12-17 Thread Ross Mellgren
I usually just make one, since it's very simple, plus it can verify at  
compile time via the function type signature if you have the right  
number and type of arguments.

-Ross

On Dec 17, 2009, at 5:59 PM, Jonathan Hoffman wrote:

 Does something like this exist?  I didn't see it, but maybe it was  
 in my blind spot

 case class JqFunc(function:String, params:JsExp*) extends JsExp with  
 JQueryRight with JQueryLeft {
override val toJsCmd = function + ( + params.map 
 (_.toJsCmd).mkString(,) + )
 }

 If not, i'll put in a ticket and add it.  Would be very useful for  
 non common functions.

 = Jon

 --

 You received this message because you are subscribed to the Google  
 Groups Lift group.
 To post to this group, send email to lift...@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 
 .



--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Generalized jQuery function missing?

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 2:59 PM, Jonathan Hoffman jonhoff...@gmail.comwrote:

 Does something like this exist?  I didn't see it, but maybe it was in my
 blind spot

 case class JqFunc(function:String, params:JsExp*) extends JsExp with
 JQueryRight with JQueryLeft {
override val toJsCmd = function + ( +
 params.map(_.toJsCmd).mkString(,) + )
 }

 If not, i'll put in a ticket and add it.  Would be very useful for non
 common functions.


Awesome.  Yeah... please add all the Jquery helpers you can think of!



 = Jon

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Problem in Lift 1.1-SNAPSHOT ?

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 2:08 PM, ngocdaothanh ngocdaoth...@gmail.comwrote:

 I checkout the source code from GitHub, do mvn clean compile and the
 output is:

 lift-modules/lift-jta/src/main/scala/net/liftweb/transaction/
 TransactionContext.scala:206: error: class TransactionContext needs to
 be abstract, since method getUnitName in trait ScalaEMFactory of type
 = String is not defined
 class TransactionContext(private implicit val transactionService:
 TransactionService)
  ^
 one error found

 The source code from GitHub is not always compilable.


This is simply not true.  The code on the master branch always compiles.  I
just did a checkout and compilation of the lift-jta module and it worked
just fine.




 On Dec 18, 3:17 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Did you do an mvn clean compile?
 
  On Thu, Dec 17, 2009 at 9:27 AM, earthling_paul paul.ber...@gmail.com
 wrote:
 
 
 
   While compiling my samples with Lift 1.1-SNAPSHOT I get this Compiler-
   Error:
 
   [ERROR] D:\Projekte\TestProjects\hello-lift-11\src\main\scala\net
   \liftweb\hello\snippet\TD.scala:76: error: object creation impossible,
   since method doSync in trait AnyVarTrait of type [F](= F)F is not
   defined
   [INFO] object QueryNotDone extends SessionVar(false)
 
   Any ideas ?
   Regards Paul
 
   --
 
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Confused about validation

2009-12-17 Thread David Pollak
I think I have to split the wizard stuff out so you can declare a single
screen with validation.

On Thu, Dec 17, 2009 at 11:23 AM, Alex Boisvert alex.boisv...@gmail.comwrote:

 I think the idea is to be a little more declarative on defining the form
 and separate the low-level concerns of handling all the events to a more
 generic form handler,

 object ShipToForm extends Form {
   val name = Variable[String](customerName)
   val address1: Variable[String]()
   val address2: Variable[String]()
   val state: Variable[String]()
   val zip: Variable[String]()

   val form =
 TextField(Name, name, StringLengthValidator(30)) ++
 TextField(Address 1, address1, StringLengthValidator(20)) ++
 TextField(Address 2, address2, StringLengthValiator(20)) ++
 TextField(State, state, listOfStates) ++
 TextField(Zip, zip, ZipCodeValidator) ++
   )  ++ FullAddressValidator(address1, address2, state, zip)

   val onSubmit = {
 // everything has been validated
   }
 }

 bind(shipTo, AjaxifyForm(ShipToForm))

 or

 bind(shipTo, PlainOldForm(ShipToForm))

 alex


 On Thu, Dec 17, 2009 at 11:07 AM, Naftoli Gugenheim 
 naftoli...@gmail.comwrote:

 What would such an abstraction do?
 What code would you like to write (including templates) and what should it
 do?

 -
 Alex Boisvertalex.boisv...@gmail.com wrote:

 Indeed, if you're building a lot of forms, you quickly realize that Lift
 currently requires fair amount of code for forms that are not backed by
 mapper elements.  There's space there for better abstrations / DSL
 improvements to reduce boilerplate -- similar to what David has built for
 the new wizard.

 alex


 On Wed, Dec 16, 2009 at 8:47 AM, greekscala hellectro...@gmail.com
 wrote:

  Hello lift people,
 
  lift seems very promising. I am trying to make some tests
  and examples because I am new to lift.
  I wanted to add some validation to a form element and show
  the validation error to the user.
  But after little searching I was a little disappointet to see that
  there
  is no such support, exept when using Mapper. I do not want to use
  Mapper.  I want only simple field validation with the errors messages
  printed in a feedback panel.
 
  Before lift I was using Wicket. I think they did a good job with the
  validators.
 
  I try to understand why lift has not such support? I do not want to
  code
  everything in my submit method and validate things there.
 
  best regards
 
  --
 
  You received this message because you are subscribed to the Google
 Groups
  Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
  liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
  .
  For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
 
 

 --

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



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




-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread David Pollak
Please try doing a mvn clean and then retry your application.

I have seen no problems with the dozen+ Lift apps I work with related to
connections not working between M7 and M8.

On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote:

 The same code works fine in 1.1M7. Anyone know what causes the
 problem. Or maybe a bug in 1.1M8?

 boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
 (com.mysql.jdbc.Driver,
  jdbc:mysql://
 localhost/mydb?autoReconnectForPools=true,
  root, ))


 the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
 failed to find either a JNDI data source with the name lift or a lift
 connection manager with the correct name/pre/ph3Caused by:/
 h3prejava.lang.NullPointerException: Looking for Connection
 Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
 data source with the name lift or a lift connection manager with the
 correct name
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
 (DB.scala:160)
at
 net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
 $1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
 )
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
 $31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
 1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
 (S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
 (S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40.apply(S.scala:1173)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at
 net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:252)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39.apply(S.scala:1172)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38.apply
 (S.scala:1171)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1.apply(S.scala:1170)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$._init(S.scala:1169)
at net.liftweb.http.S$.init(S.scala:825)
at net.liftweb.http.S$.initIfUninitted(S.scala:1514)
at net.liftweb.http.Req$.apply(Req.scala:140)
at 

[Lift] Re: use S and templating without state?

2009-12-17 Thread Peter Robinett
Sorry, I forget you wanted to use templating. You'd want your
showAchievements() to return an XHTMLResponse with the html you've
build. TemplateFinder can help, but
LiftSession.processSurroundAndInclude which you'd use to execute any
snippets in it naturally isn't available. I'm not sure what you'd do,
to be honest.

Peter

On Dec 17, 2:59 pm, Peter Robinett pe...@bubblefoundry.com wrote:
 Harry, isn't it just the same as if you were serving, say, a REST api
 request? Add your Req case to the statelessDispatchTable and have it
 call a method of your choosing like so: case r @ Req(iphone ::
 achievements :: Nil, , GetRequest) = () = showAchievements(r). r
 is a Req instance and showAchievements get request params from it
 right like you would with S.param().

 Peter

 On Dec 17, 1:28 pm, harryh har...@gmail.com wrote:



  I have a simple web page that is not based on any session state, only
  on the provided params and the contents of the datastore:

 http://foursquare.com/iphone/achievements?uid=209cityid=22

  Can I serve this page from Lift's statelessDispatchTable and still
  using templating (and possibly S?) so that no Lift/Jetty session is
  created when serving this page?

  -harryh

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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] AWS related Lift modules

2009-12-17 Thread David Pollak
Folks,

Jon mentioned he's got some S3-related code he might dump into Lift when he
has a chance.  Having that sooner rather than later would be a win for me...
also if anyone out there has SQS related code, I'd love to see that in
Lift... or I'll write it next week.

Thanks,

David

-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: use S and templating without state?

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 4:17 PM, Peter Robinett pe...@bubblefoundry.comwrote:

 Sorry, I forget you wanted to use templating. You'd want your
 showAchievements() to return an XHTMLResponse with the html you've
 build. TemplateFinder can help, but
 LiftSession.processSurroundAndInclude which you'd use to execute any
 snippets in it naturally isn't available. I'm not sure what you'd do,
 to be honest.


I'm working on an example ;-)



 Peter

 On Dec 17, 2:59 pm, Peter Robinett pe...@bubblefoundry.com wrote:
  Harry, isn't it just the same as if you were serving, say, a REST api
  request? Add your Req case to the statelessDispatchTable and have it
  call a method of your choosing like so: case r @ Req(iphone ::
  achievements :: Nil, , GetRequest) = () = showAchievements(r). r
  is a Req instance and showAchievements get request params from it
  right like you would with S.param().
 
  Peter
 
  On Dec 17, 1:28 pm, harryh har...@gmail.com wrote:
 
 
 
   I have a simple web page that is not based on any session state, only
   on the provided params and the contents of the datastore:
 
  http://foursquare.com/iphone/achievements?uid=209cityid=22
 
   Can I serve this page from Lift's statelessDispatchTable and still
   using templating (and possibly S?) so that no Lift/Jetty session is
   created when serving this page?
 
   -harryh

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: AWS related Lift modules

2009-12-17 Thread Peter Robinett
I'd love to see that. While I'm throwing out wishes, it's be great to
have a generic file store frontend and an S3 specific backend just
like how Mapper and Record have different datastore drivers. But I
have no need for this, it'd just be cool.

Peter

On Dec 17, 4:17 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,

 Jon mentioned he's got some S3-related code he might dump into Lift when he
 has a chance.  Having that sooner rather than later would be a win for me...
 also if anyone out there has SQS related code, I'd love to see that in
 Lift... or I'll write it next week.

 Thanks,

 David

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
Current state attached.


2009/12/17 Marius marius.dan...@gmail.com

 Let me know when you have something.

 Br's,
 Marius

 On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
  I'm thinking of an approach to writing a DSL with a much cleaner syntax.
 I'll try to put something together.
 
  -
 
  Marius Danciumarius.dan...@gmail.com wrote:
 
  All,
 
  I just want to see if there is any interest in the approach discussed
 here.
  As you know Lift has some interesting support for building JavaScript
  constructs from Scala code usig JsExp, JsCmd etc classes. I used quite a
 lot
  this support and it's great but if your JS code that you want to send
 down
  to the browser (say as an Ajax or Comet partial update response) gets a
 bit
  more complicated then constructing the JS fragment leads IMO to some
  cumbersome Scala code. I found myselft in quite a few situation to use
 JsRaw
  to write the JavaScript fragment in order for the code reader to
 understand
  what JavaScript code will be generated. But of course with JsRaw we put
  everything into a String so I'm not a big fan of this approach. So I
 started
  to define a JavaScript like DSL that IMO is closer to JavaScript form.
  Attached is a source code smaple of how this looks like, so for instance
 we
  can have something like:
 
  val js = JsFunc('myFunc, 'param1, 'param2) {
  JsIf('param1 __ 30) {
  Var('home) := Wrap(234 __- 3) __/ 2 `;`
  Var('someArray) := JsArray(1, 2, 3, 4, 5) `;`
  'myFunc(1, 2, do it, 'home) `;`
  $(#myID)  'attr(value, 123) `;`
} ~
JsForEach(Var('i) in 'someArray) {
  'console  'log(Hi there  __+ 'i) `;`
} ~
JsAnonFunc('arg1, 'arg2) {
 'alert(Anonymous function  __+ 'arg1 __+ 'arg2)
}(1, 2) `;`
  }
 
  println(js.toJs)
 
  this yields the following JavaScript code:
 
  function myFunc( param1, param2 ) {
  if (param1  30) {
  var home = ( 234 - 3 ) / 2;
  var someArray = [ 1, 2, 3, 4, 5 ];
  myFunc(1, 2, do it, home);
  $(#myID).attr(value, 123);}
 
  for (var i in someArray) {
  console.log(Hi there  + i);}
 
  function ( arg1, arg2 ) {
  alert(Anonymous function  + arg1 + arg2)
 
  }(1, 2);
  }
 
  ... ok I just droped nonsense code in there for exemplification. A few
  words:
 
  1. JsIf, JsForEach describe JavaScript if and for(each) statements
  2. Functions like __, __, ... __+, __- are function that alows
 definition
  of boolean and/or algebraic expressions.
  3. Wrap just wraps an expression into ()
  4. Var defined a variable
  5 := defines an assignment
  6. JsFunc declares a JS function
  7. JsAnonFunc declares an anonymous function
  8. 'myFunc(1, 2, do it, 'home)  is simply a javascript function
 invocation
  by providing 4 parameter.
  9. ~ is just a function that chains statements that don;t necessarily end
 in
  ;
 
  Do you think that something like this would be usable in Lift?
 
  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 lift...@googlegroups.com.
  To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group athttp://
 groups.google.com/group/liftweb?hl=en.

 --

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




--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




DSL.scala
Description: Binary data


Re: [Lift] By default DB.buildLoanWrapper is eager (Jeppe, please read)

2009-12-17 Thread David Pollak
On Tue, Dec 8, 2009 at 12:34 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:

 David Pollak feeder.of.the.be...@gmail.com writes:

  Folks,
 
  A month or so ago, I made the DB.buildLoanWrapper lazy.  While it
 provided a
  request-duration transaction, it did not actually pull the JDBC
 connection
  from the pool until the first request for the JDBC connection.  This led
 to
  some problems.  Basically:
 
  object MySnippet {
def render = synchronized {
  ... do a query in here
}
  }
 
  If some threads acquired the JDBC connection before invoking the snippet
  while others acquired the JDBC connection inside the synchronized (note
 it's
  an object) render method, there could be a deadlock caused by JDBC pool
  starvation.  This is unexpected and not likely to manifest unless you've
 got
  a non-trivial number of threads servicing requests.
 
  To avoid this unexpected situation, I returned DB.buildLoanWrapper to
 being
  eager, but you (and by you, I mean Jeppe), can also call
  DB.buildLoanWrapper(false) which will have the newer, lazy behavior.

 Thanks for the direct attention :-) I can see the problem, but just so
 I understand this completely: Can we agree that,

 1) The above pattern (global synchronized render method) is a rather bad
 pattern, scalability wise?


I'm not sure, but it's come up to me privately from more than one site and
from more than 1 highly capable developer.



 2) If there are no such methods (in user code), lazy connection acquiring
 is fine?


Yes.



 The question remains of course, if there are more such accidents waiting
 to happen? I always try to avoid using synchronize in application code
 (where possible :-) but I realize that Lift as a framework has to be
 somewhat more low level.

  Additionally, the default thread pool manager in Lift (ProtoDBVendor)
 will
  allow temporary pool expansion.  If there are no connections available
 after
  waiting 50ms, the pool will be temporarily expanded.

 Is there a limit to the expansion? (Before we know we've implemented
 c3p0 :-)


There's now a mechanism for a hard limit on the expansion.



 [...]

 /Jeppe

 --

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





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
Okay!
The following code:

 val jsFunc: JSFunc = Function(myFunc)(param1, param2) {case
 param1 :: param2 :: Nil =

Var(someArray) := Array(1, 2, 3, 4, 5)

If(param1  30) {

  val x = Var(x)   // now we can use either x or 'x

  x := (234 - 3) / 2 // calculation happens in scala

  Var(y) := (2:Expr) * x * 2   // calculation happens in
 javascript

  'jsFunc(1, 2, do it, 'y)

  val $ = JSIdent($)

  $(#myID)  'attr(value, 123)

} Else {

  'console  'log(=30)

}

ForEach(Var(i) In 'someArray) {

  'console  'log(Hi there   'i)

}

Function()(arg1, arg2) { case arg1 :: arg2 :: Nil =

  'alert(Anonymous function (  arg1  ,   arg2  ))

}(1,2)

}

println(jsFunc.toCode)


Produces:

function myFunc(param1, param2) {

var someArray

someArray = [1.0, 2.0, 3.0, 4.0, 5.0]

if((param1  30.0)) {

var x

x = 115.0

var y

y = ((2.0 * x) * 2.0)

jsFunc(1.0, 2.0, do it, y)

($(#myID)).attr(value, 123)

} else {

(console).log(=30)

}

var i

for(i in someArray) {

(console).log((Hi there  + i))

}

function (arg1, arg2) {

alert(Anonymous function ( + arg1) + , )  arg2) + )))

}(1.0, 2.0)

}


It may be desirable that instead of defining your own names for Vars and
function parameters, names are auto-generated, since you can anyway use
typesafe scala identifiers. This would save boilerplate and produce more
obfuscated code, and other than the name generating algorithm is a trivial
change to make.
Note that since I am not familiar with Lift's JavaScript APIs I just wrote
my own AST, which consists of case classes that contain their data
parameters and a toCode method. Feel free to delete them and plug Lift's
classes instead--there is no dependency on anything unique about them.
Also note that to prevent string + ident from compiling as a string to be
outputted and instead output a + operation, you have two choices: use the 
operator instead, which is replaced with + when either operand is a string,
or write (string:Expr) + ident.


2009/12/17 Naftoli Gugenheim naftoli...@gmail.com

 Current state attached.


 2009/12/17 Marius marius.dan...@gmail.com

 Let me know when you have something.

 Br's,
 Marius

 On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
  I'm thinking of an approach to writing a DSL with a much cleaner syntax.
 I'll try to put something together.
 
  -
 
  Marius Danciumarius.dan...@gmail.com wrote:
 
  All,
 
  I just want to see if there is any interest in the approach discussed
 here.
  As you know Lift has some interesting support for building JavaScript
  constructs from Scala code usig JsExp, JsCmd etc classes. I used quite a
 lot
  this support and it's great but if your JS code that you want to send
 down
  to the browser (say as an Ajax or Comet partial update response) gets a
 bit
  more complicated then constructing the JS fragment leads IMO to some
  cumbersome Scala code. I found myselft in quite a few situation to use
 JsRaw
  to write the JavaScript fragment in order for the code reader to
 understand
  what JavaScript code will be generated. But of course with JsRaw we put
  everything into a String so I'm not a big fan of this approach. So I
 started
  to define a JavaScript like DSL that IMO is closer to JavaScript form.
  Attached is a source code smaple of how this looks like, so for instance
 we
  can have something like:
 
  val js = JsFunc('myFunc, 'param1, 'param2) {
  JsIf('param1 __ 30) {
  Var('home) := Wrap(234 __- 3) __/ 2 `;`
  Var('someArray) := JsArray(1, 2, 3, 4, 5) `;`
  'myFunc(1, 2, do it, 'home) `;`
  $(#myID)  'attr(value, 123) `;`
} ~
JsForEach(Var('i) in 'someArray) {
  'console  'log(Hi there  __+ 'i) `;`
} ~
JsAnonFunc('arg1, 'arg2) {
 'alert(Anonymous function  __+ 'arg1 __+ 'arg2)
}(1, 2) `;`
  }
 
  println(js.toJs)
 
  this yields the following JavaScript code:
 
  function myFunc( param1, param2 ) {
  if (param1  30) {
  var home = ( 234 - 3 ) / 2;
  var someArray = [ 1, 2, 3, 4, 5 ];
  myFunc(1, 2, do it, home);
  $(#myID).attr(value, 123);}
 
  for (var i in someArray) {
  console.log(Hi there  + i);}
 
  function ( arg1, arg2 ) {
  alert(Anonymous function  + arg1 + arg2)
 
  }(1, 2);
  }
 
  ... ok I just droped nonsense code in there for exemplification. A few
  words:
 
  1. JsIf, JsForEach describe JavaScript if and for(each) statements
  2. Functions like __, __, ... __+, __- are function that alows
 definition
  of boolean and/or algebraic expressions.
  3. Wrap just wraps an expression into ()
  4. Var defined a variable
  5 := defines an assignment
  6. JsFunc declares a JS function
  7. JsAnonFunc declares an anonymous function
  8. 'myFunc(1, 2, do it, 'home)  is simply a javascript function
 invocation
  by providing 

Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-17 Thread Naftoli Gugenheim
(Not sure why on Chrome the wiki article page is all centered. Reported it
to Chrome.)

Can everyone look over the article? Especially everyone quoted in it --
Kris, Jim, DPP, Heiko, and anyone who I may have missed -- can you make sure
everything represents your opinion correctly?
Then if there is any disagreement after everyone's opinion is clarified we
need to make some decisions together.
This should not take much time, but it's very valuable! Thanks.


2009/12/15 Naftoli Gugenheim naftoli...@gmail.com

 I compiled much of this thread into
 http://wiki.github.com/dpp/liftweb/about-naming-conventions in raw form.
 As we continue to discuss the naming goals and guidelines and vote or decide
 on controversial goals, that wiki page should become more consolidated and
 less of a copy-paste of a discussion. :)


 On Mon, Dec 14, 2009 at 6:32 PM, Kris Nuttycombe 
 kris.nuttyco...@gmail.com wrote:

 On Mon, Dec 14, 2009 at 12:31 PM, David Pollak
 feeder.of.the.be...@gmail.com wrote:
  Folks,
 
  Lift allows developers to create web sites that are:
 
  Reliable (which includes secure)
  Maintainable/concise
  Highly interactive
  Easy to build
  High Performance
  Easy to on-board (initial understanding of the APIs)
 
  Lift's APIs should reflect these rank-ordered goals.  Some of these
 goals
  are in tension with each other.  For example, easy on-boarding (e.g.,
 longer
  method names, more traditional imperative style) is in tension with
 concise.
 
  There's also a very diverse Lift community.
 
  I use Emacs for a lot of my Lift coding.  I know folks who use TextMate
 for
  Lift coding.  Having long method names assumes the use of an IDE which
 has
  name completion.  Lift's APIs must serve both communities.
  People are coming to Lift from Java, Ruby, PHP, and other backgrounds.
  Assuming Scala conventions rather than a best choice for naming does a
  dis-service to the polygots.  Further, most of Scala's API conventions
  except for the collections stuff is not in my opinion that well thought
 out
  or consistent.
  Many of Lift's APIs have evolved correctly based on actual usage
 patterns.
  For example, the initially counter-intuitive use of apply to set fields
 and
  vars works far better than any other mechanism, especially when chaining
  calls.  I've tried many different mechanisms (e.g., update(), Pascal
 style
  :=, set(), etc.) for setting fields and the one that everybody
 gravitated to
  was apply().
 
  We also have to consider the existing code base.  I've personally got
 150K
  lines of Lift-code under management.  If we start breaking APIs without
 a
  compelling reason, it costs me money and it costs my clients less of my
  time.  What's the impact to various different current users of Lift of
  breaking APIs without a compelling reason (and I like this name better
 than
  that name or this name is more consistent are not compelling
 reasons.)
  So, my criteria for any name changes (and this is not open to any type
 of
  negotiation and I've been 100% consistent about this since the
 discussion
  began) is:
 
  If the name change can be accomplished with a deprecation of the old
 name
  without breaking any existing APIs, then the name change can be the
 better
  name.
  If the name change is internal to Lift or is in a little-used feature
 (e.g.,
  Kris's API changes in Loc) such that very few projects will likely be
  impacted by a name change and those that are impacted are sufficiently
 savvy
  that they will understand the change and be able to make it in a matter
 of
  minutes.
  Any class name or object name change that does not meet the above
 criteria
  must be compelling.  For example, we changed from Scala Actors to Lift
  Actors.  This was a substantial amount of breakage, but there were no
  alternatives and the Scala Actor memory retention issues were materially
  impacting many different sites and we had worked on various attempted
  solutions over a 10 month period.  If we're going to break without
  deprecation and the breakage is going to impact a substantial part of
 the
  Lift community, there must be a compelling reason to make the breakage.
 
  On Sun, Dec 13, 2009 at 10:49 AM, Kris Nuttycombe
  kris.nuttyco...@gmail.com wrote:
 
  To this point, the only goals that have been recommended for this
  effort are those that I've noted below:
 
   1) Remove ambiguity wherever possible! There are a number of places
   where very similar names are used to refer to utterly different
   things.
 
   2) As an aide removing ambiguity, consider outlawing or eliminating
   extremely generic names, or else establish a single way in which a
   given name will be used across Lift. Examples are Field, Info,
 Holder,
   etc.
 
  In general, this is okay, but if there's a FooHolder that holds a Foo,
  what's wrong with that kind of naming?

 Holder is probably the least problematic of these. The only issue I
 have with it is that FooHolder doesn't say anything about why you
 might 

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Ross Mellgren
I like the source for the DSL very much, I think it's very well written. Thanks 
for sharing it.

-Ross

On Dec 17, 2009, at 9:34 PM, Naftoli Gugenheim wrote:

 Okay!
 The following code:
 val jsFunc: JSFunc = Function(myFunc)(param1, param2) {case param1 
 :: param2 :: Nil =
 Var(someArray) := Array(1, 2, 3, 4, 5)
 If(param1  30) {
   val x = Var(x)   // now we can use either x or 'x
   x := (234 - 3) / 2 // calculation happens in scala
   Var(y) := (2:Expr) * x * 2   // calculation happens in javascript
   'jsFunc(1, 2, do it, 'y)
   val $ = JSIdent($)
   $(#myID)  'attr(value, 123)
 } Else {
   'console  'log(=30)
 }
 ForEach(Var(i) In 'someArray) {
   'console  'log(Hi there   'i)
 }
 Function()(arg1, arg2) { case arg1 :: arg2 :: Nil =
   'alert(Anonymous function (  arg1  ,   arg2  ))
 }(1,2)
 }
 println(jsFunc.toCode)
 
 Produces:
 
 function myFunc(param1, param2) {
 var someArray
 someArray = [1.0, 2.0, 3.0, 4.0, 5.0]
 if((param1  30.0)) {
 var x
 x = 115.0
 var y
 y = ((2.0 * x) * 2.0)
 jsFunc(1.0, 2.0, do it, y)
 ($(#myID)).attr(value, 123)
 } else {
 (console).log(=30)
 }
 var i
 for(i in someArray) {
 (console).log((Hi there  + i))
 }
 function (arg1, arg2) {
 alert(Anonymous function ( + arg1) + , )  arg2) + )))
 }(1.0, 2.0)
 }
 
 It may be desirable that instead of defining your own names for Vars and 
 function parameters, names are auto-generated, since you can anyway use 
 typesafe scala identifiers. This would save boilerplate and produce more 
 obfuscated code, and other than the name generating algorithm is a trivial 
 change to make.
 Note that since I am not familiar with Lift's JavaScript APIs I just wrote my 
 own AST, which consists of case classes that contain their data parameters 
 and a toCode method. Feel free to delete them and plug Lift's classes 
 instead--there is no dependency on anything unique about them.
 Also note that to prevent string + ident from compiling as a string to be 
 outputted and instead output a + operation, you have two choices: use the  
 operator instead, which is replaced with + when either operand is a string, 
 or write (string:Expr) + ident.
 
 
 2009/12/17 Naftoli Gugenheim naftoli...@gmail.com
 Current state attached.
 
 
 2009/12/17 Marius marius.dan...@gmail.com
 
 Let me know when you have something.
 
 Br's,
 Marius
 
 On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
  I'm thinking of an approach to writing a DSL with a much cleaner syntax. 
  I'll try to put something together.
 
  -
 
  Marius Danciumarius.dan...@gmail.com wrote:
 
  All,
 
  I just want to see if there is any interest in the approach discussed here.
  As you know Lift has some interesting support for building JavaScript
  constructs from Scala code usig JsExp, JsCmd etc classes. I used quite a lot
  this support and it's great but if your JS code that you want to send down
  to the browser (say as an Ajax or Comet partial update response) gets a bit
  more complicated then constructing the JS fragment leads IMO to some
  cumbersome Scala code. I found myselft in quite a few situation to use JsRaw
  to write the JavaScript fragment in order for the code reader to understand
  what JavaScript code will be generated. But of course with JsRaw we put
  everything into a String so I'm not a big fan of this approach. So I started
  to define a JavaScript like DSL that IMO is closer to JavaScript form.
  Attached is a source code smaple of how this looks like, so for instance we
  can have something like:
 
  val js = JsFunc('myFunc, 'param1, 'param2) {
  JsIf('param1 __ 30) {
  Var('home) := Wrap(234 __- 3) __/ 2 `;`
  Var('someArray) := JsArray(1, 2, 3, 4, 5) `;`
  'myFunc(1, 2, do it, 'home) `;`
  $(#myID)  'attr(value, 123) `;`
} ~
JsForEach(Var('i) in 'someArray) {
  'console  'log(Hi there  __+ 'i) `;`
} ~
JsAnonFunc('arg1, 'arg2) {
 'alert(Anonymous function  __+ 'arg1 __+ 'arg2)
}(1, 2) `;`
  }
 
  println(js.toJs)
 
  this yields the following JavaScript code:
 
  function myFunc( param1, param2 ) {
  if (param1  30) {
  var home = ( 234 - 3 ) / 2;
  var someArray = [ 1, 2, 3, 4, 5 ];
  myFunc(1, 2, do it, home);
  $(#myID).attr(value, 123);}
 
  for (var i in someArray) {
  console.log(Hi there  + i);}
 
  function ( arg1, arg2 ) {
  alert(Anonymous function  + arg1 + arg2)
 
  }(1, 2);
  }
 
  ... ok I just droped nonsense code in there for exemplification. A few
  words:
 
  1. JsIf, JsForEach describe JavaScript if and for(each) statements
  2. Functions like __, __, ... __+, __- are function that alows definition
  of boolean and/or algebraic expressions.
  3. Wrap just wraps an expression into ()
  4. Var defined a variable
  5 := defines an 

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
You're welcome. There's still some work to do; I would call it a proof of
concept. But I'll let Marius finish it up. :)


On Thu, Dec 17, 2009 at 10:18 PM, Ross Mellgren dri...@gmail.com wrote:

 I like the source for the DSL very much, I think it's very well written.
 Thanks for sharing it.

 -Ross

 On Dec 17, 2009, at 9:34 PM, Naftoli Gugenheim wrote:

 Okay!
 The following code:

 val jsFunc: JSFunc = Function(myFunc)(param1, param2) {case
 param1 :: param2 :: Nil =

 Var(someArray) := Array(1, 2, 3, 4, 5)

 If(param1  30) {

   val x = Var(x)   // now we can use either x or 'x

   x := (234 - 3) / 2 // calculation happens in scala

   Var(y) := (2:Expr) * x * 2   // calculation happens in
 javascript

   'jsFunc(1, 2, do it, 'y)

   val $ = JSIdent($)

   $(#myID)  'attr(value, 123)

 } Else {

   'console  'log(=30)

 }

 ForEach(Var(i) In 'someArray) {

   'console  'log(Hi there   'i)

 }

 Function()(arg1, arg2) { case arg1 :: arg2 :: Nil =

   'alert(Anonymous function (  arg1  ,   arg2  ))

 }(1,2)

 }

 println(jsFunc.toCode)


 Produces:

 function myFunc(param1, param2) {

 var someArray

 someArray = [1.0, 2.0, 3.0, 4.0, 5.0]

 if((param1  30.0)) {

 var x

 x = 115.0

 var y

 y = ((2.0 * x) * 2.0)

 jsFunc(1.0, 2.0, do it, y)

 ($(#myID)).attr(value, 123)

 } else {

 (console).log(=30)

 }

 var i

 for(i in someArray) {

 (console).log((Hi there  + i))

 }

 function (arg1, arg2) {

 alert(Anonymous function ( + arg1) + , )  arg2) + )))

 }(1.0, 2.0)

 }


 It may be desirable that instead of defining your own names for Vars and
 function parameters, names are auto-generated, since you can anyway use
 typesafe scala identifiers. This would save boilerplate and produce more
 obfuscated code, and other than the name generating algorithm is a trivial
 change to make.
 Note that since I am not familiar with Lift's JavaScript APIs I just wrote
 my own AST, which consists of case classes that contain their data
 parameters and a toCode method. Feel free to delete them and plug Lift's
 classes instead--there is no dependency on anything unique about them.
 Also note that to prevent string + ident from compiling as a string to be
 outputted and instead output a + operation, you have two choices: use the 
 operator instead, which is replaced with + when either operand is a string,
 or write (string:Expr) + ident.


 2009/12/17 Naftoli Gugenheim naftoli...@gmail.com

 Current state attached.


 2009/12/17 Marius marius.dan...@gmail.com

 Let me know when you have something.

 Br's,
 Marius

 On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
  I'm thinking of an approach to writing a DSL with a much cleaner
 syntax. I'll try to put something together.
 
  -
 
  Marius Danciumarius.dan...@gmail.com wrote:
 
  All,
 
  I just want to see if there is any interest in the approach discussed
 here.
  As you know Lift has some interesting support for building JavaScript
  constructs from Scala code usig JsExp, JsCmd etc classes. I used quite
 a lot
  this support and it's great but if your JS code that you want to send
 down
  to the browser (say as an Ajax or Comet partial update response) gets a
 bit
  more complicated then constructing the JS fragment leads IMO to some
  cumbersome Scala code. I found myselft in quite a few situation to use
 JsRaw
  to write the JavaScript fragment in order for the code reader to
 understand
  what JavaScript code will be generated. But of course with JsRaw we put
  everything into a String so I'm not a big fan of this approach. So I
 started
  to define a JavaScript like DSL that IMO is closer to JavaScript
 form.
  Attached is a source code smaple of how this looks like, so for
 instance we
  can have something like:
 
  val js = JsFunc('myFunc, 'param1, 'param2) {
  JsIf('param1 __ 30) {
  Var('home) := Wrap(234 __- 3) __/ 2 `;`
  Var('someArray) := JsArray(1, 2, 3, 4, 5) `;`
  'myFunc(1, 2, do it, 'home) `;`
  $(#myID)  'attr(value, 123) `;`
} ~
JsForEach(Var('i) in 'someArray) {
  'console  'log(Hi there  __+ 'i) `;`
} ~
JsAnonFunc('arg1, 'arg2) {
 'alert(Anonymous function  __+ 'arg1 __+ 'arg2)
}(1, 2) `;`
  }
 
  println(js.toJs)
 
  this yields the following JavaScript code:
 
  function myFunc( param1, param2 ) {
  if (param1  30) {
  var home = ( 234 - 3 ) / 2;
  var someArray = [ 1, 2, 3, 4, 5 ];
  myFunc(1, 2, do it, home);
  $(#myID).attr(value, 123);}
 
  for (var i in someArray) {
  console.log(Hi there  + i);}
 
  function ( arg1, arg2 ) {
  alert(Anonymous function  + arg1 + arg2)
 
  }(1, 2);
  }
 
  ... ok I just droped nonsense code in there for exemplification. A few
  words:
 
  1. JsIf, JsForEach describe JavaScript if and 

Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread Derek Chen-Becker
I've been fixing quite a few mapper bugs lately, but nothing that should
have anything to do with connection handling...

On Thu, Dec 17, 2009 at 5:16 PM, Timothy Perrett timo...@getintheloop.euwrote:

 This is funny - I actually recently started getting a strange drop in
 connection on one of my applications. Others that use mapper are fine, but
 this one in particular seems to bone after a while.

 I changed the connection info to localhost as the sql server is on the
 same machine, and that appears to have corrected the problem... to that end,
 has any of the connection stuff changed in mapper of late? If so,
 potentially there is a problem.

 Cheers, Tim

 On 18 Dec 2009, at 00:05, David Pollak wrote:

 Please try doing a mvn clean and then retry your application.

 I have seen no problems with the dozen+ Lift apps I work with related to
 connections not working between M7 and M8.

 On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote:

 The same code works fine in 1.1M7. Anyone know what causes the
 problem. Or maybe a bug in 1.1M8?

 boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
 (com.mysql.jdbc.Driver,
  jdbc:mysql://
 localhost/mydb?autoReconnectForPools=true,
  root, ))


 the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
 failed to find either a JNDI data source with the name lift or a lift
 connection manager with the correct name/pre/ph3Caused by:/
 h3prejava.lang.NullPointerException: Looking for Connection
 Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
 data source with the name lift or a lift connection manager with the
 correct name
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
 (DB.scala:160)
at
 net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
 $1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
 )
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
 $31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
 1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
 (S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
 (S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40.apply(S.scala:1173)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at
 

Re: [Lift] DB connection fail after upgrade from 1.1M7 to 1.1M8

2009-12-17 Thread David Pollak
On Thu, Dec 17, 2009 at 8:28 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I've been fixing quite a few mapper bugs lately, but nothing that should
 have anything to do with connection handling...


I've been working on StandardDBVendor lately.




 On Thu, Dec 17, 2009 at 5:16 PM, Timothy Perrett 
 timo...@getintheloop.euwrote:

 This is funny - I actually recently started getting a strange drop in
 connection on one of my applications. Others that use mapper are fine, but
 this one in particular seems to bone after a while.

 I changed the connection info to localhost as the sql server is on the
 same machine, and that appears to have corrected the problem... to that end,
 has any of the connection stuff changed in mapper of late? If so,
 potentially there is a problem.

 Cheers, Tim

 On 18 Dec 2009, at 00:05, David Pollak wrote:

 Please try doing a mvn clean and then retry your application.

 I have seen no problems with the dozen+ Lift apps I work with related to
 connections not working between M7 and M8.

 On Thu, Dec 17, 2009 at 5:59 AM, Jarod Liu liuyuan...@gmail.com wrote:

 The same code works fine in 1.1M7. Anyone know what causes the
 problem. Or maybe a bug in 1.1M8?

 boot.scala:
  DB.defineConnectionManager(DefaultConnectionIdentifier,
 new StandardDBVendor
 (com.mysql.jdbc.Driver,
  jdbc:mysql://
 localhost/mydb?autoReconnectForPools=true,
  root, ))


 the error message:

Looking for Connection Identifier ConnectionIdentifier(lift) but
 failed to find either a JNDI data source with the name lift or a lift
 connection manager with the correct name/pre/ph3Caused by:/
 h3prejava.lang.NullPointerException: Looking for Connection
 Identifier ConnectionIdentifier(lift) but failed to find either a JNDI
 data source with the name lift or a lift connection manager with the
 correct name
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at
 net.liftweb.mapper.DB$$anonfun$2$$anonfun$apply$8.apply(DB.scala:
 97)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.mapper.DB$$anonfun$2.apply(DB.scala:96)
at net.liftweb.common.EmptyBox.openOr(Box.scala:372)
at net.liftweb.mapper.DB$.newConnection(DB.scala:90)
at net.liftweb.mapper.DB$.getConnection(DB.scala:186)
at net.liftweb.mapper.DB$.use(DB.scala:446)
at net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.recurseMe$1
 (DB.scala:160)
at
 net.liftweb.mapper.DB$$anon$1$$anonfun$apply$9.apply(DB.scala:162)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:91)
at net.liftweb.mapper.DB$$anon$1$DepthCnt$.run(DB.scala:143)
at net.liftweb.mapper.DB$$anon$1.apply(DB.scala:146)
at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.scala:912)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit
 $1.apply(S.scala:1112)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$.net$liftweb$http$S$$_nest2InnerInit(S.scala:
 )
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30$$anonfun$apply
 $31.apply(S.scala:1133)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29$$anonfun$apply$30.apply(S.scala:
 1132)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28$$anonfun$apply$29.apply(S.scala:1131)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$
 $anonfun$apply$28.apply(S.scala:1130)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply
 (S.scala:1129)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at
 net.liftweb.http.S$.net$liftweb$http$S$$_innerInit(S.scala:1128)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42.apply
 (S.scala:1175)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:67)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40$$anonfun$apply$41.apply(S.scala:1174)
at
 net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:325)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:248)
at net.liftweb.http.S$$anonfun$_init$1$$anonfun$apply$38$$anonfun
 $apply$39$$anonfun$apply$40.apply(S.scala:1173)

[Lift] Re: Problem in Lift 1.1-SNAPSHOT ?

2009-12-17 Thread ngocdaothanh
I am sorry. That compilation error comes from Lift's branch for Scala
2.8.


On 12月18日, 午前8:38, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Thu, Dec 17, 2009 at 2:08 PM, ngocdaothanh ngocdaoth...@gmail.comwrote:

  I checkout the source code from GitHub, do mvn clean compile and the
  output is:

  lift-modules/lift-jta/src/main/scala/net/liftweb/transaction/
  TransactionContext.scala:206: error: class TransactionContext needs to
  be abstract, since method getUnitName in trait ScalaEMFactory of type
  = String is not defined
  class TransactionContext(private implicit val transactionService:
  TransactionService)
       ^
  one error found

  The source code from GitHub is not always compilable.

 This is simply not true.  The code on the master branch always compiles.  I
 just did a checkout and compilation of the lift-jta module and it worked
 just fine.





  On Dec 18, 3:17 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   Did you do an mvn clean compile?

   On Thu, Dec 17, 2009 at 9:27 AM, earthling_paul paul.ber...@gmail.com
  wrote:

While compiling my samples with Lift 1.1-SNAPSHOT I get this Compiler-
Error:

[ERROR] D:\Projekte\TestProjects\hello-lift-11\src\main\scala\net
\liftweb\hello\snippet\TD.scala:76: error: object creation impossible,
since method doSync in trait AnyVarTrait of type [F](= F)F is not
defined
[INFO] object QueryNotDone extends SessionVar(false)

Any ideas ?
Regards Paul

--

You received this message because you are subscribed to the Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Surf the harmonics

  --

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

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-17 Thread Jonathan Ferguson
2009/12/15 David Pollak feeder.of.the.be...@gmail.com



 5) Avoid using abbreviations


 I disagree.  When coding with a non-IDE, abbreviations make life much
 easier.


When using abbreviations, could the abbreviation be documented even it if it
the most mind numbingly obvious abbreviation as there will always
be people from a different background who don't grok it.

Cheers

Jono

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.




Re: [Lift] Goals for type and method renaming for Lift 2.0 - was: Open discussion on Lift Name Calling practices

2009-12-17 Thread Naftoli Gugenheim
Is that sufficiently expressed in the wiki article draft (look for Jim)? If 
not, what would you add?

-
Jonathan Fergusonj...@spiralarm.com wrote:

2009/12/15 David Pollak feeder.of.the.be...@gmail.com



 5) Avoid using abbreviations


 I disagree.  When coding with a non-IDE, abbreviations make life much
 easier.


When using abbreviations, could the abbreviation be documented even it if it
the most mind numbingly obvious abbreviation as there will always
be people from a different background who don't grok it.

Cheers

Jono

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.


--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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: trying to get minimum needed for unit test to work using LIFT 1.1 and JPA

2009-12-17 Thread James Black
I am trying to test that my entities are working properly, but I get this at
the end of the surefire output for the test:
1634 [main] INFO org.hibernate.cfg.annotations.CollectionBinder - Mapping
collection: jblack.resumeapp.lift.model.Author.books - Book
1639 [main] INFO org.hibernate.cfg.AnnotationConfiguration - Hibernate
Validator not found: ignoring
1739 [main] INFO
org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to
find org.hibernate.search.event.FullTextIndexEventListener on the classpath.
Hibernate Search is not enabled.
[PersistenceUnit: jpaweb] Unable to build EntityManagerFactory

I only have defined my classes in jblack.resumeapp.lift.model and created my
unit test.

The EntityManagerFactory seems to process my models properly.

  I haven't done anything with the snippets, so there are no RequestVar
implementations for my new models.

  I had created the jpa sample so all I did was add my new classes there.

  Do I need to finish the steps in chapter 10 of the lift book to get my
unit tests to pass at all?

In an unchanged jpa sample I am missing the next lines, and I am not certain
what must be done to resolve this, as the driver information isn't being
processed at all.

I use 'mvn clean install' to run my tests from the top level of my project,
but if I do 'cd spa' then 'mvn install' I get the same results.
1805 [main] INFO
org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to
find org.hibernate.search.event.FullTextIndexEventListener on the classpath.
Hibernate Search is not enabled.
1977 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider -
Using Hibernate built-in connection pool (not for production use!)
1977 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider -
Hibernate connection pool size: 20


I am trying to get my test working so I can put back in my @OneToOne,
@OneToMany and related columns and @PostLoad and related annotations, as I
had another error when using these, so I have commented them out until I get
the test working so far.

Thank you.

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@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.