[Lift] [widgets][flot] how to make the .js and .css accessable?

2010-02-01 Thread Jarod Liu
I found flot generated the following code:
  script type=text/javascript src=/classpath/flot/
jquery.flot.js/script
!--[if IE]script language=javascript type=text/javascript
src=/classpath/flot/excanvas.pack.js/script![endif]--
  link href=/classpath/flot/jquery.flot.css type=text/css
rel=stylesheet /

but the these files not exists after jetty:run.

I can access the /classpath/jquery.js.(and other .js in the webkit
jar)

now, to make flot work, I have to copy these .js files to /static and
link to these copy on the page

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



Re: [Lift] CRUDify Date picker

2010-02-01 Thread Jeppe Nejsum Madsen
The Trav the.t...@gmail.com writes:

 Hi All,

 I've been chasing this one for a while and found a few posts dancing
 around the edge, but so far I haven't seen any solid answer on it.

 Most MappedTypeField's have auto generated form fields, including
 Select elements if you override the correct method.

 I was hoping MappedDateTime would have an auto generated field that
 included a JQuery DatePicker, given that if it's a required field, you
 need it to do your crud editing.


 Is there anything at all like that in the framework? Or do I have to
 figure out how to implement it myself?

You can use this as a starting point:

class FancyMappedDate[T:Mapper[T]](fieldOwner: T) extends 
MappedDate[T](fieldOwner) {
  
  override def fieldId = Some(Text(name))
  override def setFromAny(f : Any): Date = f match {
case v :: vs =  
tryo({java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM, 
S.locale).parse(v.toString)}).map(d = this.set(d)).openOr(this.is)
case d:Date = this.set(d)
case _ = super.setFromAny(f)
  }

  override def _toForm: Box[NodeSeq] = {
  val onLoad =jQuery(function($){
$.datepicker.setDefaults($.datepicker.regional.da)
$('#+name+').datepicker({showOn: 'both', buttonImage: 
'/images/calendar.gif', buttonImageOnly: true});
});

  S.fmapFunc({s: List[String] = this.setFromAny(s)}){funcName =
  Full(xml:group
 head
script type=text/javascript 
src=/scripts/jquery/jquery-ui-1.7.2.custom.min.js/script
script src=/scripts/jquery/i18n/jquery-ui-i18n.js 
type=text/javascript/script
link type=text/css 
href=/css/south-street/jquery-ui-1.7.2.custom.css rel=stylesheet /
script type=text/javascript charset=utf-8{onLoad}/script
   /head
 input type='text' id={fieldId}
  name={funcName}
  class=date-pick dp-applied
  value={is match {case null =  case d = 
+java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM, 
S.locale).format(d)}}/
/xml:group)
  }
  }
}

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



Re: [Lift] [widgets][flot] how to make the .js and .css accessable?

2010-02-01 Thread Jeppe Nejsum Madsen
Jarod Liu liuyuan...@gmail.com writes:

 I found flot generated the following code:
   script type=text/javascript src=/classpath/flot/
 jquery.flot.js/script
 !--[if IE]script language=javascript type=text/javascript
 src=/classpath/flot/excanvas.pack.js/script![endif]--
   link href=/classpath/flot/jquery.flot.css type=text/css
 rel=stylesheet /

 but the these files not exists after jetty:run.

 I can access the /classpath/jquery.js.(and other .js in the webkit
 jar)

 now, to make flot work, I have to copy these .js files to /static and
 link to these copy on the page

You need to add a call to Flot.init in Boot to make the classpath
resources available...

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



Re: [Lift] Single log in for three contexts

2010-02-01 Thread Timothy Perrett
Chas,

I've done exactly this using a cookie with a 192bit encrypted value. I cant 
share the code, but i would advise you to make a LocParam subtype and use that 
as the authenticator as it is evaluated much before anything else. 

Cheers, Tim

On 29 Jan 2010, at 23:02, c...@munat.com wrote:

 I have three lift sites at different domain names (different apps) but all
 pulling data from the same database (using the same JPA persistence jar).
 
 I'd like my users to be able to log in on one site, and have it apply to
 all three sites.
 
 Clearly, I need some way to share the lift session across three servlet
 contexts.
 
 What is the simplest way to do this in lift? Avoiding installing some
 external app that I have to learn is a priority.
 
 All three sites are running in one instance of Tomcat 6 (as virtual
 domains)... something like example.com, this.example.com, and
 that.example.com.
 
 Any and all suggestions welcome!
 
 Chas.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to 
 liftweb+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/liftweb?hl=en.
 
 

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



Re: [Lift] [widgets][flot] how to make the .js and .css accessable?

2010-02-01 Thread Jarod Liu
Jeppe,
Thanks

Jeppe Nejsum Madsen wrote:
 Jarod Liu liuyuan...@gmail.com writes:

  I found flot generated the following code:
script type=text/javascript src=/classpath/flot/
  jquery.flot.js/script
  !--[if IE]script language=javascript type=text/javascript
  src=/classpath/flot/excanvas.pack.js/script![endif]--
link href=/classpath/flot/jquery.flot.css type=text/css
  rel=stylesheet /
 
  but the these files not exists after jetty:run.
 
  I can access the /classpath/jquery.js.(and other .js in the webkit
  jar)
 
  now, to make flot work, I have to copy these .js files to /static and
  link to these copy on the page

 You need to add a call to Flot.init in Boot to make the classpath
 resources available...

 /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] Snippet attribute pass through

2010-02-01 Thread ced
I want to set a node attribute in the template markup exactly like it
is done in example 7.13 from the Lift Book. I'll paste it here:

// the markup
lift:Ledger.balance ledger:time ledger:id=myId/
/lift:Ledger.balance

// The snippet class
class Ledger { def balance (content : NodeSeq ) : NodeSeq = {
bind (ledger, content, time - span{(new
java.util.Date).toString}/span)
}
}

Unfortunately I can't get it to work. Is there something I have to set/
enable to get this feature working? I'm using Lift 1.1-M8

Thanks,
Chris

-- 
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: Snippet attribute pass through

2010-02-01 Thread Marius
Replace your bind with:

bind (ledger, content, time -% span{(new
java.util.Date).toString}/span)

ledger:id is not anymore preserved as after the was out this was
considered a not intended feature and got moved. -% should do what
you want.

Br's,
Marius

On Feb 1, 5:57 pm, ced docpom...@googlemail.com wrote:
 I want to set a node attribute in the template markup exactly like it
 is done in example 7.13 from the Lift Book. I'll paste it here:

 // the markup
 lift:Ledger.balance ledger:time ledger:id=myId/
 /lift:Ledger.balance

 // The snippet class
 class Ledger { def balance (content : NodeSeq ) : NodeSeq = {
 bind (ledger, content, time - span{(new
 java.util.Date).toString}/span)

 }
 }

 Unfortunately I can't get it to work. Is there something I have to set/
 enable to get this feature working? I'm using Lift 1.1-M8

 Thanks,
 Chris

-- 
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] ProtoUser i18n

2010-02-01 Thread Adam Warski
Hello,

I'm using ProtoUser and all strings in the user menu, login, forgot password 
forms are localized except the Sign Up and Edit user forms. The problem is 
that in ProtoUser, the display names are defined as:

def firstNameDisplayName = ??(First Name)

instead using e.g. first.name. Sometimes the strings are in the resource 
bundles already (e.g. email, password), so it's just a matter of changing the 
keys. For others, new keys have to be added. I'd be of course happy to provide 
a patch with english  polish translations, but I read that you don't accept 
patches for some reason (although I can transfer all the IP for this big change 
to you ;) ).

Another thing is could the localForm method in ProtoUser stop being private 
(now it's private def localForm, line 628)? I just wanted to change the 
edit/signup forms decoration and for now had to copy the localForm into my code.

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu




-- 
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] NPE in MappedTextarea

2010-02-01 Thread Adam Warski
Hello,

if the value of a MappedTextarea field is null, an NPE is thrown. The problem 
is in the _toForm method. For example in MappedString, the method does:

value={is match {case null =  case s = s.toString}}

while in MappedTextarea, the value is simply {is.toString}, which causes the 
NPE.
So the fixed version should be, at line 29 of MappedTextarea:

override def _toForm: Box[Elem] = {
S.fmapFunc({s: List[String] = this.setFromAny(s)}){funcName =
Full(textarea name={funcName}
 rows={textareaRows.toString}
 cols={textareaCols.toString} id={fieldId}{is match {case null =  
case s = s.toString}}/textarea)}
  }

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu




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



Re: [Lift] Re: Snippet attribute pass through

2010-02-01 Thread Naftoli Gugenheim
Anyone want to fix the book? :)
Anyway, once you're using -% you want it to be id, not ledger:id.

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

I'm eating letters as after the was out should be as after the the
book was out :D

On Feb 1, 6:03 pm, Marius marius.dan...@gmail.com wrote:
 Replace your bind with:

 bind (ledger, content, time -% span{(new
 java.util.Date).toString}/span)

 ledger:id is not anymore preserved as after the was out this was
 considered a not intended feature and got moved. -% should do what
 you want.

 Br's,
 Marius

 On Feb 1, 5:57 pm, ced docpom...@googlemail.com wrote:



  I want to set a node attribute in the template markup exactly like it
  is done in example 7.13 from the Lift Book. I'll paste it here:

  // the markup
  lift:Ledger.balance ledger:time ledger:id=myId/
  /lift:Ledger.balance

  // The snippet class
  class Ledger { def balance (content : NodeSeq ) : NodeSeq = {
  bind (ledger, content, time - span{(new
  java.util.Date).toString}/span)

  }
  }

  Unfortunately I can't get it to work. Is there something I have to set/
  enable to get this feature working? I'm using Lift 1.1-M8

  Thanks,
  Chris

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

Re: [Lift] Re: Upgrade to Flot 0.6

2010-02-01 Thread Aaron Valade
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 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 

[Lift] Re: Snippet attribute pass through

2010-02-01 Thread Marius
Well the book reflects Lift at that point in time. Since then there
were quite a few updates. I know Derek at some point tried to keep it
up to date but I'm not sure now.

This is not about fixing the book.

Br's,
Marius

On 1 feb., 18:39, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Anyone want to fix the book? :)
 Anyway, once you're using -% you want it to be id, not ledger:id.

 -

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

 I'm eating letters as after the was out should be as after the the
 book was out :D

 On Feb 1, 6:03 pm, Marius marius.dan...@gmail.com wrote:





  Replace your bind with:

  bind (ledger, content, time -% span{(new
  java.util.Date).toString}/span)

  ledger:id is not anymore preserved as after the was out this was
  considered a not intended feature and got moved. -% should do what
  you want.

  Br's,
  Marius

  On Feb 1, 5:57 pm, ced docpom...@googlemail.com wrote:

   I want to set a node attribute in the template markup exactly like it
   is done in example 7.13 from the Lift Book. I'll paste it here:

   // the markup
   lift:Ledger.balance ledger:time ledger:id=myId/
   /lift:Ledger.balance

   // The snippet class
   class Ledger { def balance (content : NodeSeq ) : NodeSeq = {
   bind (ledger, content, time - span{(new
   java.util.Date).toString}/span)

   }
   }

   Unfortunately I can't get it to work. Is there something I have to set/
   enable to get this feature working? I'm using Lift 1.1-M8

   Thanks,
   Chris

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



Re: [Lift] NPE in MappedTextarea

2010-02-01 Thread David Pollak
Thanks.  A fix will be on review board by end of day.

On Mon, Feb 1, 2010 at 8:26 AM, Adam Warski a...@warski.org wrote:

 Hello,

 if the value of a MappedTextarea field is null, an NPE is thrown. The
 problem is in the _toForm method. For example in MappedString, the method
 does:

 value={is match {case null =  case s = s.toString}}

 while in MappedTextarea, the value is simply {is.toString}, which causes
 the NPE.
 So the fixed version should be, at line 29 of MappedTextarea:

 override def _toForm: Box[Elem] = {
S.fmapFunc({s: List[String] = this.setFromAny(s)}){funcName =
Full(textarea name={funcName}
 rows={textareaRows.toString}
 cols={textareaCols.toString} id={fieldId}{is match {case null =
  case s = s.toString}}/textarea)}
  }

 --
 Adam Warski
 http://www.warski.org
 http://www.softwaremill.eu




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




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

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



Re: [Lift] ProtoUser i18n

2010-02-01 Thread David Pollak
We'll accept a patch for this issue.

On Mon, Feb 1, 2010 at 8:07 AM, Adam Warski a...@warski.org wrote:

 Hello,

 I'm using ProtoUser and all strings in the user menu, login, forgot
 password forms are localized except the Sign Up and Edit user forms. The
 problem is that in ProtoUser, the display names are defined as:

 def firstNameDisplayName = ??(First Name)

 instead using e.g. first.name. Sometimes the strings are in the resource
 bundles already (e.g. email, password), so it's just a matter of changing
 the keys. For others, new keys have to be added. I'd be of course happy to
 provide a patch with english  polish translations, but I read that you
 don't accept patches for some reason (although I can transfer all the IP for
 this big change to you ;) ).

 Another thing is could the localForm method in ProtoUser stop being
 private (now it's private def localForm, line 628)? I just wanted to change
 the edit/signup forms decoration and for now had to copy the localForm into
 my code.

 --
 Adam Warski
 http://www.warski.org
 http://www.softwaremill.eu




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




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

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



Re: [Lift] Re: should use getColumnLabel insead of getColumnName in DB.resultSetToXXX

2010-02-01 Thread David Pollak
On Sun, Jan 31, 2010 at 7:04 PM, Jarod Liu liuyuan...@gmail.com wrote:

 david,
 sorry, i closed the ticket. do you accept my proposal


If we make the change, it will subtly break all the apps that are relying on
the current behavior.

There are two options: overload the calls with a useGetColumnLabel flag or
have some sort of global setting for the two behaviors.

Do folks have thoughts?



 On Feb 1, 5:06 am, David Pollak feeder.of.the.be...@gmail.com wrote:
  Please do not open tickets without a discussion on this list first.
 
  Please close the ticket and start a discussion.
 
 
 
 
 
  On Sun, Jan 31, 2010 at 5:12 AM, Jarod Liu liuyuan...@gmail.com wrote:
  http://github.com/dpp/liftweb/issues/issue/316
 
   by using getColumnLabel I can chose between a real column name or a
   alias name by the AS clause in SQL. with the getColumnName method I
   don't have a choice
 
   I wrap the DB.performQuery result to a map list in my app, and this
   really hurt me.
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

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




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

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



Re: [Lift] Lift-OpenID should default to openid_identifier for post param name

2010-02-01 Thread David Pollak
I've changed the code from a val to a def and changed the default value to
openid_identifier.  If this causes code breakage, folks can change it back
to the old value.

Thanks for the suggestion.

On Sat, Jan 30, 2010 at 7:58 AM, Erkki Lindpere vill...@gmail.com wrote:

 Hi,

 I suggest that Lift-OpenID should have openid_identifier as the
 default post param name instead of openIdUrl. openid_identifier is
 the one recommended in the OpenID spec. with the idea that user agents
 may someday special support for that. I think this change would be
 justified considering Lift's philosophy of providing sensible
 defaults?

 (not that it's hard to change, but it took me a while to figure out
 why /openid/login resulted in not found -- I used a custom form with
 the standard field names not the one generated by Lift)

 Erkki

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




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

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



Re: [Lift] Re: should use getColumnLabel insead of getColumnName in DB.resultSetToXXX

2010-02-01 Thread David Pollak
On Mon, Feb 1, 2010 at 3:39 PM, Lachlan Deck lachlan.d...@gmail.com wrote:

 On 02/02/2010, at 10:29 AM, David Pollak wrote:

  On Sun, Jan 31, 2010 at 7:04 PM, Jarod Liu liuyuan...@gmail.com wrote:
 
  david,
  sorry, i closed the ticket. do you accept my proposal
 
  If we make the change, it will subtly break all the apps that are relying
 on
  the current behavior.

 Only if they're running from a snapshot :)


No, there will be breakage changing from one version of Lift to another.



  There are two options: overload the calls with a useGetColumnLabel flag
 or
  have some sort of global setting for the two behaviors.
 
  Do folks have thoughts?

 Make a note of the change in the release notes for the next version. It
 seems like the suggested fix matches a user's modelling expectations. i.e.,
 if they've modelled the label different from the actual column name isn't
 that what they expect to reference in code?


We are not going to do this.  We don't expect our users to read release
notes for subtle stuff like this.  We use the Scala type system to signal
breakage... if there's an API behavior change, the code should cease to
compile when changing versions.



 with regards,
 --

 Lachlan Deck

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




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

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



Re: [Lift] Re: should use getColumnLabel insead of getColumnName in DB.resultSetToXXX

2010-02-01 Thread Lachlan Deck
On 02/02/2010, at 10:56 AM, David Pollak wrote:

 On Mon, Feb 1, 2010 at 3:39 PM, Lachlan Deck lachlan.d...@gmail.com wrote:
 
 We are not going to do this.  We don't expect our users to read release
 notes for subtle stuff like this.  We use the Scala type system to signal
 breakage... if there's an API behavior change, the code should cease to
 compile when changing versions.

Good point.

Perhaps, as a start, the api behaviour should at least be documented rather 
than remaining undefined ?
@see 
http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/DB$object.html
@see 
http://scala-tools.org/mvnsites/liftweb-2.0-M1/framework/lift-persistence/lift-mapper/scaladocs/net/liftweb/mapper/DB$object.html#Methods

with regards,
--

Lachlan Deck

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



Re: [Lift] Re: should use getColumnLabel insead of getColumnName in DB.resultSetToXXX

2010-02-01 Thread David Pollak
On Mon, Feb 1, 2010 at 4:27 PM, Lachlan Deck lachlan.d...@gmail.com wrote:

 On 02/02/2010, at 10:56 AM, David Pollak wrote:

  On Mon, Feb 1, 2010 at 3:39 PM, Lachlan Deck lachlan.d...@gmail.com
 wrote:
  
  We are not going to do this.  We don't expect our users to read release
  notes for subtle stuff like this.  We use the Scala type system to signal
  breakage... if there's an API behavior change, the code should cease to
  compile when changing versions.

 Good point.

 Perhaps, as a start, the api behaviour should at least be documented rather
 than remaining undefined ?


If you'd like to contribute to the documentation feel free.


 @see 
 http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/DB$object.html
 
 @see 
 http://scala-tools.org/mvnsites/liftweb-2.0-M1/framework/lift-persistence/lift-mapper/scaladocs/net/liftweb/mapper/DB$object.html#Methods
 

 with regards,
 --

 Lachlan Deck

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




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

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



[Lift] MYSQL TEXT field

2010-02-01 Thread XiaomingZheng
hi guys:
my app needs to use one field of mysql text type, but in Lift mapper
package, and i don't find any MappedField is suitable. any ideas?
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] [widgets][flot] jquery.flot.css breaks the chart in IE8

2010-02-01 Thread Jarod Liu
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.