[Lift] Re: Back in the (Goat) Saddle

2010-02-14 Thread Randinn
Wow, congrats, I'm glad you jumped back in the saddle.

On Feb 14, 8:15 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Back in June, I started chatting about Goat
 Rodeohttp://blog.lostlake.org/index.php?/archives/94-Lift,-Goat-Rodeo-and-...:
 a highly scalable mechanism for building distributed applications.  My first
 set of concepts for Goat Rodeo were wrong, most notably trying to do
 distributed Software Transactional Memory.  I've spent the last bunch of
 months revising the concept and code for Goat Rodeo... and today, I'm
 excitied to announce the 0.1 alpha code for Goat
 Rodeohttp://liftweb.assembla.com/spaces/goat_rodeo/stream
 .

 For more 
 info:http://blog.lostlake.org/index.php?/archives/98-Back-in-the-Goat-Sadd...

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



[Lift] Re: Lucene (Full text indexing and searching) and Lift

2010-02-12 Thread Randinn
There was mention about Lucene and Lift in the Ebook and the Liftbook
group but I don't know how far they got into it.

On Feb 13, 10:14 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Fri, Feb 12, 2010 at 11:43 AM, donfranciscodequevedo 

 donfranciscodequev...@gmail.com wrote:
  Hi,

  I searched for this on the groups, but didn't find a clear statement.

  I'm new to Lift and just wanted to clear this out:  Is full text
  indexing and searching(e.g. Lucene)  already included in the Lift
  Framework or not?

 There's no Lift/Lucene module that I know of, although at one point ESME 
 (http://incubator.apache.org/esme/) had Lift/Lucene integration.





  Thx

  Gregor

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



[Lift] Json Lift

2010-01-27 Thread Randinn
Does anyone know of some sample code that shows Json extract with a
mapper model?

-- 
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: Json Lift

2010-01-27 Thread Randinn
Well, I have this snippit and model and need to figure out how to take
the extracted information and paste it into the model. I was just
looking for some example code to discern how to do it.

http://paste.pocoo.org/show/165511/

http://paste.pocoo.org/show/165532/

On Jan 28, 6:10 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Do you have a question about lift-json per se, or lift-mapper per se? Or do 
 you want to know whether there is some built in integration?

 -

 Randinnrand...@gmail.com wrote:

 Does anyone know of some sample code that shows Json extract with a
 mapper model?

 --
 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: Json Lift

2010-01-27 Thread Randinn
Yes, it seems so.

On Jan 28, 6:38 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 So it's a mapper question?

 -

 Randinnrand...@gmail.com wrote:

 Well, I have this snippit and model and need to figure out how to take
 the extracted information and paste it into the model. I was just
 looking for some example code to discern how to do it.

 http://paste.pocoo.org/show/165511/

 http://paste.pocoo.org/show/165532/

 On Jan 28, 6:10 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

  Do you have a question about lift-json per se, or lift-mapper per se? Or do 
  you want to know whether there is some built in integration?

  -

  Randinnrand...@gmail.com wrote:

  Does anyone know of some sample code that shows Json extract with a
  mapper model?

  --
  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: Json Lift

2010-01-27 Thread Randinn
I think so, the code on the paste site is the model and the snippit (I
have made some minor changes since I posted those), the trouble I'm
having is figuring out how to save it (to take it from the extracted
Json).

On Jan 28, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Okay, so can you clarify a bit more? Do you have a mapper class with fields 
 defined? Do you know how to instantiate it? To set the value of its fields? 
 To save it (back) to the database?

 -

 Randinnrand...@gmail.com wrote:

 Yes, it seems so.

 On Jan 28, 6:38 am, Naftoli Gugenheim naftoli...@gmail.com wrote:



  So it's a mapper question?

  -

  Randinnrand...@gmail.com wrote:

  Well, I have this snippit and model and need to figure out how to take
  the extracted information and paste it into the model. I was just
  looking for some example code to discern how to do it.

 http://paste.pocoo.org/show/165511/

 http://paste.pocoo.org/show/165532/

  On Jan 28, 6:10 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

   Do you have a question about lift-json per se, or lift-mapper per se? Or 
   do you want to know whether there is some built in integration?

   -

   Randinnrand...@gmail.com wrote:

   Does anyone know of some sample code that shows Json extract with a
   mapper model?

   --
   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: Json Lift

2010-01-27 Thread Randinn
No, I haven't, I'll research .asjs, thank you for the info.

On Jan 28, 9:13 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Have you looked at .asJs which will render your component as a JsExp?

 If you're looking for bi-directional stuff, please 
 seehttp://groups.google.com/group/liftweb/browse_thread/thread/80e8b2e87...



 On Wed, Jan 27, 2010 at 11:23 AM, Randinn rand...@gmail.com wrote:
  Well, I have this snippit and model and need to figure out how to take
  the extracted information and paste it into the model. I was just
  looking for some example code to discern how to do it.

 http://paste.pocoo.org/show/165511/

 http://paste.pocoo.org/show/165532/

  On Jan 28, 6:10 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
   Do you have a question about lift-json per se, or lift-mapper per se? Or
  do you want to know whether there is some built in integration?

   -

   Randinnrand...@gmail.com wrote:

   Does anyone know of some sample code that shows Json extract with a
   mapper model?

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

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



[Lift] Re: Json Lift

2010-01-27 Thread Randinn
Thank you Naftoli and David for taking your time to help me.

On Jan 28, 9:55 am, Randinn rand...@gmail.com wrote:
 No, I haven't, I'll research .asjs, thank you for the info.

 On Jan 28, 9:13 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:

  Have you looked at .asJs which will render your component as a JsExp?

  If you're looking for bi-directional stuff, please 
  seehttp://groups.google.com/group/liftweb/browse_thread/thread/80e8b2e87...

  On Wed, Jan 27, 2010 at 11:23 AM, Randinn rand...@gmail.com wrote:
   Well, I have this snippit and model and need to figure out how to take
   the extracted information and paste it into the model. I was just
   looking for some example code to discern how to do it.

  http://paste.pocoo.org/show/165511/

  http://paste.pocoo.org/show/165532/

   On Jan 28, 6:10 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
Do you have a question about lift-json per se, or lift-mapper per se? Or
   do you want to know whether there is some built in integration?

-

Randinnrand...@gmail.com wrote:

Does anyone know of some sample code that shows Json extract with a
mapper model?

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

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



[Lift] Re: web site critique

2010-01-22 Thread Randinn
I would say you got that response because of your perceived attitude
in your previous post.

my $.02..

On Jan 22, 11:34 am, Raoul Duke rao...@gmail.com wrote:
 hi,

 On Thu, Jan 21, 2010 at 4:32 PM, David Pollak

 feeder.of.the.be...@gmail.com wrote:
  On Thu, Jan 21, 2010 at 4:29 PM, Raoul Duke rao...@gmail.com wrote:
 http://liftweb.net/download.html
  needs to tell me what (tf :-) to do next if i /do/ have mvn installed
  already.
 http://liftweb.net/docs/getting_started.html

 i sincerely believe this response hilights the problem: you see what
 you know is already there, and fail to think like a total outsider
 coming to use the site. the link should be in the 'if you already have
 mvn installed' text in the body of the page as well as just at the top
 in the 'menu'.

 $0.02.

-- 
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: intro mvn critique

2010-01-22 Thread Randinn
That's what I usually use.

On Jan 23, 10:54 am, Jonathan Ferguson j...@spiralarm.com wrote:
 What about using mvn archetype:generate?

 It gives a wizard style interface to create new projects.

 Jono

 2010/1/23 Tim Nelson tnell...@gmail.com

  I've been meaning to do this for awhile:

 http://dl.dropbox.com/u/1154284/lift-mvn.html

  Feel free to add this to the main Lift site.

  Tim

  On Thu, Jan 21, 2010 at 6:35 PM, Raoul Duke rao...@gmail.com wrote:
   I wish, but no.  I've written my own shell script.

   ugh.

   could the html verison perhaps be improved to not have extra blank
   lines which prevent me from successfully copy and pasting it into my
   shell? :-)

  http://liftweb.net/docs/getting_started/mod_master.html#x1-40001.2

   sincerely.

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



-- 
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: intro mvn critique

2010-01-22 Thread Randinn
Nice work, easy to setup.

On Jan 23, 10:45 am, Tim Nelson tnell...@gmail.com wrote:
 I've been meaning to do this for awhile:

 http://dl.dropbox.com/u/1154284/lift-mvn.html

 Feel free to add this to the main Lift site.

 Tim

 On Thu, Jan 21, 2010 at 6:35 PM, Raoul Duke rao...@gmail.com wrote:
  I wish, but no.  I've written my own shell script.

  ugh.

  could the html verison perhaps be improved to not have extra blank
  lines which prevent me from successfully copy and pasting it into my
  shell? :-)

 http://liftweb.net/docs/getting_started/mod_master.html#x1-40001.2

  sincerely.

  --
  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: Parcing Json

2010-01-14 Thread Randinn
Well here is the latest iteration of the code:

http://paste.pocoo.org/show/165511/

but I'm getting this error

Compiling 11 source files to C:\Users\Randin\Documents\Development
\weather\target\classes at 1263504637934
[ERROR]weather/snippet/HelloWorld.scala:32: error: value save is not a
member of object HelloWorld.this.Observe
  Observation.save
  ^
[ERROR]one error found

I went to 2.0-M1 and did a clean install. I assume save might be the
answer, how close am I?

On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:
 Google Groups does not shine in formatting code snippets. Here's nicer
 version:

 http://paste.pocoo.org/show/161578/

 Cheers Joni

 On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

  Hi,

  That's almost correct. I did following changes after looking into JSON
  content.

  1. 'notice' and 'header' are JSON arrays just like 'data'. Therefore:
  case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

  2. There's optional data in JSON (some datapoints are nulls and Scala
  Int or Double can't take null values). This can be fixed by extracting
  into Option.

  3. The extracted Observation is in JSON field 'observations'.
  Therefore:
  (json \ observations).extract[Observation]

  Your error stack trace suggests that you have an old version of lift-
  json. Please upgrade to M8, there was a critical bug in case class
  extraction in older versions.

  Full example which works for me:

    implicit val formats = net.liftweb.json.DefaultFormats
    case class Notice(copyright: String, copyright_url: String,
  disclaimer_url: String)
    case class Header(refresh_message: String, ID: String, main_ID:
  String, name: String, state_time_zone: String, time_zone: String,
  product_name: String, state: String)
    case class Data(sort_order: Int, wmo: Int, history_product: String,
  local_date_time: String,
                    local_date_time_full: String, air_temp: Option
  [Double], dewpt: Option[Double], apparent_t: Option[Double],
                    rel_hum: Option[Int], delta_t: Option[Double],
  wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
  [Double],
                    wind_spd_kmh: Option[Double], press: Option[Double],
  rain_trace: String)

    case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

    (json \ observations).extract[Observation]

  Cheers Joni

  On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

   I'm having a bit of trouble with Lift Json parcing, I know I'm not
   doing it correctly but looking at the examples I cannot figure out
   what, anyway, here is the code in question. If someone could point
   me in the right direction that would be great, thanks in advance.

   class HelloWorld {
     def howdy = spanWelcome to hello-lift at {new
   _root_.java.util.Date}/span
   val http = new Http
   val bos = new ByteArrayOutputStream
   val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
   IDV60901.94868.json)
   val rawdata = http(myRequest  bos)
   val bs = bos.toString
   val db = :/(www.bom.gov.au)

   val json = parse(bs)

   implicit val formats = net.liftweb.json.DefaultFormats
     case class Notice(copyright: String, copyright_url: String,
   disclaimer_url: String)
     case class Header(refresh_message: String, ID: String, main_ID:
   String, name: String, state_time_zone: String,
                       time_zone: String, product_name: String, state:
   String)
     case class Data(sort_order: Int, wmo: Int, history_product: String,
   local_date_time: String,
                     local_date_time_full: Int, air_temp: Double, dewpt:
   Double, apparent_t: Double,
                     rel_hum: Double, delta_t: Double, wind_dir: Double,
   wind_spd_kt: Double, gust_kt: Double,
                     wind_spd_kmh: Double, press: Double, rain_trace:
   Double)
     case class Observation(notice: Notice, header: Header, data: List
   [Data])
   json.extract[Observation]


-- 
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: Parcing Json

2010-01-14 Thread Randinn
Thank you both for your explanations it seems assigning val
Observation to Observe is a bad idea, what should I do to get the
parced information to the Observation map?

On Jan 15, 8:42 am, Ross Mellgren dri...@gmail.com wrote:
 Isn't it that the val Observation is being assigned to the (compiler 
 synthesized) Observe singleton object? In either case, no save method.

 -Ross

 On Jan 14, 2010, at 4:41 PM, David Pollak wrote:



  On Thu, Jan 14, 2010 at 1:37 PM, Randinn rand...@gmail.com wrote:
  Well here is the latest iteration of the code:

 http://paste.pocoo.org/show/165511/

  but I'm getting this error

  Compiling 11 source files to C:\Users\Randin\Documents\Development
  \weather\target\classes at 1263504637934
  [ERROR]weather/snippet/HelloWorld.scala:32: error: value save is not a
  member of object HelloWorld.this.Observe
   Observation.save

  The Observation method is returning an instance of the Observe case class.  
  This class has no save method on it, thus the error.

               ^
  [ERROR]one error found

  I went to 2.0-M1 and did a clean install. I assume save might be the
  answer, how close am I?

  On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:
   Google Groups does not shine in formatting code snippets. Here's nicer
   version:

  http://paste.pocoo.org/show/161578/

   Cheers Joni

   On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

Hi,

That's almost correct. I did following changes after looking into JSON
content.

1. 'notice' and 'header' are JSON arrays just like 'data'. Therefore:
case class Observation(notice: List[Notice], header: List[Header],
data: List[Data])

2. There's optional data in JSON (some datapoints are nulls and Scala
Int or Double can't take null values). This can be fixed by extracting
into Option.

3. The extracted Observation is in JSON field 'observations'.
Therefore:
(json \ observations).extract[Observation]

Your error stack trace suggests that you have an old version of lift-
json. Please upgrade to M8, there was a critical bug in case class
extraction in older versions.

Full example which works for me:

  implicit val formats = net.liftweb.json.DefaultFormats
  case class Notice(copyright: String, copyright_url: String,
disclaimer_url: String)
  case class Header(refresh_message: String, ID: String, main_ID:
String, name: String, state_time_zone: String, time_zone: String,
product_name: String, state: String)
  case class Data(sort_order: Int, wmo: Int, history_product: String,
local_date_time: String,
                  local_date_time_full: String, air_temp: Option
[Double], dewpt: Option[Double], apparent_t: Option[Double],
                  rel_hum: Option[Int], delta_t: Option[Double],
wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
[Double],
                  wind_spd_kmh: Option[Double], press: Option[Double],
rain_trace: String)

  case class Observation(notice: List[Notice], header: List[Header],
data: List[Data])

  (json \ observations).extract[Observation]

Cheers Joni

On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

 I'm having a bit of trouble with Lift Json parcing, I know I'm not
 doing it correctly but looking at the examples I cannot figure out
 what, anyway, here is the code in question. If someone could point
 me in the right direction that would be great, thanks in advance.

 class HelloWorld {
   def howdy = spanWelcome to hello-lift at {new
 _root_.java.util.Date}/span
 val http = new Http
 val bos = new ByteArrayOutputStream
 val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
 IDV60901.94868.json)
 val rawdata = http(myRequest  bos)
 val bs = bos.toString
 val db = :/(www.bom.gov.au)

 val json = parse(bs)

 implicit val formats = net.liftweb.json.DefaultFormats
   case class Notice(copyright: String, copyright_url: String,
 disclaimer_url: String)
   case class Header(refresh_message: String, ID: String, main_ID:
 String, name: String, state_time_zone: String,
                     time_zone: String, product_name: String, state:
 String)
   case class Data(sort_order: Int, wmo: Int, history_product: String,
 local_date_time: String,
                   local_date_time_full: Int, air_temp: Double, dewpt:
 Double, apparent_t: Double,
                   rel_hum: Double, delta_t: Double, wind_dir: Double,
 wind_spd_kt: Double, gust_kt: Double,
                   wind_spd_kmh: Double, press: Double, rain_trace:
 Double)
   case class Observation(notice: Notice, header: Header, data: List
 [Data])
 json.extract[Observation]

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

[Lift] Re: Parcing Json

2010-01-14 Thread Randinn
http://paste.pocoo.org/show/165532/

On Jan 15, 9:29 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Jan 14, 2010 at 2:26 PM, Randinn rand...@gmail.com wrote:
  Thank you both for your explanations it seems assigning val
  Observation to Observe is a bad idea, what should I do to get the
  parced information to the Observation map?

 What does your Observation class look like?





  On Jan 15, 8:42 am, Ross Mellgren dri...@gmail.com wrote:
   Isn't it that the val Observation is being assigned to the (compiler
  synthesized) Observe singleton object? In either case, no save method.

   -Ross

   On Jan 14, 2010, at 4:41 PM, David Pollak wrote:

On Thu, Jan 14, 2010 at 1:37 PM, Randinn rand...@gmail.com wrote:
Well here is the latest iteration of the code:

   http://paste.pocoo.org/show/165511/

but I'm getting this error

Compiling 11 source files to C:\Users\Randin\Documents\Development
\weather\target\classes at 1263504637934
[ERROR]weather/snippet/HelloWorld.scala:32: error: value save is not a
member of object HelloWorld.this.Observe
 Observation.save

The Observation method is returning an instance of the Observe case
  class.  This class has no save method on it, thus the error.

             ^
[ERROR]one error found

I went to 2.0-M1 and did a clean install. I assume save might be the
answer, how close am I?

On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:
 Google Groups does not shine in formatting code snippets. Here's
  nicer
 version:

http://paste.pocoo.org/show/161578/

 Cheers Joni

 On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

  Hi,

  That's almost correct. I did following changes after looking into
  JSON
  content.

  1. 'notice' and 'header' are JSON arrays just like 'data'.
  Therefore:
  case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

  2. There's optional data in JSON (some datapoints are nulls and
  Scala
  Int or Double can't take null values). This can be fixed by
  extracting
  into Option.

  3. The extracted Observation is in JSON field 'observations'.
  Therefore:
  (json \ observations).extract[Observation]

  Your error stack trace suggests that you have an old version of
  lift-
  json. Please upgrade to M8, there was a critical bug in case class
  extraction in older versions.

  Full example which works for me:

    implicit val formats = net.liftweb.json.DefaultFormats
    case class Notice(copyright: String, copyright_url: String,
  disclaimer_url: String)
    case class Header(refresh_message: String, ID: String, main_ID:
  String, name: String, state_time_zone: String, time_zone: String,
  product_name: String, state: String)
    case class Data(sort_order: Int, wmo: Int, history_product:
  String,
  local_date_time: String,
                    local_date_time_full: String, air_temp: Option
  [Double], dewpt: Option[Double], apparent_t: Option[Double],
                    rel_hum: Option[Int], delta_t: Option[Double],
  wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
  [Double],
                    wind_spd_kmh: Option[Double], press:
  Option[Double],
  rain_trace: String)

    case class Observation(notice: List[Notice], header:
  List[Header],
  data: List[Data])

    (json \ observations).extract[Observation]

  Cheers Joni

  On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

   I'm having a bit of trouble with Lift Json parcing, I know I'm
  not
   doing it correctly but looking at the examples I cannot figure
  out
   what, anyway, here is the code in question. If someone could
  point
   me in the right direction that would be great, thanks in advance.

   class HelloWorld {
     def howdy = spanWelcome to hello-lift at {new
   _root_.java.util.Date}/span
   val http = new Http
   val bos = new ByteArrayOutputStream
   val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
   IDV60901.94868.json)
   val rawdata = http(myRequest  bos)
   val bs = bos.toString
   val db = :/(www.bom.gov.au)

   val json = parse(bs)

   implicit val formats = net.liftweb.json.DefaultFormats
     case class Notice(copyright: String, copyright_url: String,
   disclaimer_url: String)
     case class Header(refresh_message: String, ID: String, main_ID:
   String, name: String, state_time_zone: String,
                       time_zone: String, product_name: String,
  state:
   String)
     case class Data(sort_order: Int, wmo: Int, history_product:
  String,
   local_date_time: String,
                     local_date_time_full: Int, air_temp: Double,
  dewpt:
   Double, apparent_t: Double,
                     rel_hum: Double, delta_t: Double

[Lift] Re: Parcing Json

2010-01-14 Thread Randinn
Ah, I didn't know I was missing that. Right, I'll go back to chapter 6
in the book and see how to accomplish that, thank you for the info.

On Jan 15, 9:43 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Jan 14, 2010 at 2:37 PM, Randinn rand...@gmail.com wrote:
 http://paste.pocoo.org/show/165532/

 You have to write code that will copy each of the fields from the case class
 to the mapper object.





  On Jan 15, 9:29 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Thu, Jan 14, 2010 at 2:26 PM, Randinn rand...@gmail.com wrote:
Thank you both for your explanations it seems assigning val
Observation to Observe is a bad idea, what should I do to get the
parced information to the Observation map?

   What does your Observation class look like?

On Jan 15, 8:42 am, Ross Mellgren dri...@gmail.com wrote:
 Isn't it that the val Observation is being assigned to the (compiler
synthesized) Observe singleton object? In either case, no save method.

 -Ross

 On Jan 14, 2010, at 4:41 PM, David Pollak wrote:

  On Thu, Jan 14, 2010 at 1:37 PM, Randinn rand...@gmail.com
  wrote:
  Well here is the latest iteration of the code:

 http://paste.pocoo.org/show/165511/

  but I'm getting this error

  Compiling 11 source files to C:\Users\Randin\Documents\Development
  \weather\target\classes at 1263504637934
  [ERROR]weather/snippet/HelloWorld.scala:32: error: value save is
  not a
  member of object HelloWorld.this.Observe
   Observation.save

  The Observation method is returning an instance of the Observe case
class.  This class has no save method on it, thus the error.

               ^
  [ERROR]one error found

  I went to 2.0-M1 and did a clean install. I assume save might be
  the
  answer, how close am I?

  On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:
   Google Groups does not shine in formatting code snippets. Here's
nicer
   version:

  http://paste.pocoo.org/show/161578/

   Cheers Joni

   On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

Hi,

That's almost correct. I did following changes after looking
  into
JSON
content.

1. 'notice' and 'header' are JSON arrays just like 'data'.
Therefore:
case class Observation(notice: List[Notice], header:
  List[Header],
data: List[Data])

2. There's optional data in JSON (some datapoints are nulls and
Scala
Int or Double can't take null values). This can be fixed by
extracting
into Option.

3. The extracted Observation is in JSON field 'observations'.
Therefore:
(json \ observations).extract[Observation]

Your error stack trace suggests that you have an old version of
lift-
json. Please upgrade to M8, there was a critical bug in case
  class
extraction in older versions.

Full example which works for me:

  implicit val formats = net.liftweb.json.DefaultFormats
  case class Notice(copyright: String, copyright_url: String,
disclaimer_url: String)
  case class Header(refresh_message: String, ID: String,
  main_ID:
String, name: String, state_time_zone: String, time_zone:
  String,
product_name: String, state: String)
  case class Data(sort_order: Int, wmo: Int, history_product:
String,
local_date_time: String,
                  local_date_time_full: String, air_temp:
  Option
[Double], dewpt: Option[Double], apparent_t: Option[Double],
                  rel_hum: Option[Int], delta_t:
  Option[Double],
wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
[Double],
                  wind_spd_kmh: Option[Double], press:
Option[Double],
rain_trace: String)

  case class Observation(notice: List[Notice], header:
List[Header],
data: List[Data])

  (json \ observations).extract[Observation]

Cheers Joni

On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

 I'm having a bit of trouble with Lift Json parcing, I know
  I'm
not
 doing it correctly but looking at the examples I cannot
  figure
out
 what, anyway, here is the code in question. If someone
  could
point
 me in the right direction that would be great, thanks in
  advance.

 class HelloWorld {
   def howdy = spanWelcome to hello-lift at {new
 _root_.java.util.Date}/span
 val http = new Http
 val bos = new ByteArrayOutputStream
 val myRequest = new Request(
 http://www.bom.gov.au/fwo/IDV60901/
 IDV60901.94868.json)
 val rawdata = http(myRequest  bos)
 val bs = bos.toString
 val db = :/(www.bom.gov.au)

 val json = parse(bs)

 implicit val formats = net.liftweb.json.DefaultFormats

[Lift] Re: Parcing Json

2010-01-13 Thread Randinn
I assume I use the save method but am stumbling on implementing it...

On Jan 11, 5:49 pm, Joni Freeman freeman.j...@gmail.com wrote:
 Hi,

 I'm sorry but I'm not totally sure what you are trying to accomplish.
 What would be the key in that map and what would be its values?

 Cheers Joni

 On 11 tammi, 03:14, Randinn rand...@gmail.com wrote:

  I should explain what we are planning, the idea is to get the json
  file into a string, parse it and save the caught information into a
  Observation map.

  On Jan 11, 11:23 am, Randinn rand...@gmail.com wrote:

   Forgive my ignorance but I was wondering why (json \
   observations).extract[Observation], is it to save as a flat file?

   On Jan 4, 7:13 am, Randinn rand...@gmail.com wrote:

I tried some of the changes you made but not all of them, and (json\
observations).extract[Observation], I had no idea about that one.
Thank you very much for your help, it is appreciated.

On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:

 Google Groups does not shine in formatting code snippets. Here's nicer
 version:

http://paste.pocoo.org/show/161578/

 Cheers Joni

 On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

  Hi,

  That's almost correct. I did following changes after looking 
  intoJSON
  content.

  1. 'notice' and 'header' areJSONarrays just like 'data'. Therefore:
  case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

  2. There's optional data inJSON(some datapoints are nulls and Scala
  Int or Double can't take null values). This can be fixed by 
  extracting
  into Option.

  3. The extracted Observation is inJSONfield 'observations'.
  Therefore:
  (json\ observations).extract[Observation]

  Your error stack trace suggests that you have an old version of 
  lift-
 json. Please upgrade to M8, there was a critical bug in case class
  extraction in older versions.

  Full example which works for me:

    implicit val formats = net.liftweb.json.DefaultFormats
    case class Notice(copyright: String, copyright_url: String,
  disclaimer_url: String)
    case class Header(refresh_message: String, ID: String, main_ID:
  String, name: String, state_time_zone: String, time_zone: String,
  product_name: String, state: String)
    case class Data(sort_order: Int, wmo: Int, history_product: 
  String,
  local_date_time: String,
                    local_date_time_full: String, air_temp: Option
  [Double], dewpt: Option[Double], apparent_t: Option[Double],
                    rel_hum: Option[Int], delta_t: Option[Double],
  wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
  [Double],
                    wind_spd_kmh: Option[Double], press: 
  Option[Double],
  rain_trace: String)

    case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

    (json\ observations).extract[Observation]

  Cheers Joni

  On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

   I'm having a bit of trouble with LiftJsonparcing, I know I'm not
   doing it correctly but looking at the examples I cannot figure out
   what, anyway, here is the code in question. If someone could 
   point
   me in the right direction that would be great, thanks in advance.

   class HelloWorld {
     def howdy = spanWelcome to hello-lift at {new
   _root_.java.util.Date}/span
   val http = new Http
   val bos = new ByteArrayOutputStream
   val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
   IDV60901.94868.json)
   val rawdata = http(myRequest  bos)
   val bs = bos.toString
   val db = :/(www.bom.gov.au)

   valjson= parse(bs)

   implicit val formats = net.liftweb.json.DefaultFormats
     case class Notice(copyright: String, copyright_url: String,
   disclaimer_url: String)
     case class Header(refresh_message: String, ID: String, main_ID:
   String, name: String, state_time_zone: String,
                       time_zone: String, product_name: String, 
   state:
   String)
     case class Data(sort_order: Int, wmo: Int, history_product: 
   String,
   local_date_time: String,
                     local_date_time_full: Int, air_temp: Double, 
   dewpt:
   Double, apparent_t: Double,
                     rel_hum: Double, delta_t: Double, wind_dir: 
   Double,
   wind_spd_kt: Double, gust_kt: Double,
                     wind_spd_kmh: Double, press: Double, rain_trace:
   Double)
     case class Observation(notice: Notice, header: Header, data: 
   List
   [Data])
  json.extract[Observation]


-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift

[Lift] Re: Parcing Json

2010-01-10 Thread Randinn
Forgive my ignorance but I was wondering why (json \
observations).extract[Observation], is it to save as a flat file?

On Jan 4, 7:13 am, Randinn rand...@gmail.com wrote:
 I tried some of the changes you made but not all of them, and (json\
 observations).extract[Observation], I had no idea about that one.
 Thank you very much for your help, it is appreciated.

 On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:

  Google Groups does not shine in formatting code snippets. Here's nicer
  version:

 http://paste.pocoo.org/show/161578/

  Cheers Joni

  On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

   Hi,

   That's almost correct. I did following changes after looking intoJSON
   content.

   1. 'notice' and 'header' areJSONarrays just like 'data'. Therefore:
   case class Observation(notice: List[Notice], header: List[Header],
   data: List[Data])

   2. There's optional data inJSON(some datapoints are nulls and Scala
   Int or Double can't take null values). This can be fixed by extracting
   into Option.

   3. The extracted Observation is inJSONfield 'observations'.
   Therefore:
   (json\ observations).extract[Observation]

   Your error stack trace suggests that you have an old version of lift-
  json. Please upgrade to M8, there was a critical bug in case class
   extraction in older versions.

   Full example which works for me:

     implicit val formats = net.liftweb.json.DefaultFormats
     case class Notice(copyright: String, copyright_url: String,
   disclaimer_url: String)
     case class Header(refresh_message: String, ID: String, main_ID:
   String, name: String, state_time_zone: String, time_zone: String,
   product_name: String, state: String)
     case class Data(sort_order: Int, wmo: Int, history_product: String,
   local_date_time: String,
                     local_date_time_full: String, air_temp: Option
   [Double], dewpt: Option[Double], apparent_t: Option[Double],
                     rel_hum: Option[Int], delta_t: Option[Double],
   wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
   [Double],
                     wind_spd_kmh: Option[Double], press: Option[Double],
   rain_trace: String)

     case class Observation(notice: List[Notice], header: List[Header],
   data: List[Data])

     (json\ observations).extract[Observation]

   Cheers Joni

   On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

I'm having a bit of trouble with LiftJsonparcing, I know I'm not
doing it correctly but looking at the examples I cannot figure out
what, anyway, here is the code in question. If someone could point
me in the right direction that would be great, thanks in advance.

class HelloWorld {
  def howdy = spanWelcome to hello-lift at {new
_root_.java.util.Date}/span
val http = new Http
val bos = new ByteArrayOutputStream
val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
IDV60901.94868.json)
val rawdata = http(myRequest  bos)
val bs = bos.toString
val db = :/(www.bom.gov.au)

valjson= parse(bs)

implicit val formats = net.liftweb.json.DefaultFormats
  case class Notice(copyright: String, copyright_url: String,
disclaimer_url: String)
  case class Header(refresh_message: String, ID: String, main_ID:
String, name: String, state_time_zone: String,
                    time_zone: String, product_name: String, state:
String)
  case class Data(sort_order: Int, wmo: Int, history_product: String,
local_date_time: String,
                  local_date_time_full: Int, air_temp: Double, dewpt:
Double, apparent_t: Double,
                  rel_hum: Double, delta_t: Double, wind_dir: Double,
wind_spd_kt: Double, gust_kt: Double,
                  wind_spd_kmh: Double, press: Double, rain_trace:
Double)
  case class Observation(notice: Notice, header: Header, data: List
[Data])
   json.extract[Observation]


-- 
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: Parcing Json

2010-01-10 Thread Randinn
I should explain what we are planning, the idea is to get the json
file into a string, parse it and save the caught information into a
Observation map.

On Jan 11, 11:23 am, Randinn rand...@gmail.com wrote:
 Forgive my ignorance but I was wondering why (json \
 observations).extract[Observation], is it to save as a flat file?

 On Jan 4, 7:13 am, Randinn rand...@gmail.com wrote:

  I tried some of the changes you made but not all of them, and (json\
  observations).extract[Observation], I had no idea about that one.
  Thank you very much for your help, it is appreciated.

  On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:

   Google Groups does not shine in formatting code snippets. Here's nicer
   version:

  http://paste.pocoo.org/show/161578/

   Cheers Joni

   On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

Hi,

That's almost correct. I did following changes after looking intoJSON
content.

1. 'notice' and 'header' areJSONarrays just like 'data'. Therefore:
case class Observation(notice: List[Notice], header: List[Header],
data: List[Data])

2. There's optional data inJSON(some datapoints are nulls and Scala
Int or Double can't take null values). This can be fixed by extracting
into Option.

3. The extracted Observation is inJSONfield 'observations'.
Therefore:
(json\ observations).extract[Observation]

Your error stack trace suggests that you have an old version of lift-
   json. Please upgrade to M8, there was a critical bug in case class
extraction in older versions.

Full example which works for me:

  implicit val formats = net.liftweb.json.DefaultFormats
  case class Notice(copyright: String, copyright_url: String,
disclaimer_url: String)
  case class Header(refresh_message: String, ID: String, main_ID:
String, name: String, state_time_zone: String, time_zone: String,
product_name: String, state: String)
  case class Data(sort_order: Int, wmo: Int, history_product: String,
local_date_time: String,
                  local_date_time_full: String, air_temp: Option
[Double], dewpt: Option[Double], apparent_t: Option[Double],
                  rel_hum: Option[Int], delta_t: Option[Double],
wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
[Double],
                  wind_spd_kmh: Option[Double], press: Option[Double],
rain_trace: String)

  case class Observation(notice: List[Notice], header: List[Header],
data: List[Data])

  (json\ observations).extract[Observation]

Cheers Joni

On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

 I'm having a bit of trouble with LiftJsonparcing, I know I'm not
 doing it correctly but looking at the examples I cannot figure out
 what, anyway, here is the code in question. If someone could point
 me in the right direction that would be great, thanks in advance.

 class HelloWorld {
   def howdy = spanWelcome to hello-lift at {new
 _root_.java.util.Date}/span
 val http = new Http
 val bos = new ByteArrayOutputStream
 val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
 IDV60901.94868.json)
 val rawdata = http(myRequest  bos)
 val bs = bos.toString
 val db = :/(www.bom.gov.au)

 valjson= parse(bs)

 implicit val formats = net.liftweb.json.DefaultFormats
   case class Notice(copyright: String, copyright_url: String,
 disclaimer_url: String)
   case class Header(refresh_message: String, ID: String, main_ID:
 String, name: String, state_time_zone: String,
                     time_zone: String, product_name: String, state:
 String)
   case class Data(sort_order: Int, wmo: Int, history_product: String,
 local_date_time: String,
                   local_date_time_full: Int, air_temp: Double, dewpt:
 Double, apparent_t: Double,
                   rel_hum: Double, delta_t: Double, wind_dir: Double,
 wind_spd_kt: Double, gust_kt: Double,
                   wind_spd_kmh: Double, press: Double, rain_trace:
 Double)
   case class Observation(notice: Notice, header: Header, data: List
 [Data])
json.extract[Observation]


-- 
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: Templating in lift

2010-01-04 Thread Randinn
Very nice! can I suggest you put an excerpt or a link it in here

http://wiki.github.com/dpp/liftweb

On Jan 4, 11:10 am, Mads Hartmann mads...@gmail.com wrote:
 Hello everyone,
 I just wrote a small blog post that contains an example of how you use
 templates in Lift when you need to iterate over a collection of data.
 This took me a bit of researching and coding to figure out so I'm
 leaving a link to it here encase anyone new to lift is having the same
 problem :)

 http://sidewayscoding.tumblr.com/post/315327937/view-first-templating...

 Also I would appreciate if someone would tell me if this is not the
 idiomatic way to do, I'm new to Scala and Lift so I don't know any
 better, thanks.

 Mads Hartmann Jensen

--

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: source of working demo of Lift+JPA on google app engine

2010-01-04 Thread Randinn
Last time I looked just JDO yes, I didn't think it was worth it as you
cannot use most of what makes Lift special (Comet, mapper), but if
you're looking for an example check out...

http://mawson.wordpress.com/2009/04/10/first-steps-with-scala-on-google-app-engine/
(a bit dated)
http://code.google.com/p/scala-lift-gae-js-example/
http://github.com/ymnk/lift-gae-jdo

Maybe look at GWT 2.0 ...

On Jan 4, 6:12 pm, qingshan qingshan@gmail.com wrote:
 Looks like no one knows the answer or don't want to answer my first
 post in Lift group.

 and the only thing I can do is to try JDO? (thanks a lot to ymnk)

 Thanks anyway,

 Qingshan

 On Dec 26 2009, 8:51 pm, qingshan qingshan@gmail.com wrote:

  Hi,

  I am a new Lifter just came from Grails world (with 6 months
  experiences with Grails +GAEplaying a couple of toy apps). Because
  Grails (even the latest release of v1.2) does not really supportGAE,
  or precisely only semi support, as said at google site, I look for a
  new framework has betterGAEsupport and came to Lift after read some
  stuff by David and James Strachan (creator of Groovy language).

  I bought the lift book from Apress and try to make theJPAdemo work
  on GAE but with no luck. I could not find any source of a working demo
  on Lift+JPA on GAE (I do find a working demo of Lift+JDO onGAEby
  ymnk: github.com/ymnk/lift-gae-jdo, by the way).

  Could someone point me to the source of a working demo of Lift +JPA
  onGAE?

  thanks a lot,

  Qingshan



--

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: Parcing Json

2010-01-03 Thread Randinn
I tried some of the changes you made but not all of them, and (json \
observations).extract[Observation], I had no idea about that one.
Thank you very much for your help, it is appreciated.

On Jan 4, 1:00 am, Joni Freeman freeman.j...@gmail.com wrote:
 Google Groups does not shine in formatting code snippets. Here's nicer
 version:

 http://paste.pocoo.org/show/161578/

 Cheers Joni

 On 3 tammi, 12:20, Joni Freeman freeman.j...@gmail.com wrote:

  Hi,

  That's almost correct. I did following changes after looking into JSON
  content.

  1. 'notice' and 'header' are JSON arrays just like 'data'. Therefore:
  case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

  2. There's optional data in JSON (some datapoints are nulls and Scala
  Int or Double can't take null values). This can be fixed by extracting
  into Option.

  3. The extracted Observation is in JSON field 'observations'.
  Therefore:
  (json \ observations).extract[Observation]

  Your error stack trace suggests that you have an old version of lift-
  json. Please upgrade to M8, there was a critical bug in case class
  extraction in older versions.

  Full example which works for me:

    implicit val formats = net.liftweb.json.DefaultFormats
    case class Notice(copyright: String, copyright_url: String,
  disclaimer_url: String)
    case class Header(refresh_message: String, ID: String, main_ID:
  String, name: String, state_time_zone: String, time_zone: String,
  product_name: String, state: String)
    case class Data(sort_order: Int, wmo: Int, history_product: String,
  local_date_time: String,
                    local_date_time_full: String, air_temp: Option
  [Double], dewpt: Option[Double], apparent_t: Option[Double],
                    rel_hum: Option[Int], delta_t: Option[Double],
  wind_dir: String, wind_spd_kt: Option[Double], gust_kt: Option
  [Double],
                    wind_spd_kmh: Option[Double], press: Option[Double],
  rain_trace: String)

    case class Observation(notice: List[Notice], header: List[Header],
  data: List[Data])

    (json \ observations).extract[Observation]

  Cheers Joni

  On 3 tammi, 09:17, Randinn rand...@gmail.com wrote:

   I'm having a bit of trouble with Lift Json parcing, I know I'm not
   doing it correctly but looking at the examples I cannot figure out
   what, anyway, here is the code in question. If someone could point
   me in the right direction that would be great, thanks in advance.

   class HelloWorld {
     def howdy = spanWelcome to hello-lift at {new
   _root_.java.util.Date}/span
   val http = new Http
   val bos = new ByteArrayOutputStream
   val myRequest = new Request(http://www.bom.gov.au/fwo/IDV60901/
   IDV60901.94868.json)
   val rawdata = http(myRequest  bos)
   val bs = bos.toString
   val db = :/(www.bom.gov.au)

   val json = parse(bs)

   implicit val formats = net.liftweb.json.DefaultFormats
     case class Notice(copyright: String, copyright_url: String,
   disclaimer_url: String)
     case class Header(refresh_message: String, ID: String, main_ID:
   String, name: String, state_time_zone: String,
                       time_zone: String, product_name: String, state:
   String)
     case class Data(sort_order: Int, wmo: Int, history_product: String,
   local_date_time: String,
                     local_date_time_full: Int, air_temp: Double, dewpt:
   Double, apparent_t: Double,
                     rel_hum: Double, delta_t: Double, wind_dir: Double,
   wind_spd_kt: Double, gust_kt: Double,
                     wind_spd_kmh: Double, press: Double, rain_trace:
   Double)
     case class Observation(notice: Notice, header: Header, data: List
   [Data])
   json.extract[Observation]



--

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 with LiftFilter in 2.8.0

2009-12-22 Thread Randinn
This is not the first time this has cropped up, you may have to sticky
warning not to use 2.8 with Lift for the moment.

On Dec 23, 2:55 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Lift *DOES NOT* work on Scala 2.8 Beta1 RC4  5.  Do not even try it.  We
 are currently working with EPFL to resolve these issues.

 Lift 1.1-M8 and Lift 1.1-SNAPSHOT only work with Scala 2.7.7.  That is the
 *only* version of Scala that Lift 1.1-M8 and SNAPSHOT work with.  If you
 have any other version of Scala specified in your pom.xml file, it will not
 work.

 Do not try to mix different versions of Lift in the same web app.  The class
 loader will not know which versions of the Lift library go with different
 Servlets.

 Once you get your pom.xml file set up with Scala 2.7.7, then you must do a
 mvn -U clean install before doing an mvn jetty:run



 On Tue, Dec 22, 2009 at 7:39 PM, Alan M alan.morten...@gmail.com wrote:
  Update:

  I updated the other servlet to scala 2.8 and lift 1.1 snapshot (much
  easier than I thought, I must be getting used to it) and I checked the
  libs for both webapps and the commons lib directory.. no conflicting
  versions of scala or lift jars.. I'm on Tomcat 6 btw..  Not sure where
  to look next..

  Alan

  On Dec 22, 7:13 pm, Ross Mellgren dri...@gmail.com wrote:
   Where do you have the scala library jars? If you haven't taken pains to
  ensure that you have two entirely separate scala JARs (2.7.3 and 2.8) in two
  separate classloaders I could believe that you'll get all kinds of problems
  like this. You might be better served using two separate tomcat instances
  and some kind of reverse proxy like nginx to ensure they remain entirely
  separated.

   -Ross

   On Dec 22, 2009, at 10:07 PM, Alan M wrote:

I get this message when it tries to initialize the LiftFilter..

Dec 22, 2009 6:53:40 PM org.apache.catalina.core.StandardContext
filterStart
SEVERE: Exception starting filter LiftFilter
java.lang.NoSuchMethodError: scala.collection.SeqLike.projection()
Ljava/lang/Object;
       at net.liftweb.util.ListHelpers$class.first(ListHelpers.scala:
53)
       at net.liftweb.util.Helpers$.first(Helpers.scala:32)
       at net.liftweb.util.LogBoot$.findTheFile$1(Log.scala:117)
       at net.liftweb.util.LogBoot$._log4JSetup(Log.scala:119)
       at net.liftweb.util.LogBoot$$anonfun$1.apply(Log.scala:97)
       at net.liftweb.util.LogBoot$$anonfun$1.apply(Log.scala:97)
       at net.liftweb.util.LogBoot$.checkConfig(Log.scala:95)
       at net.liftweb.util.LogBoot$.net$liftweb$util$LogBoot$$_logger
(Log.scala:141)
       at net.liftweb.util.LogBoot$$anonfun$2.apply(Log.scala:143)
       at net.liftweb.util.LogBoot$$anonfun$2.apply(Log.scala:143)
       at net.liftweb.util.Log$.rootLogger(Log.scala:27)
       at net.liftweb.util.Log$.error(Log.scala:43)
       at net.liftweb.http.provider.HTTPProvider$class.bootLift
(HTTPProvider.scala:80)
       at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:524)
       at net.liftweb.http.provider.servlet.ServletFilterProvider
$class.init(ServletFilterProvider.scala:23)
       at net.liftweb.http.LiftFilter.init(LiftServlet.scala:524)

Are multiple versions of Scala or Lift getting messed up here?  I have
two different Lift based servlets on this tomcat, one with Scala 2.7.3
and an older lift version and one with Scala 2.8 and the newest lift
version..

I guess I'm just trying to avoid updating that other servlet because
it's really not in my schedule right now..  Then again that might not
be the problem at all..

Alan

--

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.

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




[Lift] Re: Documentation Site

2009-12-21 Thread Randinn
Well for the current information the places to go are
http://scala-tools.org/mvnsites-snapshots/liftweb/index.html and
http://wiki.github.com/dpp/liftweb if that will help you.

On Dec 21, 7:47 pm, johncch john...@gmail.com wrote:
 Well, this is an apt discussion at this point in time I feel. One of
 the weakness of the Lift Project is really the sparse documentation,
 as well as the rapid cycle of development obsoleting virtually many of
 the slightly older code out there.

 I don't mind contributing my time improving the documentation. Perhaps
 one of the reasons why people don't contribute back is that the wiki
 is not very prominent, for one reason or another. It's just rarely
 referenced anywhere else most of the time. Would appreciate a more
 concentrated effort on this.

 I haven't actually seen the lift 1.1 scala docs. For 
 example,http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-base/lift-...
 points to a blank page - that's for Lift common. I mostly rely on the
 IDE(idea) to open up declarations via maven.. not exactly the best
 method since the source code is more often than not not commented.

 The lift framework is pretty massive, I think that's the reason why
 it's difficult to write comprehensive documentation for it. I'm just
 wondering what is a good way to go about doing that? A list of how-tos
 plus in depth discussion about each part of the framework i.e. base,
 or common, or? Perhaps there can be one page for every logical object
 in Lift.

 regards,
 CH

 On Dec 21, 6:12 am, Timothy Perrett timo...@getintheloop.eu wrote:

  I really don't think thats the issue - Lift is not closed to 
  committing... if that were the case, David would never have recruited us 
  onto the team ;-)

  95% of all OSS projects i've ever come across have the same policy when it 
  comes to wikis etc... they are organic, community driven beasts. For 
  instance, I was no aware that you had written any articles... but that is 
  great. You say you want them fleshed out? In what way / what information do 
  you need.

  Writing documentation is actually a great way to understand something 
  because it means you have to fully grok it in order to teach others - we 
  need to solve the documentation issue for sure, and any contribution you or 
  others have is very much welcome.

  Cheers, Tim

  On 20 Dec 2009, at 21:43, Randinn wrote:

   To give the benefit of doubt to people who use Lift knowing that is
   closed to commiting they may think the same about the documentation. I
   have added a bit but I've more thrown up a few pages and figured
   someone with more knowledge would flesh them out.

   On Dec 20, 8:47 pm, Timothy Perrett timo...@getintheloop.eu wrote:
   1.0 is the last official release that was not a milestone or snapshot
   - thus, they are the primary api docs right now until we release 2.0
   (that is, what was being called 1.1 is being renamed to 2.0). API docs
   are a process issue, and handled as part of our build process - they
   will always live both on scala-tools and liftweb.net where applicable.
   They wont ever sit anywhere else (officially).

   Yes, the wiki is a little out dated. I forget the number of times i've
   tried to spear head a wiki effort... the bottom line is that other
   people need to start writing content - there are a fair number of
   competent lift users in the community who simply are not giving
   anything back by way of articles or wiki cleaning - thus our docs get
   out dated fast because the team prefer to write code than
   documentation. We even tried to appointed a wiki gardener but he
   appears to have just disappeared into the ether... Id be open to
   hearing suggestions on how one could keep the wiki more up to date?
   Short of users actually contributing back, there is a limit on what
   the team can do at anyone time. We are getting there, but its not
   going to be an overnight process.

   Blogs - a fundamental corner stone of the internet and your right,
   they are a great information repository. Perhaps we could syndicate
   some blogs onto liftweb.net during the rewrite (yes, im going to
   rewrite it at last!)... certainly open for that.

   Cheers, Tim

   PS: Sorry that was a bit of a rant, but this is a frustrating issue
   that i've been pushing for over a year ;-)

   On Dec 19, 1:16 pm, Hannes hannes.flo...@gmx.li wrote:

   Definitely! I would like one location for everything, but I believe that
   the current situation is not like that.

   - there two API docs 1.0 and 1.1, the latter is hard to find
   - there's liftweb.net (a little bit out-dated)
   - there's the Wiki
   - there's David's Blog (that has some unique information)

   What did I forget?

   thanks.

   Why not improve the existing wiki on github?

   Or fork the book and make improvements that way?

   I'm not opposed to additional resources, but why create another place
   where docs may or not be out of date?

   I think that Lift is still

[Lift] Re: CMS or wiki built with Lift?

2009-12-20 Thread Randinn
Well, as far as CMS Glenn is working on one here 
http://github.com/glennSilverman/democritus
and David is starting one here http://github.com/dpp/hoisted


On Dec 21, 7:24 am, jlist9 jli...@gmail.com wrote:
 Hi, I haven't found anything when I searched but I'd like to double check 
 here -
 is there an open source CMS (content management system) or wiki system
 built with Lift? I need to update a simple site and I'm hoping that I can 
 learn
 Lift by examples.

--

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: Documentation Site

2009-12-20 Thread Randinn
To give the benefit of doubt to people who use Lift knowing that is
closed to commiting they may think the same about the documentation. I
have added a bit but I've more thrown up a few pages and figured
someone with more knowledge would flesh them out.

On Dec 20, 8:47 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 1.0 is the last official release that was not a milestone or snapshot
 - thus, they are the primary api docs right now until we release 2.0
 (that is, what was being called 1.1 is being renamed to 2.0). API docs
 are a process issue, and handled as part of our build process - they
 will always live both on scala-tools and liftweb.net where applicable.
 They wont ever sit anywhere else (officially).

 Yes, the wiki is a little out dated. I forget the number of times i've
 tried to spear head a wiki effort... the bottom line is that other
 people need to start writing content - there are a fair number of
 competent lift users in the community who simply are not giving
 anything back by way of articles or wiki cleaning - thus our docs get
 out dated fast because the team prefer to write code than
 documentation. We even tried to appointed a wiki gardener but he
 appears to have just disappeared into the ether... Id be open to
 hearing suggestions on how one could keep the wiki more up to date?
 Short of users actually contributing back, there is a limit on what
 the team can do at anyone time. We are getting there, but its not
 going to be an overnight process.

 Blogs - a fundamental corner stone of the internet and your right,
 they are a great information repository. Perhaps we could syndicate
 some blogs onto liftweb.net during the rewrite (yes, im going to
 rewrite it at last!)... certainly open for that.

 Cheers, Tim

 PS: Sorry that was a bit of a rant, but this is a frustrating issue
 that i've been pushing for over a year ;-)

 On Dec 19, 1:16 pm, Hannes hannes.flo...@gmx.li wrote:

  Definitely! I would like one location for everything, but I believe that
  the current situation is not like that.

  - there two API docs 1.0 and 1.1, the latter is hard to find
  - there's liftweb.net (a little bit out-dated)
  - there's the Wiki
  - there's David's Blog (that has some unique information)

  What did I forget?

  thanks.

   Why not improve the existing wiki on github?

   Or fork the book and make improvements that way?

   I'm not opposed to additional resources, but why create another place
   where docs may or not be out of date?

   I think that Lift is still at the point where one location of docs is
   better.

   My opinion.

   On Dec 19, 6:37 am, Hannes hannes.flo...@gmx.li wrote:

   Hi Lifters,

   I'm thinking about setting up a site that takes together all available
   information about Lift (Links, News, ...).

   I would like to know, if this would be appreciated or not. I still think
   that all the available information is to much spread out - specially for
   people who get started with Lift. In case of positive responds, I would
   like to setup a Plone (CMS) site. I think its a really good tool, to
   organize content.

   thanks for listening.

   --

   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: **Important** Announcing the Lift 2.0 branch

2009-12-20 Thread Randinn
Why not with 2.8 just going to beta 2.0 my estimation is that 2.0 will
be finished before

On Dec 21, 12:03 pm, Xuefeng Wu ben...@gmail.com wrote:
 Why not release Lift2.0 with Scala2.8?

 On Mon, Dec 21, 2009 at 3:34 AM, Indrajit Raychaudhuri
 indraj...@gmail.comwrote:



  Okay Folks,

  Lift 2.0 branch has shaped up enough for everybody to play with.
  Checkout the branch irc_wip_lift20 and get going! Just be aware that
  it's still undergoing updated and changes incrementally and there are
  few rough edges.

  Key changes:

  1. The project tree has been restructured according to the proposal
  sent out earlier [1]. To summarize, we now have three top level
  projects (framework, archetypes and examples) each with independent
  build life-cycle. There are other additional infra projects that are
  less to do with the actual code.

  A quick summary of the top-level projects:

  1. Framework:
  The whole of Lift Framework that matter most to most. The usual
  modules (viz., lift-base, lift-persistence and lift-modules) have got
  nested within. Therefore, from now on, building Lift framework would
  mean just that. Doing a git pull or git clone as usual, changing
  to framework directory and running mvn install.

  2. Archetypes:
  The standard distributed archetypes. The archetypes help you get quick
  started with a Lift based project. If you are not into building maven
  archetypes, you can stay clear of this. But a quick probe is welcome.

  3. Examples:
  All the Lift examples are grouped into this project. If you are
  generally interested in learning different techniques from examples
  you don't have to build the whole of Lift anymore. Well that was still
  the case earlier, but now it's even more obvious. And it's true the
  other way round too, if you have to build Lift framework from source,
  you don't have to build the examples along with it. Another point: the
  examples won't be deployed on scala-tools maven repo anymore. Those
  war files up there serve no good purpose.

  Everything now gets neatly tucked into their respective homes :)

  Additional points that you should be aware of:

  A. Availability on scala-tools repository:
  - Components of framework would be available
  - Components of archetypes would be available
  - Components of examples would *not* be available

  B. Availability on scala-tools Maven site:
  Site generated from framework would be the main content of scala-tools
  Maven site. Depending on how things go, we might even have a home of
  it's own athttp://dev.liftweb.net. (Separate proposal coming up)

  C. Lift Parent Project Model:
  The top level pom.xml has moved to it's own home at resources/project-
  model. This would stay as a 'flyweight' project (as in boxing, not
  GoF) on it's own that would strictly control the common behavior,
  plugin dependencies, versions etc. for all the top level projects
  (framework, archetypes, examples). This would be deployed on scala-
  tools repository.

  D. Lift Site Skin (WIP):
  I haven't started working on this yet. But the intent is to create a
  project site that is of some real value and serves as placeholder for
  mostly 'auto-generated' docs. See #B above.

  E. Still pending:
  a. Migration to Scala 2.8 branch. Intend to have stable master created
  first with everything working as usual without being caught into Scala
  release cycle. Hopefully, this branch and '280_port' would merge soon!
  b. Higher quality site generation (See #B above, proposal coming up)
  c. Site skin (See #D above)
  d. Hudson integration and better release management. So that certain
  steps in Committer release process [2] become automatic (waiting for
  merge to master and hudson maintenance)
  e. Having a nice README.md at the top level
  f. General spit and polish

  F: To be decided:
  a. Future of lift-core. (Separate mail coming)
  b. Relevance of OtherLicensedWorks.txt (repo distribution of javamail
  is now under CDDL and license automatically reflects in dependency
  page)
  c. Need for remove-trailings.sh (can be replaced by git pre-commit
  hook)

  [1]
 http://groups.google.com/group/liftweb/browse_thread/thread/450a3e741...
  [2]http://wiki.github.com/dpp/liftweb/committer-release-process

  Feedbacks most welcome!

  Cheers, Indrajit

  --

  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, 

[Lift] Re: Documentation

2009-12-15 Thread Randinn
My suggestion is to get Programming in Scala, it explains the basics
more than the others. Davids book and the rest are great but written
for existing programmers. I also am learning not being a coder for
years so I know how you feel.

On Dec 16, 3:05 am, Daniel who.reads.th...@gmail.com wrote:
 Hey,

 I'm new to both Scala and Lift, but I don't have any professional Java
 experience. It seems that all of the documentation available for Lift
 is aimed at folks who have considerable professional experience with
 Java already. Is there any documentation available aimed for people
 like me who don't have very much Java enterprise experience (I'm a
 student)?

 I find that the Django and Rails documentation is very helpful, while
 Lift's is somewhat impenetrable. Are there any plans to improve the
 Lift documentation? It's the major obstacle preventing my adoption of
 this otherwise impressive framework.

 Thanks,
 Daniel

--

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

2009-12-15 Thread Randinn
I also suggest possibly looking at http://www.scala-lang.org/node/104
and http://www.naildrivin5.com/scalatour might help a bit.

Also working on the tuts at http://www.simplyscala.com/ are nice as
you can see them in action.

On Dec 16, 3:05 am, Daniel who.reads.th...@gmail.com wrote:
 Hey,

 I'm new to both Scala and Lift, but I don't have any professional Java
 experience. It seems that all of the documentation available for Lift
 is aimed at folks who have considerable professional experience with
 Java already. Is there any documentation available aimed for people
 like me who don't have very much Java enterprise experience (I'm a
 student)?

 I find that the Django and Rails documentation is very helpful, while
 Lift's is somewhat impenetrable. Are there any plans to improve the
 Lift documentation? It's the major obstacle preventing my adoption of
 this otherwise impressive framework.

 Thanks,
 Daniel

--

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: Lift 1.1-M8

2009-12-14 Thread Randinn
Very nice, great work guys!

On Dec 15, 6:57 am, harryh har...@gmail.com wrote:
 Huzzah!
 Welcome M8!

--

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: Documentation for 1.1

2009-12-09 Thread Randinn
I'm sorry I didn't reply to this earlier. Yes, I am looking for docs
so I can keep my newbie questions to a minimum. I know I can ask
anything here but I'd rather see you all moving Lift forward then
dealing with my simplistic questions.

On Dec 8, 10:50 am, Timothy Perrett timo...@getintheloop.eu wrote:
 You are aware that our maven site automatically generates a list of  
 changes in a given version? If any commiters adds something then they  
 updates the changes.xml for just this reason.

 Take a look at that and see if it is the kind of thing you would like?  
 I'm not saying it's everything you could ask for, as I sense you want  
 deeper docs in general - but as before, this is in hand.

 Cheers, Tim

 Sent from my iPhone

 On 7 Dec 2009, at 23:01, Randinn rand...@gmail.com wrote:

  A pretty good idea, a commiter makes a change or adds a feature then
  post about it on a blog, that would make it easier for people to go
  through and later on to be able to update the documentation.

  On Dec 7, 10:53 pm, TylerWeir tyler.w...@gmail.com wrote:
  Something like This Week in Lift master would help.http://
  suitmymind.com/blog/2009/01/22/this-week-in-edge-cappuccino/

  On Dec 7, 5:55 am, Timothy Perrett timo...@getintheloop.eu wrote:

  Randinn,

  This is already slated for 1.1/2.0 release... dont worry we are  
  getting to it :-)

  Cheers, Tim

  On 7 Dec 2009, at 08:09, Randinn wrote:

  I am writing here to get a dialog going about the changes from  
  1.0 to
  1.1. I mistakenly filed a ticket on the subject but was wondering  
  if
  there could be some documentation done with all of the new/changed
  features in 1.1. Most of the time the changes and additions are
  mentioned here but there are times that a feature is added and it's
  only talked about when someone asks about it. I was wondering if a
  current commiter or possibly bring one on board with the idea of
  fleshing out the documentation.

  --

  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: I was giving a short interview for JavaBooks.org about Lift Scala

2009-12-08 Thread Randinn
Haha, upvoted :)

On Dec 9, 3:57 am, Marius marius.dan...@gmail.com wrote:
 You can vote up or down here :)

 http://www.dzone.com/links/video_interview_with_marius_danciu_author_...

 Br's,
 Marius

 On Dec 7, 9:59 am, Marius marius.dan...@gmail.com wrote:

  Hi,

  After a long day I ended up giving this interview.

 http://vimeo.com/7986506

  Br's,
  Marius

  P.S. Please forgive my crappy English.

--

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: lift-stamped - Traits for logging changes MetaMapper-Records

2009-12-08 Thread Randinn
Very nice work, I don't deal with records but it looks very useful.

On Dec 9, 1:33 pm, Franz Bettag fr...@bett.ag wrote:
 Hi guys,

 thanks to this great community i could finish a project today which i
 found worth to be made available public.

 The topic says it all, check it out athttps://github.com/fbettag/lift-stamped/

 Tell me what you guys think!

 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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Documentation for 1.1

2009-12-07 Thread Randinn
I am writing here to get a dialog going about the changes from 1.0 to
1.1. I mistakenly filed a ticket on the subject but was wondering if
there could be some documentation done with all of the new/changed
features in 1.1. Most of the time the changes and additions are
mentioned here but there are times that a feature is added and it's
only talked about when someone asks about it. I was wondering if a
current commiter or possibly bring one on board with the idea of
fleshing out the documentation.

--

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: Documentation for 1.1

2009-12-07 Thread Randinn
Great! Thank you for the heads-up.

On Dec 7, 9:55 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Randinn,

 This is already slated for 1.1/2.0 release... dont worry we are getting to it 
 :-)

 Cheers, Tim

 On 7 Dec 2009, at 08:09, Randinn wrote:

  I am writing here to get a dialog going about the changes from 1.0 to
  1.1. I mistakenly filed a ticket on the subject but was wondering if
  there could be some documentation done with all of the new/changed
  features in 1.1. Most of the time the changes and additions are
  mentioned here but there are times that a feature is added and it's
  only talked about when someone asks about it. I was wondering if a
  current commiter or possibly bring one on board with the idea of
  fleshing out the documentation.

  --

  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: Documentation for 1.1

2009-12-07 Thread Randinn
A pretty good idea, a commiter makes a change or adds a feature then
post about it on a blog, that would make it easier for people to go
through and later on to be able to update the documentation.

On Dec 7, 10:53 pm, TylerWeir tyler.w...@gmail.com wrote:
 Something like This Week in Lift master would 
 help.http://suitmymind.com/blog/2009/01/22/this-week-in-edge-cappuccino/

 On Dec 7, 5:55 am, Timothy Perrett timo...@getintheloop.eu wrote:

  Randinn,

  This is already slated for 1.1/2.0 release... dont worry we are getting to 
  it :-)

  Cheers, Tim

  On 7 Dec 2009, at 08:09, Randinn wrote:

   I am writing here to get a dialog going about the changes from 1.0 to
   1.1. I mistakenly filed a ticket on the subject but was wondering if
   there could be some documentation done with all of the new/changed
   features in 1.1. Most of the time the changes and additions are
   mentioned here but there are times that a feature is added and it's
   only talked about when someone asks about it. I was wondering if a
   current commiter or possibly bring one on board with the idea of
   fleshing out the documentation.

   --

   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: what changes would need to be made so LIFT can work with HTML5

2009-12-06 Thread Randinn
Here are a couple of places to look:

http://wiki.github.com/dpp/liftweb/10-11-possible-code-changes
http://groups.google.com/group/liftweb/browse_thread/thread/824f14038bedf425#

On Dec 6, 6:54 pm, James Black planiturth...@gmail.com wrote:
 Thank you for your response.

 I am new to LIFT, and I think the version of LIFT I am using, 1.0, is too
 old for this to work properly, as I get an error about the fact that
 java.lang.String is found and util.Box is required.

 I tried to get my app to work with LIFT 1.1 but I had problems with CRUDify,
 so which version should I use that will work properly with CRUDify and
 setDocType?

 On Sun, Dec 6, 2009 at 1:15 AM, Alex Boisvert alex.boisv...@gmail.comwrote:

  Have you tried calling S.setDocType(!DOCTYPE html) ?

  alex

  On Sat, Dec 5, 2009 at 8:29 PM, James Black planiturth...@gmail.comwrote:

  I tried to use HTML5 doctype and LIFT threw an error.

  It complained about line 1:

  !DOCTYPE html
  html
  ...
  /html

  --

  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.

--

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] NGiNX HTTP Push Module

2009-11-22 Thread Randinn
I found this and thought just in case someone here can use this I'd
list it.

http://pushmodule.slact.net/

--

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




[Lift] JavaFX

2009-11-20 Thread Randinn
I was wondering if anyone has had any success connecting JavaFX to
Lift, I found this 
http://stronglytypedblog.blogspot.com/2009/10/scala-console-with-javafx-experimental.html
but I'm wondering how hard it is to work with 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=.




[Lift] Re: JavaFX

2009-11-20 Thread Randinn
Hmm, that's too bad, I remember seeing you say something to that
effect in a Sun forum but was hoping it might have been worked-around.

On Nov 21, 5:45 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 If you mean JavaFX calling into Scala code I tried and it didn't seem to 
 work. JavaFX probably makes assumptions about $ in names.

 -

 Randinnrand...@gmail.com wrote:

 I was wondering if anyone has had any success connecting JavaFX to
 Lift, I found 
 thishttp://stronglytypedblog.blogspot.com/2009/10/scala-console-with-java...
 but I'm wondering how hard it is to work with 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 
 athttp://groups.google.com/group/liftweb?hl=.

--

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




[Lift] Wiki One-to-Many

2009-11-15 Thread Randinn

I was wondering if anyone that read the Git wiki One-to-Many made the
example could post it onto Github as i was unsuccessful. Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Wiki One-to-Many

2009-11-15 Thread Randinn

Ah, I thought that it would be less of a bother so people wouldn't
have to deal with my trivial questions. Here it is


import net.liftweb.util._
import net.liftweb.http._
import net.liftweb.mapper._

object Author extends Author with LongKeyedMetaMapper[Author]
class Author extends LongKeyedMapper[Author] with IdPK with OneToMany
[Long, Author] {
  def getSingleton = Author
  object name extends MappedString(this, 100)
  object books extends MappedOneToMany(Book, Book.author, OrderBy
(Book.sort, Ascending)) with Owned[Book] with Cascade[Book]
}
object Book extends Book with LongKeyedMetaMapper[Book]

class Book extends LongKeyedMapper[Book] with IdPK with Ordered[Book]
{
def getSingleton = Book
object author extends MappedLongForeignKey(this, Author)
with LongMappedForeignMapper[Book, Author]
object name extends MappedString(this, 100) {
object sort extends MappedInt(this)
  def compare(that: Book) = this.sort.is - that.sort.is
  }
}

Here is the errors

C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
\onetwomany\model\Author.scala:18:
 error: value sort is not a member of object many.model.Book
  object books extends MappedOneToMany(Book, Book.author, OrderBy
(Book.sort, Ascending)) with Owned[
Book] with Cascade[Book]
 
^
C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
\onetwomany\model\Author.scala:18:
 error: wrong number of arguments for constructor Object: ()
java.lang.Object
  object books extends MappedOneToMany(Book, Book.author, OrderBy
(Book.sort, Ascending)) with Owned[
Book] with Cascade[Book]
   ^
C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
\onetwomany\model\Author.scala:27:
 error: inferred type arguments [object Book.this.name] do not conform
to class MappedInt's type par
ameter bounds [T : net.liftweb.mapper.Mapper[T]]
object sort extends MappedInt(this)
^
C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
\onetwomany\model\Author.scala:28:
 error: value sort is not a member of many.model.Book
  def compare(that: Book) = this.sort.is - that.sort.is
^
C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
\onetwomany\snippet\EditOne.scala:
16: error: value SHtml is not a member of package net.liftweb
import net.liftweb.SHtml._
   ^
C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
\onetwomany\snippet\ListOne.scala:
23: error: not found: value link
 edit - link(edit, ()=author=a, Text(?(Edit))),
   ^
6 errors found


I first tried to separate Author and Books into their own classes and
when I was not able to get it to work I Just cut and paste the
example into one class.



On Nov 16, 1:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Why don't you try the reverse -- post your code and error?

 -

 Randinnrand...@gmail.com wrote:

 I was wondering if anyone that read the Git wiki One-to-Many made the
 example could post it onto Github as i was unsuccessful. Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Wiki One-to-Many

2009-11-15 Thread Randinn

Thank you for your help.

On Nov 16, 9:15 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Copy-paste error. Your Book.sort is inside Book.name.

 -

 Randinnrand...@gmail.com wrote:

 Ah, I thought that it would be less of a bother so people wouldn't
 have to deal with my trivial questions. Here it is

 import net.liftweb.util._
 import net.liftweb.http._
 import net.liftweb.mapper._

 object Author extends Author with LongKeyedMetaMapper[Author]
 class Author extends LongKeyedMapper[Author] with IdPK with OneToMany
 [Long, Author] {
   def getSingleton = Author
   object name extends MappedString(this, 100)
   object books extends MappedOneToMany(Book, Book.author, OrderBy
 (Book.sort, Ascending)) with Owned[Book] with Cascade[Book]}

 object Book extends Book with LongKeyedMetaMapper[Book]

 class Book extends LongKeyedMapper[Book] with IdPK with Ordered[Book]
 {
 def getSingleton = Book
 object author extends MappedLongForeignKey(this, Author)
 with LongMappedForeignMapper[Book, Author]
 object name extends MappedString(this, 100) {
 object sort extends MappedInt(this)
   def compare(that: Book) = this.sort.is - that.sort.is
   }

 }

 Here is the errors

 C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
 \onetwomany\model\Author.scala:18:
  error: value sort is not a member of object many.model.Book
   object books extends MappedOneToMany(Book, Book.author, OrderBy
 (Book.sort, Ascending)) with Owned[
 Book] with Cascade[Book]

 ^
 C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
 \onetwomany\model\Author.scala:18:
  error: wrong number of arguments for constructor Object: ()
 java.lang.Object
   object books extends MappedOneToMany(Book, Book.author, OrderBy
 (Book.sort, Ascending)) with Owned[
 Book] with Cascade[Book]
                        ^
 C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
 \onetwomany\model\Author.scala:27:
  error: inferred type arguments [object Book.this.name] do not conform
 to class MappedInt's type par
 ameter bounds [T : net.liftweb.mapper.Mapper[T]]
 object sort extends MappedInt(this)
                     ^
 C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
 \onetwomany\model\Author.scala:28:
  error: value sort is not a member of many.model.Book
   def compare(that: Book) = this.sort.is - that.sort.is
                                                 ^
 C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
 \onetwomany\snippet\EditOne.scala:
 16: error: value SHtml is not a member of package net.liftweb
 import net.liftweb.SHtml._
                    ^
 C:\Users\Randin\Documents\Scala\one2many\onetwomany\src\main\scala
 \onetwomany\snippet\ListOne.scala:
 23: error: not found: value link
              edit - link(edit, ()=author=a, Text(?(Edit))),
                        ^
 6 errors found

 I first tried to separate Author and Books into their own classes and
 when I was not able to get it to work I Just cut and paste the
 example into one class.

 On Nov 16, 1:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

  Why don't you try the reverse -- post your code and error?

  -

  Randinnrand...@gmail.com wrote:

  I was wondering if anyone that read the Git wiki One-to-Many made the
  example could post it onto Github as i was unsuccessful. Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: CometActor and render

2009-11-13 Thread Randinn

Ah, nice, just checking if you knew about it as an option.

On Nov 13, 8:08 am, Jack Widman jack.wid...@gmail.com wrote:
 I did and its actually in the code I attached. In one place I use Dispatch
 and in another place I use httpclient directly. I intend to use Dispatch for
 everything.



 On Thu, Nov 12, 2009 at 4:05 PM, Randinn rand...@gmail.com wrote:

  I'm not trying to change the subject but I was wondering if you looked
  at Databinder Dispatchhttp://databinder.net/dispatch/Aboutfor your
  url calls?

  On Nov 12, 3:26 pm, Jack Widman jack.wid...@gmail.com wrote:
   David,

   I have attached my code. It runs but does not behave as I intended it to.
   The code does a web search on the term scala and displays a list of
  URLs
   of the results. Next to each URL it says Page Length : -1. A process is
   running in the background which takes each URL, goes out and gets the
  page
   and takes the length of the page. The length of that page is then
  supposed
   to immediately appear on the page next to that URL. I put the lengths on
  a
   queue, as they come in, and I have the Comet page poll the queue and
  display
   the results. It would probably be better to have the results send a
  message
   to the Comet class so the page is only re-rendered when there is a change
   but for now I am polling.

   I can see the lengths coming in and being put on the queue, but the Comet
   page is not getting them till they are all retrieved. (This takes way too
   long and nothing changes on the screen till its too late). I need them to
   appear as they come in. Occasionally I can see a length being retrieved
  and
   the Comet page finds it but even then it is not displayed until all the
   lengths are in.   I know this is not very clear but I think it will be
  clear
   from the code.

   I also know there are a lot of places in the code which can be improved
  and
   I welcome all of your input but what I would love is to have these
  numbers
   appear on the page as they they are retrieved. I have been stumped by
  this
   for a while and I suspect that somebody who knows Lift well might see the
   problem right away.

   The class that retrieves the page lengths is called Calculator and the
  queue
   is called SourceQueue. The classes are pretty small so hopefully it will
  be
   clear what is going on. I want you to know I think it is incredible how
   responsive you and the group are and I look forward to using Lift in the
   future.

   Thanks so much.

   Jack

   On Tue, Nov 10, 2009 at 1:27 AM, David Pollak 
  feeder.of.the.be...@gmail.com

wrote:

On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman jack.wid...@gmail.com
  wrote:

The only difference between your working code and mine is that mine
  has a
process in the background that is always running and puts Foo objects
  on a
queue whenever they are ready. Where can I start this long running
  process
so that it doesn't interfere with the lowPriority method that takes
  things
off the queue and rerenders the page. I tried starting the process in
  its
own Actor that I start in localSetup but it seems somehow to be
  blocking the
lowPriority method from doing its thing.

I have no idea what this means... sorry.

Please post actual runnable code and we can help you debug.

On Sun, Nov 8, 2009 at 11:35 PM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

Jack,

I reproduced your code and it seems to work fine.  I've enclosed a
working copy.

Some comments about your code:

   - The foos variable and the foo variable may be getting confused
  in
   the code... the render method may be rendering the same thing
  based on the
   unchanging foos variable.
   - Doing null testing is a sign that you have logic errors in your
   code.  I strongly recommend using either Box or Option for
  everything that
   can logically not contain a value/reference.  If you're bridging
  out to Java
   code and are expecting null from the Java code, write a small
  bridge that
   will wrapper the Java return values in Box/Option.
   - You have a case class (Tick) that contains no parameters.
   Please
   use a case object instead.
   - Your Tick look is a spin loop.  You fire a Tick message as part
  of
   processing the Tick message.  I would suggest that if you're
  polling, that
   you have a reasonable poll interval, otherwise you'll starve your
  CPU.
   Further, having reRender on each loop through means that you're
  forcing a
   lot of bytes over the wire rather than only doing a reRender on
  changed
   values.

Thanks,

David

On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman jack.wid...@gmail.com
  wrote:

Sorry. Here it is:   As I said, I know that when render is called,
foo.getValue has the right value. But it does not show on the
  screen, unless
I refresh the browser.

package com.foo.comet

import

[Lift] Re: CometActor and render

2009-11-12 Thread Randinn

I'm not trying to change the subject but I was wondering if you looked
at Databinder Dispatch http://databinder.net/dispatch/About for your
url calls?

On Nov 12, 3:26 pm, Jack Widman jack.wid...@gmail.com wrote:
 David,

 I have attached my code. It runs but does not behave as I intended it to.
 The code does a web search on the term scala and displays a list of URLs
 of the results. Next to each URL it says Page Length : -1. A process is
 running in the background which takes each URL, goes out and gets the page
 and takes the length of the page. The length of that page is then supposed
 to immediately appear on the page next to that URL. I put the lengths on a
 queue, as they come in, and I have the Comet page poll the queue and display
 the results. It would probably be better to have the results send a message
 to the Comet class so the page is only re-rendered when there is a change
 but for now I am polling.

 I can see the lengths coming in and being put on the queue, but the Comet
 page is not getting them till they are all retrieved. (This takes way too
 long and nothing changes on the screen till its too late). I need them to
 appear as they come in. Occasionally I can see a length being retrieved and
 the Comet page finds it but even then it is not displayed until all the
 lengths are in.   I know this is not very clear but I think it will be clear
 from the code.

 I also know there are a lot of places in the code which can be improved and
 I welcome all of your input but what I would love is to have these numbers
 appear on the page as they they are retrieved. I have been stumped by this
 for a while and I suspect that somebody who knows Lift well might see the
 problem right away.

 The class that retrieves the page lengths is called Calculator and the queue
 is called SourceQueue. The classes are pretty small so hopefully it will be
 clear what is going on. I want you to know I think it is incredible how
 responsive you and the group are and I look forward to using Lift in the
 future.

 Thanks so much.

 Jack

 On Tue, Nov 10, 2009 at 1:27 AM, David Pollak feeder.of.the.be...@gmail.com

  wrote:

  On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman jack.wid...@gmail.comwrote:

  The only difference between your working code and mine is that mine has a
  process in the background that is always running and puts Foo objects on a
  queue whenever they are ready. Where can I start this long running process
  so that it doesn't interfere with the lowPriority method that takes things
  off the queue and rerenders the page. I tried starting the process in its
  own Actor that I start in localSetup but it seems somehow to be blocking 
  the
  lowPriority method from doing its thing.

  I have no idea what this means... sorry.

  Please post actual runnable code and we can help you debug.

  On Sun, Nov 8, 2009 at 11:35 PM, David Pollak 
  feeder.of.the.be...@gmail.com wrote:

  Jack,

  I reproduced your code and it seems to work fine.  I've enclosed a
  working copy.

  Some comments about your code:

     - The foos variable and the foo variable may be getting confused in
     the code... the render method may be rendering the same thing based on 
  the
     unchanging foos variable.
     - Doing null testing is a sign that you have logic errors in your
     code.  I strongly recommend using either Box or Option for everything 
  that
     can logically not contain a value/reference.  If you're bridging out 
  to Java
     code and are expecting null from the Java code, write a small bridge 
  that
     will wrapper the Java return values in Box/Option.
     - You have a case class (Tick) that contains no parameters.  Please
     use a case object instead.
     - Your Tick look is a spin loop.  You fire a Tick message as part of
     processing the Tick message.  I would suggest that if you're polling, 
  that
     you have a reasonable poll interval, otherwise you'll starve your CPU.
     Further, having reRender on each loop through means that you're 
  forcing a
     lot of bytes over the wire rather than only doing a reRender on changed
     values.

  Thanks,

  David

  On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman jack.wid...@gmail.comwrote:

  Sorry. Here it is:   As I said, I know that when render is called,
  foo.getValue has the right value. But it does not show on the screen, 
  unless
  I refresh the browser.

  package com.foo.comet

  import net.liftweb._
  import http._
  import js._
  import JsCmds._
  import net.liftweb.util._
  import net.liftweb.http._
  import _root_.scala.xml._
  import scala.actors._
  import com.authoritude.snippet._
  import scala.collection.mutable.Queue
  import net.liftweb.http.SessionVar

  class MyComet extends CometActor {

    override def defaultPrefix = Full(auth)

    private var foos = FooManager.getFoos

    def createDisplay(foos:List[Foo]):NodeSeq = {
      span id=gotable
      {
        for {foo - foos} yield trtd{foo.getValue}/td/tr
      }

  

[Lift] Re: Wizard at BASE

2009-11-10 Thread Randinn

Its sounds like your presentation went well, congrats. now we need to
talk you into a Melbourne trip. :)

On Nov 11, 5:15 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Nov 10, 2009 at 9:52 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  Hi David,

  Thanks for presenting your latest work on Wizard last night at the Bay
  Area Scala Enthusiasts meetup. I enjoyed hearing about Wizard and have
  a few comments that I wanted to share with you and the rest of the
  Lift community. I know Wizard is very new and I'm only going by what I
  learned last night, so please bear with me if I misunderstood
  anything!

  As I understand it a Wizard instance is composed of screens
  ('questions'? I forget the exact terminology), each of which can have
  multiple inputs, each input having a prompt ('Name', 'Your mother or
  father's name', etc) and multiple validation rules. User input is
  saved each time the user hits the Submit (or Next, in your example)
  button. User state is stored from screen to screen and can be rolled
  backwards but not forward. This is analogous to checking out an older
  revision in a version control system, with each submitted screen being
  a revision, but then loosing all revisions since the checkout
  (rebasing the HEAD I believe it's called in Git).

  What I expected, and what I think many other people would expect, is
  that going back and forward among screens does not change the Wizard
  state but simply changes what portion of the questions and responses
  the user sees. In this case each screen is a simple, reduced view of
  the current state, rather than a state in itself.

  To use an analogy, think of a Wizard instance as an (annoying)
  adventure game and each screen as a dungeon room. Let's say I fight my
  way through several rooms full of grues, only to reach a locked door.
  I'm told that the switch to unlock the door is 2 rooms back. I go back
  (ie the previous screen method is fired twice) and I throw the switch.
  Unfortunately, Wizard has also rolled back the dungeon state two
  revisions and the intermediate room and room with the door now have
  fearsome grues in them again! (In fact, I think Wizard could be used
  quite easily for adventure games like that. Cool! I'm reminded of my
  time making games in HyperCard. =)

  To give another example, let's say I have a Wizard representing an e-
  commerce site and have the following screens: shopping cart - name
  and shipping address - credit card and billing address -
  confirmation. If I get to the confirmation screen and see that I added
  2 Widgets and only want to buy 1, I want to be able to go back to the
  shopping cart screen to make my change without losing the addresses
  and payment details I entered in the intermediate screens.

  Am I describing Wizard correctly, and if so, why did you chose the
  first method of operation over the second? Can the second mode be
  added?

 Not easily.  Snapshotting at a point in time and rolling back to that point
 is easy with immutability.  Merging different branches of a given snapshot
 is non-trivial and is not likely a feature that will make it into Wizard in
 the near term.  Put another way, 3 way merges on text is non-trivial.  3 way
 merges on non-text is not a solved problem that I know of.  Further, once
 you merge text in Git, you have the compiler test to make sure that code
 makes sense, but doing logic testing would be difficult during a merge
 phase.



  Thanks for all the great work and I'm really looking forward to using
  Wizard!

  Peter Robinett

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



[Lift] My Sitemap Problem

2009-11-08 Thread Randinn

I made this sitemap but the User.sitemap is not showing up on the
site, it looks like it should work but is not, can someone point out
what I did wrong?

 val entries = Menu(Loc(Home, List(index), Home))::
Menu(Loc(Item, List(member, index) - false, Item),
 Menu(Loc(ItemList, List(member, list), Item List)),
 Menu(Loc(ItemCreate, List(member, create), Create
Item))) ::
Menu(Loc(Admin, List(admin, list) - true, Admin),
 Menu(Loc(AdminList, List(admin, list), Category
List)),
 Menu(Loc(UserCreate, List(admin, create), Create
Category))) ::
Menu(Loc(Auser, List(auser, list) - true, User),
 Menu(Loc(AuserList, List(auser, list), User
List))) :: Nil
User.sitemap :: Nil


LiftRules setSiteMap SiteMap(entries : _*)

LiftRules.rewrite.append {
  case RewriteRequest(
  ParsePath(List(member, action, id),_,_,_),_,_) =
RewriteResponse(member :: action :: Nil, Map(id - id))
  case RewriteRequest(
  ParsePath(List(admin, action, id),_,_,_),_,_) =
RewriteResponse(admin :: action :: Nil, Map(id - id))
  case RewriteRequest(
  ParsePath(List(auser, action, id),_,_,_),_,_) =
RewriteResponse(auser :: action :: Nil, Map(id - id))
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: My Sitemap Problem

2009-11-08 Thread Randinn

I just realized that it should be:

 Menu(Loc(AuserList, List(auser, list), User
List))) ::
User.sitemap

On Nov 9, 2:37 pm, Randinn rand...@gmail.com wrote:
 I made this sitemap but the User.sitemap is not showing up on the
 site, it looks like it should work but is not, can someone point out
 what I did wrong?

  val entries = Menu(Loc(Home, List(index), Home))::
     Menu(Loc(Item, List(member, index) - false, Item),
          Menu(Loc(ItemList, List(member, list), Item List)),
          Menu(Loc(ItemCreate, List(member, create), Create
 Item))) ::
     Menu(Loc(Admin, List(admin, list) - true, Admin),
          Menu(Loc(AdminList, List(admin, list), Category
 List)),
          Menu(Loc(UserCreate, List(admin, create), Create
 Category))) ::
     Menu(Loc(Auser, List(auser, list) - true, User),
          Menu(Loc(AuserList, List(auser, list), User
 List))) :: Nil
     User.sitemap :: Nil

     LiftRules setSiteMap SiteMap(entries : _*)

     LiftRules.rewrite.append {
       case RewriteRequest(
           ParsePath(List(member, action, id),_,_,_),_,_) =
         RewriteResponse(member :: action :: Nil, Map(id - id))
       case RewriteRequest(
           ParsePath(List(admin, action, id),_,_,_),_,_) =
         RewriteResponse(admin :: action :: Nil, Map(id - id))
       case RewriteRequest(
           ParsePath(List(auser, action, id),_,_,_),_,_) =
         RewriteResponse(auser :: action :: Nil, Map(id - id))
     }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Question about megaprotouser S.error

2009-11-03 Thread Randinn

I think all you'd need to do is throw some CSS and Jquery in and
you'll there :)

On Nov 4, 6:42 am, Heiko Seeberger heiko.seeber...@googlemail.com
wrote:
 Thank you. It's my contribution to the W-JAX Challenge where several web
 frameworks compete.
 But to be honest: The others are really nicely designed ...

 Heiko

 2009/11/3 Randinn rand...@gmail.com





  Nicely designed site, just to go a bit off-topic, very clean.

  On Nov 4, 4:33 am, Heiko Seeberger heiko.seeber...@googlemail.com
  wrote:
   2009/11/3 DFectuoso santiago1...@gmail.com

I would expect that any time the form fails to validate(try clicking
submit without typing a password or a valid email in hellolift) i
would get a message saying what is wrong.

   That's how it works.
   Go tohttp://174.143.152.248:8080/kix-1.0/tosee a live demo: Try to sign
   up and (thereafter) to login with invalid data. Go tohttp://
  github.com/hseeberger/kix/and take a look at the User class (and
   object).

   Heiko

 --
 Heiko Seeberger

 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: scalamodules.org
 Lift, the simply functional web framework: liftweb.net
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Question about megaprotouser S.error

2009-11-03 Thread Randinn

Nicely designed site, just to go a bit off-topic, very clean.

On Nov 4, 4:33 am, Heiko Seeberger heiko.seeber...@googlemail.com
wrote:
 2009/11/3 DFectuoso santiago1...@gmail.com



  I would expect that any time the form fails to validate(try clicking
  submit without typing a password or a valid email in hellolift) i
  would get a message saying what is wrong.

 That's how it works.
 Go tohttp://174.143.152.248:8080/kix-1.0/to see a live demo: Try to sign
 up and (thereafter) to login with invalid data. Go 
 tohttp://github.com/hseeberger/kix/and take a look at the User class (and
 object).

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



[Lift] Re: Error mvn install on lift-actor

2009-11-02 Thread Randinn

I just had this occur as well with a basic archetype build, cleaned
out the local maven repo and still the same problem.

On Nov 2, 11:49 pm, Josh Suereth joshua.suer...@gmail.com wrote:
 huh, perhaps if I was in active development with you guys, I'd have a better
 idea...

 I know maven + -SNAPSHOT can cause fun for everyone ;)

 Anyway, I wonder if maven has the ability to turn on checksuming now.  I
 know things like archiva and nexus can do that, but this might help you
 avoid problems in the future...

 - Josh

 On Mon, Nov 2, 2009 at 3:52 AM, Timothy Perrett 
 timo...@getintheloop.euwrote:

  Sorry, but +1

  Maven is a funny beast that needs some controlling but in my experience a
  little manual repo pruneing usually yeilds results :-)

   Cheers, Tim

  Sent from my iPhone

  On 2 Nov 2009, at 02:18, Josh Suereth joshua.suer...@gmail.com wrote:

  There's something just wrong about this

  On Sun, Nov 1, 2009 at 10:06 AM, David Pollak 
  feeder.of.the.be...@gmail.com
  feeder.of.the.be...@gmail.com wrote:

  Yeah, I do rm -rf ~/.m2 about once a week.  Usually on Monday mornings
  just before I go make myself some tea.

  On Sun, Nov 1, 2009 at 7:55 AM, Naftoli Gugenheim naftoli...@gmail.com
  naftoli...@gmail.com wrote:

  It can't be the POM -- it built it. It just couldn't install it. I wonder
  if it's related to the new structure. I emptied .m2/repository/new/liftweb
  and it seems to be working now.
  Thanks.

  -
  Josh Suereth joshua.suer...@gmail.comjoshua.suer...@gmail.com wrote:

  It looks like the pom is in a different encoding then maven expects.
   That's
  a fun issue!  I would check maven's JIRA to see if someone else has
  reported
  this issue and has a workaround.

  Who is deploying/configuring Lift's POM files?   Are you using UTF-8 or
  UTF-16 encoding?   In either case, I would check the pom.xml for
  lift-actors
  in your local repo.  Pull it up in a text editor that will show you all
  characters and switch encodings.

  - Josh

  On Sat, Oct 31, 2009 at 10:54 PM, Naftoli Gugenheim 
  naftoli...@gmail.com
  naftoli...@gmail.comwrote:

   What could be wrong?

   C:\dev\gitrepo\liftweb\lift-base\lift-actormvn -e install
   + Error stacktraces are turned on.
   [INFO] Scanning for projects...
   WAGON_VERSION: 1.0-beta-2
   [INFO]

  
   [INFO] Building Lift Actor
   [INFO]    task-segment: [install]
   [INFO]

  
   [INFO] [resources:resources]
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] skip non existing resourceDirectory
   C:\dev\gitrepo\liftweb\lift-base\lift-actor\src\main\resources
   [INFO] [scala:compile {execution: scala-compile}]
   [INFO] Checking for multiple versions of scala
   [INFO] includes = [**/*.scala,**/*.java,]
   [INFO] excludes = []
   [INFO] Compiling 0 source files to
   C:\dev\gitrepo\liftweb\lift-base\lift-actor\target\classes
   [INFO] Nothing to compile - all classes are up to date
   [INFO] [compiler:compile]
   [INFO] Nothing to compile - all classes are up to date
   [INFO] [resources:testResources]
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] skip non existing resourceDirectory
   C:\dev\gitrepo\liftweb\lift-base\lift-actor\src\test\resources
   [INFO] [scala:testCompile {execution: scala-testCompile}]
   [INFO] Checking for multiple versions of scala
   [INFO] includes = [**/*.scala,**/*.java,]
   [INFO] excludes = []
   [WARNING] No source files found.
   [INFO] [compiler:testCompile]
   [INFO] No sources to compile
   [INFO] [surefire:test]
   [INFO] Surefire report directory:
   C:\dev\gitrepo\liftweb\lift-base\lift-actor\target\surefire-reports

   ---
    T E S T S
   ---
   There are no tests to run.

   Results :

   Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

   [INFO] [jar:jar]
   [INFO] Building jar:

  C:\dev\gitrepo\liftweb\lift-base\lift-actor\target\lift-actor-1.1-SNAPSHOT.jar
   [INFO] [source:jar-no-fork {execution: default}]
   [INFO] [bundle:bundle {execution: default-bundle}]
   [INFO] [install:install]
   [INFO] Installing

  C:\dev\gitrepo\liftweb\lift-base\lift-actor\target\lift-actor-1.1-SNAPSHOT.jar
   to

  C:\Users\Naftoli\.m2\repository\net\liftweb\lift-actor\1.1-SNAPSHOT\lift-actor-1.1-SNAPSHOT.jar
   [INFO]

  
   [ERROR] BUILD ERROR
   [INFO]

  
   [INFO] Error installing artifact's metadata: Error installing metadata:
   Error updating group repository metadata

   only whitespace content allowed before start tag and not \u0 (position:
   START_DOCUMENT seen \u0... @1:1)
   [INFO]

  

[Lift] Re: Unit Testing

2009-11-02 Thread Randinn

This may help...

http://wiki.github.com/dpp/liftweb/how-to-unit-test-lift-snippets-with-a-logged-in-user


On Nov 3, 4:13 pm, sunanda sunanda.pa...@gmail.com wrote:
 Hi,
 How to do unit testing in Lift Framework.
 Sunanda.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] List of Users

2009-11-01 Thread Randinn

I'm trying to generate a list of users onto the screen but am unable
to see the model here's me code so far

package com.scalalist.project.snippet

import com.scalalist.project.model.User
import net.liftweb.util.BindHelpers._
import scala.xml._


class ListUser {

def list(html: NodeSeq) : NodeSeq = {
toShow.flatMap(item =
bind(user, html,
 firstName - user.firstName,
 lastName - user.lastName,
 email - user.email,
 locale - user.locale,
 timezone - user.timezone,
 FuncAttrBindParam(view_href, _ =
   Text(view/+ (user.primaryKeyField)),href),
 FuncAttrBindParam(edit_href, _ =
   Text(edit/+ (user.primaryKeyField)),href),
 FuncAttrBindParam(delete_href, _ =
   Text(delete/+ (user.primaryKeyField)),href)
)
)
}

private def toShow =
User.findAll();

}

__

lift:surround with=default at=content
  table
 thead
tr
thFirst Name/th
thLast Name/th
thEmail/th
thLocale/th
thTimezone/th
thView/th
thEdit/th
thDelete/th
/tr
  /thead

  tbody class=stripeMe
  lift:ListUser.list 
tduser:firstName//td
tduser:lastName//td
tduser:email//td
tduser:locale/
  tduser:timezone//td
  tda user:view_href=View/a/td
  tda user:edit_href=Edit/a/td
  tda user:delete_href=Delete/a/td
  /tr
  /lift:ListUser.list
  /tbody
  /table
/lift:surround


How can I get it to see the model objects? I've noticed ModelView
would that be a better way?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: List of Users

2009-11-01 Thread Randinn

Doh!, very sorry about that.

On Nov 2, 11:14 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Nov 1, 2009 at 2:00 PM, Randinn rand...@gmail.com wrote:

  I'm trying to generate a list of users onto the screen but am unable
  to see the model here's me code so far

  package com.scalalist.project.snippet

  import com.scalalist.project.model.User
  import net.liftweb.util.BindHelpers._
  import scala.xml._

  class ListUser {

     def list(html: NodeSeq) : NodeSeq = {
         toShow.flatMap(item =

 This should read:

 toShow.flatMap(user =



             bind(user, html,
                  firstName - user.firstName,
                  lastName - user.lastName,
                  email - user.email,
                  locale - user.locale,
                  timezone - user.timezone,
                  FuncAttrBindParam(view_href, _ =
                    Text(view/+ (user.primaryKeyField)),href),
                  FuncAttrBindParam(edit_href, _ =
                    Text(edit/+ (user.primaryKeyField)),href),
                  FuncAttrBindParam(delete_href, _ =
                    Text(delete/+ (user.primaryKeyField)),href)
             )
         )
     }

     private def toShow =
         User.findAll();

  }

  __

  lift:surround with=default at=content
   table
      thead
         tr
             thFirst Name/th
             thLast Name/th
             thEmail/th
             thLocale/th
             thTimezone/th
             thView/th
             thEdit/th
             thDelete/th
         /tr
       /thead

       tbody class=stripeMe
           lift:ListUser.list 
             tduser:firstName//td
             tduser:lastName//td
             tduser:email//td
             tduser:locale/
                   tduser:timezone//td
                   tda user:view_href=View/a/td
                   tda user:edit_href=Edit/a/td
                   tda user:delete_href=Delete/a/td
               /tr
           /lift:ListUser.list
       /tbody
   /table
  /lift:surround

  How can I get it to see the model objects? I've noticed ModelView
  would that be a better way?

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



[Lift] Re: A Critique On Lift

2009-10-24 Thread Randinn



 Scala is not like, for example, BASIC, where you can look up FOR, IF/
 THEN/ELSE. there's lots of individual and compound punctuation marks
 that are very difficult to search for online and in PDFs (try
 searching for !).



This is where I am coming from, coding after a 16 or so year hiatus
and my main language was basic so I guess I am one of the rare ones
here who doesn't have the OOP/Java hang-ups, I just have a whole
different set of hang-ups to deal with. I have been looking at Scala
for some months and have to admit it is starting to sink in, of course
having to learn everything else in order to learn it is making it take
a bit longer.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: A Critique On Lift

2009-10-24 Thread Randinn

This may not be it, but you can at least print out this list :)

http://jim-mcbeath.blogspot.com/2008/12/scala-operator-cheat-sheet.html

On Oct 24, 6:47 am, bob rbpas...@gmail.com wrote:
 I'll repeat: there are no operators in scala

 s/operators/methods-with-operator-like-names/

 anywhere, here's a typical case:

 import some.library.package.foo._

 val a = bar 42
 val b = a ~!~ 3.14159

 you can't easily tell that bar is being imported via foo._ .
 what is bar's return type?
 what does ~!~ do?

 i'm not saying its not possible to track all this down, but you can't
 just print out a listing of a class and take it on the subway. you
 have to have access to the scaladocs and possibly even the sources.

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



[Lift] Re: Proposal : Lift ticketing system

2009-10-24 Thread Randinn

Seems to be a good idea, Glen is working on one...

http://github.com/glennSilverman/democritus

his could be folded over and fleshed out...

On Oct 25, 2:17 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 How about we integrate the wiki, blog, forum, and issue tracker into the CMS? 
 ;)
 Seriously, maybe it would be a good idea to create a repo and list, and start 
 serious discussion on all aspects of its design. Maybe it could become a big 
 community project, with lots of feedback to Lift.

 -

 jlist9jli...@gmail.com wrote:

 CMS, wiki, blog, forum also sound more interesting than bug tracking
 system to me :-)

 On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote:

  I don't mean to be negative, but are other options being considered
  besides a ticketing system?  I kind of wonder if the effort is worth
  it when excellent alternatives exist (like JIRA -- their Git
  integration may interest you:  
  https://plugins.atlassian.com/plugin/details/4984
  -- I have used their Subversion integration and was very pleased).

  I would be far more interested in seeing something done for the
  benefit of the Lift Web Site.  (Is it written with Lift?)  I don't see
  a Lift CMS -- and that is something that could evolve well over time.
  I think it is important for a web framework to use their own stuff,
  and it should be indicative of the cool things that it can do,
  stability, scale, and performance...  (I am amazed that I have seen
  rather poor demonstrations of this, specifically by Adobe and JBoss --
  but again, I'm not trying to be negative...)

  I see the Lift site integrating Google Analytics...  Is that something
  that could be out of the box with Lift?  That could be a selling
  point to people making external web sites.

  Another area that would be neat to develop is instrumentation.  Sort
  of the JMX-Console equivalent for Lift.  For scalability and sizing
  analysis, this would be really useful.

  Having said that, one major feature that I feel is missing from github
  is the lack of attachments for an issue.  How do you attach test cases
  or patches for an issue?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: One minor exception to the no-RTFM rule

2009-10-22 Thread Randinn

Hehe, Yes, I've noticed quite a few of those, you might want to post
that on the groups main page.

On Oct 23, 3:33 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,
 We've got a solid rule in Lift-land which is we don't respond with RTFM.
  Why?  Because we want to encourage people to ask questions.

 There's one exception to that rule that I'll make now.  If your code
 suddenly breaks (we do make breaking changes to Lift from time to time),
 please at least search the project archives for the phrase Breaking
 Changes.  We work hard to make sure the breaking changes are few and far
 between.  We work hard to flag breaking changes long before they happen.
  Yeah, I know not everyone reads every post on this list, but folks with
 production apps should spend a little time here.

 But, before you post Gee my app was compiling yesterday and it's not
 compiling today, please search for recent posts with the words Breaking
 Changes in the title.

 We will flag these.  We promise.

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



[Lift] Re: S.deleteCookie broken in M6

2009-10-22 Thread Randinn

And don't forget goatrodeo, wizard, oh and the CMS. Quite a plate you
have there, Makes my working and trying to get my site working look
like a pittance.

On Oct 23, 3:27 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Oct 22, 2009 at 9:07 AM, harryh har...@gmail.com wrote:

   File a ticket.

  Done

   It's Harry's tickets day for me today.  The more you file,
   the more that get fixed.

  Oh my. That's really quite something there.

 And for all of you who want to see what's on my Lift (or ESME) 
 plate:https://www.rememberthemilk.com/home/bearfeeder/10510876/



  -harryh

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



[Lift] Re: Security Explained

2009-10-22 Thread Randinn

I've been pondering this for some time, could an actor be used as a
cookie, if so would that render the stealing attack mote?

    7. Lift uses the container's session management (usually JSESSIONID) for
    session management.  As far as I know, Jetty, Tomcat, Glassfish are secure
    in terms of the way they deal with sessions.  Of course, anything that's 
 not
    over SSL is vulnerable to a cookie stealing attack.

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



[Lift] A Critique On Lift

2009-10-21 Thread Randinn

http://localhost3000.de/2009/10/a-quick-glance-at-lift/

The site above is a blog post from a Rails developer, he had some good
and bad things to say about Lift and since I do not know enough to
debate with him I thought I'd post it here.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Wizard code in master

2009-10-16 Thread Randinn

That would be a great added feature, sorry for the late comment on the
subject. Ah, full disclosure, I do not care for green...

On Sep 12, 4:14 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 The wizard stuff is in the lift-wizard package.  Right now, it's random
 thoughts that are forming into something that will be semantically 
 likehttps://www.lostlake.org/wizard.wmvbut be syntactically a Scala DSL.
 I need 2 or 3 solid days working on Wizard to make it usable, but I haven't
 found those 2 or 3 days yet.



 On Fri, Sep 11, 2009 at 10:06 AM, glenn gl...@exmbly.com wrote:

  Is this wizard code available for review somewhere?

  I'm writing a snippet that allows users to add or edit
  site content - heading, summary, tags, etc. - and then depending on
  the content
  type selected - html, file, form, etc. - takes the user to a page
  specifically for adding/editing
  that content type (e.g. a file upload page, if that is required).

  Glenn

  On Sep 3, 3:38 am, Timothy Perrett timo...@getintheloop.eu wrote:
   Thought as much ;-)

   Just something else to throw into discussion, but perhaps it would be
   great ifwizardprocesses could be serialised into a couple of formats
   (XML, JSON??)... this is something that I could see myself using to
   load differentwizardsteps dynamically from my database or such.

   Cheers, Tim

Right now, I think it's vomit in process, but later it will turn into
  work
in process and later code suitable for others to make fun of.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: The quality of the Lift list [was: Don't shoot the non-XML messenger ...]

2009-10-14 Thread Randinn

Do not beat yourself up for it, you started a great project and it
peeked the interests of some great coders. No matter what you do there
are going to be times like this, luckily it's rare, as we have all
seen some people cannot work well with others, at the least be abrupt
at most insulting. My suspicion is he may not be able to control it
but that's not important. I think you handled the situation very well.
I know this is Very off Lift-centric topic so I'll not write about it
anymore.

On Oct 15, 2:49 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,

 It is not lightly that I ban someone from the group... this is only the
 second time I've banned a substantive poster.  I'm going to discuss some of
 the process and then touch on some of the substance of the questions that
 the poster was getting at.

 The Lift community, reflected on this list, is an inquisitive, friendly
 place where people who have a passion for building great web apps converge
 and contribute to making Lift a really great open source framework.  Newbies
 are the lifeblood of the group because they come with fresh perspectives and
 new ways of looking at things.  Questions from newbies help us refine and
 enhance Lift and the associated documentation.  Folks who are building
 production apps on Lift receive the fastest turn-around because these folks
 are betting their careers and their enterprises (even enterprises of one) on
 Lift and they deserve the best support in the industry for taking this risk.

 A big part of why this community is successful (in terms of size, quality of
 discussion, and quality of results) is because we keep the quality of
 discussion high.  How do we do this?  The folks who have been on the list
 generally keep the level of discussion to the Lift ideals.  We reward
 newbies with quick answers and encourage friendly discourse.  We are
 generally slower to respond to those that are less reflective of the list
 ideals.  I warn folks who are pushing boundaries (usually privately, but
 every once in a while publicly) and where the line is.

 In this case, nothing worked.  The poster was neither asking questions,
 giving usable feedback, or being polite in his engagement with the folks on
 the list.  I received a substantial number of private communications about
 this poster (which is pretty rare), and I took action.

 In terms of the substance, let me address to threat issue first.  I
 threatened to ban the poster from the list.  Perhaps DHH or Martin would not
 make such a threat.  I am very sure that the quality of discussion on the
 Lift list is higher than that on the Rails list (one of the reasons I
 started Lift was to be part of a nicer community.)  One cost of having a
 nicer place is excluding those who do not fit.  The second threat I made
 was to relay a tongue-in-cheek private communication I received about the
 poster to the list (after receiving the okay from the guy that made the
 communication to me.)  This threat was obvious, using video game rating
 language http://www.esrb.org/ratings/ratings_guide.jsp, Comic mischief
 and Cartoon violence.  It was something that even a 6 year old can
 distinguish from reality.  Put another way, the poster was talking about
 Kafkaesque experiences with using Lift and I responded with
 Jonesianhttp://www.youtube.com/watch?v=CrupqdGvsocfeature=PlayListp=62FED00...language.

 In terms of the broader issue of Lift's HTML templating system being XHTML
 only, yes, that's true.  Lift treats HTML templates as XML.  Lift's
 templating system is not a String templating system but an XML templating
 system.  This satisfies the needs to render content to HTML browsers.  If
 there are needs for generating other kinds of content, Lift is not as good,
 but in many cases there are better libraries for doing so.  Lift makes it
 very simple to integrate other rendering/templating engines into Lift,
 usually with a single line of code the dispatches the HTTP request to an
 alternate provider of a LiftResponse.  If the poster had simply said, I
 want to template non-HTML output, can you show me how? he would have gotten
 a nice example (and I might have even rolled it into demo.liftweb.net or
 maybe Tim might have blogged about it.

 Keeping things in XML has a number of advantages and a few disadvantages.
 First, the disadvantages: (1) you can't template non-XHTML responses and (2)
 everything must be well formed XML.  The advantages are (1) security (2)
 performance (it's easier to cache XML and the cost of mutating XML trees is
 O(log N)), (3) there is better separation of logic from the view (perhaps
 Terrance Parr's String Template library achieves this level of separation),
 and (4) the ability to mutate the resulting page (rewrite tags, move stuff
 to head/tail, consolidate scripts) is more performant and less error-prone
 than doing the same with a String-based representation.

 I will address Bill's security question.  For String-based rendering systems
 

[Lift] Re: Started integrating lift in a scala+spring project. Feedback?

2009-10-09 Thread Randinn

I'm sorry for the late question but have you looked at Scalaffinity?

http://sourceforge.net/projects/scalaffinity/

It might give you an idea or two...

On Oct 1, 8:14 pm, rintcius rintc...@gmail.com wrote:
 Hi,

 I have started integrating Lift in a Scala +Springexample project
 (seehttp://code.google.com/p/scala-spring). This first integration
 just has a single template and snippet for now but should give an idea
 how Lift can be integrated.
 Before I go further with this I would like some Lift experts to review
 the code I have written so far.
 Anybody? The changeset that adds lift integration is 
 inhttp://code.google.com/p/scala-spring/source/detail?r=18

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



[Lift] Re: Supporting Jetty 7 Continuations

2009-10-07 Thread Randinn

Looks like you need to open a ticket for that :P

On Oct 8, 3:50 am, Timothy Perrett timo...@getintheloop.eu wrote:
 My point exactly!

 To that end, why dont we just add a small matching statement or switch  
 that allows using Jetty 7 - only the package structure has changed not  
 the continuation API itself so it should be fairly trivial. The jetty-
 runner stuff would really get me out of jetty-wrapper-hell that im in  
 right now and would mean we could create an archetype that allows Lift  
 apps to be deployable as a standalone JAR with jetty built in... would  
 that not be über cool?

 Cheers, Tim

 On 7 Oct 2009, at 17:30, David Pollak wrote:



  On Wed, Oct 7, 2009 at 9:19 AM, Timothy Perrett timo...@getintheloop.eu
   wrote:

  I know that has been the plan - but I cant help but think that Servlet
  3.0 is still a long way off standardisation?

  It's been 3 months away from being a standard for almost 2 years. ;-)

  What do you think?

  Cheers, Tim

  On 7 Oct 2009, at 16:53, David Pollak wrote:

   I was hoping to generically support Servlet 3.0 continuations (which
   should work for Jetty 7 and Glassfish).  Please open a ticket for  
  it.

   On Wed, Oct 7, 2009 at 2:23 AM, Timothy Perrett timo...@getintheloop.eu
wrote:

   Guys,

   I just wanted to rename this thread and raise this for proper
   discussion. API's between J6.x and J7.x appear to be the same, its
   mainly the package names and structure that have changed.

   Is it feasible to add a match statement to replace the current val
   assignments that have essentially hardcoded dependency on J6.x?

   There's some great stuff in Jetty 7 that would really help me (and
   lots of others) out

   Cheers, Tim

   On Oct 5, 5:20 pm, Timothy Perrett timo...@getintheloop.eu wrote:
Id say that it would be easier to use a match statement as part of
   the
val assignment... The current code is just using reflection, so
factoring into a case statement shouldnt be too tough right?

Thoughts?

Cheers, Tim

On 5 Oct 2009, at 16:48, Indrajit Raychaudhuri wrote:

 On 05/10/09 5:29 PM, Timothy Perrett wrote:

 So I just wrote a Jetty 6 wrapper - getting the packaging
   working was
 not ideal and not as flexible as Jetty 7 jetty-runner.

 Yes, just took a look at jetty-runner. Feature wise, it's blows
   away
 the
 older mechanism man!

 Any thoughts in and around altering the lift code to adjust the
 package based on jetty version?

 I can think of two options basically:

 1. Move to jetty 7 and be done with it.

 2. Allowing user option (via -Djetty.version) during
 archetype:generate.
 jetty.version can be an overridable archetype property that
   defaults
 to
 (say 6) but user can do -Djetty.version=7.

 Depending on the jetty version, the *.scala, *.xml etc. can be
 filtered
 to make the right kind of adjustment during archetype creation.

 Cheers, Indrajit

 Cheers, Tim

 On Oct 5, 9:07 am, Timothy Perretttimo...@getintheloop.eu
   wrote:
 Indrajit,

 Your right, jetty-runner is Jetty 7. The only tie we have to
   Jetty 6
 would be this line:

       val cc = Class.forName
 (org.mortbay.util.ajax.ContinuationSupport)

 It would be trivial to add a match or whatever that determined
   the
 correct type to use... The question is, why haven't we done  
  this
 already? I suspect its just a time / capacity issue but wanted
   to
 check.

 I know I could write a jetty 6 wrapper, but that is my  
  fallback
 position as something more OOTB would be preferable.

 Cheers, Tim

 On Oct 5, 8:29 am, Indrajit Raychaudhuriindraj...@gmail.com
 wrote:

 Tim,

 Interestingly, we are trying out something similar in a  
  project
 here and
 this is absolutely cool stuff.

 In fact, Zimbra Desktop does this too. Pure Prism+Jetty
   bundled as
 'desktop application'.

 That you can have 'double-click' friendly application  
  helps :-)

 Few notes:

 1. Embedding Jetty server is super easy with
 org.mortbay.jetty.Server.
 Something that we have in Lift - well almost ;-) The
   RunWebApp in
 the
 archetypes are primitive use case of such. [1]

 2. Jetty Runner is available only on Jetty 7.x series I think
   (not
 certain). But yes, looks good either way.

 3. Jetty has this clean and nice way of having web-app  
  specific
 jetty
 config tucked inside the application (war or expanded) within
 WEB-INF/jetty-web.xml which is basically an XmlConfiguration
 instance
 applied on the specific WebApplicationContext instead of the
 Container
 Context. [2]

 4. An archetype that does self deploying is something that I
   have
 on my
 todo-list. Do you think this would make sense?

 5. Maven assembly plugin would do. I haven't tried this
   myself, but
 Maven shade plugin looks 

[Lift] Re: lift nearly inaccessible for newby

2009-10-06 Thread Randinn

Hello koveen,

I'll tell you some of my experiences with Lift/Scala to give you some
idea. I learned to code basic and some what they called then Machine
Language on a Commodore Vic 20 and a 64 oh so long ago, I learned a
bit of C then gave it up. I learned a bit of PHP since then but that's
it. I'm learning Scala/Lift because I want to, not for a particular
site I want to make. If you are determined to learn it there are some
things you need to understand then.

 OOP is the very first, if you do not have an understanding of Object
Orientated Programming then you'll not see why the code is written the
way it is. I would suggest learning what Functional Programming is as
well as you will be dealing with it to a lesser degree. You need to
learn the basics of Java (what classes are, whats an interface, etc.)
as they will be referenced because it is assumed you already know
these.

You have something most of the others here do not have, pre-conceived
notions, the same Java programmers that do know the basics are also
constrained a bit by that knowledge. Scala has differences from Java
that they have to overcome to learn the language.

What I suggest is if you have a site you have to make soon do it in
something else and study Scala more, if not then readas many of the
Scala books you can find (Davids is a great book and the lift book is
a great basic book) Martin's book I'd suggest getting as he has
definitions of Java terms and explains some of the Java basics.
Anyway, good luck.



On Oct 7, 4:40 am, koveen liep...@xs4all.nl wrote:
 David,

 no need to appologise! I think you do all necessary to clarify issues
 at hand and defend the interests of the lift community!
 And I am very happy with the liftbook too! But yes I've spent two
 weekends to try to accomplish some simple task and failed.

 And because of that, indeed it has crossed my mind to refer back to
 Rails, only because I really liked to watch those 256 video's in which
 Ryan Bates explaines some small detail. (I didn't watch them all)

 It would feel like a failure to me to change to back to Rails, because
 I have more confidence in Lift.

 But for a beginner it is not easy.

 Ko

 On Oct 6, 8:31 pm, David Pollak feeder.of.the.be...@gmail.com wrote:

  We try to make Lift accessible to a wide range of folks who want to build
  web sites.  However, there are lower-bounds on what we can do.  By and
  large, PHP is a great place to start in terms of mapping simple HTTP
  requests into simple web pages with a little RDBMS storage.
  Personally, I don't think Lift is materially more complex than Rails,
  although Rails' documentation and examples are worlds better than Lift's
  (this is not a put-down of the excellent work done by the whole community
  and Marius, Derek, and Tyler specifically, but a simple indication of being
  4-5 years behind Rails in terms of adoption.)

  So, Lift may not be the right thing for the original poster.  Maybe it will
  be in two years.

  Sorry.

  On Tue, Oct 6, 2009 at 12:52 AM, Stefan Langer
  mailtolan...@googlemail.comwrote:

   Not ment as a offence but you are in way over your head!
   A couple of things:
   1. You say you are a non-programmer but I assume you do understand Scala?
   Or else it is pointless to use Lift as it is based on the Scala language 
   and
   relies heavily on its features. Knowledge of Java is also a plus cause 
   some
   of the libs are not available in Scala but only in Java and it is better 
   to
   know Java in order to understand the libraries.
   2. You do have experience with websites? Complex web applications? If not
   then I suggest you start by doing a simple static page for your design to
   get to know the technics you are trying to use or you get yourself a
   programmer/webdesinger to do it for you. If you are not willing to learn
   about the technical details you will get in big trouble later on and I 
   mean
   trouble that can actually cost you money.
   3. If the above points do not seem valid for you then please get
   professional help
   4. If you are not scared by the above points and you are willing to invest
   then I suggest getting some example code and starting to disect that.
   Take a look athttp://github.com/tjweir/pocketchangeappwhichis a
   complete demo app in lift
   and take a look athttp://github.com/tjweir/liftbookfora liftbook that
   is available freely.

   Regards and good luck on your project

   Stefan

   2009/10/5 koveen liep...@xs4all.nl

   hi Naftoli,

   thanks for your interest.

   On Oct 5, 10:50 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
Being a non-programmer, and additionally not having a Java background,
which framework are you comparing Lift to when you say it's not easy?
:)

   First I read a book about rails, explaining things from the start, I
   did watch quite a lot of nice video's on the web explaining some basic
   tricks with Rails. I think it is a system that is easy to start with
   but I became 

[Lift] Re: lift nearly inaccessible for newby

2009-10-06 Thread Randinn

For the large part, I agree, the level of questions even I know is
geingt a bit too much, and the amount of patience you all use
answering them even though you know you just answered that a week ago
is commendable. That said you commiters don't have time to waste
answering those questions, that's what we are for :) and it is
happening. There are people here that are not commiters that are
answering those questions and others. I've been a lurker here for over
a year and even I am answering an occasional answer.

Maybe writing what you understand into the Wiki should be promoted
more, mention it on the title pages of lift, maybe even bring in a
commiter or two in with the express idea they are working on the Docs/
wiki. Bring in some support crew so the commiters only have to worry
about committing :)

 Personal Opinion:
 To be fair to Lift commit team, there is quite a bit of example code
 online for people to check out, but I'm not convinced they are
 actually looking at it.  Given the number of questions that come in
 that are easily solved with a Google Search, I don't know how pumping
 out more and more docs and examples will help, as it seems largely
 ignored.



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



[Lift] Re: Can we deploy lift webapp on Google App Engine?

2009-09-29 Thread Randinn

Try http://github.com/ymnk/lift-gae-jdo for a example, personally I
don't care for the limited approach GEA gives you, but that's me

On Sep 30, 9:22 am, Sury surysha...@gmail.com wrote:
 Thanks a lot ;-)

 On 29 Sep 2009, at 06:54 PM, TylerWeir tyler.w...@gmail.com wrote:



  google for lift appengine there a few out there.

  On Sep 29, 11:05 am, justss surysha...@gmail.com wrote:
  Great TylerWeir!!! Thanks a lot... Can you please suggest any kind of
  documentation for this... sorry to be bothering you for that. Any
  tutorial would be of great help.

  Cheers.

  On Sep 29, 2:08 pm, TylerWeir tyler.w...@gmail.com wrote:

 http://lift-example.appspot.com

  There are caveats though, the major one is the lack of actors.

  On Sep 29, 8:53 am, justss surysha...@gmail.com wrote:

  Hi All,

  I'm brand new to Scala and lift framework. I have created a very
  simple hello world web app in lift framework and deployed it
  successfully on tomcat.
  Now I want to know whether I can deploy the same lift application  
  on
  Google app engine or not? I have the war ready, so in I thought  
  that
  it should have been as simple as deploying any war on tomcat or
  websphere!!! But I see it is not ;-(
  Can anyone please guide me as to how I can deploy my mini lift  
  app on
  GAE?

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



[Lift] Re: Code Plugability in Lift

2009-09-26 Thread Randinn

You might want to take something for that, maybe some non-boiler-plate
code might help...

On Sep 26, 8:06 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I've been thinking about vomitting (I mean creating) bytecode at runtime
 that creates a mock class for Hibernate consumption.


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



[Lift] Re: CMS for Lift?

2009-09-18 Thread Randinn

Ah, nice, might I suggest contacting Glenn http://github.com/glennSilverman
as he has a good start on it.

On Sep 19, 2:38 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Sep 17, 2009 at 5:26 PM, Randinn rand...@gmail.com wrote:

  Is there a example of this as of yet?

 No, but I'm planning to spend October (and perhaps part of November)
 off-list (which is now consuming 3/4 of my day every day).  A CMS is on my
 to-do list.





  On Aug 20, 1:03 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   FWIW... I got roped into hosting a CMS by the PTA of my kids' school.  I
  may
   knock something together in Lift or leverage off the work Glenn has done.

   On Tue, Aug 18, 2009 at 3:26 PM, Timothy Perrett timo...@getintheloop.eu
  wrote:

Just my two cents, but I wouldn't use the lift namespace... If you use
  the
lift tags OOTB, you risk designers shoving lots of comet actors on a
  single
page. You would get more granular control if you created a special set
  of
tags:

cms:something .. /

Cheers, Tim

On 18/08/2009 23:00, Ewan ehar...@gmail.com wrote:

 I've been scratching my head about that one too.  I have used both
 Alfresco and opencms to produce both dynamic and static and in the
 case of dynamic they have their own servlet/filter to render the
 content - I've not yet spent enough time working out how and if they
 can be fitted together.

 For me, having used Hybris (J2EE ecommerce engine with some CMS built
 in), I'd like to be able to have page fragments in a template served
 from the CMS (lift snippets presumably) that would be created/
 maintained with some aspect of workflow by CMS user(s) in an
 associated CMS lift webapp with funky (X)HTML editor support.  My web
 guys, non-lift devs, can then sprinkle cms tags where appropriate.  A
 tag might be lift:cms contentId=news count=5 order=ascending/
 which would render the last five news items in ascending order.

 Just some thoughts

 -- Ewan

 On Aug 18, 10:09 pm, Terry J. Leach terry.le...@gmail.com wrote:
 I would like to know how the Lift/Scala can leveraged to with
  Alfresco
 or any other open source Java based CMS.

 Terry J. Leach

 On Aug 17, 2:09 pm, Stefan Scott stefanscottal...@gmail.com
  wrote:

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

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

 Some on-line demos here:

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

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

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

 Regarding dynamic site map creation - I do know that MODx has
 something like this, using WayFinder to create a menu from selected
 branches of the site's document

[Lift] Re: CMS for Lift?

2009-09-17 Thread Randinn

Is there a example of this as of yet?

On Aug 20, 1:03 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 FWIW... I got roped into hosting a CMS by the PTA of my kids' school.  I may
 knock something together in Lift or leverage off the work Glenn has done.

 On Tue, Aug 18, 2009 at 3:26 PM, Timothy Perrett 
 timo...@getintheloop.euwrote:





  Just my two cents, but I wouldn't use the lift namespace... If you use the
  lift tags OOTB, you risk designers shoving lots of comet actors on a single
  page. You would get more granular control if you created a special set of
  tags:

  cms:something .. /

  Cheers, Tim

  On 18/08/2009 23:00, Ewan ehar...@gmail.com wrote:

   I've been scratching my head about that one too.  I have used both
   Alfresco and opencms to produce both dynamic and static and in the
   case of dynamic they have their own servlet/filter to render the
   content - I've not yet spent enough time working out how and if they
   can be fitted together.

   For me, having used Hybris (J2EE ecommerce engine with some CMS built
   in), I'd like to be able to have page fragments in a template served
   from the CMS (lift snippets presumably) that would be created/
   maintained with some aspect of workflow by CMS user(s) in an
   associated CMS lift webapp with funky (X)HTML editor support.  My web
   guys, non-lift devs, can then sprinkle cms tags where appropriate.  A
   tag might be lift:cms contentId=news count=5 order=ascending/
   which would render the last five news items in ascending order.

   Just some thoughts

   -- Ewan

   On Aug 18, 10:09 pm, Terry J. Leach terry.le...@gmail.com wrote:
   I would like to know how the Lift/Scala can leveraged to with Alfresco
   or any other open source Java based CMS.

   Terry J. Leach

   On Aug 17, 2:09 pm, Stefan Scott stefanscottal...@gmail.com wrote:

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

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

   Some on-line demos here:

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

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

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

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

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

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

   - Stefan Scott

   On Aug 16, 3:13 pm, glenn gl...@exmbly.com wrote:

   Philip,

   I'm working on a cms system in Lift. Right now, it 

[Lift] Silly Question

2009-09-15 Thread Randinn

I was wondering if the plan is to move to record eventually why is
there improvements being made to mapper? Are they only debugging
changes?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Ajax example from the book

2009-09-14 Thread Randinn

Not at the moment but it does have a group

http://groups.google.com/group/the-lift-book

On Sep 15, 5:45 am, Jack Widman jack.wid...@gmail.com wrote:
 I was referring to that book. Is there another? :)
 Thanks for your help Daniel.

 On Mon, Sep 14, 2009 at 9:52 AM, Daniel Nelson dpn53...@gmail.com wrote:

  If you're referring to the Exploring Lift book, have a look at Section
  3.11.1 Binding Values in Snippets where it explains bind. (I'm new
  to Lift myself and hopefully not leading you astray.)

  1. myFunc's html parameter is fed automatically by the HTML Lift
  Template.  In the follow example, everything between
  lift:SomeClass.myFunc and /lift:SomeClass.myFunc is passed to
  myFunc.

  lift:surround with=default at=content
         h2Hello World/h2
         lift:SomeClass.myFunc form=POST
                 p Some Text hello:description //p
                 hello:button /
         /lift:SomeClass.myFunc
  /lift:surround

  2. hello is a prefix for referring to template elements by name. The
  HTML Lift template should have some like hello:button / which will
  get replaced by the evaluation after - within bind().

  3. I'm not sure what you mean How does the div work.

  On Sep 13, 10:24 pm, jack jack.wid...@gmail.com wrote:
   Could somebody please explain to me how this example from the book
   works.

    def myFunc(html:NodeSeq):NodeSeq  = {
           bind(hello,html,button -
            ajaxButton(Text(Press me),
                       { () =
                         println(Got an Ajax call.)
                        SetHtml(my-div, Text(That's it))
                      })
          )
     }

   In particular, what do I pass in as the html parameter?
   What is 'hello'?
   How does the div work?

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



[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread Randinn

What was the answer now that you have attained it?

On Sep 9, 3:02 am, Jack Widman jack.wid...@gmail.com wrote:
 You are right. I will fine tune my determine which is a good question to ask
 mechanism :)

 On Tue, Sep 8, 2009 at 12:54 PM, Timothy Perrett 
 timo...@getintheloop.euwrote:



  IMHO, you'd probably get better traction with such questions in a
  wider audience on the main scala-user list over at EPFL...

  Cheers, Tim

  On 8 Sep 2009, at 17:26, Jack Widman wrote:

   Right. I will try to keep to the topic :)

   I actually found him and he quickly answered me.

   On Tue, Sep 8, 2009 at 12:24 PM, David Pollak 
  feeder.of.the.be...@gmail.com
wrote:
   Jack,

   I'm not sure where N8han (the author of Databinder) hangs out, but
   it's not on the Lift list.  :-(

   Sorry.

   David

   On Tue, Sep 8, 2009 at 8:58 AM, jack jack.wid...@gmail.com wrote:

   Please forgive me for including so much code but I have an important
   demo fast approaching and I'm kind of in a bind. I am using
   Databinders Dispatch http library which is a wrapper around Javas
   HttpClient library. I have included the Http class below. Does anyone
   see how to set the user-agent header. Once again I apologize and would
   be much obliged for any help.

   import collection.Map
   import collection.immutable.{Map = IMap}
   import util.DynamicVariable
   import java.io.
   {InputStream,OutputStream,BufferedInputStream,BufferedOutputStream}
   import java.net.URI
   import java.util.zip.GZIPInputStream

   import org.apache.http._
   import org.apache.http.client._
   import org.apache.http.impl.client.{DefaultHttpClient,
   BasicCredentialsProvider}
   import org.apache.http.client.methods._
   import org.apache.http.client.entity.UrlEncodedFormEntity
   import org.apache.http.client.utils.URLEncodedUtils

   import org.apache.http.entity.StringEntity
   import org.apache.http.message.BasicNameValuePair
   import org.apache.http.protocol.HTTP.UTF_8
   import org.apache.http.params.{HttpProtocolParams, BasicHttpParams}
   import org.apache.http.util.EntityUtils
   import org.apache.http.auth.{AuthScope, UsernamePasswordCredentials,
   Credentials}

   case class StatusCode(code: Int, contents:String)
    extends Exception(Exceptional resoponse code:  + code + \n +
   contents)

   /** Http access point. Standard instances to be used by a single
   thread. */
   class Http {
    val credentials = new DynamicVariable[Option[(AuthScope,
   Credentials)]](None)
    val client = new ConfiguredHttpClient

    def credentialsProvider = new BasicCredentialsProvider {
      override def getCredentials(scope: AuthScope) = null
    }

   /**  /** Info Logger for this instance, default returns Connfiggy if
   on classpath else console logger. */
    lazy val log: Logger = try {
      new Logger {
        val delegate = net.lag.logging.Logger.get
        def info(msg: String, items: Any*) { delegate.info(msg, items:
   _*) }
      }
    } catch {
      case e: NoClassDefFoundError = new Logger {
        def info(msg: String, items: Any*) {
          println(INF: [console logger] dispatch:  + msg.format(items:
   _*))
        }
      }
    }
    **/
    /** Execute method for the given host, with logging. */
    def execute(host: HttpHost, req: HttpUriRequest) = {
      //log.info(%s %s%s, req.getMethod, host, req.getURI)
      client.execute(host, req)
    }
    /** Execute for given optional parametrs, with logging. Creates
   local scope for credentials. */
    val execute: (Option[HttpHost], Option[Credentials], HttpUriRequest)
   = HttpResponse = {
      case (Some(host), Some(creds), req) =
        client.credentials.withValue(Some((new AuthScope
   (host.getHostName, host.getPort), creds)))(execute(host, req))
      case (None, Some(creds), _) = error(Credentials specified
   without explicit host)
      case (Some(host), _, req) = execute(host, req)
      case (_, _, req) =
        //log.info(%s %s, req.getMethod, req.getURI)
        client.execute(req)
    }
    /** Execute full request-response handler. */
    def x[T](hand: Handler[T]): T = x(hand.request)(hand.block)
    /** Execute request and handle response codes, response, and entity
   in block */
    def x [T](req: Request)(block: Handler.F[T]) = {
      val res = execute(req.host, req.creds, req.req)
      val ent = res.getEntity match {
        case null = None
        case ent = Some(ent)
      }
      try { block(res.getStatusLine.getStatusCode, res, ent) }
      finally { ent foreach (_.consumeContent) }
    }
    /** Apply Response Handler if reponse code returns true from chk. */
    def when[T](chk: Int = Boolean)(hand: Handler[T]) = x(hand.request)
   {
      case (code, res, ent) if chk(code) = hand.block(code, res, ent)
      case (code, _, Some(ent)) = throw StatusCode(code,
   EntityUtils.toString(ent, UTF_8))
      case (code, _, _)         = throw StatusCode(code, [no entity])
    }
    /** Apply a custom block in addition to predefined 

[Lift] Re: CRUDify

2009-09-07 Thread Randinn

I'll ask the author.

On Sep 2, 3:49 am, David Pollak feeder.of.the.be...@gmail.com wrote:
 Good stuff!  Care to add a wiki page
 http://wiki.github.com/dpp/liftwebthat points to these blog posts?

 On Tue, Sep 1, 2009 at 10:10 AM, Randinn rand...@gmail.com wrote:

  Here are a couple of good posts on seting up CRUDify, I thought
  initiates like myself might benefit.

 http://neuralmonkey.blogspot.com/search/label/lift

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

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



[Lift] Re: May I know websites powered by Lift?

2009-09-03 Thread Randinn

http://groups.google.com/group/liftweb/browse_thread/thread/ed8f9e8e44f3c23f

On Sep 4, 12:07 am, surfman chinasmile...@gmail.com wrote:
 I tried searching websites powered by Lift but failed. Any one knows
 any? I suggest that David should edit a page list all websites powered
 by Lift on Liftweb Project. It will be great useful. Thanks.

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



[Lift] CRUDify

2009-09-01 Thread Randinn

Here are a couple of good posts on seting up CRUDify, I thought
initiates like myself might benefit.

http://neuralmonkey.blogspot.com/search/label/lift

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



[Lift] Re: TableEditor article

2009-08-31 Thread Randinn

Ah, I looked for tableeditor in the scaladocs but was unable to find
it.

On Aug 22, 6:05 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 I should have thought of that problem.
 I could make TableEditor more flexible when I have time, but the truth is 
 that I don't know if it's worth it. The whole thing is less than 80 LOC with 
 scaladocs (not counting the utilities it uses which you can also use). The 
 real logic that provides its semantics is ItemsList, which includes 
 sortability, and is public. So it's probably not worth it to not write your 
 own snippet! The value of TableEditor is that it's automatic--3 lines in the 
 view and two in Boot, (actually that could surely be lessened when I have a 
 chance) and it works on any table. Once your customizing it it might not be 
 worth it. It basically does old fashioned binds, backed by an ItemsList 
 (better name anyone?). Also it uses eachField from mapper.view.Util, but in 
 your case you know which fields you have.
 What do you think?

 -

 glenngl...@exmbly.com wrote:

 Naftoli,

 I must be doing something wrong. I tried the following, as you
 suggested,
 inserting the extra xml after the item:fields tag, but
 ManagerUsers.list does its
 own iteration through the table items and I get duplicate columns.

 ManageUsers.list just does a bind to the myuser:roles tag.

 table:items
     tr
       item:fields fields=firstname lastname email 
         td style=vertical-align: topfield:form //td
       /item:fields
       lift:ManageUsers.list
         td style=vertical-align: topmyuser:roles //td
       /lift:ManageUsers.list
       td style=vertical-align: topitem:removeBtn //td
     /tr
   /table:items

 Then, I have the added problem of saving changes to the item, since
 roles is not
 a field recognized by ItemsList.save.

 Any suggestions??

 Kevin,

 I implemented asmselect in my app and it works great.
 Thanks for the heads up.

 Glenn...

 On Aug 20, 3:44 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:

  It's not too hard to make your own without ajax.
  def addRemove(c: Child) = (_:Boolean) match {
    case true = if(!field.contains(c)) field+=c
    case false = field -= c}

  Then iterate (flatMap) over Child.findAll creating a checkbox initialized 
  to field.contains(x) with addRemove(x) as its setter.

  -

  Kevin Wrightkev.lee.wri...@googlemail.com wrote:

  Absolutely spot-on article here about multiple selection on 
  webpages:http://www.ryancramer.com/journal/entries/select_multiple/
  I'm a big fan of asmselect, and the real beauty is that we already have
  jquery support in lift out-of-the-box :)
  http://www.ryancramer.com/journal/entries/select_multiple/

  On Thu, Aug 20, 2009 at 11:27 PM, glenn gl...@exmbly.com wrote:

   Naftoli,

   I like the checkboxes style for a small selection (say 10 or less),
   and perhaps a multi-selectbox if the choices are more numerous.
   Another approach is to use two list boxes, one for the choices and
   another for the selections, with maybe a drag-and-drop capability or
   some add/remove buttons in between. I guess there is no good default
   solution.

   One enhancement to your tableeditor would be a tableviewer option,
   using a field:toXml instead of a field:form tag.

   Thanks for your help.

   Glenn...

   On Aug 20, 2:20 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
The name is really a misnomer. It's not a MappedField. So it's missing
   the opposite half: it _is_ the validSelectValues but it doesn't have the
   toForm method of MappedField's to make use of its values.
I'm not sure how a hypothetical toForm would work for a many-to-many
   field. Actually it depends on the circumstances. One option is how MS
   Access works---every time you select a value you get a new blank row. This
   is good where you can have many or duplicate children, but is more complex
   to implement. Similarly you can have a list of current children and a
   dropdown to add. Another option (where duplicates are not allowed) is a 
   set
   of checkboxes.

-

glenngl...@exmbly.com wrote:

Naftoli,

Sorry for the addendum, but ideally, it would be nice to
do something like:

override def validSelectValues: Box[List[(Long, String)]] ...

as you can with MappedLongForeignKey, and have a select box
display in the table.

Glenn...

On Aug 20, 12:51 pm, glenn gl...@exmbly.com wrote:

 Naftoli,

 I tried using TableEditor with a MetaMapper instance of a ManyToMany
 class, but header:fields and
 item:fields tags in the template didn't pick up the MappedManyToMany
 object in the class.

 Is there some method that I need to override,or is there some way to
 write the template that will
 resolve this?

 Glenn...

 On Aug 12, 2:48 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:

  I just wrote a brief wiki 

[Lift] Re: New features

2009-08-25 Thread Randinn

Anyone have code showing this in action as it were?

On Aug 6, 8:39 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Oh, I think I know what the problem is. I think I should classify it as a bug.
 Since you're adding a Role that isn't saved yet, and ManyToMany tracks the 
 children via the join table, it can't access the child. As a workaround save 
 the Role before adding it, although the need to do so is against the idea of 
 ManyToMany and OneToMany. I will see what I can do, G-d willing.

 -

 glenngl...@exmbly.com wrote:

 Naftoli,

 Hate to do this to you, but I'm getting the following error using
 ManyToMany for Users to Roles:

 Message: java.lang.RuntimeException: Broken join
         scala.Predef$.error(Predef.scala:76)
         net.liftweb.mapper.ManyToMany$MappedManyToMany$$anonfun$children$1$
 $anonfun$apply$1.apply(ManyToMany.scala:54)
         net.liftweb.mapper.ManyToMany$MappedManyToMany$$anonfun$children$1$
 $anonfun$apply$1.apply(ManyToMany.scala:54)
         net.liftweb.util.EmptyBox.openOr(Box.scala:372)
         net.liftweb.mapper.ManyToMany$MappedManyToMany$$anonfun$children
 $1.apply(ManyToMany.scala:54)
         net.liftweb.mapper.ManyToMany$MappedManyToMany$$anonfun$children
 $1.apply(ManyToMany.scala:54)
         scala.List.map(List.scala:812)
         net.liftweb.mapper.ManyToMany$MappedManyToMany.children
 (ManyToMany.scala:54)
         net.liftweb.mapper.ManyToMany$MappedManyToMany.elements
 (ManyToMany.scala:96)
         scala.Seq$class.flatMap(Seq.scala:293)
         net.liftweb.mapper.ManyToMany$MappedManyToMany.flatMap
 (ManyToMany.scala:44)

  def edit(ns: NodeSeq): NodeSeq = {
     val theUser = view.entity
     val addRole = TheBindParam(insert, view.snippet.link(edit, ()
 = theUser.roles += new Role, Text(S?(Add Role

     bind(user, ns,
          firstname - text(theUser.firstName.is, theUser.firstName
 (_), (size,20)),
          lastname - text(theUser.lastName.is,theUser.lastName(_),
 (size, 30)),
          roles - theUser.roles.flatMap{role =
               bind(role, ns,
                   name - role.name.toForm,
                   remove - SHtml.submit(S?(Remove), ()=
 theUser.roles -= role)
               )
           },
          addRole,
          submit - SHtml.submit(S?(Save), ()=view.save)
          )
     }

 The offending code seems to be the line: roles -
 theUser.roles.flatMap{
 in the above bind method when I click on the addRole link.

 Here's my User class:

 class User extends MegaProtoUser[User] with ManyToMany[Long,User]{
   def getSingleton = User // what's the meta server

    object roles
     extends MappedManyToMany(UserRole, UserRole.user, UserRole.role,
 Role)

 }

 What am I doing wrong? You can see how difficult it is to slog through
 this code, let alone just
 trying to explain the problem so I can get help.

 On Aug 5, 9:57 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

  I'll try.
  By the way, as per my correction, you can implement list the regular way 
  without ModelView, and just use ModelSnippet's load function in your edit 
  link or button, passing it the User instance.

  -

  glenngl...@exmbly.com wrote:

  Naftoli,

  I fixed my code per your comments and now I can edit and remove users
  from a list, as long as I populate the list with
  ModelView instances, as you said. As for the docs, this step was not
  clear to me at all. I just assumed that the list was
  just populated with User entities and the view in the ModelSnippet was
  instantiated with the selected User on each request.

  It sounds like your plate is pretty full, so I won't expect much, but
  sometime soon, could you provide an example, or improved
  docs, for using TableEditor and its related ItemsList trait.

  Thanks for all.

  Glenn...

  On Aug 5, 9:18 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

   Correction: ModelSnippet.load takes the actual Mapper instance, not the 
   ModelView wrapper.

   -

   Naftoli Gugenheimnaftoli...@gmail.com wrote:

   To answer your immediate question, the listing should not refer to the 
   snippet's view but new ModelView instances for each entity. Then 
   editAction is shorthand for the snippet's link method with a callback to 
   call load on the ModelView. To set the snippet's view's entity, either 
   call load on the snippet with the other ModelView, or call load on the 
   other ModelView (or just set its entity directly).
   As far as documentation, please tell me what scaladocs need what 
   clarification. Thanks.

   -

   glenngl...@exmbly.com wrote:

   Naftoli,

   Functional programming systems are notoriously difficult to document.
   The only way to really know what's going on is to meticulously trace
   through the source. But that requires
   time-consuming trial and error coding. So, without clear examples
   demonstrating exactly what 

[Lift] Re: New features

2009-08-25 Thread Randinn

Great! Thank you both for you help.


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



[Lift] Re: This is the official support channel for Lift

2009-08-19 Thread Randinn

If you haven't already David, you, may want to state where to go for
Lift help in your Twitter Bio.

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



[Lift] JPA Archetype error

2009-03-25 Thread Randinn

I fetched the JPA Archetype, maven installed it, cd'd to web, did a
mvn jetty:run and got this error in firefox. So in got into Netbeans
and did the same thing, I know I did something wrong, just what.


XML Parsing Error: junk after document element
Location: http://localhost:9090/
Line Number 4, Column 3:h2Welcome to the super duper 
catalog!/h2
^

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



[Lift] Absolute Beginner

2009-03-25 Thread Randinn

Are there any plans for some tutorials/info for people that have no
programming experience (at least none in the last decade)?

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



[Lift] Re: Absolute Beginner

2009-03-25 Thread Randinn

Further it's my understanding that the current crop of Scala books
assume you already have a working knowledge of java.

On Mar 26, 12:01 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Mar 24, 2009 at 9:35 PM, Randinn rand...@gmail.com wrote:

  Are there any plans for some tutorials/info for people that have no
  programming experience (at least none in the last decade)?

 Sorry.  Lift requires basic knowledge of Scala as well as some ability to do
 stuff at the command line.



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

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



[Lift] Re: Absolute Beginner

2009-03-25 Thread Randinn

Thinking on it further it seems I need to ask this of the Scala crowd.
My knowledge of programming is antiquated but I do not want to learn
Java just to un-learn parts of it Scala changes.

On Mar 26, 12:01 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Mar 24, 2009 at 9:35 PM, Randinn rand...@gmail.com wrote:

  Are there any plans for some tutorials/info for people that have no
  programming experience (at least none in the last decade)?

 Sorry.  Lift requires basic knowledge of Scala as well as some ability to do
 stuff at the command line.



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

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



[Lift] Re: [ANN] Beginning Scala is available for pre-order

2009-01-27 Thread Randinn

Also is Apress planning on a preview pdf with the book order?

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



[Lift] Re: Any special requirements for using JavaScript output from GWT in Lift?

2008-11-09 Thread Randinn

Thank you for the prompt response, that answered my question quite
handily.

On Nov 10, 6:43 am, David Pollak [EMAIL PROTECTED]
wrote:
 On Sun, Nov 9, 2008 at 11:30 AM, Randinn [EMAIL PROTECTED] wrote:

  I guess my question is how much javascript can lift use?

 As much as you can write or load into the browser.

  Is it
  seamless or is there a limit?

 I don't understand what you mean by seamless.  You can send JavaScript down
 to the browser.  You can service any form of HTTP request within Lift.  With
 the existing JQuery and YUI support, there are a lot of Lift classes that
 abstract the support for things such that you write them in Scala rather
 than raw JavaScript, but you can look at the Lift sources and see that the
 JQuery and YUI support is layered on top of generic Lift features.  You can
 create any form of content and service any form of HTTP request in Lift.

 Thanks,

 David



   Nobody to my knowledge has done any GWT with Lift.  I look forward to
  your
   questions and results.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Collaborative Task Managementhttp://much4.us
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

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