[Lift] Re: Js normalizations

2010-03-08 Thread Peter Robinett
+!

On Mar 7, 11:11 pm, Heiko Seeberger heiko.seeber...@googlemail.com
wrote:
 On 7 March 2010 19:37, Marius marius.dan...@gmail.com wrote:



  If you think that this makes sense I'll add a ticket and put it in my
  backlog.

 Makes a lot of sense for me. Go for it!

 Heiko

 Company: weiglewilczek.com
 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 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: Javascript Dependencies

2010-03-08 Thread Peter Robinett
Marius,

I love the simplicity of your proposal but I think that's also its
problem. Let's say I have something with several dependencies:
lift:MySnipet.work
  lift:dependencies
script src=dep1.js/
script src=dep2.js/
script src=myLib.js/
   // you got the idea
  /lift:dependencies
  // specific tags
/lift:MySnipet.work

As you can see, the user may as well be writing raw XHTML for a head
tag: they're required to know all the dependencies and put them in the
correct order.

Of course library authors can make this easier by writing snippets and
such that provide the dependencies:
def flotSelectableJS =
  lift:dependencies
script src=/classpath/jquery.js/
script src=/classpath/jquery.flot.js/
script src=/classpath/jquery.flot.selectable.js/
  /lift:dependencies

However, there is no representation of the Javascript files and their
individual dependencies independent on the XML tags and the order in
which they are placed. This is why I like using a Scala class better:
a developer can look at any instance of a Javascript file class and
see its dependencies without having to do any (easy) XML querying,
only converting the instance to XML when necessary. I guess one reason
I am pushing this approach is that I'm thinking in terms of lift-flot,
where the user does all their manipulation of the charts in straight
Scala, not Javascript or XHTML. This is also corresponds to how
various Javascript and jQuery operations are represented in
net.liftweb.http.js, and I'd like to complement them and continue in
that vein.

Oh, and I definitely want to be able to have conditional snippets like
you mention, that's a great feature.

What do you think?

Peter

On Mar 6, 11:33 am, Marius marius.dan...@gmail.com wrote:
 On Mar 6, 9:14 pm, Peter Robinett pe...@bubblefoundry.com wrote:





  Hi guys,

  Sorry I'm only coming back to this discussion now. I think what you're
  both proposing are the two parts of what should be the complete use-
  case. Yes, dependencies _exist_ per page and, yes, you want to
  _declare_ them per snippet or CometActor. The last (and only) commit
  on my pr1001_issue_branch shows my first stab at managing and
  registering the 
  dependencies:http://github.com/dpp/liftweb/tree/pr1001_issue_281.
  I think it is quite similar to what has been mentioned (compare
  JsScript to Marius' JsDependenciesTree, ignoring that his is more
  elegant =).

  I think my resolve and satisfied_? methods work correctly, though they
  still need someone with some CS knowledge to check them (for instance,
  I'm not doing any checks for circular dependencies right now). The
  only real question is _when_ to call them and how to act upon them. I
  was thinking at the snippet level, not the page level. Anything
  outputting (X)HTML to the browser needs to be able to register their
  dependencies (CometActors by their nature should really only do it in
  their initial render) for a page-wide set of dependencies which are
  then resolved and merged into the head of the HTML document when the
  page is finally rendered.

 Hmmm ... anything that is outputting (x)html. We have snippets, comet
 actors, LiftView-s. Any of these can called multiple times but IMHO
 registration should happen once. For snippets and comet we could a
 nested snippet such as:

 lift:MySnipet.work
   lift:dependencies
     script src=bla.js/
    // you got the idea
   /lift:dependencies
   // specific tags
 /lift:MySnipet.work

 lift:comet ...
   lift:dependencies
     script src=bla.js/
    /// you got the ides
   /lift:dependencies
   ...
 /lift:comet

 In this sense we are describing dependencies (could be both js and
 css) per snippet / per comet. the dependencies snippet could be either
 eagerly evaluated or not - shouldn't really matter. What it does it
 just put the script and link tags in a head element that lift will
 automatically merge.

 This could also be useful for conditional snippets . Say we have
 snippet A and snippet B on the same page each having different
 dependencies. But snippet A is invoked only when the user is logged on
 and snippet B only when user is logged off. Thus we won't have to
 modify scala API at all. Cause it seems that Lift already provides the
 goodies for us. Of course this can work even today if we replace
 lift:dependencies with head tag but people would probably find
 this nomenclature odd.

 I'm not sure if we should worry about circular dependencies in this
 case and neither for duplicates as lift head merge mechanism detects
 duplicates.

 I think this would cover snippets and comet actors and it should also
 work for LiftView-s

 Thoughts ?





  So, what if we have something like req.registerDependency(myJsScript)?
  The Request would store the dependencies that the LiftResponse would
  then take, resolve, and merge into the XHTML it's outputting. However,
  CometActors exist outside of normal requests. How do we get around
  this? CometActors are created initially in a Request, so

[Lift] Re: Js normalizations

2010-03-08 Thread Peter Robinett
Like Heiko, I vote for Marius to do what he proposes. ;-)

On Mar 8, 9:47 am, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Mon, Mar 8, 2010 at 12:36 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:

  +!

 Does this translate to I vote you must do this? ;-)

 +1







  On Mar 7, 11:11 pm, Heiko Seeberger heiko.seeber...@googlemail.com
  wrote:
   On 7 March 2010 19:37, Marius marius.dan...@gmail.com wrote:

If you think that this makes sense I'll add a ticket and put it in my
backlog.

   Makes a lot of sense for me. Go for it!

   Heiko

   Company: weiglewilczek.com
   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 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: Javascript Dependencies

2010-03-06 Thread Peter Robinett
Hi guys,

Sorry I'm only coming back to this discussion now. I think what you're
both proposing are the two parts of what should be the complete use-
case. Yes, dependencies _exist_ per page and, yes, you want to
_declare_ them per snippet or CometActor. The last (and only) commit
on my pr1001_issue_branch shows my first stab at managing and
registering the dependencies: 
http://github.com/dpp/liftweb/tree/pr1001_issue_281.
I think it is quite similar to what has been mentioned (compare
JsScript to Marius' JsDependenciesTree, ignoring that his is more
elegant =).

I think my resolve and satisfied_? methods work correctly, though they
still need someone with some CS knowledge to check them (for instance,
I'm not doing any checks for circular dependencies right now). The
only real question is _when_ to call them and how to act upon them. I
was thinking at the snippet level, not the page level. Anything
outputting (X)HTML to the browser needs to be able to register their
dependencies (CometActors by their nature should really only do it in
their initial render) for a page-wide set of dependencies which are
then resolved and merged into the head of the HTML document when the
page is finally rendered.

So, what if we have something like req.registerDependency(myJsScript)?
The Request would store the dependencies that the LiftResponse would
then take, resolve, and merge into the XHTML it's outputting. However,
CometActors exist outside of normal requests. How do we get around
this? CometActors are created initially in a Request, so we should be
able to connect then but I don't know that part of Lift well enough to
say how.

Jeppe, Marius, what do you think? Am I on the right track? Do my
suggestions address both of your concerns?

Peter

On Mar 1, 7:17 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Marius marius.dan...@gmail.com writes:
  Yes we do have different perspectives. I'm saying for page X here
  these are the JS dependencies whether you seem to say here is a
  snippet, and it needs these dependencies

 Yes

  I'd still prefer my paradigm (not because of my ego) because it'd be
  easier to manage redundancies, it applies generically for snippets,
  comet actors etc. without having to induce other type of API. It is
  maybe coarse grained vs. your proposal that seems to me finner
  grained.

 I think the two can co-exist, although I haven't thought it through wrt
 comet actors etc. That was what I was hinting at in the previous
 mail. At the of the day (or before sending a response at least :-) a
 page needs to have a well-defined list of script files to include.

 So it makes sense to start with your paradigm and my paradigm should
 be able to be layered on top if one wishes...

  However I'd be happy to see an implementation of any of these
  proposals. Maybe other people would have better ideas so perhaps Peter
  and/oryou could dig could make this happen?

 I'll let Peter take the lead and help where ever I can :-)

 /Jeppe

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



[Lift] Re: Lift or Scala first?

2010-03-05 Thread Peter Robinett
Yes, yes, yes! David's book was a fantastic guide for me as I learned
Scala and Lift at the same time.

Going back to the original question, I've learned a language and a
framework at the same time twice (Lift and Scala, Pylons and Python)
and I'm torn. On one hand having lots of high quality example code and
defined goals really helped guide my learning but on the other hand
you have that much more to learn at all once. I guess it really
depends on your style of learning.

Just my two cents...

Peter

On Mar 5, 2:23 pm, Wilson MacGyver wmacgy...@gmail.com wrote:
 I highly recommend first you read chapter 1-5 of Beginning Scala by
 David Pollak.

 then you are ready to start working through lift's tutorial, samples, etc.

 On Fri, Mar 5, 2010 at 12:19 PM, Mini Naim minin...@gmail.com wrote:
  Hi guys:
  I have a simple question, it's necessary to learn Scala first? or i
  can go with Lift framework, without learn Scala language?

  Thanks

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

 --
 Omnem crede diem tibi diluxisse supremum.

-- 
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: minified js artifacts (was Re: Re-opened #363)

2010-03-03 Thread Peter Robinett
I like Jeppe's option:
 Or 2.5: use 1. for the js artifacts included with Lift and let the user
 decide how to handle their own js files. I would hate to be forced into
 using the yui compressor for my own files that I put in toserve (not
 that it isn't a good idea :-)

This lets us keep plain js source in Lift (makes upgrading included js
artifacts easier and gives nicer diffs) while giving the user complete
control over their own files (e.g. perhaps they don't want a file
minified in test mode so that they can more easily track method calls
via Firebug).

Peter

On Mar 3, 9:19 am, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 On 03/03/10 10:21 PM, Jeppe Nejsum Madsen wrote:

  Indrajit Raychaudhuriindraj...@gmail.com  writes:

  [...]

  My interest in the current context, is to have consistent behavior in
  the js artifacts bundled with Lift.

  To me (and Marius) #2 is also worth consideration. True that you'd
  have a compressed (IDE unfriendly) js in the codebase but you'd also
  be able to remove build-time dependency on yui compressor. (one less
  dependency, one less step etc.)

  But why is it a problem with the build-time dependency on yui compressor
  if it only concerns the building of the lift-*.jar? Or am I missing
  something?

 No question with the worthiness of yui-compressor as such, it does the
 job perfectly and great for the purpose :) It about when to use it.

 If we are using it to minify the set of third party js files (jquery,
 json etc.) repeatedly which never change we might as well consider
 keeping the minified form directly. Hence the worthiness behind
 consideration. Note that Lift's internal js files (e.g., jlift.js) are
 fine going the yui-compressor route.

 But more than anything, we need to be consistently following either of
 these (particularly for the 3rd party js artifacts).



  Ideally the lift jars should contain both, and the non-minified used in
  development.

 Yes, better. Which actually led to the other thought (#3). But git
 should contain only one form in that case (the un-minified one).





  /Jeppe

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



[Lift] Re: Is CometActor the right tool for this job?

2010-03-02 Thread Peter Robinett
I agree with David and think a simpler AJAX approach would be better.
From my work with lift-flot I know it's definitely possible (see the
lift-flot AJAX example). You can even do your plotting entirely in
Javascript and only use Lift to return data requested via AJAX, which
I've done for updating some RaphaelJS graphics.

Peter

On Mar 2, 10:11 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Mar 2, 2010 at 5:55 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:

  Hi,

  I haven't used Lift's comet support at all, but now it seems like a
  use case has popped up. I can do this with POA (Plain Ol Ajax), but,
  at least for me, it looks like CometActor might be a better fit. The
  use case is this:

  We need to show a page containing a chart and some tables with data.
  The user should be able to filter, group, select new axis values etc
  in the page and the chart/table should be updated. All the views use
  the same underlying data, which will take some time (5-10s) to pull up
  initially. Changing views after initial load will reuse the data.

 Unless you're going to update the graph synchronously, the comet solution is
 not the best.  A graph with ajax/json elements that update the graph and
 send back new data to chart would be my choice.







  So I was thinking to have a CometActor that holds the data and can
  render the specified view. The UI will send view messages that tell
  how to slice the data. The benefits from the actor solution as I see
  it are:

  1) Can load initial data asynchronously
  2) Can hold on to the data while the user is on the page
  3) Page update is asynchronously, so the UI is perceived as faster

  Are these assessments correct? Or is this overkill? A few questions:

  1) I assume each page get their own instance of the actor so they can
  hold their own data. Is this correct?
  2) When is a CometActor shutdown? Sometime after the user navigates
  away from page?
  3) How do I get access to the CometActor instance on the page? I need
  to send a message to it from a function bound to e.g. an ajaxSelect

  /Jeppe

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

 --
 Lift, the simply functional web 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: Lift 2.0M2 LiftMerge order?

2010-03-02 Thread Peter Robinett
If you want to send data to a CometActor when it initializes from
Scala code (e.g. a snippet), try this:
for (session - S.session) {
  session.setupComet(myCometActor, Empty, myMessage)
}

Peter

On Mar 2, 3:36 pm, Rick R rick.richard...@gmail.com wrote:
  They are not being rendered in reverse.  There is no problem.  The code
  works correctly.
  Why?
  First, the code in the CometActor is a call a function in response to an
  event.  The page will be loaded before you can press the button or otherwise
  cause the event to be dispatched.
  Second, as I said in my first response, the code in liftAjax only gets
  executed after the page is loaded... that means if there's some random event
  that causes the page parsing to be delayed until after the liftAjax.js file
  is loaded and parsed, the calls in liftAjax that reference the variables on
  the page is not going to get executed until after the page is completely
  loaded (which also means the page is parsed and the inline JavaScript code
  is executed.)

 Thanks for clarifying.  Upon page load, I am attempting to make a
 JsonCall connect to the CometActor. This is how I intend to get the
 parameter created by the RewriteRequest function to the CometActor.
 So that it can use that param to fetch a previously allocated
 resource.

 I noticed a failure, which is why I posted to the list. The failure
 was that my call to to the comet server occurred before liftAjax.js
 was loaded. Thus causing javascript to stop evaluating and my json
 call to not occur.

 Thanks to your explanation above, I now realize that I should probably
 use some mechanism to specify that my jsonCall occurs on the
 body.onLoad event, or something like it, rather than being executed
 inline.

 Could you provide guidance in this area? Because I can't find anything
 in the docs that would allow me to specify such a task from scala
 source.  I could just hack something $(document).ready, but I was
 hoping to go for as much Lift as possible.

 Thanks.

-- 
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: Javascript Dependencies

2010-02-28 Thread Peter Robinett
Issue 281 is not going to make it into M3. The specific issue that
needs to be solved first is how to manage dependencies across multiple
snippets on one page. See the Assembla page for more information:
http://www.assembla.com/spaces/liftweb/tickets/281

Peter

On Feb 26, 5:14 pm, Peter Robinett pe...@bubblefoundry.com wrote:
 Mads, thanks for bringing ticket 281 to my attention, I'll address it
 in my patch.

 Jeppe, that's how I plan on using it with Flot: having Flot.init
 register the plugins and in the charts call toHTML as needed.

 Should have everything up on my pr1001_issue_322 branch by tomorrow.

 Peter

 On Feb 25, 1:14 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:



  Peter Robinett pe...@bubblefoundry.com writes:
   Hi all,

  [...]

   // Usage in boot.scala
   val myJsScript = new JsScript(flot :: jquery.flot.selectable.js ::
   Nil)
   ResourceServer.allow(myJsScript.allowResource)

   // Usage in a normal snippet
   def mySnippet = {
      head
              { myJsScript.toHTML }
      /head
      div
              The rest of the snippet...
      /div
   }

   // Usage in a CometActor
   class myActor extends CometActor with JsScriptDependency {
      override def scripts = List(new JsScript(flot ::
   jquery.flot.selectable.js :: Nil));
   }

   What do you think? It's a really quite basic but I think such an
   approach could work well for things like as lift-flot.

  It might be a start :-) I'm a little unsure if it supports the use case
  I would like to see:

  I'm using jqPlot (a flot-like lib) and would like to, in boot, just
  initialize the widget:

  jqPlot.init

  jqPlot comes with numerous plugins and this should be handled by the
  widget. Whether a plugin is loaded on a page depends on some higher
  level structure. Ie. if I wish to draw a pie chart, the pie chart plugin
  should be loaded.

  Looking back at this, it seems like this could work with the above

  In init: register all plugins
  In the specific charts, call toHtml on the plugins needed

  /Jeppe

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



[Lift] Re: scala-time and Lift pom.xml

2010-02-26 Thread Peter Robinett
Keep your Longs as millisecond UTC timestmaps and you should be ok.
That being said, it does make sense to keep your time information in
time-specific objects. To use scala-time add the following to the
dependencies section of your POM:
!-- for scala-time --
dependency
  groupIdorg.scala-tools/groupId
  artifactIdtime/artifactId
  version2.7.4-0.1/version !-- FIXME: Using version for Scala
2.7.4! --
/dependency

As I mentioned in your original thread about time, Jorge hasn't
compiled scala-time for the latest versions of Scala but I found that
the 2.7.4 version worked.

Peter

On Feb 26, 10:14 am, Jim Barrows jim.barr...@gmail.com wrote:
 On Fri, Feb 26, 2010 at 11:12 AM, Hannes hannes.flo...@gmx.li wrote:
   I swear that I ONLY use it to compare if things are older than other
  things. I think comparison of long values is faster than string or date
  comparison, or?

 In what timezone?  and for what calendar?







  thanks.

  On Fri, Feb 26, 2010 at 10:52 AM, Hannes hannes.flo...@gmx.li wrote:

  THANKS!

  You saved my weekend

  You're welcome.
   On the other hand using a Long as a date terrifies me, and makes me
  think your weekend, and the next three are all toast... but, maybe
  not...

   On Fri, Feb 26, 2010 at 10:43 AM, Hannes hannes.flo...@gmx.li wrote:

  Jim,

  Thanks that helped!

  Maybe its to late, or I don't know what, but.

  Its a bit complicated to use I think. What's about scala-time? For my
  purpose, I just need the the time as a number (e.g. long). How do I do 
  that?

  java.util.Date will give it to you.

  thanks.

  In what fashion do you mean integrate?
  Adding this:

  dependency
      groupIdjoda-time/groupId
      artifactIdjoda-time/artifactId
      version1.6/version

  /dependency

   to the dependency section to your maven POM will bring in the jar files.

  On Fri, Feb 26, 2010 at 10:14 AM, Hannes hannes.flo...@gmx.li wrote:

  Hi Peter,

  I read your mail, maybe you can help me. I'm wondering how I can
  integrate JodaTime or scala-time into my project.

  thanks.
  Hannes

  This is more a question for Jorge than anyone else but since it's Lift-
  related I thought I'd put it here:

  What's the easiest way to add scala-tools to my Lift project's
  pom.xml? My knowledge of Maven is very limited, but I hope that it is
  simply a matter of adding another repository and dependency.

  Thanks,
  Peter Robinett

  --

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

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

  --
  James A Barrows

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

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

  --
  James A Barrows

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

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

  --
  James A Barrows

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

[Lift] Re: Javascript Dependencies

2010-02-26 Thread Peter Robinett
Mads, thanks for bringing ticket 281 to my attention, I'll address it
in my patch.

Jeppe, that's how I plan on using it with Flot: having Flot.init
register the plugins and in the charts call toHTML as needed.

Should have everything up on my pr1001_issue_322 branch by tomorrow.

Peter

On Feb 25, 1:14 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Peter Robinett pe...@bubblefoundry.com writes:
  Hi all,

 [...]





  // Usage in boot.scala
  val myJsScript = new JsScript(flot :: jquery.flot.selectable.js ::
  Nil)
  ResourceServer.allow(myJsScript.allowResource)

  // Usage in a normal snippet
  def mySnippet = {
     head
             { myJsScript.toHTML }
     /head
     div
             The rest of the snippet...
     /div
  }

  // Usage in a CometActor
  class myActor extends CometActor with JsScriptDependency {
     override def scripts = List(new JsScript(flot ::
  jquery.flot.selectable.js :: Nil));
  }

  What do you think? It's a really quite basic but I think such an
  approach could work well for things like as lift-flot.

 It might be a start :-) I'm a little unsure if it supports the use case
 I would like to see:

 I'm using jqPlot (a flot-like lib) and would like to, in boot, just
 initialize the widget:

 jqPlot.init

 jqPlot comes with numerous plugins and this should be handled by the
 widget. Whether a plugin is loaded on a page depends on some higher
 level structure. Ie. if I wish to draw a pie chart, the pie chart plugin
 should be loaded.

 Looking back at this, it seems like this could work with the above

 In init: register all plugins
 In the specific charts, call toHtml on the plugins needed

 /Jeppe

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



[Lift] Re: Liftweb and javascript

2010-02-24 Thread Peter Robinett
I believe you just need to turn off a garbage collection setting in
boot.scala but if it's there I assume it's an app-wide setting...

Peter

On Feb 24, 1:46 pm, Cliff Zhao zha...@gmail.com wrote:
 I am new to the Lift framework and currently trying to evaluate it. Canada
 Government web sites need to comply with Government of Canada's Common Look
 and Feel 2.0 standard. One of the requirments ia that the web site needs to
 work with and WITHOUT javascript enabled.

 I tried with one simple form, I didn't use any javascript, while the view
 page source showed that Lift generated some javascript code.

 My question is: Can I turn it off to make the generated page javascript
 free?

 Thanks.

 Best Regards,
 Cliff Zhao

-- 
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] Javascript Dependencies

2010-02-24 Thread Peter Robinett
Hi all,

Following up on a previous thread about upgrading to Flot 0.6[1], I'd
like to discuss how (or even whether) we handle Javascript
dependencies within Lift. It'd be great to get this in as part of
#322[2] for M3 next week but I acknowledge I've been slow pushing
forward the discussion and that it may be a little tricky to get
right. Hopefully with this discussion we can chart a good course.

The issue of Javascript plugins comes up because the Lift side may
need to know about the additional Javascript files you're using. If
nothing else, ResourceServe.allow needs to be called if you want to
serve the Javascript file from within the Lift app. However, if you're
setting up Javascript calls from Lift (such as with some Ajax or Comet
functionality) you need to do a little more.

The current situation is the simplest: it is up to users to add the
files to the ResourceServer in boot.scala and to add a script tag to
their HTML output, whether in the document head or body. However,
there are various parts of Lift, particularly in lift-widgets, that
make use of additional Javascript files so it would be nice to have a
common, perhaps more abstracted way of doing this.

Here's what I'm thinking:

// at net.liftweb.http.js or something similar
class JsScript(path: List[String]) {
def baseUrl = 
def allowResource = {
case path = true
}
def toHTML = script type=text/javascript
src={ path.mkString(baseUrl, /, ) }/script
}

trait JsScriptDependency {
abstract def scripts: List[JsScript];
override lazy val fixedRender: Box[NodeSeq] =
Some(super.fixedRender.getOrElse(scala.xml.Text()) ++
scripts.map(_.toHTML))
}

// Usage in boot.scala
val myJsScript = new JsScript(flot :: jquery.flot.selectable.js ::
Nil)
ResourceServer.allow(myJsScript.allowResource)

// Usage in a normal snippet
def mySnippet = {
head
{ myJsScript.toHTML }
/head
div
The rest of the snippet...
/div
}

// Usage in a CometActor
class myActor extends CometActor with JsScriptDependency {
override def scripts = List(new JsScript(flot ::
jquery.flot.selectable.js :: Nil));
}

What do you think? It's a really quite basic but I think such an
approach could work well for things like as lift-flot.

Peter

[1]: 
http://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55c181475/0d91f4aee1af8977
[2]: 
https://www.assembla.com/spaces/liftweb/tickets/322-upgrade-the-flot-lift-widget-to-0-6

-- 
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 is the current working pattern for storing timestamps?

2010-02-22 Thread Peter Robinett
Hi Hannes,

Jonathan's suggestion of MappedDateTime is a good one and one that I
have used. However, I haven't been super happy about how time is
handled by, in my case, MappedDateTime + java.util.Date + MySQL
Datetime. I played around a little with making a MappedField that
holds a ScalaTime (ie JodaTime) object that would be persisted in a
database as a millisecond UTC timestamp but didn't get very far with
it. I believe if you look through this mailing list you'll find
someone else (sorry, I forget who!) talking about basically doing just
this and sharing some code. Anyway, just another possible approach...

Peter

On Feb 21, 10:59 am, Jonathan Hoffman jonhoff...@gmail.com wrote:
 Does MappedDateTime do what you want?

 Also look at MappedEnum for the status

 On Feb 21, 2010, at 6:07 AM, Hannes wrote:



  Hi Lifters,

  I'm using Mapper with Lift 1.1-M7 and I need to have some information about 
  time.

  Especially I wanna store a time-stamp for a status field that can have 
  three values: NEW; OPEN; CLOSED;

  So, what I thought about was defining two new fields open_time and 
  close_time that I'd use to filter/sort items.

  thanks for any ideas!

  --
  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: Versions: Netbeans, Scala and Lift

2010-02-22 Thread Peter Robinett
I'm running Netbeans 6.7.1 with the Maven and Scala 2.7 plugins quite
happily on OS X.

Peter

On Feb 21, 10:34 pm, Caoyuan dcaoy...@gmail.com wrote:
 Yes, Scala plugin for NetBeans 6.8 needs Scala 2.8, thus lift's 280 branches.

 For Maven project, there is no need to set Scala home and dependent
 libs in NetBeans, all these setting are in pom.xml.

 Cheers,
 -Caoyuan



 On Mon, Feb 22, 2010 at 5:51 AM, Ross Mellgren dri...@gmail.com wrote:
  Lift 1.1 and 2.0 are the same code stream by the way, just 1.1 was renamed 
  to 2.0 after 1.1-M8. That said, the most recent versions of 2.0-SNAPSHOT 
  and 1.1-SNAPSHOT run on Scala 2.7.7. The new 2.0-SNAPSHOT branch for Scala 
  2.8.0 (280_port_refresh, built as 2.0-scala280-SNAPSHOT I believe) runs on 
  Scala 2.8.0 Beta 1.

  I have no idea about NetBeans, though I've heard on the list a couple times 
  that the most recent versions are Scala 2.8 only.

  Keep in mind that Scala is extremely version sensitive and not backward 
  compatible.

  Hope that helps,
  -Ross

  On Feb 21, 2010, at 4:06 PM, Arie wrote:

  I've been going through as many posts as possible to try to establish
  how to use Netbeans (on a Mac) with Lift.

  I think I'm correct in saying that Netbeans 6.8 will only work with
  Scala 2.8 (beta/snapshot -http://wiki.netbeans.org/Scala68v1), and
  that from this (http://old.nabble.com/Lift-1.1-SNAPSHOT-under-
  Scala-2.8-with-NetBeans-and-the-Scala-plugin-td25302936.html) Lift 1.1
  will only work with Scala 2.7.5.

  What will Lift 1.0 work with in Netbeans (if it will), and related,
  how do I square getting Lift (version 1.0/1.1), to work in Netbeans
  6.8 which seems to require Scala 2.8?

  Will any of these problems be solved by Lift 2.0, and when is 2.0
  scheduled to come out!?

  Thanks.

  --
  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: What is the current working pattern for storing timestamps?

2010-02-22 Thread Peter Robinett
Yep, the consensus seems to be that you should use JodaTime (and scala-
time). You can use scala-time with Maven (URL:
http://scala-tools.org/repo-releases/org/scala-tools/time/) but it was
compiled with Scala 2.7.4. However, I didn't have any noticeable
problems running it on 2.7.7.

Peter

On Feb 22, 10:41 am, Hannes hannes.flo...@gmx.li wrote:
 Hi Peter,

 Thanks in advance.

 I was browsing through the list and read, that there's a lot of problems
 with the Java stuff. That's why I asked. I'll have a look at this
 JodaTime thing...

 thanks.



  Hi Hannes,

  Jonathan's suggestion of MappedDateTime is a good one and one that I
  have used. However, I haven't been super happy about how time is
  handled by, in my case, MappedDateTime + java.util.Date + MySQL
  Datetime. I played around a little with making a MappedField that
  holds a ScalaTime (ie JodaTime) object that would be persisted in a
  database as a millisecond UTC timestamp but didn't get very far with
  it. I believe if you look through this mailing list you'll find
  someone else (sorry, I forget who!) talking about basically doing just
  this and sharing some code. Anyway, just another possible approach...

  Peter

  On Feb 21, 10:59 am, Jonathan Hoffman jonhoff...@gmail.com wrote:

  Does MappedDateTime do what you want?

  Also look at MappedEnum for the status

  On Feb 21, 2010, at 6:07 AM, Hannes wrote:

  Hi Lifters,

  I'm using Mapper with Lift 1.1-M7 and I need to have some information 
  about time.

  Especially I wanna store a time-stamp for a status field that can have 
  three values: NEW; OPEN; CLOSED;

  So, what I thought about was defining two new fields open_time and 
  close_time that I'd use to filter/sort items.

  thanks for any ideas!

  --
  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: Back in the (Goat) Saddle

2010-02-15 Thread Peter Robinett
Hi David,

Goat Rodeo sounds cool and your blog post was very interesting. Just
to ask, do you see Goat Rodeo relating to Lift at all (sharing ideas?
code?) or do you see it as something that will take on a life of its
own completely divorced from Lift?

Peter

On Feb 14, 1:15 am, 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: Upgrade to Flot 0.6

2010-02-08 Thread Peter Robinett
Yep, Javascript dependencies can get tricky. Generally, Lift's head
merging means that you just include the necessary script tag in your
snippet right before the code that will call it. However, this isn't
always so easy (for example, when doing AJAX responses). This is of
course after the ResourceServer has allowed the appropriate file.

My inclination is to do something quite similar to what Aaron
describes. Looking towards a general solution, maybe there could be a
net.liftweb.http.js.JsScript class that can be used to include the
appropriate Javascript files via ResourceServer.allow. Would that make
sense?

Peter

On Feb 5, 11:51 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Peter Robinett pe...@bubblefoundry.com writes:
  Hi Aaron,

  I just added hoverable to my branch. Please let me know if you have
  any issues with it.

  As for plugins, I think it might take a little thinking to get right.
  Looking at the Flot plugin documentation 
  (http://flot.googlecode.com/svn/trunk/PLUGINS.txt), a plugin registers 
  itself by calling
  $.plot.plugins.push(pluginDefinitionObject). I think we could have a
  generic plugin trait and make individual instances for each specific
  plugin which would implement the minimum possible, which may simply be
  including the plugin javascript file on the page.

  However, including the plugin Javascript files could be tricky.
  Flot.init in boot.scala could be aggressive about including as many
  plugin files as possible, but that's not a particularly elegant way.
  However, including them elsewhere, for example as part of the
  Flot.render, would make uses like calling Flot.render in a CometActor
  tricky.

  Finally, I notice that plugins are allowed to add their own options to
  the new series option object we've been discussing. Because by their
  nature we can't anticipate all options, it may make sense that the
  series object should be some sort of Map.

  What do people think?

 I've also been thinking about this. I'm using jqPlot instead of Flot for
 various reasons and there the same issues arise. Also, several other
 jqQuery plugins are extendable with some sort of plugin mechanism and in
 much the same way. So maybe some of this could be made generic in some way?

 /Jeppe

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



[Lift] Re: Lift Google Summer of Code?

2010-02-07 Thread Peter Robinett
Hey Justin,

That sounds like a very cool idea. Do you know what the organization
has to do?

On Feb 6, 7:23 pm, Justin Reardon justin.rear...@gmail.com wrote:
 Hi folks,

 I'm a Computer Science student at the University of Waterloo, looking to 
 participate in Google Summer of Code program this spring. Have you given any 
 thought to applying as a mentoring organization this year? I've been playing 
 around with Lift for a while now and its been a delightful change from other 
 web development frameworks I've used. I'd love to spend a summer contributing 
 to the project!

 Thanks,
 Justin Reardon

-- 
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: Flot 0.6 Upgrade Breaking Change Question

2010-02-05 Thread Peter Robinett
It requires changing the FlotOptions trait. Actually, we could do
exactly what Flot 0.6 does and support both (just add the series
option without removing the lines, points and shadowSize options),
though then we'd need some way to prioritize one way over the other.

Peter

On Feb 5, 10:43 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Feb 4, 2010 at 4:07 PM, Peter Robinett pe...@bubblefoundry.comwrote:

  Hello all,

  Please tell me if you are using the lift-flot module. I am working on
  upgrading it to Flot 0.6 and as Aaron noted[1], Flot has switched to a
  slightly new format of specifying options. However, they have kept
  backwards compatibility, meaning that we could upgrade to the latest
  version of Flot without changing the way series options are specified.
  Would you prefer to have a breaking change in lift-flot now in order
  to ensure future compatibility or would you like to put off this
  change until a future version of Flot drops support for this now
  depreciated format?

 Can you deprecate the Scala calls that correspond to the deprecated Flot
 calls?  If so, that'd be optimal.  I'm not sure how widely used Flot is, but
 unless there are more than 3 people who object to a breaking change, I'd be
 okay with it.







  Peter

  [1]:
 http://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55...

  --
  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: Upgrade to Flot 0.6

2010-02-05 Thread Peter Robinett
Hi Aaron,

I just added hoverable to my branch. Please let me know if you have
any issues with it.

As for plugins, I think it might take a little thinking to get right.
Looking at the Flot plugin documentation (http://flot.googlecode.com/
svn/trunk/PLUGINS.txt), a plugin registers itself by calling
$.plot.plugins.push(pluginDefinitionObject). I think we could have a
generic plugin trait and make individual instances for each specific
plugin which would implement the minimum possible, which may simply be
including the plugin javascript file on the page.

However, including the plugin Javascript files could be tricky.
Flot.init in boot.scala could be aggressive about including as many
plugin files as possible, but that's not a particularly elegant way.
However, including them elsewhere, for example as part of the
Flot.render, would make uses like calling Flot.render in a CometActor
tricky.

Finally, I notice that plugins are allowed to add their own options to
the new series option object we've been discussing. Because by their
nature we can't anticipate all options, it may make sense that the
series object should be some sort of Map.

What do people think?

Peter

On Feb 5, 6:13 am, Aaron Valade a...@alum.mit.edu wrote:
 Looks great!

 One little nit is, could we add the hoverable option to
 FlotGridOptions?  That's a new feature which was added to Flot which
 shouldn't break backwards compatibility.

 Any thoughts about integrating plugins as the zooming and FlotOverview
 class don't work without the selecting plugin.

 - A



 On Thu, Feb 4, 2010 at 7:56 PM, Peter Robinett pe...@bubblefoundry.com 
 wrote:
  Hi Aaron,

  I've pushed the simplest update possible to my branch here:
 http://github.com/dpp/liftweb/tree/pr1001_issue_322. I will make the
  series options change if there are no significant dissenting voices in
  the thread I created[1]. In the meantime, do. The flotDemo app seems
  to work without any changes.

  What do you think?

  Peter

  [1]:http://groups.google.com/group/liftweb/t/ba7e0f76042ff562

  On Feb 3, 6:30 am, Aaron Valade a...@alum.mit.edu wrote:
  I've created a ticket here:

 http://github.com/dpp/liftweb/issues/issue/322

  Thanks again!
  - Aaron

  On Tue, Feb 2, 2010 at 10:10 PM, Peter Robinett pe...@bubblefoundry.com 
  wrote:
   You're welcome. I'm happy to look into adding Flot plugin support, but
   please open a ticket on GitHub (http://github.com/dpp/liftweb/issues).

   Peter

   On Feb 1, 10:22 am, Aaron Valade a...@alum.mit.edu wrote:
   Thanks Peter!

   One of the other things that changed between Flot 0.4 and 0.6 is that
   a plugin structure was introduced and some functionality was pushed
   out of the core and into a plugin, specifically the selection
   functionality which can be used for zooming and other interactions
   with the charted data.  I hate to tack on requests for more work, but
   if you get a chance, I'd appreciate if you could add functionality to
   the Lift Flot Widget to allow use of these plugins. I'm in the process
   of making some small changes with the Flot Widget to support these
   plugins in my local fork of Lift and would be happy to share what I've
   done, if that's allowed.  Otherwise, I'd be very eager to provide
   additional testing of any capabilities that you make available or any
   other help that I can provide within the guidelines of the Lift
   project.

   Thanks,
   - A

   On Mon, Feb 1, 2010 at 12:28 PM, Peter Robinett 
   pe...@bubblefoundry.com wrote:
Ok guys, I'll work on this in the next few days (I'm out of town right
now).

Peter

On Jan 31, 3:20 pm, Timothy Perrett timo...@getintheloop.eu wrote:
It seems like peter will take ownership of this and make it happen
ASAP so a patch / diff should not be needed.

Peter, please confirm when you will roll this in a branch and put it
on review board?

Cheers, Tim

Sent from my iPhone

On 31 Jan 2010, at 22:48, Aaron Valade aval...@gmail.com wrote:

 I'm more than happy to submit the patch under the Lift IP policy,
 but I understand if you don't feel comfortable with that. And I can
 submit it anyway that works for you. I'm just looking to help give
 back to everyone that's helped me out. Albeit in a very, very small
 way.

 Sent from my iPhone

 On Jan 31, 2010, at 5:43 PM, David Pollak 
 feeder.of.the.be...@gmail.com
  wrote:

 Peter,

 Please keep in mind the Lift IP policy.  We don't pull from other
 repositories nor do we accept patches.  We'll have to do the Flot
 0.6 ourselves.

 Thanks,

 David

 On Fri, Jan 29, 2010 at 4:44 PM, Peter Robinett 
 pe...@bubblefoundry.com
  wrote:
 Aaron, thanks so much for taking the initiative to upgrade Flot, 
 it's
 something that I've been meaning to do. Just skimming over your
 changes, everything looks good. As for not using the packed 
 excanvas
 file, that should be ok since Lift

[Lift] Re: Map to JsObj

2010-02-05 Thread Peter Robinett
I know there was something simple. Thanks, now I just need to make
sure I have the right implicits imported and I'm good to go.

On Feb 5, 12:54 pm, Ross Mellgren dri...@gmail.com wrote:
 JsObj(map.toSeq: _*) ?

 -Ross

 On Feb 5, 2010, at 3:53 PM, Peter Robinett wrote:



  I thought it would be something that already exists but I can't for
  the life of me find out how to convert a Map to a JsObj. Am I missing
  something basic in net.liftweb.http.js?

  Thanks,
  Peter

  --
  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: Out of Memory Errors Building Lift

2010-02-04 Thread Peter Robinett
Thanks Jono, but unfortunately that didn't help.

Peter

On Feb 3, 6:53 pm, Jonathan Ferguson j...@spiralarm.com wrote:
 Try upgrading to the latest version of maven (2.2.1 or later ). I was having
 a simliar issue.

 Cheers
 Jono

 j...@192-168-1-69:~ $mvn -version
 Apache Maven 2.2.1 (r801777; 2009-08-07 05:16:01+1000)
 Java version: 1.6.0_17
 Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
 Default locale: en_US, platform encoding: utf8
 OS name: mac os x version: 10.6.2 arch: x86_64 Family: mac
 j...@192-168-1-69:~ $

 On 4 February 2010 13:09, Peter Robinett pe...@bubblefoundry.com wrote:



  Hi all,

  I seem to be to doing something wrong, as I keep getting out of memory
  errors when trying to build Lift from source. My command is:
  mvn -DXmx1024m -U clean install

  Am I missing something obvious? I've tried with 1024 and 2048
  megabytes of memory. I'm running Java 1.6.0_17 and Maven 2.2.0 on OS X
  (10.6) and have 4 gigabytes of physical memory.

  Peter

  --
  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: Out of Memory Errors Building Lift

2010-02-04 Thread Peter Robinett
Hmm, I see that it's always when running YUI Compressor on lift-
webkit. I actually had issues with YUI Compressor in the past (http://
groups.google.com/group/liftweb/browse_thread/thread/
f338204c6ee02dd3/3025b5ef300b4ee2) but this time I'm running the Sun
JVM, not OpenJDK.

Peter

On Feb 4, 11:19 am, Peter Robinett pe...@bubblefoundry.com wrote:
 Thanks Jono, but unfortunately that didn't help.

 Peter

 On Feb 3, 6:53 pm, Jonathan Ferguson j...@spiralarm.com wrote:



  Try upgrading to the latest version of maven (2.2.1 or later ). I was having
  a simliar issue.

  Cheers
  Jono

  j...@192-168-1-69:~ $mvn -version
  Apache Maven 2.2.1 (r801777; 2009-08-07 05:16:01+1000)
  Java version: 1.6.0_17
  Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
  Default locale: en_US, platform encoding: utf8
  OS name: mac os x version: 10.6.2 arch: x86_64 Family: mac
  j...@192-168-1-69:~ $

  On 4 February 2010 13:09, Peter Robinett pe...@bubblefoundry.com wrote:

   Hi all,

   I seem to be to doing something wrong, as I keep getting out of memory
   errors when trying to build Lift from source. My command is:
   mvn -DXmx1024m -U clean install

   Am I missing something obvious? I've tried with 1024 and 2048
   megabytes of memory. I'm running Java 1.6.0_17 and Maven 2.2.0 on OS X
   (10.6) and have 4 gigabytes of physical memory.

   Peter

   --
   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: Out of Memory Errors Building Lift

2010-02-04 Thread Peter Robinett
Thanks, Jeppe, that did the trick. I swear, JVM options are such a
dark art!

Peter

On Feb 4, 12:49 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Peter Robinett pe...@bubblefoundry.com writes:
  Hmm, I see that it's always when running YUI Compressor on lift-
  webkit. I actually had issues with YUI Compressor in the past (http://
  groups.google.com/group/liftweb/browse_thread/thread/
  f338204c6ee02dd3/3025b5ef300b4ee2) but this time I'm running the Sun
  JVM, not OpenJDK.

 I have essentially the same setup as you. I have

 MAVEN_OPTS='-Xmx1624m -XX:MaxPermSize=128m'

 and can do a 'mvn -U clean install

 /Jeppe

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



[Lift] Flot 0.6 Upgrade Breaking Change Question

2010-02-04 Thread Peter Robinett
Hello all,

Please tell me if you are using the lift-flot module. I am working on
upgrading it to Flot 0.6 and as Aaron noted[1], Flot has switched to a
slightly new format of specifying options. However, they have kept
backwards compatibility, meaning that we could upgrade to the latest
version of Flot without changing the way series options are specified.
Would you prefer to have a breaking change in lift-flot now in order
to ensure future compatibility or would you like to put off this
change until a future version of Flot drops support for this now
depreciated format?

Peter

[1]: 
http://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55c181475

-- 
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: Suggestion to extend Comet (ListenerManager) to selectively update subscribers

2010-02-04 Thread Peter Robinett
Heiko, I would love this and would use it often, but I'm not sure it's
such a general use case that it should be part of Lift. What do other
people think?

Peter

On Feb 4, 4:05 pm, Heiko Seeberger heiko.seeber...@googlemail.com
wrote:
 Hi,

 In the current state the ListenerManager will always update all subscribers.
 I have got a use case where only certain subscribers should be updated.
 Therefore I suggest to extend the ListenerManager such that there can be an
 optional partial function that determines which subscribers will be updated.
 This change will not break the current API and will not affect the default
 behavior.

 I have already implemented a prototype solution but would like to know your
 opinion first. So what do you think? Any objections up-front?

 Cheers,

 Heiko

 Work: weiglewilczek.com
 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 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: Upgrade to Flot 0.6

2010-02-04 Thread Peter Robinett
Hi Aaron,

I've pushed the simplest update possible to my branch here:
http://github.com/dpp/liftweb/tree/pr1001_issue_322. I will make the
series options change if there are no significant dissenting voices in
the thread I created[1]. In the meantime, do. The flotDemo app seems
to work without any changes.

What do you think?

Peter

[1]: http://groups.google.com/group/liftweb/t/ba7e0f76042ff562

On Feb 3, 6:30 am, Aaron Valade a...@alum.mit.edu wrote:
 I've created a ticket here:

 http://github.com/dpp/liftweb/issues/issue/322

 Thanks again!
 - Aaron



 On Tue, Feb 2, 2010 at 10:10 PM, Peter Robinett pe...@bubblefoundry.com 
 wrote:
  You're welcome. I'm happy to look into adding Flot plugin support, but
  please open a ticket on GitHub (http://github.com/dpp/liftweb/issues).

  Peter

  On Feb 1, 10:22 am, Aaron Valade a...@alum.mit.edu wrote:
  Thanks Peter!

  One of the other things that changed between Flot 0.4 and 0.6 is that
  a plugin structure was introduced and some functionality was pushed
  out of the core and into a plugin, specifically the selection
  functionality which can be used for zooming and other interactions
  with the charted data.  I hate to tack on requests for more work, but
  if you get a chance, I'd appreciate if you could add functionality to
  the Lift Flot Widget to allow use of these plugins. I'm in the process
  of making some small changes with the Flot Widget to support these
  plugins in my local fork of Lift and would be happy to share what I've
  done, if that's allowed.  Otherwise, I'd be very eager to provide
  additional testing of any capabilities that you make available or any
  other help that I can provide within the guidelines of the Lift
  project.

  Thanks,
  - A

  On Mon, Feb 1, 2010 at 12:28 PM, Peter Robinett pe...@bubblefoundry.com 
  wrote:
   Ok guys, I'll work on this in the next few days (I'm out of town right
   now).

   Peter

   On Jan 31, 3:20 pm, Timothy Perrett timo...@getintheloop.eu wrote:
   It seems like peter will take ownership of this and make it happen
   ASAP so a patch / diff should not be needed.

   Peter, please confirm when you will roll this in a branch and put it
   on review board?

   Cheers, Tim

   Sent from my iPhone

   On 31 Jan 2010, at 22:48, Aaron Valade aval...@gmail.com wrote:

I'm more than happy to submit the patch under the Lift IP policy,
but I understand if you don't feel comfortable with that. And I can
submit it anyway that works for you. I'm just looking to help give
back to everyone that's helped me out. Albeit in a very, very small
way.

Sent from my iPhone

On Jan 31, 2010, at 5:43 PM, David Pollak 
feeder.of.the.be...@gmail.com
 wrote:

Peter,

Please keep in mind the Lift IP policy.  We don't pull from other
repositories nor do we accept patches.  We'll have to do the Flot
0.6 ourselves.

Thanks,

David

On Fri, Jan 29, 2010 at 4:44 PM, Peter Robinett 
pe...@bubblefoundry.com
 wrote:
Aaron, thanks so much for taking the initiative to upgrade Flot, it's
something that I've been meaning to do. Just skimming over your
changes, everything looks good. As for not using the packed excanvas
file, that should be ok since Lift runs the YUI compressor by default
on all Javascript files (correct, David?). Of course, broken URLs
need
to be fixed.

David, how do we go about merging these changes?

Peter

On Jan 29, 3:32 pm, Aaron Valade a...@alum.mit.edu wrote:
 There is one break that my commit made which I just realized
after I
 had sent this email in that I deleted the excanvas.pack.js file and
 dropped in the excanvas.js that was included with the Flot 0.6
 distribution but didn't rename it to be excanvas.pack.js and didn't
 change the path in the Flot.scala file.

 I can make an additional commit that fixes this, if it pleases
the court. :-)

 - A

 On Fri, Jan 29, 2010 at 6:15 PM, David Pollak

 feeder.of.the.be...@gmail.com wrote:
  Peter,

  What do you think of the upgrade (given that you're the most
Flot-ish Lift
  committer)?

  Thanks,

  David

  On Fri, Jan 29, 2010 at 12:32 PM, Aaron Valade
a...@alum.mit.edu wrote:

  Hello all,
  I needed to use some of the recent functionality in the Flot
jQuery
  plugin which is version 0.6.  The Flot lift-widget is
currently at
  0.4.  So I upgraded it to use the new version and I've posted
the
  commit on github:

 http://github.com/avalade/liftweb/commit/fa3d76fb72a7f74d13265e4039f0
...

  Version 0.6 of Flot does make one breaking change which
requires some
  of the options which were previously described as a top level
  attributes on the FlotOptions object to be pushed inside of a
new
  attribute called FlotSeriesOptions.  I've made the appropriate
changes
  to the various example Flot charts

[Lift] Re: jquery.flot.css breaks the chart in IE8

2010-02-03 Thread Peter Robinett
Hi Jarod,

It sounds like you're running into a known problem that has already
been addressed: 
http://groups.google.com/group/liftweb/browse_thread/thread/5e0335583e2a248b

Peter

On Feb 3, 1:45 am, Jarod Liu liuyuan...@gmail.com wrote:
 At first I don't know the Flot.init 
 things(https://groups.google.com/group/liftweb/browse_thread/thread/8c974d50...
 ). I copy jquery.flot.js and excanvas.js to /static (without
 jquery.flot.css) and link to these js's on the page. At this time my
 charts work fine. After I know the Flot.init,  then I follow the
 official way to use Flot. And then in IE8 Flot just draw the
 backgroup, labels, but no line, point(still good in firefox and
 chrome). Now, I switch back to the /static copy to make it work.

 On Feb 3, 11:14 am, Peter Robinett pe...@bubblefoundry.com wrote:



  Hi Jarod,

  I'm afraid I don't understand your problem. Are you staying that the
  combination of the blueprint and flot CSS files leads to incorrect
  charts in IE8 but the charts are rendered correctly when the blueprint
  file is not included? If so, is this a problem with how Lift includes
  the files or in one of the libraries themselves? Since I will be
  working on upgrading Lift's version of Flot to the latest 
  (seehttp://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55...),
  can you confirm that this is a problem in Flot 0.6? If so, please open
  a ticket athttp://github.com/dpp/liftweb/issues.

  Thanks,
  Peter

  On Feb 1, 10:02 pm, Jarod Liu liuyuan...@gmail.com wrote:

   I don't use the blueprint css. It works fine without jquery.flot.css.
   Maybe it would better do not generate the link to jquery.flot.css by
   default( I think most real world app won't use the blueprint css). And
   add some kind of options to make flot generate the link

-- 
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] Out of Memory Errors Building Lift

2010-02-03 Thread Peter Robinett
Hi all,

I seem to be to doing something wrong, as I keep getting out of memory
errors when trying to build Lift from source. My command is:
mvn -DXmx1024m -U clean install

Am I missing something obvious? I've tried with 1024 and 2048
megabytes of memory. I'm running Java 1.6.0_17 and Maven 2.2.0 on OS X
(10.6) and have 4 gigabytes of physical memory.

Peter

-- 
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: Upgrade to Flot 0.6

2010-02-02 Thread Peter Robinett
You're welcome. I'm happy to look into adding Flot plugin support, but
please open a ticket on GitHub (http://github.com/dpp/liftweb/issues).

Peter

On Feb 1, 10:22 am, Aaron Valade a...@alum.mit.edu wrote:
 Thanks Peter!

 One of the other things that changed between Flot 0.4 and 0.6 is that
 a plugin structure was introduced and some functionality was pushed
 out of the core and into a plugin, specifically the selection
 functionality which can be used for zooming and other interactions
 with the charted data.  I hate to tack on requests for more work, but
 if you get a chance, I'd appreciate if you could add functionality to
 the Lift Flot Widget to allow use of these plugins. I'm in the process
 of making some small changes with the Flot Widget to support these
 plugins in my local fork of Lift and would be happy to share what I've
 done, if that's allowed.  Otherwise, I'd be very eager to provide
 additional testing of any capabilities that you make available or any
 other help that I can provide within the guidelines of the Lift
 project.

 Thanks,
 - A



 On Mon, Feb 1, 2010 at 12:28 PM, Peter Robinett pe...@bubblefoundry.com 
 wrote:
  Ok guys, I'll work on this in the next few days (I'm out of town right
  now).

  Peter

  On Jan 31, 3:20 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  It seems like peter will take ownership of this and make it happen
  ASAP so a patch / diff should not be needed.

  Peter, please confirm when you will roll this in a branch and put it
  on review board?

  Cheers, Tim

  Sent from my iPhone

  On 31 Jan 2010, at 22:48, Aaron Valade aval...@gmail.com wrote:

   I'm more than happy to submit the patch under the Lift IP policy,
   but I understand if you don't feel comfortable with that. And I can
   submit it anyway that works for you. I'm just looking to help give
   back to everyone that's helped me out. Albeit in a very, very small
   way.

   Sent from my iPhone

   On Jan 31, 2010, at 5:43 PM, David Pollak feeder.of.the.be...@gmail.com
wrote:

   Peter,

   Please keep in mind the Lift IP policy.  We don't pull from other
   repositories nor do we accept patches.  We'll have to do the Flot
   0.6 ourselves.

   Thanks,

   David

   On Fri, Jan 29, 2010 at 4:44 PM, Peter Robinett pe...@bubblefoundry.com
wrote:
   Aaron, thanks so much for taking the initiative to upgrade Flot, it's
   something that I've been meaning to do. Just skimming over your
   changes, everything looks good. As for not using the packed excanvas
   file, that should be ok since Lift runs the YUI compressor by default
   on all Javascript files (correct, David?). Of course, broken URLs
   need
   to be fixed.

   David, how do we go about merging these changes?

   Peter

   On Jan 29, 3:32 pm, Aaron Valade a...@alum.mit.edu wrote:
There is one break that my commit made which I just realized
   after I
had sent this email in that I deleted the excanvas.pack.js file and
dropped in the excanvas.js that was included with the Flot 0.6
distribution but didn't rename it to be excanvas.pack.js and didn't
change the path in the Flot.scala file.

I can make an additional commit that fixes this, if it pleases
   the court. :-)

- A

On Fri, Jan 29, 2010 at 6:15 PM, David Pollak

feeder.of.the.be...@gmail.com wrote:
 Peter,

 What do you think of the upgrade (given that you're the most
   Flot-ish Lift
 committer)?

 Thanks,

 David

 On Fri, Jan 29, 2010 at 12:32 PM, Aaron Valade
   a...@alum.mit.edu wrote:

 Hello all,
 I needed to use some of the recent functionality in the Flot
   jQuery
 plugin which is version 0.6.  The Flot lift-widget is
   currently at
 0.4.  So I upgraded it to use the new version and I've posted
   the
 commit on github:

http://github.com/avalade/liftweb/commit/fa3d76fb72a7f74d13265e4039f0
   ...

 Version 0.6 of Flot does make one breaking change which
   requires some
 of the options which were previously described as a top level
 attributes on the FlotOptions object to be pushed inside of a
   new
 attribute called FlotSeriesOptions.  I've made the appropriate
   changes
 to the various example Flot charts which were included in the
   flotDemo
 module.

 Would it be possible to get this change upstream?

 - Aaron

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

[Lift] Re: [flot] jquery.flot.css breaks the chart in IE8

2010-02-02 Thread Peter Robinett
Hi Jarod,

I'm afraid I don't understand your problem. Are you staying that the
combination of the blueprint and flot CSS files leads to incorrect
charts in IE8 but the charts are rendered correctly when the blueprint
file is not included? If so, is this a problem with how Lift includes
the files or in one of the libraries themselves? Since I will be
working on upgrading Lift's version of Flot to the latest (see
http://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55c181475),
can you confirm that this is a problem in Flot 0.6? If so, please open
a ticket at http://github.com/dpp/liftweb/issues.

Thanks,
Peter

On Feb 1, 10:02 pm, Jarod Liu liuyuan...@gmail.com wrote:
 I don't use the blueprint css. It works fine without jquery.flot.css.
 Maybe it would better do not generate the link to jquery.flot.css by
 default( I think most real world app won't use the blueprint css). And
 add some kind of options to make flot generate the link

-- 
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: Upgrade to Flot 0.6

2010-02-01 Thread Peter Robinett
Ok guys, I'll work on this in the next few days (I'm out of town right
now).

Peter

On Jan 31, 3:20 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 It seems like peter will take ownership of this and make it happen  
 ASAP so a patch / diff should not be needed.

 Peter, please confirm when you will roll this in a branch and put it  
 on review board?

 Cheers, Tim

 Sent from my iPhone

 On 31 Jan 2010, at 22:48, Aaron Valade aval...@gmail.com wrote:



  I'm more than happy to submit the patch under the Lift IP policy,  
  but I understand if you don't feel comfortable with that. And I can  
  submit it anyway that works for you. I'm just looking to help give  
  back to everyone that's helped me out. Albeit in a very, very small  
  way.

  Sent from my iPhone

  On Jan 31, 2010, at 5:43 PM, David Pollak feeder.of.the.be...@gmail.com
   wrote:

  Peter,

  Please keep in mind the Lift IP policy.  We don't pull from other  
  repositories nor do we accept patches.  We'll have to do the Flot  
  0.6 ourselves.

  Thanks,

  David

  On Fri, Jan 29, 2010 at 4:44 PM, Peter Robinett pe...@bubblefoundry.com
   wrote:
  Aaron, thanks so much for taking the initiative to upgrade Flot, it's
  something that I've been meaning to do. Just skimming over your
  changes, everything looks good. As for not using the packed excanvas
  file, that should be ok since Lift runs the YUI compressor by default
  on all Javascript files (correct, David?). Of course, broken URLs  
  need
  to be fixed.

  David, how do we go about merging these changes?

  Peter

  On Jan 29, 3:32 pm, Aaron Valade a...@alum.mit.edu wrote:
   There is one break that my commit made which I just realized  
  after I
   had sent this email in that I deleted the excanvas.pack.js file and
   dropped in the excanvas.js that was included with the Flot 0.6
   distribution but didn't rename it to be excanvas.pack.js and didn't
   change the path in the Flot.scala file.

   I can make an additional commit that fixes this, if it pleases  
  the court. :-)

   - A

   On Fri, Jan 29, 2010 at 6:15 PM, David Pollak

   feeder.of.the.be...@gmail.com wrote:
Peter,

What do you think of the upgrade (given that you're the most  
  Flot-ish Lift
committer)?

Thanks,

David

On Fri, Jan 29, 2010 at 12:32 PM, Aaron Valade  
  a...@alum.mit.edu wrote:

Hello all,
I needed to use some of the recent functionality in the Flot  
  jQuery
plugin which is version 0.6.  The Flot lift-widget is  
  currently at
0.4.  So I upgraded it to use the new version and I've posted  
  the
commit on github:

   http://github.com/avalade/liftweb/commit/fa3d76fb72a7f74d13265e4039f0
  ...

Version 0.6 of Flot does make one breaking change which  
  requires some
of the options which were previously described as a top level
attributes on the FlotOptions object to be pushed inside of a  
  new
attribute called FlotSeriesOptions.  I've made the appropriate  
  changes
to the various example Flot charts which were included in the  
  flotDemo
module.

Would it be possible to get this change upstream?

- Aaron

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

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

  --
  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 
  athttp://groups.google.com/group/liftweb?hl=en
  .
  --
  You received this message because you

[Lift] Re: Upgrade to Flot 0.6

2010-01-29 Thread Peter Robinett
Aaron, thanks so much for taking the initiative to upgrade Flot, it's
something that I've been meaning to do. Just skimming over your
changes, everything looks good. As for not using the packed excanvas
file, that should be ok since Lift runs the YUI compressor by default
on all Javascript files (correct, David?). Of course, broken URLs need
to be fixed.

David, how do we go about merging these changes?

Peter

On Jan 29, 3:32 pm, Aaron Valade a...@alum.mit.edu wrote:
 There is one break that my commit made which I just realized after I
 had sent this email in that I deleted the excanvas.pack.js file and
 dropped in the excanvas.js that was included with the Flot 0.6
 distribution but didn't rename it to be excanvas.pack.js and didn't
 change the path in the Flot.scala file.

 I can make an additional commit that fixes this, if it pleases the court. :-)

 - A

 On Fri, Jan 29, 2010 at 6:15 PM, David Pollak



 feeder.of.the.be...@gmail.com wrote:
  Peter,

  What do you think of the upgrade (given that you're the most Flot-ish Lift
  committer)?

  Thanks,

  David

  On Fri, Jan 29, 2010 at 12:32 PM, Aaron Valade a...@alum.mit.edu wrote:

  Hello all,
  I needed to use some of the recent functionality in the Flot jQuery
  plugin which is version 0.6.  The Flot lift-widget is currently at
  0.4.  So I upgraded it to use the new version and I've posted the
  commit on github:

 http://github.com/avalade/liftweb/commit/fa3d76fb72a7f74d13265e4039f0...

  Version 0.6 of Flot does make one breaking change which requires some
  of the options which were previously described as a top level
  attributes on the FlotOptions object to be pushed inside of a new
  attribute called FlotSeriesOptions.  I've made the appropriate changes
  to the various example Flot charts which were included in the flotDemo
  module.

  Would it be possible to get this change upstream?

  - Aaron

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

-- 
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 on Stack Overflow

2010-01-12 Thread Peter Robinett
I'm a huge SO fan and have used it to ask a lot of my stupid Scala
questions but I've been asking my Lift questions here. Perhaps the
reason there are so few Lift questions is because others are doing the
same? Note that Scala has a respectable 698 questions.

Peter

On Jan 12, 2:28 pm, joseph b. boyle.jos...@gmail.com wrote:
 Stack Overflow may not be so much better a way of delivering support
 to someone who already has a Lift question, but presence there would
 be a great way to publicize Lift to the many developers who go there
 without Lift in mind but have problems that Lift could be applied to.
-- 
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 with MS Access database

2009-12-27 Thread Peter Robinett
Hi Gang,

I believe that Schemefier is failing to find a database driver named
Access and cannot default to a generic SQL one since DriverType is an
abstract class. Supported databases are: PostgreSQL, Derby (included
if you use one of the Maven archetypes, easy to add if you did not),
MaxDb, H2, SQL Server, MySQL, and Oracle. If you absolutely need to
use MS Access (which I imagine many people here will advise against)
we can help you extend DriverType to create an Access driver.

Hope that helps.

Peter

On Dec 25, 10:40 am, Gang wangga...@gmail.com wrote:
 Hi All,

 I'm learning Lift, and get to do a small project in Lift.  The
 requirement is to connect to MS Access database.  I got an error at
 the Schemifier.schemify() call.  I have setup DSN in window and was
 able to connect to the database from NetBeans.  the error in the
 log

 INFO: ERROR - Failed to Boot
 scala.MatchError: ACCESS
         at net.liftweb.mapper.SuperConnection.calcDriver(DB.scala:682)
         at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply
 (Schemifier.scala:56)
         at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply
 (Schemifier.scala:54)
         at net.liftweb.mapper.DB$.use(DB.scala:305)
         at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:
 53)
         at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:
 36)
         at bootstrap.liftweb.Boot.boot(Boot.scala:24)

 Any help is appreciated.

 Gang

--

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: The future of lift-core

2009-12-23 Thread Peter Robinett
Thanks guys, that helps a lot.

Peter

On Dec 23, 9:05 am, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 Hey Peter,

 lift-base is just a parent model for lift-common, lift-actor, lift-util
 and lift-webkit. It's not a real dependency that can be used in a
 project. Since you are using lift-mapper, just using lift-mapper as
 dependency should suffice. Rest of the dependencies would be pulled down
 automatically.

 I just updated your gist. See if this works.http://gist.github.com/262613

 As davidB mentioned you can also run mvn dependency:analyze to filter
 out unnecessary dependencies.

 Generally speaking:

 1. If you are using any of the persistence modules (lift-mapper,
 lift-jpa, lift-record) you do not need any of the base modules. They
 would be pulled transitively.

 2. If you are not using the persistence module (possibly because your
 app doesn't need such support). Just including lift-webkit should suffice.

 3. Additionally, if you are using any of the special purpose modules
 (from lift-modules), just add that to the lift of dependencies.

 Cheers, Indrajit

 On 23/12/09 7:12 PM, David Bernard wrote:



  Tips :

  in your project call :
  mvn dependency:analyze

  you should see the list of dependencies useless and used throught
  transitive path and to list directly in your pom.xml (may be in place of
  lift-core).

  /davidB

  On Wed, Dec 23, 2009 at 02:31, Peter Robinett pe...@bubblefoundry.com
  mailto:pe...@bubblefoundry.com wrote:

      Indrajit, your post made me realize that I've been using lift-core
      without realizing it. Thanks.

      Unfortunately switching to something simpler is giving me some
      trouble. I believe that I should be able to add lift-base, but while
      its sub-modules get downloaded (lift-common, lift-util, etc), Maven
      says that the lift-base module is missing and needs to be installed.
      This is the entry I'm using:
      dependency
      groupIdnet.liftweb/groupId
      artifactIdlift-base/artifactId
      version1.1-SNAPSHOT/version
      /dependency

      As the resident Maven expert, do you have any idea what's wrong? My
      entire pom.xml is here:http://gist.github.com/262244

      Thanks,
      Peter

      On Dec 22, 8:32 am, Indrajit Raychaudhuri indraj...@gmail.com
      mailto:indraj...@gmail.com wrote:
        On 22/12/09 12:23 AM, David Pollak wrote:

         On Sun, Dec 20, 2009 at 11:39 AM, Indrajit Raychaudhuri
         indraj...@gmail.com mailto:indraj...@gmail.com
      mailto:indraj...@gmail.com mailto:indraj...@gmail.com wrote:

             Folks,

             lift-core is a 'meta' project that can be added as a
      dependency to a
             Lift project to pull in all the Lift modules. This serves
      as a singular
             configuration point in a Lift based application.

             However, since lift-core downloads all the Lift modules
      (irrespective of
             whether the project needs it), adding this as the
      dependency slow  down
             things for a standard project that doesn't need some
      additional modules.

             In a sense, we have moved quite a bit from the initial
      purpose of having
             single dependency on this 'meta' project in a Lift application.

             Further, the name is a misnomer now!

             The question, therefore is:
             Should we consider deprecating this? If not, we need to
      document when it
             should be preferred and when not. If yes, what should be
      the time frame
             for making the move?

             With Lift 2.0 coming up,

         Lift 2.0 is not coming up it's merely a rename of Lift 1.1
      based on
         the naming rules that Heiko proposed and the Lift community
      adopted.
         The fact that the next release of Lift is going to be called
      2.0 rather
         than 1.1 does not change the scope of the release.

        Indeed, poor wordings, Lift 2.0 *restructure* coming up is what I
      meant.
        But yes, it ends up sounding different, sorry.

         With that being said, deprecating lift-core is fine by me as
      long as
         there is an easy to understand deprecation message with clear
         instructions as to how to replace lift-core with whatever is
      necessary.

        For deprecating dependencies, it's just matter of persuasion
        (Announcement, wiki etc.) for at least two releases, or more
      (could be
        milestone releases). And eventually, dropping it from the build
      beyond
        an agreeable release time frame.

        I couldn't figure out a clean way of deprecating 'meta' packages
      since
        it doesn't have any active code (thus doesn't expose any place to
      code
        in some deprecation warning message).

        As such, the package is harmless and there is zero cost of
      maintenance.
        Just that, it's no more a good practice (longer build time,
      larger war

[Lift] WebSockets are Coming

2009-12-22 Thread Peter Robinett
Since Lift is so great at handling Comet updates, we might want to
take a look at supporting WebSockets which will (hopefully) be part of
HTML5. Here are a few links I just found:
- http://dev.w3.org/html5/websockets/
- 
http://armstrongonsoftware.blogspot.com/2009/12/comet-is-dead-long-live-websockets.html
- http://www.igvita.com/2009/12/22/ruby-websockets-tcp-for-the-browser/

Anyway, food for thought.

Peter

--

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: WebSockets are Coming

2009-12-22 Thread Peter Robinett
That would be very elegant.

On Dec 22, 4:42 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Dec 22, 2009 at 3:47 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:

  Since Lift is so great at handling Comet updates, we might want to
  take a look at supporting WebSockets which will (hopefully) be part of
  HTML5. Here are a few links I just found:
  -http://dev.w3.org/html5/websockets/
  -
 http://armstrongonsoftware.blogspot.com/2009/12/comet-is-dead-long-li...
  -http://www.igvita.com/2009/12/22/ruby-websockets-tcp-for-the-browser/

  Anyway, food for thought.

 My (long time) plan is to auto-detect if the browser and the server supports
 web sockets and do the Comet stuff via websockets if both sides allow it.







  Peter

  --

  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: The future of lift-core

2009-12-22 Thread Peter Robinett
Indrajit, your post made me realize that I've been using lift-core
without realizing it. Thanks.

Unfortunately switching to something simpler is giving me some
trouble. I believe that I should be able to add lift-base, but while
its sub-modules get downloaded (lift-common, lift-util, etc), Maven
says that the lift-base module is missing and needs to be installed.
This is the entry I'm using:
dependency
  groupIdnet.liftweb/groupId
  artifactIdlift-base/artifactId
  version1.1-SNAPSHOT/version
/dependency

As the resident Maven expert, do you have any idea what's wrong? My
entire pom.xml is here: http://gist.github.com/262244

Thanks,
Peter

On Dec 22, 8:32 am, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 On 22/12/09 12:23 AM, David Pollak wrote:







  On Sun, Dec 20, 2009 at 11:39 AM, Indrajit Raychaudhuri
  indraj...@gmail.com mailto:indraj...@gmail.com wrote:

      Folks,

      lift-core is a 'meta' project that can be added as a dependency to a
      Lift project to pull in all the Lift modules. This serves as a singular
      configuration point in a Lift based application.

      However, since lift-core downloads all the Lift modules (irrespective of
      whether the project needs it), adding this as the dependency slow  down
      things for a standard project that doesn't need some additional modules.

      In a sense, we have moved quite a bit from the initial purpose of having
      single dependency on this 'meta' project in a Lift application.

      Further, the name is a misnomer now!

      The question, therefore is:
      Should we consider deprecating this? If not, we need to document when it
      should be preferred and when not. If yes, what should be the time frame
      for making the move?

      With Lift 2.0 coming up,

  Lift 2.0 is not coming up it's merely a rename of Lift 1.1 based on
  the naming rules that Heiko proposed and the Lift community adopted.
  The fact that the next release of Lift is going to be called 2.0 rather
  than 1.1 does not change the scope of the release.

 Indeed, poor wordings, Lift 2.0 *restructure* coming up is what I meant.
 But yes, it ends up sounding different, sorry.



  With that being said, deprecating lift-core is fine by me as long as
  there is an easy to understand deprecation message with clear
  instructions as to how to replace lift-core with whatever is necessary.

 For deprecating dependencies, it's just matter of persuasion
 (Announcement, wiki etc.) for at least two releases, or more (could be
 milestone releases). And eventually, dropping it from the build beyond
 an agreeable release time frame.

 I couldn't figure out a clean way of deprecating 'meta' packages since
 it doesn't have any active code (thus doesn't expose any place to code
 in some deprecation warning message).

 As such, the package is harmless and there is zero cost of maintenance.
 Just that, it's no more a good practice (longer build time, larger war
 size etc.).





      now might be a good time to make a decision.
      Thoughts?

      Cheers, Indrajit

      NB: An open question to anybody in the Lift: Who among you are actually
      using lift-core in you project and what is the level of impact you
      foresee in case you have to move on to have an alternative approach.

      --

      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
      mailto:liftweb@googlegroups.com.
      To unsubscribe from this group, send email to
      liftweb+unsubscr...@googlegroups.com
      mailto:liftweb%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.

--

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] Ajax Forms and Binding

2009-12-18 Thread Peter Robinett
Hi all,

I think there is a simple answer to this, but I'm a little confused. I
want to update a bound element when my Ajax form is submitted. Here's
a simple version based upon what I gleaned from the wiki and the
mailing list:

lift:Test.form
  pDisplay: test:display //p
  pInput1: test:input1 //p
  pInput2: test:input2 //p
  ptest:submit //p
/lift:Test.form

class Test {
  var display = 
  var input1 = 
  var input2 = 
  def form(xhtml: NodeSeq): NodeSeq = {
SHtml.ajaxForm(
  bind(test, xhtml,
display - display,
input1 - SHtml.text(input1, input1 = _),
input2 - SHtml.text(input2, input2 = _),
submit - SHtml.submit(Submit, () = {}) // empty method
since our hidden item will be called instead?
  ) ++
  SHtml.hidden(() = {
   display = input1 + input2
   // push an update to display here?
   ()
  })
)
  }
}

Am I on the right track? How do I actually get test:display / to be
updated?

Thanks,
Peter

--

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: Duplicate Keys Created by Schemefier

2009-12-18 Thread Peter Robinett
Sorry, dropped the ball on this one. Maybe change something in
MySqlDriver, perhaps primaryKeySetup? Unfortunately at that level you
don't know what columns have been defined. Anyway, I don't think this
is a pressing issue, so in the absence of having a solution to offer,
I'll leave it be.

Peter

On Dec 16, 12:55 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Wed, Dec 16, 2009 at 11:07 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:

  Fair enough, but isn't this still a non-optimal situation with the
  MySQL database driver?

 What is your proposed change?







  Peter

  On Dec 15, 7:23 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett pe...@bubblefoundry.com
  wrote:

My tables created by Schemefier have multiple keys for the primary key
when my Mapper model is declared like so: class myModel extends
LongKeyedMapper[myModel] with IdPK. There is naturally the primary key
but there is also a unique key on the column that simply duplicates
the functionality of the primary key.

Are other people seeing this? I've only looked on MySQL. This seems to
be because IdPK adds an id of type MappedLongIndex. Only the
longIndexColumnType of MySqlDriver has UNIQUE KEY in its definition.
Unique keys are great but, as I mentioned, if the column is also the
primary key the index is a duplication. Maybe this is something that
IdPK can disable when declaring the column? At least with MySQL
primary keys are guaranteed to be unique and InnoDB tables, which
Mapper uses, can have issues with long primary keys[1].

Should this be fixed? Or is the more helpful answer 'Don't use
MySQL'? ;-)

   I would use MySQL for a production site.

   If IdPK isn't doing what you want, then don't use it, just declare the
   primary key field manually.

Peter

[1]:http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.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
 
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroup 
  s.com
.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

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

  --

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

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

--

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




[Lift] Re: Ajax Forms and Binding

2009-12-18 Thread Peter Robinett
Unfortunately there is no change. Firebug shows that the POST reply
was empty.

Peter

On Dec 18, 3:26 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Fri, Dec 18, 2009 at 3:22 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  Hi all,

  I think there is a simple answer to this, but I'm a little confused. I
  want to update a bound element when my Ajax form is submitted. Here's
  a simple version based upon what I gleaned from the wiki and the
  mailing list:

  lift:Test.form
   pDisplay: test:display //p
   pInput1: test:input1 //p
   pInput2: test:input2 //p
   ptest:submit //p
  /lift:Test.form

  class Test {
   var display = 
   var input1 = 
   var input2 = 
   def form(xhtml: NodeSeq): NodeSeq = {
     SHtml.ajaxForm(
       bind(test, xhtml,
         display - span id=i_like_yaks{display}/span,
         input1 - SHtml.text(input1, input1 = _),
         input2 - SHtml.text(input2, input2 = _),
         submit - SHtml.submit(Submit, () = {}) // empty method
  since our hidden item will be called instead?
       ) ++
       SHtml.hidden(() = {
        display = input1 + input2

 SetHtml(i_like_yaks, Text(display))





       })
     )
   }
  }

  Am I on the right track? How do I actually get test:display / to be
  updated?

  Thanks,
  Peter

  --

  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: Ajax Forms and Binding

2009-12-18 Thread Peter Robinett
Sorry, spoke to soon. I got it, thanks.

On Dec 18, 4:27 pm, Peter Robinett pe...@bubblefoundry.com wrote:
 Unfortunately there is no change. Firebug shows that the POST reply
 was empty.

 Peter

 On Dec 18, 3:26 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:



  On Fri, Dec 18, 2009 at 3:22 PM, Peter Robinett 
  pe...@bubblefoundry.comwrote:

   Hi all,

   I think there is a simple answer to this, but I'm a little confused. I
   want to update a bound element when my Ajax form is submitted. Here's
   a simple version based upon what I gleaned from the wiki and the
   mailing list:

   lift:Test.form
    pDisplay: test:display //p
    pInput1: test:input1 //p
    pInput2: test:input2 //p
    ptest:submit //p
   /lift:Test.form

   class Test {
    var display = 
    var input1 = 
    var input2 = 
    def form(xhtml: NodeSeq): NodeSeq = {
      SHtml.ajaxForm(
        bind(test, xhtml,
          display - span id=i_like_yaks{display}/span,
          input1 - SHtml.text(input1, input1 = _),
          input2 - SHtml.text(input2, input2 = _),
          submit - SHtml.submit(Submit, () = {}) // empty method
   since our hidden item will be called instead?
        ) ++
        SHtml.hidden(() = {
         display = input1 + input2

  SetHtml(i_like_yaks, Text(display))

        })
      )
    }
   }

   Am I on the right track? How do I actually get test:display / to be
   updated?

   Thanks,
   Peter

   --

   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: mysql database password

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

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

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

 Thanks,
 itsjar

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



 }

--

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




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

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

Peter

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

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

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

 -harryh

--

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




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

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

Peter

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

 Peter

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



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

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

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

  -harryh

--

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




[Lift] Re: AWS related Lift modules

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

Peter

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

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

 Thanks,

 David

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

--

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




[Lift] Re: Duplicate Keys Created by Schemefier

2009-12-16 Thread Peter Robinett
Fair enough, but isn't this still a non-optimal situation with the
MySQL database driver?

Peter

On Dec 15, 7:23 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  My tables created by Schemefier have multiple keys for the primary key
  when my Mapper model is declared like so: class myModel extends
  LongKeyedMapper[myModel] with IdPK. There is naturally the primary key
  but there is also a unique key on the column that simply duplicates
  the functionality of the primary key.

  Are other people seeing this? I've only looked on MySQL. This seems to
  be because IdPK adds an id of type MappedLongIndex. Only the
  longIndexColumnType of MySqlDriver has UNIQUE KEY in its definition.
  Unique keys are great but, as I mentioned, if the column is also the
  primary key the index is a duplication. Maybe this is something that
  IdPK can disable when declaring the column? At least with MySQL
  primary keys are guaranteed to be unique and InnoDB tables, which
  Mapper uses, can have issues with long primary keys[1].

  Should this be fixed? Or is the more helpful answer 'Don't use
  MySQL'? ;-)

 I would use MySQL for a production site.

 If IdPK isn't doing what you want, then don't use it, just declare the
 primary key field manually.







  Peter

  [1]:http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.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.

 --
 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] partialUpdate and bind

2009-12-15 Thread Peter Robinett
It's not clear to me whether I can use bind with partialUpdate in a
CometActor. I believe I can but bind returns a NodeSeq, while
partialUpdate takes a JsCmd. There is an implicit called
xmlToXmlOrJsCmd but it returns a RenderOut and I don't know of
anything that converts that to a JsCmd.

I'm using a partialUpdate because I have some other JsCmds that need
to be called that way and I just want to add an update to an xhtml
field to the set of commands.

Does that make sense?

Peter

--

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] Duplicate Keys Created by Schemefier

2009-12-15 Thread Peter Robinett
My tables created by Schemefier have multiple keys for the primary key
when my Mapper model is declared like so: class myModel extends
LongKeyedMapper[myModel] with IdPK. There is naturally the primary key
but there is also a unique key on the column that simply duplicates
the functionality of the primary key.

Are other people seeing this? I've only looked on MySQL. This seems to
be because IdPK adds an id of type MappedLongIndex. Only the
longIndexColumnType of MySqlDriver has UNIQUE KEY in its definition.
Unique keys are great but, as I mentioned, if the column is also the
primary key the index is a duplication. Maybe this is something that
IdPK can disable when declaring the column? At least with MySQL
primary keys are guaranteed to be unique and InnoDB tables, which
Mapper uses, can have issues with long primary keys[1].

Should this be fixed? Or is the more helpful answer 'Don't use
MySQL'? ;-)

Peter

[1]: http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: partialUpdate and bind

2009-12-15 Thread Peter Robinett
Thanks, David. In my case I want to update a Flot graph and some text
boxes with new information. Since they have their source data in
common, it seems to me it would be most efficient to update the two
parts of the page simultaneously via a partialUpdate. Is this
reasonable or am I abusing partialUpdate?

Peter

On Dec 15, 4:52 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 You can use PartialUpdate and bind() if you are doing a
 SetHtml(id_of_thing_to_update, bind(...))

 PartialUpdate is meant to update a subset of your HTML or some JavaScript
 data structures.

 On Tue, Dec 15, 2009 at 4:50 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  It's not clear to me whether I can use bind with partialUpdate in a
  CometActor. I believe I can but bind returns a NodeSeq, while
  partialUpdate takes a JsCmd. There is an implicit called
  xmlToXmlOrJsCmd but it returns a RenderOut and I don't know of
  anything that converts that to a JsCmd.

  I'm using a partialUpdate because I have some other JsCmds that need
  to be called that way and I just want to add an update to an xhtml
  field to the set of commands.

  Does that make sense?

  Peter

  --

  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: MappedField Callback(s)

2009-12-14 Thread Peter Robinett
Naftoli mentioned the LifecycleCallbacks trait but doesn't actually
hook into anything itself – it just provides the methods. To hook into
things it looks like you definitely could subclass get and set, but
that doesn't strike me as nice from a user's perspective as having
the . I just discovered the doneWithSave method, so I think there
might be something here. As Tim says, code is best, so let me write up
an example.

Peter

On Dec 12, 11:15 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Why not just subclass the get/set methods on the MappedField and do the
 callbacks there?

 On Fri, Dec 11, 2009 at 3:02 PM, Timothy Perrett 
 timo...@getintheloop.euwrote:





  Peter,

  Have you any code on a branch or similar? I think this conversation
  will progress best with code samples.

  Cheers, Tim

  On Dec 11, 7:18 pm, Peter Robinett pe...@bubblefoundry.com wrote:
   MetaMapper has a bunch of nice callback methods (afterCreate,
   beforeValidation, etc) that you can hook into. Recently I've found
   myself wanting one on MappedField so I can do something when its value
   changes. I could call a method myself right next to every time I
   update a value but a callback is more generic. Is this a reasonable
   idea? Would this be something people would like contributed back into
   Lift? Are there any other callbacks on MappedField that would be
   useful?

   Peter

  --

  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: MappedField Callback(s)

2009-12-12 Thread Peter Robinett
Not yet, I was planning on working on it next week.

Peter

On Dec 11, 3:02 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Peter,

 Have you any code on a branch or similar? I think this conversation
 will progress best with code samples.

 Cheers, Tim

 On Dec 11, 7:18 pm, Peter Robinett pe...@bubblefoundry.com wrote:



  MetaMapper has a bunch of nice callback methods (afterCreate,
  beforeValidation, etc) that you can hook into. Recently I've found
  myself wanting one on MappedField so I can do something when its value
  changes. I could call a method myself right next to every time I
  update a value but a callback is more generic. Is this a reasonable
  idea? Would this be something people would like contributed back into
  Lift? Are there any other callbacks on MappedField that would be
  useful?

  Peter

--

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] JsCmd to Actual Javascript

2009-12-11 Thread Peter Robinett
I'm trying to do a partial update in my CometActor with several
Javascript commands and I'm trying to figure out how to do it. It
looks like I can do partialUpdate(CmdPair(jsCmd1, jsCmd2)) but I'd
like to see the raw Javascript that CmdPair represents. Bar actually
running the code and looking in the browser, how do I do this? JsCmd
obviously has some sort of serialization method that is called before
it is sent to the browser, but it is not readily apparent to me what
it is.

Thanks!

Peter

--

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] MappedField Callback(s)

2009-12-11 Thread Peter Robinett
MetaMapper has a bunch of nice callback methods (afterCreate,
beforeValidation, etc) that you can hook into. Recently I've found
myself wanting one on MappedField so I can do something when its value
changes. I could call a method myself right next to every time I
update a value but a callback is more generic. Is this a reasonable
idea? Would this be something people would like contributed back into
Lift? Are there any other callbacks on MappedField that would be
useful?

Peter

--

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: JsCmd to Actual Javascript

2009-12-11 Thread Peter Robinett
Very cool, thanks!

On Dec 11, 10:53 am, Marius marius.dan...@gmail.com wrote:
 Well you can see thr Raw JavaScript with FireBug for example. On Lift
 side take a look on LiftServlet.scala convertAnswersToCometResponse.
 From you can see this:

 val ret = ar.response.toJavaScript(session, ar.displayAll) 

 toJavaScript is a method of the internal XmlOrJsCmd class which you
 can find in CometActor.scala.

 Besides that, you don't need to explicitly use CmdPair as you can just
 say partialUpdate(jsCmd1  jsCmd2  ...)

 Br's,
 Marius

 On Dec 11, 8:38 pm, Peter Robinett pe...@bubblefoundry.com wrote:



  I'm trying to do a partial update in my CometActor with several
  Javascript commands and I'm trying to figure out how to do it. It
  looks like I can do partialUpdate(CmdPair(jsCmd1, jsCmd2)) but I'd
  like to see the raw Javascript that CmdPair represents. Bar actually
  running the code and looking in the browser, how do I do this? JsCmd
  obviously has some sort of serialization method that is called before
  it is sent to the browser, but it is not readily apparent to me what
  it is.

  Thanks!

  Peter

--

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: Multi-Ćolumn MappedField

2009-12-10 Thread Peter Robinett
I believe David has said that having MappedPassword represent two
columns is one of his great regrets, so watch out! ;-)

Peter

On Dec 10, 9:17 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
 IMHO this doesn't sound like an ideal way to do this. At a high level what
 are you trying to do? Is this a legacy DB or starting from scratch? If I had
 to do something like this I would instead use something like
 MappedLongForeignKey so that you have a direct reference to the other tables
 instead of having to do it manually. Something like:

 class C extends LongKeyedMapper[C] with IdPK {
   def getSingleton = C

   object refA extends MappedLongForeignKey(this,A)
   object refB extends MappedLongForeignKey(this,B)

   def getRef = refA.obj or refB.obj

   def setRef(obj : A) = refA(obj); refB(Empty)
   def setRef(obj : B) = refB(obj); refA(Empty)

 }

 Derek



 On Wed, Dec 9, 2009 at 9:44 PM, Joern joern.bernha...@gmx.net wrote:
  Hi there,

  I want to create a MappedField, which has one column as Type Long and
  another column as Type Boolean, but I don't know, what I should put
  into dbFieldClass and/or targetSQLType. If I look at MappedPassword
  for example, I just see classOf[String] or Types.VARCHAR, which
  somehow makes sense, because all columns of the MappedPassword are
  Strings. How can I create such a MappedField ?

  Or maybe there is a completely different and/or better way to approach
  my problem:
  I have two tables (A and B), which are represented by my own mapper
  classes having IdPK.
  In a third table (let's call it C), I want to reference an instance of
  A or B in table C. As mentioned above, I want to say for example that
  Boolean false means look in table A for the Long (=index) and true
  - look in table B.

  Any tips, pointers or links to more documentation about multi-column
  mappedfields? :)

  Thanks,
  Joern

  --

  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: Welcome Peter Robinett to the Lift committers

2009-12-10 Thread Peter Robinett
Thanks, all! Beyond lift-flot, I will be taking a look at
MegaProtoUser, oAuth and AMQP in the coming months. Of course, if
people would like to direct my work, that's very welcome.

Peter

On Dec 10, 7:18 am, Indrajit Raychaudhuri indraj...@gmail.com wrote:
 Welcome Peter! Keen to discover your bag of trick ;-)

 Cheers, Indrajit

 On 10/12/09 3:38 AM, David Pollak wrote:



  Folks,

  Please join me in welcoming Peter Robinett to the Lift committers.
  Peter's been active on the Lift list helping people and asking questions
  (a great combo.)  As Peter's project has progressed, he's developed
  artifacts that he is looking to contribute to Lift and I for one am
  looking forward to enhancements (e.g., to the flot stuff) as well as
  other stuff that he's got in his bag of tricks. ;-)

  Welcome Peter!

  Thanks,

  David

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

  --

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

--

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: Multi-Ćolumn MappedField

2009-12-10 Thread Peter Robinett
Joern, are you using MegaProtoUser? If so, I dramatically simplified
our access control code by using the superUser property it provides,
though I can't say whether that'd be useful for you. Also, what you
describe kind of reminds me of App Engine's Expando models (http://
code.google.com/appengine/docs/python/datastore/expandoclass.html).
While I don't think you can easily (or necessarily would want to)
implement it, it might provide some inspiration.

Peter

On Dec 10, 2:46 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 The business logic/interfaces on your Scala classes do not need to match the
 DB.  For example:

 class MyFoo extends LongKeyedMapper[MyFoo] with IdPK {
   def getSingleton = MyFoo

   protected object name extends MappedString(this, 64)
   protected object age extends MappedInt(this)

   def info: (String, Int) = (name.is, age.is)

   def info_=(info: (String, Int)): Unit = {
     name.set(info._1)
     age.set(info._2)
   }

 }

 object MyFoo extends MyFoo with LongKeyedMetaMapper[MyFoo]

 So, you've got 2 columns in your database, but the Scala MyFoo class doesn't
 expose those columns... instead, it exposes the info method.

 Does this give you what you want?

 Thanks,

 David





 On Thu, Dec 10, 2009 at 12:18 PM, Joern joern.bernha...@gmx.net wrote:
   Why do these fields have to be taped together?  What is taped
  together?

   Why not just create a method that takes a user and updates the correct
   columns in the record?

  Sorry if taped together didn't make sense - I wanted to say that
  they belong together and should be seen as one Unit instead of two
  columns which need to import extra logic (with the method) to be bound
  together. If I use a method, I still have to add the two columns,
  initialize it with proper names and default values every time I want
  to use that logic. It still feels like a workaround as I have
  repetitive code, which results in copy  paste, what I want to avoid
  as much as possible.

  But ok, I'll use that workaround since I don't really see another way,
  if it's not possible to put something like a wrapper around two
  MappedFields.

I hope that information helps understanding my problem...

   Not really.  English is a very bad vehicle for design.  Please give us
  your
   schema or the interfaces at the Scala level.

  My code got really complex and I'm not sure what interfaces I should
  post here. I thought I already posted the relevant parts with the
  InstanceUser schema in the example... :S

  Thanks,
  Joern

  --

  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: Fwd: Watch Foursquare Lift talk live from NY

2009-12-08 Thread Peter Robinett
On Dec 7, 7:36 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Mon, Dec 7, 2009 at 6:59 PM, Peter Robinett pe...@bubblefoundry.comwrote:

  One thing mentioned briefly in the talk that I'd like to know more
  about is oAuth Server code. Is anyone working on that?

 It's on my to-do list.

This is something we'll need at EQUAL Networks within a month or two.
Do you think you'll get to it within that time period? I'm happy to
take a stab at it first, though I know it's not trivial (I've only
written oAuth clients, not servers).

Peter

--

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: UTF-8 Characters

2009-12-08 Thread Peter Robinett
Thanks, David, \u00B0 did it.

Peter

On Dec 7, 7:35 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 Peter,

 My understanding is that JavaScript strings must be ASCII or escaped to
 Unicode: \u4455 (or whatever the unicode character is for degrees).

 Thanks,

 David

 On Mon, Dec 7, 2009 at 7:14 PM, Peter Robinett pe...@bubblefoundry.comwrote:



  Hi all,

  I just discovered that XHTML pages do not support all the character
  entity references HTML does[1]. In my case that means switching from
  deg; to ° in my Javascript file. This is fine except that I am now
  getting a garbled character. My file is encoded in UTF-8 and Maven is
  using UTF-8[2], so I'm stumped about why it is happening. I could just
  switch to an HTML doctype but I'm interested in understanding
  everything that's happening here. Any suggestions?

  Peter

  [1]:
 http://www.bubblefoundry.com/blog/2009/12/html-and-xml-character-enco...
  [2]:
 http://maven.apache.org/plugins/maven-resources-plugin/examples/encod...

  --

  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: Sharing a RequestVar Across CometActors

2009-12-08 Thread Peter Robinett
This was from a while ago but I just wanted to note that it works
well, though I do have some issues with when render is then called,
since localSetup is no longer used.

Also, why does setupComet take a boxed name parameter?

Thanks,
Peter

On Oct 12, 8:15 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Oct 12, 2009 at 7:04 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:







  Hi all,

  I have a question about whether it's possible to access RequestVars in
  CometActors (specifically, to access them in localSetup). I believe it
  is, based upon a recent thread about sharing them among snippets[1]
  and an older thread about Actors accessing S[2]. But first, some
  background, as I may be going around this in totally the wrong way and
  would appreciate your thoughts.

  I am making a dashboard to display a bunch of data that will be coming
  in (near) real-time and I want to use Comet to make sure the user
  always sees the most update-to-date information in their dashboard. I
  have a variety of different aggregate values to display that fall into
  several categories together, so I can group the calculations together.
  I think this sectioning will prove useful in the future, as I can
  imagine wanting to display some but not all of these sections on
  another page.

  Because the CometActors all will need to know the dashboard to which
  they belong, my thought was to share this Mapper instance via a
  RequestVar.

 You can create messages to be sent to a CometActor upon setup:

 for {
   session - S.session
  } session.setupComet(Dashboard, Empty, ABunchOfInfo(sessionInfo))

 When the Dashboard comet actor is created, it will be sent the
 ABunchOfInfo message.  In this way you can send current request state info
 to a CometActor.

 Does this help?







  I call my snippet like so:
  lift:Dashboard.display
  /lift:Dashboard.display

  The snippet defines a RequestVar called myDashboard and then returns a
  NodeSeq:
  div
   lift:comet type=DashboardHelper1
   /lift:comet
  // 
   lift:comet type=DashboardHelperN
   /lift:comet
  /div

  While I can get this all to compile, myDashboard is empty in the
  CometActors. I understand that CometActors basically exist outside of
  the normal request cycle, so would this be the reason why my
  RequestVar is always empty? I was hoping that it would still be in the
  request cycle when localSetup is called, but I can see why that would
  be unrealistic.

  I just tried using SessionVar instead of a RequestVar and this works.
  However, I'm worried about having to be more careful about emptying
  the SessionVar if requesting a different dashboard than if I would if
  I were using a RequestVar. Is this an unrealistic fear?

  What do you think is the best way to proceed?

  Thanks for your help,
  Peter Robinett

  [1]:
 http://groups.google.com/group/liftweb/browse_thread/thread/5cf4ae2ec...
  [2]:
 http://groups.google.com/group/liftweb/browse_thread/thread/274cfc9d2...

 --
 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: Sharing a RequestVar Across CometActors

2009-12-08 Thread Peter Robinett
Specifically, I have:
case Setup(newDatacenter) = {
  datacenter = Full(newDatacenter)
  DatacenterBroker.datacenters(newDatacenter.id) ! AddAListener
(this)
  DatacenterBroker.datacenters(newDatacenter.id) !? GetPackets
match {
case Packets(packets) = {
  savePackets(packets)
  reRender(true)
}
  }
}

My problem is that reRender, while sending the data, doesn't seem to
be causing the new script code to be merged into the document's
head, leaving me with: divheadscript.../script/head/div
in the body.

It's not clear to me whether the script contents are being evaluated
(I would think it shouldn't, since there should only be 1 head tag in
an HTML document) and, even if they are, whether anything happens
since they are all wrapped in a jQuery(document).ready() call.

Peter

On Dec 8, 7:05 pm, Peter Robinett pe...@bubblefoundry.com wrote:
 This was from a while ago but I just wanted to note that it works
 well, though I do have some issues with when render is then called,
 since localSetup is no longer used.

 Also, why does setupComet take a boxed name parameter?

 Thanks,
 Peter

 On Oct 12, 8:15 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:



  On Mon, Oct 12, 2009 at 7:04 AM, Peter Robinett 
  pe...@bubblefoundry.comwrote:

   Hi all,

   I have a question about whether it's possible to access RequestVars in
   CometActors (specifically, to access them in localSetup). I believe it
   is, based upon a recent thread about sharing them among snippets[1]
   and an older thread about Actors accessing S[2]. But first, some
   background, as I may be going around this in totally the wrong way and
   would appreciate your thoughts.

   I am making a dashboard to display a bunch of data that will be coming
   in (near) real-time and I want to use Comet to make sure the user
   always sees the most update-to-date information in their dashboard. I
   have a variety of different aggregate values to display that fall into
   several categories together, so I can group the calculations together.
   I think this sectioning will prove useful in the future, as I can
   imagine wanting to display some but not all of these sections on
   another page.

   Because the CometActors all will need to know the dashboard to which
   they belong, my thought was to share this Mapper instance via a
   RequestVar.

  You can create messages to be sent to a CometActor upon setup:

  for {
    session - S.session
   } session.setupComet(Dashboard, Empty, ABunchOfInfo(sessionInfo))

  When the Dashboard comet actor is created, it will be sent the
  ABunchOfInfo message.  In this way you can send current request state info
  to a CometActor.

  Does this help?

   I call my snippet like so:
   lift:Dashboard.display
   /lift:Dashboard.display

   The snippet defines a RequestVar called myDashboard and then returns a
   NodeSeq:
   div
    lift:comet type=DashboardHelper1
    /lift:comet
   // 
    lift:comet type=DashboardHelperN
    /lift:comet
   /div

   While I can get this all to compile, myDashboard is empty in the
   CometActors. I understand that CometActors basically exist outside of
   the normal request cycle, so would this be the reason why my
   RequestVar is always empty? I was hoping that it would still be in the
   request cycle when localSetup is called, but I can see why that would
   be unrealistic.

   I just tried using SessionVar instead of a RequestVar and this works.
   However, I'm worried about having to be more careful about emptying
   the SessionVar if requesting a different dashboard than if I would if
   I were using a RequestVar. Is this an unrealistic fear?

   What do you think is the best way to proceed?

   Thanks for your help,
   Peter Robinett

   [1]:
  http://groups.google.com/group/liftweb/browse_thread/thread/5cf4ae2ec...
   [2]:
  http://groups.google.com/group/liftweb/browse_thread/thread/274cfc9d2...

  --
  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: Fwd: Watch Foursquare Lift talk live from NY

2009-12-07 Thread Peter Robinett
If you missed the talk you can download it from the same link. It's a
good one.

One thing mentioned briefly in the talk that I'd like to know more
about is oAuth Server code. Is anyone working on that? How can I help?

Peter

On Dec 7, 3:16 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 -- Forwarded message --
 From: Dave Briccetti da...@davebsoft.com
 Date: Mon, Dec 7, 2009 at 3:15 PM
 Subject: Watch Foursquare Lift talk live from NY
 To: Bay Area Scala Enthusiasts scala-b...@googlegroups.com

 http://www.justin.tv/n8han

 --

 You received this message because you are subscribed to the Google Groups
 Bay Area Scala Enthusiasts group.
 To post to this group, send email to scala-b...@googlegroups.com.
 To unsubscribe from this group, send email to
 scala-base+unsubscr...@googlegroups.comscala-base%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group 
 athttp://groups.google.com/group/scala-base?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] UTF-8 Characters

2009-12-07 Thread Peter Robinett
Hi all,

I just discovered that XHTML pages do not support all the character
entity references HTML does[1]. In my case that means switching from
deg; to ° in my Javascript file. This is fine except that I am now
getting a garbled character. My file is encoded in UTF-8 and Maven is
using UTF-8[2], so I'm stumped about why it is happening. I could just
switch to an HTML doctype but I'm interested in understanding
everything that's happening here. Any suggestions?

Peter

[1]: 
http://www.bubblefoundry.com/blog/2009/12/html-and-xml-character-encoding-gotchas-in-javascript/
[2]: 
http://maven.apache.org/plugins/maven-resources-plugin/examples/encoding.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.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Newbie question on the Scala Todo sample application.

2009-12-03 Thread Peter Robinett
Hey itsjar,

The user account stuff was created for you because you used the lift-
archetype-base archetype. Use lift-archetype-blank to get a truly
blank setup.

Peter

On Dec 3, 3:47 pm, itsjar its...@gmail.com wrote:
 Hi,

 when I was working on the tutorial I got to the point where it tells
 you to run it and go to localhost:8080.
 I was surprised to see a complete login/signup application which I
 didn't code.
 So when I set up the program by using the command:
    mvn archetype:generate -U \
     -DarchetypeGroupId=net.liftweb \
     -DarchetypeArtifactId=lift-archetype-basic \
     -DarchetypeVersion=1.0 \
     -DremoteRepositories=http://scala-tools.org/repo-releases\
     -DgroupId=com.liftworkshop \
     -DartifactId=todo \
     -Dversion=0.1-SNAPSHOT

 there is some command in it which generates a standard application for
 me?
 I've been looking for the code of this application but it seems to be
 in .class files which (when I open them) don't really make sense to
 me.
 Could someone explain me what is going on behind my back since I want
 to be in complete control of the application. Also I would like to
 write the login application from scratch to learn lift/scala and it
 might be useful to have access to the code. Is that possible?

 These are probably dumb questions. Sorry if that's the case.
 Thanks,
 itsjar

--

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: Image upload and serving example

2009-12-02 Thread Peter Robinett
Jon, that sounds very interesting and I'd love to see it. S3 support
in general would be a great module for Lift, in my opinion.

Peter

On Dec 2, 10:24 am, jon jonhoff...@gmail.com wrote:
 For those that are using s3, I created a MappedS3Image MappedField for
 automating the storage of image uploads to s3 with a unique identifier
 stored in the RDBMS.  If anyone's interested I could clean and share
 the code.

 usage like this: user.avatar.setFromUpload(fileParamHolderBox) or
 user.avatar.setFromUrl(urlString)

 - Jon

 On Dec 2, 12:15 am, DMB combust...@gmail.com wrote:

  You don't even need f.get in there as it turns out. f.get should
  just be file. Beautiful. Thanks for the tip.

  On Dec 1, 8:07 pm, David Pollak feeder.of.the.be...@gmail.com wrote:

   On Tue, Dec 1, 2009 at 8:03 PM, DMB combust...@gmail.com wrote:
Ended up doing this:

   def show(xhtml: NodeSeq) : NodeSeq = {
       if(S.post_?) {
           val f : Option[FileParamHolder] = S.request match {
               case Empty = Empty
               case Full(req) =
                   req.uploadedFiles.find(_.name == file_upload)
           }

           if(f.isDefined) {
               acceptFile(f.get)
           }
       }
       return xhtml
   }

   This is a place for a for comprehension:

   def show(xhtml: NodeSeq): NodeSeq = {
     for {
       request - S.request if S.post_?
       file - request.uploadedFiles.find(_.name == file_upload)
     } acceptFile(f.get)

     xhtml

   }

   Note that the code is shorter, reads better and has no branches in it.

And putting a bare upload field in the snippet, like you sugested. I
still wonder if the binding method is the best place for this, though.

On Dec 1, 10:14 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 If you have the Req (request), you can do:

 val req: Req = ...
 val theFile: Option[FileParamHolder] = req.uploadedFiles.find(_.name 
 ==
 my_param_name)

 On Tue, Dec 1, 2009 at 2:49 AM, DMB combust...@gmail.com wrote:
  Just what I was looking for, thanks!

  By the way, is there a way to assign a name attribute to a file
  upload input field? The reason is I have a legacy piece of code that
  does HTTP uploads by simulating a form submit. This code requires 
  that
  the form field name be known in advance, for obvious reasons.

  On Nov 30, 9:26 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   Folks,

   Lately there's been a bunch of chatter on the list about image 
   upload
and
   figuring out how to put the image files in the right place to 
   serve
them
   again.

   I've written a simple example of image uploading, storing the 
   image
in
  the
   RDBMS and then serving the image.  You can find the code at:
 http://github.com/dpp/imagine/

   The file upload snippet is very simple:

   class DoUpload {
     private def saveFile(fp: FileParamHolder): Unit = {
       fp.file match {
         case null =
         case x if x.length == 0 =
         case x =
           val blob = ImageBlob.create.image(x).saveMe
           ImageInfo.create.name
   (fp.fileName).mimeType(fp.mimeType).blob(blob).saveMe
           S.notice(Thanks for the upload)
           S.redirectTo(/)
       }
     }

     def render(in: NodeSeq): NodeSeq =
     bind(upload, in, file - SHtml.fileUpload(saveFile _))

   }

   If the blob is uploaded, it's put in a row in ImageBlob and an
ImageInfo
  row
   is created to store the name and mime type.  There are two 
   different
rows
  so
   that one doesn't have to pull the whole blob back when you're
checking
  for
   the upload date.

   Serving the image is similarly concise:

     def serveImage: LiftRules.DispatchPF = {
       case req @ Req(images :: _ :: Nil, _, GetRequest) if
   findFromRequest(req).isDefined =
         () = {
           val info = findFromRequest(req).open_! // open is valid 
   here
  because
   we just tested in the guard

           // Test for expiration
           req.testFor304(info.date, Expires - 
   toInternetDate(millis
+
   30.days)) or
           // load the blob and return it
           info.blob.obj.map(blob = InMemoryResponse(blob.image,
   List((Last-Modified, toInternetDate(info.date.is)),

    (Expires, toInternetDate(millis + 30.days)),

    (Content-Type, info.mimeType.is)), Nil,  200))
         }
     }

   If the request matches /images/xxx where xxx is a name in the
ImageInfo
   table, check to see if we can return a 304 (not modified).  If 
   not,
we
  pull
   the blob from the database and return it.

   I hope this helps folks who are looking to manage and serve 
   images.

  

[Lift] Re: lift-json escaping bug

2009-11-30 Thread Peter Robinett
Harry, I think you're double-escaping the slash. This works:
scala import net.liftweb.json._
scala val s1 = { \id\: \America/New_York\ }
s1: java.lang.String = { id: America/New_York }

scala JsonParser.parse(s1)
res0: net.liftweb.json.JsonAST.JValue = JObject(List(JField(id,JString
(America/New_York

Peter Robinett

On Nov 30, 2:16 pm, harryh har...@gmail.com wrote:
 scala import net.liftweb.json._
 scala val s2 = { \id\: \America\\/New_York\ }
 s2: java.lang.String = { id: America\/New_York }

 scala JsonParser.parse(s2)
 res1: net.liftweb.json.JsonAST.JValue = JObject(List(JField(id,JString
 (America\New_York

 It should be America/New_York but for some reason getting a \ instead
 of a /

 -harryh

--

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




[Lift] Re: fsc and Lift

2009-11-27 Thread Peter Robinett
If you're using Maven to manage your Lift project and especially
testing things with the mvn jetty:run target, run mvn scala:cc in
another shell. It will run fsc, detect source file changes and
recompile them, reloading classes or restarting Jetty as necessary. It
works very well, though I find that editing actor classes tends to
require a true shutdown of Jetty and restart.

Peter Robinett

On Nov 27, 9:03 pm, jack jack.wid...@gmail.com wrote:
 Does anybody use fsc instead of scalac? I find scalac slow. Are there
 any known issues with using fsc 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=en.




[Lift] Re: Feature Request: deleteMenuLocParams in CRUDify

2009-11-24 Thread Peter Robinett
I had this exact need for deleteMenuLocParams the other day. I'd love
to see this added!

Peter Robinett

On Nov 24, 5:40 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Nov 24, 2009 at 1:03 AM, tommycli tommy...@ucla.edu wrote:
  Amazing - great. For future reference - what's the preferred method
  for asking for code/feature to be integrated?

 Discuss on this list, once everyone is happy, open a ticket at GitHub.





  On Nov 23, 9:46 pm, Ross Mellgren dri...@gmail.com wrote:
   Added an issue for you:http://github.com/dpp/liftweb/issues#issue/205
   and it's on review board:http://reviewboard.liftweb.net/r/121/

   So it will (probably) be in 1.1-SNAPSHOT in a day or two, assuming the
  change isn't unacceptable for whatever reason.

   -Ross

   On Nov 23, 2009, at 11:50 PM, tommycli wrote:

Add deleteMenuLocParams to CRUDify.

Patch below. (I tried github, but you guys don't pull apparently).

pre
diff --git a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/
mapper/CRUDify.scala b/lift-persistence/lift-mapper/src/main/scala/net/
liftweb/mapper/CR
index 21e5a3b..5aae123 100644
--- a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/
CRUDify.scala
+++ b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/
CRUDify.scala
@@ -265,7 +265,7 @@ trait CRUDify[KeyType, CrudType : KeyedMapper
[KeyType, CrudType]] {

          def defaultValue = Empty

-          def params = Nil
+          def params = deleteMenuLocParams

          /**
           * What's the text of the link?
@@ -297,6 +297,11 @@ trait CRUDify[KeyType, CrudType : KeyedMapper
[KeyType, CrudType]] {
        }))
  }

+  /**
+   * Override to include new Params for the show all menu
+   */
+  def deleteMenuLocParams: List[Loc.AnyLocParam] = Nil
+
  def deleteMenuName = S.??(Delete)+ +displayName

  def deleteTemplate(): NodeSeq = pageWrapper(_deleteTemplate)
/pre

--

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: Feature Request: deleteMenuLocParams in CRUDify

2009-11-24 Thread Peter Robinett
We've built an access control system that uses an If LocParam to
enforce whether the current user can access the requested location.

Peter

On Nov 24, 10:12 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
 Just curious, but what are you using the LocParams for in this case? I'm
 writing my own CRUDOps trait that takes a different approach to permissions
 and menus, so I'm trying to figure out the use cases besides my own.

 Thanks,

 Derek

 On Tue, Nov 24, 2009 at 11:01 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:

  I had this exact need for deleteMenuLocParams the other day. I'd love
  to see this added!

  Peter Robinett

  On Nov 24, 5:40 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Tue, Nov 24, 2009 at 1:03 AM, tommycli tommy...@ucla.edu wrote:
Amazing - great. For future reference - what's the preferred method
for asking for code/feature to be integrated?

   Discuss on this list, once everyone is happy, open a ticket at GitHub.

On Nov 23, 9:46 pm, Ross Mellgren dri...@gmail.com wrote:
 Added an issue for you:
 http://github.com/dpp/liftweb/issues#issue/205
 and it's on review board:http://reviewboard.liftweb.net/r/121/

 So it will (probably) be in 1.1-SNAPSHOT in a day or two, assuming
  the
change isn't unacceptable for whatever reason.

 -Ross

 On Nov 23, 2009, at 11:50 PM, tommycli wrote:

  Add deleteMenuLocParams to CRUDify.

  Patch below. (I tried github, but you guys don't pull apparently).

  pre
  diff --git
  a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/
  mapper/CRUDify.scala
  b/lift-persistence/lift-mapper/src/main/scala/net/
  liftweb/mapper/CR
  index 21e5a3b..5aae123 100644
  ---
  a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/
  CRUDify.scala
  +++
  b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/
  CRUDify.scala
  @@ -265,7 +265,7 @@ trait CRUDify[KeyType, CrudType : KeyedMapper
  [KeyType, CrudType]] {

            def defaultValue = Empty

  -          def params = Nil
  +          def params = deleteMenuLocParams

            /**
             * What's the text of the link?
  @@ -297,6 +297,11 @@ trait CRUDify[KeyType, CrudType : KeyedMapper
  [KeyType, CrudType]] {
          }))
    }

  +  /**
  +   * Override to include new Params for the show all menu
  +   */
  +  def deleteMenuLocParams: List[Loc.AnyLocParam] = Nil
  +
    def deleteMenuName = S.??(Delete)+ +displayName

    def deleteTemplate(): NodeSeq = pageWrapper(_deleteTemplate)
  /pre

  --

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

.
  For more options, visit this group 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
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

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

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

  --

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

--

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: Improving lift-flot

2009-11-24 Thread Peter Robinett
Thanks, Jeppe, it's interesting to see how you've approached it.

Peter

On Nov 24, 12:57 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Peter Robinett pe...@bubblefoundry.com writes:
  I've been working with lift-flot a lot recently and I'd like to share
  some thoughts and suggest some improvements. It's a very useful
  interface to a great Javascript plotting library, so consider these as
  small suggestions from a fan.

 I had some of the same concerns as you a while back. I ended up writing
 a wrapper to the JqPlot library instead since it better matched the
 features we needed.

 But the inner workings are about the same, so maybe you can use some of
 the ideas. I'm mainly using category plots with name/value pairs.

 I have basic structure for a single series:

 class CategorySeries[T](val categories : List[T], val values :
 List[Double], val name : Option[String])

 And a complete dataset:

 class CategoryDataset[T](val series : List[CategorySeries[T]], val name:
 Option[String])

 I then defined several different plot types that do the right thing
 with respect to the dataset:

 class BarChart[T] (dataset: CategoryDataset[T])
 class StackedBarChart[T] (dataset: CategoryDataset[T])
 class PieChart[T] (dataset: CategoryDataset[T])

 etc

 I haven't made any partial updates so don't know how well this works
 here :-)

 /Jeppe

--

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




[Lift] Does a Mapper MappedStringForeignKey check for existence when set?

2009-11-24 Thread Peter Robinett
I having some memory problems that I suspect are caused, at the end of
the day, by creating many Mapper instances and setting their
MappedStringForeignKey property. When I set it, is it being looked up
in the database? Based on a previous thread[1], I suspect it is. This
is with 1.1-M5.

Thanks,
Peter Robinett

[1]: 
http://groups.google.com/group/liftweb/browse_thread/thread/41894ec33fc538/104ab87f1213ea7b

--

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: Improving lift-flot

2009-11-24 Thread Peter Robinett
I'd be happy to but I'd appreciate some advice and guidance.

Peter

On Nov 24, 2:26 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I'm all for enhancing the flot stuff.

 Do I see anyone raising their hand to own the changes?

 On Tue, Nov 24, 2009 at 12:57 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:



  Peter Robinett pe...@bubblefoundry.com writes:

   I've been working with lift-flot a lot recently and I'd like to share
   some thoughts and suggest some improvements. It's a very useful
   interface to a great Javascript plotting library, so consider these as
   small suggestions from a fan.

  I had some of the same concerns as you a while back. I ended up writing
  a wrapper to the JqPlot library instead since it better matched the
  features we needed.

  But the inner workings are about the same, so maybe you can use some of
  the ideas. I'm mainly using category plots with name/value pairs.

  I have basic structure for a single series:

  class CategorySeries[T](val categories : List[T], val values :
  List[Double], val name : Option[String])

  And a complete dataset:

  class CategoryDataset[T](val series : List[CategorySeries[T]], val name:
  Option[String])

  I then defined several different plot types that do the right thing
  with respect to the dataset:

  class BarChart[T] (dataset: CategoryDataset[T])
  class StackedBarChart[T] (dataset: CategoryDataset[T])
  class PieChart[T] (dataset: CategoryDataset[T])

  etc

  I haven't made any partial updates so don't know how well this works
  here :-)

  /Jeppe

  --

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

 --
 Lift, the simply functional web 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: Does a Mapper MappedStringForeignKey check for existence when set?

2009-11-24 Thread Peter Robinett
Ok, thanks, that makes sense.

On Nov 24, 2:54 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Tue, Nov 24, 2009 at 2:47 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:

  I having some memory problems that I suspect are caused, at the end of
  the day, by creating many Mapper instances and setting their
  MappedStringForeignKey property. When I set it, is it being looked up
  in the database? Based on a previous thread[1], I suspect it is. This
  is with 1.1-M5.

 It's not being looked up in the database until you call .obj on the field.





  Thanks,
  Peter Robinett

  [1]:
 http://groups.google.com/group/liftweb/browse_thread/thread/41894ec33...

  --

  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] Improving lift-flot

2009-11-23 Thread Peter Robinett
I've been working with lift-flot a lot recently and I'd like to share
some thoughts and suggest some improvements. It's a very useful
interface to a great Javascript plotting library, so consider these as
small suggestions from a fan.

First, the fact that FlotSerie's data property is a List[Pair[Double,
Double]] means that detail about what you're charting can get lost. If
you're plotting more than one line and want to refer to a certain
FlotSerie later, you have to rely upon the FlotSerie's label and the
order of the List[FlotSerie] used by Flot.render and JsFlotAppendData.
This can be addressed either by having a parallel list of your own
more expressive data instances, which is what I'm doing, or by only
having this more expressive list and having an implicit conversion to
a Pair[Double, Double] (I just thought of this and haven't tested it).
I can't think of a better way to do this, since everyone's data source
will be different and so the generic Pair[Double, Double] is needed –
this is just a comment on how the library works.

There is a general reliance on List[Pair[Double, Double]] throughout
lift-flot and it is an actual annoyance when you are updating an
existing graph, for instance via a Comet actor. Speaking of the List
[FlotSerie] I mentioned earlier, if you are updating your chart you
need to keep this list of series around and update it as you have new
data to plot. This is fine except for the fact that JsFlotAppendData
requires you to pass it both the updated List[FlotSerie] and a List
[Pair[Double, Double]] with one and only one new data point for each
FlotSerie. This means that you need to hard-code the list order so
that the order of the List[Pair[Double, Double]] matches that of the
List[FlotSerie], so that the correct series is updated with the
correct new point. I assume you need to give it the new data twice so
it knows which FlotSeries have new points and which don't, but this is
something the library could do behind the scenes to make the
developers' lives easier. More importantly, I don't like the fact that
the method replies upon two lists being in the exact same order.

So, what would I like to see with lift-flot? Mainly I'd like to see
the whole situation with the List[Pair[Double, Double]]'s improved. I
don't know if another Flot class, such as a FlotPoint, would help or
maybe just making better use of the List[FlotSeries], but I think
there definitely is room for improvement. If someone else has been
using lift-flot I'd love to hear their suggestions, as perhaps I've
been making it more complicated than it actually is.

I think a lot of the annoyances I described only crop up when using
the JsFlotAppendData method, so I don't won't to propose anything that
ends up being a regression for the majority of the library's users.
Please let me know if you're doing static charts and anything
suggested would make your work more complicated.

Since I am using lift-flot a lot (perhaps more than anyone else,
seeing how little it's been discussed here recently), I'm more than
happy to take the lead and contribute some code if others agree that
my suggestions are reasonable (please convince me otherwise!). I guess
that the first thing I could do would be to write a tutorial on using
the library. Would that be appreciated?

Peter Robinett

PS I've been working with 1.1-M5 and 1.1-M6, but I don't think there
have been any changes to lift-flot since then, let alone any that
would invalidate my comments.

--

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: Best practices for objects that refer to their own type?

2009-11-16 Thread Peter Robinett

Based how I think MappedLongForeignKey works, I would expect
Comment.parentComment to already have the parent instance, but I
haven't tested this.

Peter

On Nov 16, 8:57 am, Trevor Austin traus...@gmail.com wrote:
 I have an object type representing a threaded comment that I want to
 organize into trees - what's the best way to represent this
 relationship with Mapper?  My naive idea is to do something like:

 class Comment extends LongKeyedMapper[Comment] with IdPK {
   ...
   object parentComment extends MappedLongForeignKey(this, Comment) {
     override def dbColumnName = parent_comment_id
     override def defaultValue = -1
   }
   ...
   def getParentComment():Box[Comment] = {
     if(this.parentComment.is == -1) {
       Empty
     }
     else {
       Comment.find(By(Comment.id, this.parentComment))
     }
   }

 }

 Is there a way to do this more directly so that Comment.parentComment
 just gives me something I can feed into type matching rather tahn
 doing the explicit check against -1 in a wrapper funciton?
--~--~-~--~~~---~--~~
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] Wizard at BASE

2009-11-10 Thread Peter Robinett

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?

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

Peter Robinett
--~--~-~--~~~---~--~~
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 at BASE

2009-11-10 Thread Peter Robinett

Thanks, Naftoli, it sounds like the solution you describe is what I
thought Wizard would (or could) be.

Peter

On Nov 10, 11:33 am, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Sounds like Wizard is very complex!
 Peter, if all you want is to split a form among several screens with one 
 continuous state, see BindPlus.bindSwitch. All you need to do is put the 
 separate screens in sibling elements in the template, and tell bindSwitch 
 which xml to output and it will leave out the others. Use a StatefulSnippet 
 or RequestVars and use links or buttons to update the input to bindSwitch, 
 such as a page number.

 -

 David Pollakfeeder.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] Re: Pretty Printed Output?

2009-11-09 Thread Peter Robinett

How hard would this be to implement? I'm a big fan of pretty HTML
output, so I'd be interested in implementing this if it's not too
hard.

Peter Robinett

On Nov 7, 7:06 am, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Sat, Nov 7, 2009 at 1:01 AM, aw anth...@whitford.com wrote:

  Is there a mode whereby I can turn on pretty printed output for my
  xhtml?  (I'm thinking of a LiftRule, I think?).  Preferably, I'd also
  like to control some details like indentation size.

 No mode for that... sorry.



 --
 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: CometActor fixedRender vs. render

2009-10-26 Thread Peter Robinett

fixedRender sounds very useful and was something I didn't know about.
How do you use it? Do you call render from within fixedRender?

Peter Robinett

On Oct 26, 9:40 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 There are parts of a comet component that may not change on every render
 of the component.  For example, if a Chat component were to re-render its
 whole self on every chat message, the input box would be re-rendered,
 erasing any in-process input.  So, there's a fixed part of the the comet
 component and a changes a lot part of the comet component.  By default
 (reRender(false)) only the non-fixed part of the component is
 re-rendered.  Does this answer your question?

 On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 



 heiko.seeber...@googlemail.com wrote:
  Hi,

  In CometActor, what's the puropse of fixedRender? What's the
  difference/relation to render?

  Thanks

  Heiko

  --

  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

 --
 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: CometActor fixedRender vs. render

2009-10-26 Thread Peter Robinett

Thanks, David. To make sure I'm not confused, the fixed part isn't
redrawn by render because render binds to bodyArea, not the inputArea
bound in fixedRender?

Peter

On Oct 26, 11:45 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 http://github.com/dpp/liftweb/blob/master/lift-examples/example/src/m...

 On Mon, Oct 26, 2009 at 11:43 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  fixedRender sounds very useful and was something I didn't know about.
  How do you use it? Do you call render from within fixedRender?

  Peter Robinett

  On Oct 26, 9:40 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   There are parts of a comet component that may not change on every
  render
   of the component.  For example, if a Chat component were to re-render its
   whole self on every chat message, the input box would be re-rendered,
   erasing any in-process input.  So, there's a fixed part of the the comet
   component and a changes a lot part of the comet component.  By default
   (reRender(false)) only the non-fixed part of the component is
   re-rendered.  Does this answer your question?

   On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 

   heiko.seeber...@googlemail.com wrote:
Hi,

In CometActor, what's the puropse of fixedRender? What's the
difference/relation to render?

Thanks

Heiko

--

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

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

 --
 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] Flot Demo Broken

2009-10-26 Thread Peter Robinett

The flot demo in lift-examples/flotDemo on github.com/dpp/liftweb
won't compile because of the following errors:
lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
comet/FlotCometExample.scala:34: error: type mismatch;
 found   : net.liftweb.flot_demo.web.comet.FlotCometExample
 required: scala.actors.Actor
Sensor.acum !? AddListener(this) match {
   ^
lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
comet/FlotCometExample.scala:50: error: type mismatch;
 found   : net.liftweb.flot_demo.web.comet.FlotCometExample
 required: scala.actors.Actor
Sensor.acum ! RemoveListener(this)
 ^
two errors found

I assume this is related to the switch of CometActor to LiftActor. Is
there any way I can easily help fix this? Should I file a bug?

Peter Robinett
--~--~-~--~~~---~--~~
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: Flot Demo Broken

2009-10-26 Thread Peter Robinett

That's a start but I'm sure we don't want broken code in the
repository! =)

Peter

On Oct 26, 12:48 pm, Java1Guy mark.cha...@gmail.com wrote:
 I got it to run pretty easily by locally back porting to 1.1m4.
 Just change back the one package name change, IIRC.
 Otherwise it was becoming a big rat hole.

 Mark
--~--~-~--~~~---~--~~
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: Flot Demo Broken

2009-10-26 Thread Peter Robinett

Thanks, Indrajit. I created the ticket here: 
http://github.com/dpp/liftweb/issues/#issue/135

Peter

On Oct 26, 12:57 pm, Indrajit Raychaudhuri indraj...@gmail.com
wrote:
 Yes please, file a ticket.

 Just noticed, oddly flotDemo isn't part of the reactor either (not
 listed as sub-module for lift-examples). Would have been trapped by now
 otherwise.

 Cheers, Indrajit

 On 27/10/09 12:54 AM, Peter Robinett wrote:



  The flot demo in lift-examples/flotDemo on github.com/dpp/liftweb
  won't compile because of the following errors:
  lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
  comet/FlotCometExample.scala:34: error: type mismatch;
    found   : net.liftweb.flot_demo.web.comet.FlotCometExample
    required: scala.actors.Actor
       Sensor.acum !? AddListener(this) match {
                                  ^
  lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
  comet/FlotCometExample.scala:50: error: type mismatch;
    found   : net.liftweb.flot_demo.web.comet.FlotCometExample
    required: scala.actors.Actor
       Sensor.acum ! RemoveListener(this)
                                    ^
  two errors found

  I assume this is related to the switch of CometActor to LiftActor. Is
  there any way I can easily help fix this? Should I file a bug?

  Peter Robinett
--~--~-~--~~~---~--~~
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: What is going to be in Lift 1.1

2009-10-15 Thread Peter Robinett

Hi David,

That sounds like a great list, especially (in my case) the Record,
lift-json, OAuth, and REST support.

Peter Robinett

On Oct 14, 11:27 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,
 I'd like to get everyone's input on what Lift 1.1 will contain.  Here's my
 list:

    - Wizard working to the same quality that SiteMap works
    - Record become the primary persistence vehicle in Lift
    - Lift runs on Scala 2.8
    - Full support for Oracle and MS SQL Server
    - Integrate lift-json into Lift's JavaScript libraries
    - OAuth server support
    - Improved REST support

 Please let me know what your list looks like.  Once we get to consensus,
 I'll post tickets for each of the items.

 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: How much Scala knowledge is needed to start coding a simple blog with Lift?

2009-10-15 Thread Peter Robinett

David's Beginning Scala book is fantastic: it's perfectly paced, gets
straight to the point, and is written in a nice voice.

Peter Robinett

On Oct 15, 4:41 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Thu, Oct 15, 2009 at 4:18 AM, Viktor Klang viktor.kl...@gmail.comwrote:

  I started Scala 2 years ago by reading the Lift code.
  so DPPs basically responsible for my Scala code... ;)

 So what you're saying is that you're all my fault... gak. ;-)





  On Thu, Oct 15, 2009 at 10:58 AM, opyate opy...@gmail.com wrote:

  Hello,

  I bought the Scala book in PDF format (Odersky/Spoon/Venners) and
  pretty much jumped around it (benefit of PDF is the hyperlinks) for
  about a week. I am probably proficient with everything in chapters
  1-18 which is still pretty much beginner/novice level, but I need the
  web/book before I tackle most other concepts.

  But I just wanted to get my hands dirty with a couple of apps and
  dived straight in. You learn by doing. You learn by reading someone
  else's code, which is what I've been doing a lot with the Lift sources
  (I have a local Git clone, and set it up in Eclipse).

  So, in a nutshell: learn the Scala basics, and get your hands dirty.
  Open a console and faff about, then start writing apps! :-)

  What I've done so far can be found here:
 http://github.com/opyate/Ken
 http://github.com/opyate/yauser

  Happy coding!
  Juan

  On Oct 15, 6:07 am, ngocdaothanh ngocdaoth...@gmail.com wrote:
   Hi,

   I have experience with Rails and Java. I'm new to Scala and Lift. I
   want to ask how much Scala knowledge is needed to start coding a
   simple blog with Lift?

   Rails is easy to learn because it require little Ruby knowledge to get
   started. Having read the Lift book, I feel one must have some advanced
   Scala knowledge to get started. Could anyone provide some kind of
   guideline or curriculum of Scala and Lift to get started with Lift?

   I would like to write a simple blog to learn Lift. But don't know how
   much Scala knowledge I should have to jump in Lift.

   Thanks.

  --
  Viktor Klang

  Blog: klangism.blogspot.com
  Twttr: viktorklang
  Wave: viktor.kl...@googlewave.com
  Code: github.com/viktorklang

  AKKA Committer - akkasource.org
  Lift Committer - liftweb.com
  Atmosphere Committer - atmosphere.dev.java.net
  SoftPub founder:http://groups.google.com/group/softpub

 --
 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: Complex primary key

2009-10-14 Thread Peter Robinett

http://scala-tools.org/mvnsites-snapshots/liftweb/lift-mapper/scaladocs/net/liftweb/mapper/ManyToMany.html

If you look back in the group there is a thread announcing the
addition of the trait and how to use it.

Peter Robinett

On Oct 14, 10:57 am, GA my_li...@me.com wrote:
 I need a many-to-many intermediary table and i need to add some more  
 fields to it as well.

 In the question I meant compound primary key because I am creating the  
 intermediary  table manually in the mapper model. Is there any way to  
 do many-to-many relationships automatically in the mapper?

 Thanks,

 On Oct 13, 2009, at 6:37 PM, David Pollak wrote:

  I'm sorry, are you trying to do a compound primary key or create a  
  many-to-many intermediary table?

  On Tue, Oct 13, 2009 at 8:06 AM, David Pollak feeder.of.the.be...@gmail.com
   wrote:
  I don't think that's possible with mapper.  Sorry.

  You might want to see if JPA supports such a beast.

  On Mon, Oct 12, 2009 at 7:30 AM, my_li...@me.com wrote:

  Hello guys,

  How can I create a mapper with two or more fields as primary key?

  For instance if we have a table of people with a Long primary key
  called ID generated by IdPK, and also we have a table of addresses
  also with a Long primary key called ID generated by IdPK. The idea
  is to create an association table with both IDs to represent people
  with many addresses and addresses with multiple people. So both IDs
  will be primary key of the new table.

  Thanks in advance,

  GA

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

  --
  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: Complex primary key

2009-10-13 Thread Peter Robinett

GA, so you want a composite primary key? I'm not sure that's possible
in most SQL databases, though a unique composite key definitely is...

Peter Robinett

On Oct 12, 4:30 pm, my_li...@me.com wrote:
 Hello guys,

 How can I create a mapper with two or more fields as primary key?

 For instance if we have a table of people with a Long primary key  
 called ID generated by IdPK, and also we have a table of addresses  
 also with a Long primary key called ID generated by IdPK. The idea  
 is to create an association table with both IDs to represent people  
 with many addresses and addresses with multiple people. So both IDs  
 will be primary key of the new table.

 Thanks in advance,

 GA
--~--~-~--~~~---~--~~
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: Extend the tables that like the migration in the Rails ?

2009-10-12 Thread Peter Robinett

Is User added to Schemefier in Boot.scala? It should look something
like: Schemifier.schemify(true, Log.infoF _, User)

Peter Robinett

On Oct 12, 11:22 am, Neil.Lv anim...@gmail.com wrote:
 Hi all,

    I don't know whether there is a mechanism that like the migration
 of the Rails in the Liftweb, and how can we

 extend the table, such as add a column desc  into a table users (OR
 user ?).

    I add this code in the User model and restart the server, the table
 don't change anything !
    ###
    class User extends MegaProtoUser[User] {
      ...
      object desc extends MappedPoliteString(this, 128)
      ...
    }
    ###

   How can i do if i want to achieve this purpose ?

   Thanks for any suggestion!

 Cheers,
   Neil
--~--~-~--~~~---~--~~
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: Props file example

2009-10-12 Thread Peter Robinett

It's a simple java.properties file. You should place it in src/main/
resources/props. There is a search order but, off the top of my head,
the last two options are the username running the app (e.g.
peter.props) and default.props.

My peter.props looks like this:
db.driver=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost/myDB
db.user=myUser
db.password=myPassword
isPeter=true

Notice that you can define your own properties.

Peter Robinett

On Oct 12, 2:42 pm, Guillermo Acilu my_li...@me.com wrote:
 Hello guys,

 I am starting to learn Lift and I have a very silly question.

 I am using postgresql and I have seen that the file boot.scala reads  
 the configuration parameters like connect string, user name and  
 password, from a properties file called Props. I could not find an  
 example of such a file in any document or in google. Is it a XML file  
 or a simple java.properties file? Could you please send me an small  
 example?

 Thanks in advance,

 GA
--~--~-~--~~~---~--~~
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: LongKeyedMapper object where I can set the id

2009-10-09 Thread Peter Robinett

Hi Harry,

I think you also need to set override def dbAutogenerated_? = false

I've used dbAutogenerated_? and writePermission_? with
MappedStringIndex but I also had to redefine dirty_?, which hopefully
you won't have to do. If you do a search through this group you can
find my thread on it. However, my solution isn't complete, as Mapper
always tries to INSERT a row instead of UPDATE, the exact inverse of
your problem!

Peter

On Oct 8, 11:28 pm, harryh har...@gmail.com wrote:
 LongKeyedMapper object where I can set the id.

 I want a database object where I set the primary key myself (rather
 than having it be sequentially by the database).  I thought I could do
 this:

 class Tombstone extends LongKeyedMapper[Tombstone] {
   def getSingleton = Tombstone

   def primaryKeyField = id
   object id extends MappedLongIndex(this) {
     override def writePermission_? = true
   }

 }

 object Tombstone extends Tombstone with LongKeyedMetaMapper[Tombstone]
 {
   override def dbTableName = tombstones

 }

 But when I do Tombstone.create.id(12).save it does an UPDATE instead
 of an INSERT.  Is there any good way to do what I want 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: YUI Compressor Fatal Error

2009-10-08 Thread Peter Robinett

Hi all,

I just switched to the Sun JVM and everything works now, so it
definitely was OpenJDK. Oh well.

Peter

On Oct 6, 7:10 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Tue, Oct 6, 2009 at 1:39 AM, Peter Robinett pe...@bubblefoundry.comwrote:



  Thanks, all. While David Bernard's plan to update the maven plugin is
  very welcome, the fact that Scala Actors don't work for Comet actors
  suggests that I should switch to the Sun JVM.

 Keep in mind I was on Ubuntu 8.04 (granted this is the LTS version).

 I'll try on 9.04 today.





  Peter

  On Oct 6, 8:50 am, David Bernard david.bernard...@gmail.com wrote:
   yuicompressor 2.3.x doesn't work with openjdk
   (https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/287035)
   But it seems that yuicompressor 2.4.2 works
   (http://www.electrictoolbox.com/minify-javascript-css-yui-compressor/)

   It's a long time I didn't update yuicompressor-maven-plugin. I'll
   deploy a new version latter this week.

   /davidB

   On Tue, Oct 6, 2009 at 02:19, Ross Mellgren dri...@gmail.com wrote:
According to his version number he's running ubuntu and that particular
version corresponds to jaunty jackalope (9.04)
Unless he spliced that package into debian or something else.
-Ross
On Oct 5, 2009, at 8:06 PM, David Pollak wrote:

d...@david-desktop:~/Desktop/liftweb/examples/example$ java -version
Picked up JAVA_TOOL_OPTIONS: -Xmx1024M
java version 1.6.0_0
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK Client VM (build 1.6.0_0-b11, mixed mode, sharing)
d...@david-desktop:~/Desktop/liftweb/examples/example$

I'm running on Ubuntu 8.04 with the OpenJDK installation.

I get compilation failures on about half the runs.  They appear to be
random.

Scala Actors do not work (I'm not trying to throw gasoline on any
  fires,
just reporting what I'm seeing) when powering Lift's comet stuff.
  However,
Lift Actors do work.

I'm not seeing any explicit issues with other libraries.

What OS are you running under your OpenJDK installation?

On Mon, Oct 5, 2009 at 1:10 PM, Peter Robinett 
  pe...@bubblefoundry.com
wrote:

Ross, I am using OpenJDK:
$ java -version
java version 1.6.0_0
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

Is it possible to use YUI Compressor at all with OpenJDK?

Peter

On Oct 5, 7:32 pm, Ross Mellgren dri...@gmail.com wrote:
 I thought someone mentioned this a little while ago and it was due
  to
 OpenJDK (and only related to the YUI compressor)?

 -Ross

 On Oct 5, 2009, at 1:25 PM, jon wrote:

  Is there a syntax problem in one of your javascript files?

  On Oct 5, 1:23 pm, Peter Robinett pe...@bubblefoundry.com
  wrote:
  Hi all,

  I've been compiling and running my Lift app on my personal
  machine
  without any problems but when I try to run it on another machine
  (where it had previously worked), I am getting fatal YUI
  Compressor
  errors.

  Not knowing YUI Compressor or how Lift and Maven use it (but
  willing
  to learn!), I'd appreciate any tips on how to get it to work
  again.

  Thanks in advance,
  Peter Robinett

  PS I thought I already posted a version of this message but I
  don't
  see it on the Groups site. My apologies if this message is a
  duplicate.

  $ mvn jetty:run
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'jetty'.
  [INFO]

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

  
  [INFO] Preparing jetty:run
  [INFO] [resources:resources]
  [INFO] Using default encoding to copy filtered resources.
  [INFO] [yuicompressor:compress {execution: default}]
  [INFO] equalnetworks.css (267b) - equalnetworks.css (197b)[73%]
  [INFO] dashboard.css (5511b) - dashboard.css (4478b)[81%]
  [INFO] jquery.tooltip.css (172b) - jquery.tooltip.css
  (145b)[84%]
  [INFO]

  
  [ERROR] FATAL ERROR
  [INFO]

  
  [INFO] null
  [INFO]

  
  [INFO] Trace
  java.lang.RuntimeException
          at

  com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
  (JavaScriptCompressor.java:299)
          at
  com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse
  (JavaScriptCompressor.java:335)
          at
  com.yahoo.platform.yui.compressor.JavaScriptCompressor.init
  (JavaScriptCompressor.java:532

[Lift] Re: YUI Compressor Fatal Error

2009-10-06 Thread Peter Robinett

Thanks, all. While David Bernard's plan to update the maven plugin is
very welcome, the fact that Scala Actors don't work for Comet actors
suggests that I should switch to the Sun JVM.

Peter

On Oct 6, 8:50 am, David Bernard david.bernard...@gmail.com wrote:
 yuicompressor 2.3.x doesn't work with openjdk
 (https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/287035)
 But it seems that yuicompressor 2.4.2 works
 (http://www.electrictoolbox.com/minify-javascript-css-yui-compressor/)

 It's a long time I didn't update yuicompressor-maven-plugin. I'll
 deploy a new version latter this week.

 /davidB

 On Tue, Oct 6, 2009 at 02:19, Ross Mellgren dri...@gmail.com wrote:
  According to his version number he's running ubuntu and that particular
  version corresponds to jaunty jackalope (9.04)
  Unless he spliced that package into debian or something else.
  -Ross
  On Oct 5, 2009, at 8:06 PM, David Pollak wrote:

  d...@david-desktop:~/Desktop/liftweb/examples/example$ java -version
  Picked up JAVA_TOOL_OPTIONS: -Xmx1024M
  java version 1.6.0_0
  OpenJDK  Runtime Environment (build 1.6.0_0-b11)
  OpenJDK Client VM (build 1.6.0_0-b11, mixed mode, sharing)
  d...@david-desktop:~/Desktop/liftweb/examples/example$

  I'm running on Ubuntu 8.04 with the OpenJDK installation.

  I get compilation failures on about half the runs.  They appear to be
  random.

  Scala Actors do not work (I'm not trying to throw gasoline on any fires,
  just reporting what I'm seeing) when powering Lift's comet stuff.  However,
  Lift Actors do work.

  I'm not seeing any explicit issues with other libraries.

  What OS are you running under your OpenJDK installation?

  On Mon, Oct 5, 2009 at 1:10 PM, Peter Robinett pe...@bubblefoundry.com
  wrote:

  Ross, I am using OpenJDK:
  $ java -version
  java version 1.6.0_0
  OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
  OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

  Is it possible to use YUI Compressor at all with OpenJDK?

  Peter

  On Oct 5, 7:32 pm, Ross Mellgren dri...@gmail.com wrote:
   I thought someone mentioned this a little while ago and it was due to
   OpenJDK (and only related to the YUI compressor)?

   -Ross

   On Oct 5, 2009, at 1:25 PM, jon wrote:

Is there a syntax problem in one of your javascript files?

On Oct 5, 1:23 pm, Peter Robinett pe...@bubblefoundry.com wrote:
Hi all,

I've been compiling and running my Lift app on my personal machine
without any problems but when I try to run it on another machine
(where it had previously worked), I am getting fatal YUI Compressor
errors.

Not knowing YUI Compressor or how Lift and Maven use it (but willing
to learn!), I'd appreciate any tips on how to get it to work again.

Thanks in advance,
Peter Robinett

PS I thought I already posted a version of this message but I don't
see it on the Groups site. My apologies if this message is a
duplicate.

$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]


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


[INFO] Preparing jetty:run
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [yuicompressor:compress {execution: default}]
[INFO] equalnetworks.css (267b) - equalnetworks.css (197b)[73%]
[INFO] dashboard.css (5511b) - dashboard.css (4478b)[81%]
[INFO] jquery.tooltip.css (172b) - jquery.tooltip.css (145b)[84%]
[INFO]


[ERROR] FATAL ERROR
[INFO]


[INFO] null
[INFO]


[INFO] Trace
java.lang.RuntimeException
        at

com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
(JavaScriptCompressor.java:299)
        at
com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse
(JavaScriptCompressor.java:335)
        at
com.yahoo.platform.yui.compressor.JavaScriptCompressor.init
(JavaScriptCompressor.java:532)
        at
net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile
(YuiCompressorMojo.java:178)
        at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir
(MojoSupport.java:151)
        at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute
(MojoSupport.java:105)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:558

[Lift] Re: lift-json's extract and Mapper

2009-10-05 Thread Peter Robinett

Thanks, Joni, that works perfectly!

Peter

On Oct 5, 8:49 am, Joni Freeman freeman.j...@gmail.com wrote:
 Hi Peter,

 To select multiple packets you need to first select the objects within
 the array. Like this:

 for {
   JObject(packet) - parse(s)
   JField(node, JString(node)) - packet
   JField(dt, JInt(dt)) - packet
   JField(temp, JDouble(temp)) - packet

 } yield // construct Packet here

 Cheers Joni

 On Oct 5, 2:13 am, Peter Robinett pe...@bubblefoundry.com wrote:

  Thanks, Joni.

  I've been playing with just that for comprehension syntax over the
  weekend. How would I do it if I had multiple packets?
  {
    packets: [
    {
      node: 00:1D:C9:00:04:9F,
      dt: 1254553581405,
      temp: 27.5
    },
    {
      node: 00:1D:C9:00:04:9E,
      dt: 1254553582405,
      temp: 24.3
    }
   ]

  }

  I've had some problems iterating across the parsed results. If I do:
  for {
    json - parse(s)
    JField(node, JString(node)) - json
    JField(dt, JInt(dt)) - json
    JField(temp, JDouble(temp)) - json

  } yield  // construct Packet here

  I will end up with 8 Packets. Should I be doing something like JArray
  (json) - parse(s)?

  Thanks for your help,
  Peter

  On Oct 4, 3:08 pm, Joni Freeman freeman.j...@gmail.com wrote:

I don't know how hard would it be to add this feature, so I don't know
if this is a reasonable request. This would make making JSON API
endpoints really easy for me and I hope for other people too.

   This certainly sounds like a reasonable feature request, I will take a
   deeper look at it.

   Meanwhile, you can use tmp case class as Kevin noted, or use for-
   comprehension to query the json. Something like:

   {
     packet: {
       node: 00:1D:C9:00:04:9F,
       dt: 1254553581405,
       temp: 27.5
     }

   }

   val json = parse(s)
   for {
     JField(node, JString(node)) - json
     JField(dt, JInt(dt)) - json
     JField(temp, JDouble(temp)) - json

   } yield  // construct Packet here

   That's a bit verbose but quite flexible. This test case contains more
   query 
   examples:http://github.com/dpp/liftweb/blob/master/lift-json/src/test/scala/ne...

   Cheers Joni
--~--~-~--~~~---~--~~
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: Model Events

2009-10-05 Thread Peter Robinett

Glad to help.

Peter

On Oct 5, 11:29 am, donfranciscodequevedo
donfranciscodequev...@gmail.com wrote:
 Thanks Peter, that pretty much answers my question!

 On 5 Okt., 01:17, Peter Robinett pe...@bubblefoundry.com wrote:

  Hi Gregor,

  For my Mapper model called Packet, my companion object looks like
  this:
  object Packet extends Packet with LongKeyedMetaMapper[Packet] {
          override def dbTableName = packets // define the DB table name

          /* register callback to send the new packet */
          override def afterCreate = createdRow _ :: super.afterCreate
          private def createdRow(packet: Packet) {
                  DatacenterBroker.createdPacket(packet)
          }

  }

  As you can see, after a Packet is created it is sent to an Actor
  (using the broker object as an intermediary). The Scaladocs for
  MetaMapper show many before and after events that you can override
  like I've done with 
  afterCreate:http://scala-tools.org/mvnsites-snapshots/liftweb/lift-mapper/scalado...

  Peter Robinett

  On Oct 4, 10:47 pm, donfranciscodequevedo

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

   Thanks for your fast response. As an app developer, if I would like to
   get notified from the persistence layer, that some changes to my
   domain model have happened, how could I get such functionality with a
   Scala actor? By subclassing the persistence class? Or is such
   functionality already integrated in the persistence layer?

   Let's say I would like to get notified before some data is inserted in
   the database. How would I achieve that?

   Thanks again

   On 4 Okt., 20:37, marius d. marius.dan...@gmail.com wrote:

Scala has a natural support for events notifications = Scala Actors.
It's a very natural fit for building event driven systems. In Lift
we're moving CometActors to LiftActors instead of Scala Actors due to
some memory consumption problems with current Scala actors
implementation which are probably fixed now in Scala 2.7.7 RC1.

So definitely yes, event driven programming is quite fitful in Lift.

Br's,
Marius

On Oct 4, 8:25 pm, donfranciscodequevedo

donfranciscodequev...@gmail.com wrote:
 I have been looking for Web frameworks that will take advantage of an
 Event Driven programming model.
 Some Frameworks like Python's Zope and Grails manage to subscribe to
 Model Events. E.g. one can subscribe to a notification message,
 whenever a domain model gets changed, added, deleted, etc. (like
 explained here  http://bit.ly/2AkVBy)

 Can the Lift Framework throw such events too? Similar to the way
 Grails and Zope do it?
 Or is there another way in Lift to do the same?

 I must say that I preety much do like the Lift Framework and it's
 fresh approach on important tasks like Comet, Templating, Active
 Record, Web Services, Localization...

 However one of my key requirements would be simple handling of events
 and notifications.

 Thank you

 Gregor
--~--~-~--~~~---~--~~
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] YUI Compressor Fatal Error

2009-10-05 Thread Peter Robinett

Hi all,

I've been compiling and running my Lift app on my personal machine
without any problems but when I try to run it on another machine
(where it had previously worked), I am getting fatal YUI Compressor
errors.

Not knowing YUI Compressor or how Lift and Maven use it (but willing
to learn!), I'd appreciate any tips on how to get it to work again.

Thanks in advance,
Peter Robinett

PS I thought I already posted a version of this message but I don't
see it on the Groups site. My apologies if this message is a
duplicate.

$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]

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

[INFO] Preparing jetty:run
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [yuicompressor:compress {execution: default}]
[INFO] equalnetworks.css (267b) - equalnetworks.css (197b)[73%]
[INFO] dashboard.css (5511b) - dashboard.css (4478b)[81%]
[INFO] jquery.tooltip.css (172b) - jquery.tooltip.css (145b)[84%]
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] null
[INFO]

[INFO] Trace
java.lang.RuntimeException
at
com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
(JavaScriptCompressor.java:299)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse
(JavaScriptCompressor.java:335)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.init
(JavaScriptCompressor.java:532)
at net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile
(YuiCompressorMojo.java:178)
at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir
(MojoSupport.java:151)
at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute
(MojoSupport.java:105)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:558)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle
(DefaultLifecycleExecutor.java:924)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle
(DefaultLifecycleExecutor.java:767)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:529)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal
(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]

[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Oct 05 17:18:57 UTC 2009
[INFO] Final Memory: 27M/66M
[INFO]

--~--~-~--~~~---~--~~
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: MappedStringForeignKey and Schemifier

2009-10-05 Thread Peter Robinett

Thanks, David. Here is the ticket: 
http://github.com/dpp/liftweb/issues/#issue/79

Peter

On Oct 5, 9:06 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 I know there are a lot of mapper tickets open, but please add this one.
  I'll spend a day or two this week getting the Mapper tickets closed.

 On Sat, Oct 3, 2009 at 3:00 AM, Peter Robinett pe...@bubblefoundry.comwrote:





  I have a model, Node, with a string index. I have another model,
  Packet, which has a MappedStringForeignKey to Node. Unfortunately,
  Schemifier doesn't seem to respect the MappedStringForeignKey type and
  creates a BIGINT column in the packets table, as you can see from its
  output:
  INFO - CREATE TABLE packets (temp DOUBLE , id BIGINT UNSIGNED NOT NULL
  AUTO_INCREMENT UNIQUE KEY , mac BIGINT UNSIGNED , dt DATETIME , mah
  DOUBLE , lux DOUBLE , rssi DOUBLE)  ENGINE = InnoDB
  INFO - ALTER TABLE packets ADD CONSTRAINT packets_PK PRIMARY KEY(id)
  INFO - CREATE INDEX packets_mac ON packets ( mac )

  Is this a bug? I can override fieldCreatorString for the foreign key
  but I don't think I should have to. This is with 1.1-SNAPSHOT.

  Peter

  And the relevant parts of my models:

  class Node extends KeyedMapper[String, Node] {
   def getSingleton = Node
   /* MAC address as primary key */
   def primaryKeyField = mac
   object mac extends MappedStringIndex(this, 17) with IndexedField
  [String] {
         override def dbDisplay_? = true
         override lazy val defaultValue = randomString(maxLen)
         /* allow user-defined primary key */
         override def writePermission_? = true
         override def dbAutogenerated_? = false
         private var myDirty = false
         override def dirty_? = myDirty
         override def dirty_?(b : Boolean) = { myDirty = b;
  super.dirty_?(b) }
         override def fieldCreatorString(dbType: DriverType, colName:
  String): String = colName+ CHAR(+maxLen+) NOT NULL 
   }
  }

  class Packet extends LongKeyedMapper[Packet] with IdPK {
   def getSingleton = Packet
   object node extends MappedStringForeignKey(this, Node, 17) {
         // Change the default behavior to add a database index for
  this column.
         override def dbIndexed_? = true
         override def dbColumnName = mac
   }
  }

 --
 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: YUI Compressor Fatal Error

2009-10-05 Thread Peter Robinett

Ross, I am using OpenJDK:
$ java -version
java version 1.6.0_0
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

Is it possible to use YUI Compressor at all with OpenJDK?

Peter

On Oct 5, 7:32 pm, Ross Mellgren dri...@gmail.com wrote:
 I thought someone mentioned this a little while ago and it was due to  
 OpenJDK (and only related to the YUI compressor)?

 -Ross

 On Oct 5, 2009, at 1:25 PM, jon wrote:



  Is there a syntax problem in one of your javascript files?

  On Oct 5, 1:23 pm, Peter Robinett pe...@bubblefoundry.com wrote:
  Hi all,

  I've been compiling and running my Lift app on my personal machine
  without any problems but when I try to run it on another machine
  (where it had previously worked), I am getting fatal YUI Compressor
  errors.

  Not knowing YUI Compressor or how Lift and Maven use it (but willing
  to learn!), I'd appreciate any tips on how to get it to work again.

  Thanks in advance,
  Peter Robinett

  PS I thought I already posted a version of this message but I don't
  see it on the Groups site. My apologies if this message is a
  duplicate.

  $ mvn jetty:run
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'jetty'.
  [INFO]
  
  [INFO] Building server
  [INFO]    task-segment: [jetty:run]
  [INFO]
  
  [INFO] Preparing jetty:run
  [INFO] [resources:resources]
  [INFO] Using default encoding to copy filtered resources.
  [INFO] [yuicompressor:compress {execution: default}]
  [INFO] equalnetworks.css (267b) - equalnetworks.css (197b)[73%]
  [INFO] dashboard.css (5511b) - dashboard.css (4478b)[81%]
  [INFO] jquery.tooltip.css (172b) - jquery.tooltip.css (145b)[84%]
  [INFO]
  
  [ERROR] FATAL ERROR
  [INFO]
  
  [INFO] null
  [INFO]
  
  [INFO] Trace
  java.lang.RuntimeException
          at
  com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
  (JavaScriptCompressor.java:299)
          at  
  com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse
  (JavaScriptCompressor.java:335)
          at  
  com.yahoo.platform.yui.compressor.JavaScriptCompressor.init
  (JavaScriptCompressor.java:532)
          at  
  net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile
  (YuiCompressorMojo.java:178)
          at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir
  (MojoSupport.java:151)
          at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute
  (MojoSupport.java:105)
          at org.apache.maven.plugin.DefaultPluginManager.executeMojo
  (DefaultPluginManager.java:451)
          at  
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
  (DefaultLifecycleExecutor.java:558)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycl
   e
  (DefaultLifecycleExecutor.java:499)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle
  (DefaultLifecycleExecutor.java:924)
          at  
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle
  (DefaultLifecycleExecutor.java:767)
          at  
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
  (DefaultLifecycleExecutor.java:529)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal
  (DefaultLifecycleExecutor.java:512)
          at  
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
  (DefaultLifecycleExecutor.java:482)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFai
   lures
  (DefaultLifecycleExecutor.java:330)
          at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
  (DefaultLifecycleExecutor.java:291)
          at  
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
  (DefaultLifecycleExecutor.java:142)
          at org.apache.maven.DefaultMaven.doExecute
  (DefaultMaven.java:336)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
  129)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
  Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.codehaus.classworlds.Launcher.launchEnhanced
  (Launcher.java:
  315)
          at org.codehaus.classworlds.Launcher.launch(Launcher.java:
  255)
          at org.codehaus.classworlds.Launcher.mainWithExitCode

  1   2   >