[Lift] Re: Problem with RequestVar

2009-10-27 Thread Heiko Seeberger
Hi,

2009/10/27 sunanda sunanda.pa...@gmail.com


 Hi,
 I need to retain the value of gridid throughout the session.


Then use a SessionVar instead of a RequestVar.

Heiko

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



[Lift] Newbie: zero parameter functions, bind call-by-name function curiosity

2009-10-27 Thread Strom

I'm not sure if this is a scala or a lift related question, but when I
try to bind a submit button, I'm having some confusion on using zero
parameter functions as the () - Any parameter in the submit
signature.

The signature for the method in question is
SHtml.submit(value : String, func : () = Any, attrs : (String, String)
*)

1. My first question is about the following method definitions
def processForm () : Unit = {...}
vs
def processForm = {...}  //no parentheses after method declaration

Why can I call processForm as well as processForm() for the first
example, but only processForm for the second example. If there is
scala/lift documentation on this simple question?

2. Why do I get a compiler error when I use the following code:
bind( ...
  submit - SHtml.submit( Process Form, processForm() )  /*type
mismatch error*/
)
vs
bind( ...
  submit - SHtml.submit( Process Form, processForm ) /*compiles
successfully*/
)

It's my impression that the above bind calls are equivalent given the
way the scala compiler behaves when I call processForm or
processForm().

Also, I wasn't even sure the method itself would allow the code to
compile.  I thought I'd have to do () - processForm or () -
processForm().


The error I was getting was this:
error type mismatch
  found : Unit
  required : () - Any

Can someone please clarify? Thanks so much.

--~--~-~--~~~---~--~~
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: Newbie: zero parameter functions, bind call-by-name function curiosity

2009-10-27 Thread Marius



On Oct 27, 8:52 am, Strom strommo...@gmail.com wrote:
 I'm not sure if this is a scala or a lift related question, but when I
 try to bind a submit button, I'm having some confusion on using zero
 parameter functions as the () - Any parameter in the submit
 signature.

 The signature for the method in question is
 SHtml.submit(value : String, func : () = Any, attrs : (String, String)
 *)

 1. My first question is about the following method definitions
 def processForm () : Unit = {...}
 vs
 def processForm = {...}  //no parentheses after method declaration

 Why can I call processForm as well as processForm() for the first
 example, but only processForm for the second example. If there is
 scala/lift documentation on this simple question?

Because compiler already knows that processForm is a zero argument
function and accepts processForm call. In the second example you just
can't call a call-by-name using () as it would contradict its very
definition.


 2. Why do I get a compiler error when I use the following code:
 bind( ...
   submit - SHtml.submit( Process Form, processForm() )  /*type
 mismatch error*/
 )
 vs
 bind( ...
   submit - SHtml.submit( Process Form, processForm ) /*compiles
 successfully*/
 )

processForm() is a value not a function. It is the value returned by
processForm function while processForm is the function itself.


 It's my impression that the above bind calls are equivalent given the
 way the scala compiler behaves when I call processForm or
 processForm().

 Also, I wasn't even sure the method itself would allow the code to
 compile.  I thought I'd have to do () - processForm or () -
 processForm().

 The error I was getting was this:
 error type mismatch
   found : Unit
   required : () - Any

 Can someone please clarify? Thanks so much.
--~--~-~--~~~---~--~~
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] record support redis?

2009-10-27 Thread monty chen

Record is a new refactorization of Mapper that is backing-store
agnostic at its core, so it doesn’t matter whether you want to save
your data to JDBC, JPA, or even something such as XML

Redis is a key-value database. It is similar to memcached but the
dataset is not volatile, and values can be strings, exactly like in
memcached, but also lists and sets with atomic operations to push/pop
elements.

I want to know when lift 1.1 release, record support redis?.

Scala bindings for Redis are available in this 
http://github.com/acrosa/scala-redis

--~--~-~--~~~---~--~~
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: Firefox issue with ajaxSelectObj and page refresh

2009-10-27 Thread David Pollak
What's the JavaScript to force the correct item to be selected?  I think we
could append the JavaScript to the ajaxSelectObj to force the right thing to
happen.

On Mon, Oct 26, 2009 at 4:27 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


 Hi,

 When using ajaxSelectObj and I have the currently selected object in a
 SessionVar and refreshes the page, the selected object is not selected
 in the browser after the page refresh, even if the generated html has
 the correct selected=selected option.

 This only happens on Firefox (OS X), not Chrome or Safari and seems to
 be a known FF issue (eg
 http://www.beyondcoding.com/2008/12/16/option-selectedselected-not-working/
 )

 but I was wondering if there's some well known Lift workaround? The
 obvious problem is of course that the view is now out of sync with the
 server

 /Jeppe

 The basic lift app with the following template  snippet:

  form
lift:helloWorld.select
  My select select:lc1/
/lift:helloWorld.select
  /form

 class HelloWorld {
  val lcs = List(1,2,3)
  private object lc1 extends SessionVar[Box[Int]](Empty)

  def select(in: NodeSeq): NodeSeq = {
println(lc1 is: +lc1.is)
bind(select, in, lc1 -ajaxSelectObj(lcs.map(lc = (lc, Item
 +lc.toString)), lc1.is,
(lc:Int) = {
  lc1(Full(lc))
  println(selected lc1=%s.format(lc1));
  SetHtml(mylc, Text(lc.toString))
}))
  }
 }

 



-- 
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 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: Playing around with Loc

2009-10-27 Thread David Pollak
Kris,

This all looks very good to me.  Unless others object, please open a ticket
(nothing going into Lift without a ticket... the tyranny of process).  Let's
roll this stuff in post M7.  Also, please prepare an email to send to this
list and the Lift-announce list with the breaking changes.

Thanks,

David

On Sat, Oct 24, 2009 at 4:49 PM, Kris Nuttycombe
kris.nuttyco...@gmail.comwrote:


 My motivation was twofold: first, I wanted to be able to control
 access to a Loc based upon the data in the Loc itself (hence the new
 IfValue and UnlessValue) and in the process I realized that there was
 a disconnect in type safety between for example the Title LocParam and
 the Loc itself because there was no enforcement that a LocParam added
 to the Loc would respect the Loc's type. Secondly, I have found it
 useful to have a construct like the following:

 object Site {
   var locs: List[Loc[_]] = Nil
   def add[T](l: Loc[T]): Loc[T] = {
  locs = l :: locs
  l
   }

   val userLoc = add(new DataLoc[User](...))
   val orderLoc = add(new DataLoc[Order](...))
 }

 Then, in my Boot.scala I create the SiteMap like this:

 LiftRules.setSiteMap(SiteMap(Site.locs.map(Menu(_)): _*))

 The advantage of this construction is that I can refer to userLoc or
 orderLoc from anywhere in my application and can use the Locs to
 create links to display pages for various objects in a typesafe
 fashion.

 The main breaking change is a rename of defaultParams to defaultValue,
 which I did mostly in the process of trying to understand the code
 better, since it took me a few minutes at first to figure out the dual
 use of the Param.

 It also occurred to me that instead of adding the type parameter
 directly to LocParam and adding the AnyLocParam name for
 LocParam[Nothing], it would be just as easy to add a new parameterized
 supertrait of LocParam which would break less code.

 As far as sealing the trait goes, I've been bitten twice recently by
 production bugs due to an incomplete match, so I figure that sealing
 could be helpful so long as there's a well-known extension point for
 user additions.

 Kris

 On Sat, Oct 24, 2009 at 5:18 PM, David Pollak
 feeder.of.the.be...@gmail.com wrote:
  In general, it all sounds very good to me.
  What was your motivation (other than pure aesthetics)?
  If there are breaking changes to code, will they be super-obvious
  (compilation failures)?
 
  On Fri, Oct 23, 2009 at 5:04 PM, Kris Nuttycombe 
 kris.nuttyco...@gmail.com
  wrote:
 
  Hi, all,
 
  I've been messing around with Loc a bit to try to tighten up the type
  safety of the parameterized type and add authentication LocParams that
  can be aware of the current value encapsulated by the Loc. I've put up
  some changes on the kjn-loc-wip branch and would really like some
  feedback.
 
  Some of the major changes:
 
  * gave LocParam a covariant type parameter to go with Loc's type
  parameter and made it a sealed trait, with UserLocParam[T] as the main
  extension point for user-defined traits. Added AnyLocParam as base
  trait of LocParam instances that are not dependent upon T
  * Added IfValue  UnlessValue LocParams
  * Made default Loc parameterized by Unit instead of NullLocParams
  * Some minor renaming to distinguish between uses of the Param name-
  - now all Param usages refer to LocParams
  * Removed need for a bunch of asInstanceOf casts
 
  What do you all think? Is this something that you'd like to see
  cleaned up  committed to master?
 
  Thanks,
 
 
 
 
 
  --
  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
 
  
 

 



-- 
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 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: Easy way to force IE7 only to quirks mode

2009-10-27 Thread David Pollak
On Mon, Oct 26, 2009 at 9:27 PM, Charles F. Munat c...@munat.com wrote:


 I have an ExtJS form that it failing in IE7 Standards mode (works fine
 on IE8 or in quirks mode on IE7). I don't want to force quirks mode on
 all browsers or serve the form improperly. I read that inserting a
 comment between the XML processing tag and the DOCTYPE declaration will
 force IE7 to quirks mode and leave all other browsers alone.


The String for the DocType is generated in:

object ResponseInfo {
  var docType: PartialFunction[Req, Box[String]] = {
case _ if S.skipDocType = Empty
case _ if S.getDocType._1 = S.getDocType._2
case _ = Full(DocType.xhtmlTransitional)
  }
}

You can update the PartialFunction to test for IE7 and emit something like:
case _ if S.req.map(_.isIE7) == Full(true) =
Full(myIEthingyhere\n+DocType.xhtmlTransitional)




 Anyone know an easy way to do this in Lift? I know we can respond to
 individual browsers (though I can't seem to find that on the list), but
 how to insert that comment? Or is there a better way?

 Chas.


 



-- 
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 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: Easy way to force IE7 only to quirks mode

2009-10-27 Thread Charles F. Munat

Thanks!

David Pollak wrote:
 
 
 On Mon, Oct 26, 2009 at 9:27 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 I have an ExtJS form that it failing in IE7 Standards mode (works fine
 on IE8 or in quirks mode on IE7). I don't want to force quirks mode on
 all browsers or serve the form improperly. I read that inserting a
 comment between the XML processing tag and the DOCTYPE declaration will
 force IE7 to quirks mode and leave all other browsers alone.
 
 
 The String for the DocType is generated in:
 
 object ResponseInfo {
   var docType: PartialFunction[Req, Box[String]] = {
 case _ if S.skipDocType = Empty
 case _ if S.getDocType._1 = S.getDocType._2
 case _ = Full(DocType.xhtmlTransitional)
   }
 }
 
 You can update the PartialFunction to test for IE7 and emit something like:
 case _ if S.req.map(_.isIE7) == Full(true) = 
 Full(myIEthingyhere\n+DocType.xhtmlTransitional)
 
  
 
 
 Anyone know an easy way to do this in Lift? I know we can respond to
 individual browsers (though I can't seem to find that on the list), but
 how to insert that comment? Or is there a better way?
 
 Chas.
 
 
 
 
 
 
 -- 
 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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: How to give a time lmit to display a message

2009-10-27 Thread David Pollak
On Mon, Oct 26, 2009 at 6:23 PM, sunanda sunanda.pa...@gmail.com wrote:


  I am trying to display the message for 2 seconds and remove the
 message using following code. It is  displaying the meassage but not
 removing after 2 seconds. Where am I going wrong.

 SetHtml(editcoldefmsg,Text(Edited Column Definition
 +coldef.displayname)) After(2 seconds, SetHtml(editcoldefmsg, Text
 ()))



It seems to just work.  Please run the enclosed example.




 Sunanda

 On Oct 27, 8:50 am, sunanda sunanda.pa...@gmail.com wrote:
  Thanks Ross
 
  On Oct 27, 2:33 am, Ross Mellgren dri...@gmail.com wrote:
 
 
 
   SetHtml(msg, Text(hello))  After(1 minute, SetHtml(msg, Empty))
 
   -Ross
 
   On Oct 25, 2009, at 9:03 PM,sunandawrote:
 
Hi,
I need to display a message only for few seconds using SetHtml.
E.g. SetHtml(msg,Text(Hello)).
How can I do this
 
Thanks.
   Sunanda- Hide quoted text -
 
   - Show quoted text -- Hide quoted text -
 
  - Show quoted text -
 



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



.tgz
Description: GNU Zip compressed data


[Lift] Re: how to use mapper like clause questions

2009-10-27 Thread David Pollak
On Mon, Oct 26, 2009 at 4:52 PM, george geo...@mattandgeorge.com wrote:


 Is there any way to do this, but have it match on OR instead of AND?

 User.findAll(Like(User.firstName, % + q + %), Like(User.lastName,
 % + q + %))

 I couldn't see a way to do it, so I tried out BySQL instead. However,
 when I put in the % wildcards I get a sql exception..

 User.findAll( BySql(users.email like '%?%',
  IHaveValidatedThisSQL(george, 2009-10-26), q) )


I have not validated this, but try:

BySql(users.email like ?, ..., %+q+%)




 So how do you specify the wildcards?

 thanks

 george
 



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



[Lift] Re: how to use mapper like clause questions

2009-10-27 Thread george

 I have not validated this, but try:

 BySql(users.email like ?, ..., %+q+%)

that works

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



[Lift] Re: Newbie: zero parameter functions, bind call-by-name function curiosity

2009-10-27 Thread Ross Mellgren

Did you mean () = processForm by chance? () - processForm is a pair  
of () and processForm's result.

-Ross

On Oct 27, 2009, at 2:52 AM, Strom wrote:


 I'm not sure if this is a scala or a lift related question, but when I
 try to bind a submit button, I'm having some confusion on using zero
 parameter functions as the () - Any parameter in the submit
 signature.

 The signature for the method in question is
 SHtml.submit(value : String, func : () = Any, attrs : (String,  
 String)
 *)

 1. My first question is about the following method definitions
 def processForm () : Unit = {...}
 vs
 def processForm = {...}  //no parentheses after method declaration

 Why can I call processForm as well as processForm() for the first
 example, but only processForm for the second example. If there is
 scala/lift documentation on this simple question?

 2. Why do I get a compiler error when I use the following code:
 bind( ...
  submit - SHtml.submit( Process Form, processForm() )  /*type
 mismatch error*/
 )
 vs
 bind( ...
  submit - SHtml.submit( Process Form, processForm ) /*compiles
 successfully*/
 )

 It's my impression that the above bind calls are equivalent given the
 way the scala compiler behaves when I call processForm or
 processForm().

 Also, I wasn't even sure the method itself would allow the code to
 compile.  I thought I'd have to do () - processForm or () -
 processForm().


 The error I was getting was this:
 error type mismatch
  found : Unit
  required : () - Any

 Can someone please clarify? Thanks so much.

 


--~--~-~--~~~---~--~~
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] Folder for resource bundles possible?

2009-10-27 Thread Heiko Seeberger
Hi,

Is there a way to configure Lift such that it is possible to but resource
bundles (properties files, used by S.?) into another folder but the top
level one?
I would like to put them into a i18n folder, just like the core-lift
properties.

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

--~--~-~--~~~---~--~~
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] Changes in 1.1 production mode?

2009-10-27 Thread Yousry Abdallah

Hi,
at the moment I'm testing my application against 1.1 snapshot and I
noticed that while running lift in production mode: -
Drun.mode=production aside from blueprints IE6 fallback:

 !--[if IE]link rel=stylesheet href=/classpath/blueprint/
ie.css type=text/css media=screen, projection![endif]--

all other comments are removed from the html output.

I'm using  adsense and it is essential to pass  key parameters via
comments.

Did I miss some options/parameters to deactivate this new feature?

--~--~-~--~~~---~--~~
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: Changes in 1.1 production mode?

2009-10-27 Thread David Pollak
Please see LiftRules.stripComments.

You can do LiftRules.stripComments(false)



On Tue, Oct 27, 2009 at 8:18 AM, Yousry Abdallah yous...@gmail.com wrote:


 Hi,
 at the moment I'm testing my application against 1.1 snapshot and I
 noticed that while running lift in production mode: -
 Drun.mode=production aside from blueprints IE6 fallback:

  !--[if IE]link rel=stylesheet href=/classpath/blueprint/
 ie.css type=text/css media=screen, projection![endif]--

 all other comments are removed from the html output.

 I'm using  adsense and it is essential to pass  key parameters via
 comments.

 Did I miss some options/parameters to deactivate this new feature?

 



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



[Lift] How to receive content-type application/json in a Lift API

2009-10-27 Thread GA

Hello guys,

I have a small Lift API that has to receive JSON content. The content- 
type is specified as application/json. The API method is written as  
follows:

 def jsonTest(req: Req): LiftResponse = {

 implicit val formats = net.liftweb.json.DefaultFormats //  
Brings in default date formats etc.
 case class Person(name: String, password: String)
 val json = parse(req.body.toString) /* Line that fails */
 val person = json.extract[Person]
 CreatedResponse(wrapXmlBody(operation id=jsonTest  
success=true /operation), application/json)
 }


I want to parse the content using the net.liftweb.jsonParser but the  
server returns HTTP 500 error.

If the content-type is text/xml, the message comes inside of req.xml,  
where does it come when it is application/json?

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: How to receive content-type application/json in a Lift API

2009-10-27 Thread David Pollak
On Tue, Oct 27, 2009 at 9:05 AM, GA my_li...@me.com wrote:


 Hello guys,

 I have a small Lift API that has to receive JSON content. The content-
 type is specified as application/json. The API method is written as
 follows:

 def jsonTest(req: Req): LiftResponse = {

 implicit val formats = net.liftweb.json.DefaultFormats //
 Brings in default date formats etc.
 case class Person(name: String, password: String)
 val json = parse(req.body.toString) /* Line that fails */
 val person = json.extract[Person]
 CreatedResponse(wrapXmlBody(operation id=jsonTest
 success=true /operation), application/json)
 }


 I want to parse the content using the net.liftweb.jsonParser but the
 server returns HTTP 500 error.


req.body is an Array[Byte].  calling .toString on it will not yield a String
representing the Array[Byte].

Try parse(new String(req.body, UTF-8))

If this doesn't work, please include the stack trace.



 If the content-type is text/xml, the message comes inside of req.xml,
 where does it come when it is application/json?

 Thanks in advance,

 GA


 



-- 
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 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] Two entity class map onto one DB table?

2009-10-27 Thread Ferdinand Chan

Hi,

I'm a newbie to Lift and still learning Lift by coding a pet project.

One question I have is about the Mapper.

For example, if I have two classes, say Promotion and Discount. They
are two different classes but having a one to one relationship to each
other, i.e. Each Promotion will have one Discount object and vise
versa.


If I model them in Lift by two classes and each of them extends from
LongKeyedMapper. Then each of them will be mapped to a DB table. Hence
I will have two tables created in DB.

Its it possible to setup or construct these two class such that in
code level, they will be two different classes but in DB level, they
are both mapped to a table.

For example, if Promotion have properties like name , expiry date and
Discount have properties like original price and discounted price. Can
they map to a table named PromotionDetails in DB with columns id,
name, expiry date, original_price and discounted_price ?

Thanks

Ferdinand


--~--~-~--~~~---~--~~
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: record support redis?

2009-10-27 Thread Timothy Perrett

It's not on our road map so unless one of the commiters wants to take  
this on for a particular reason youll probally get a faster solution  
by implementing it yourself.

Redis has a fairly simple interface so overlaying the record stuff  
should be easy. Was this a general ask or have you investigated record  
yourself and found it a little difficult?

Cheers, Tim

Sent from my iPhone

On 27 Oct 2009, at 07:37, monty chen montyc...@qq.com wrote:


 Record is a new refactorization of Mapper that is backing-store
 agnostic at its core, so it doesn’t matter whether you want to save
 your data to JDBC, JPA, or even something such as XML

 Redis is a key-value database. It is similar to memcached but the
 dataset is not volatile, and values can be strings, exactly like in
 memcached, but also lists and sets with atomic operations to push/pop
 elements.

 I want to know when lift 1.1 release, record support redis?.

 Scala bindings for Redis are available in this 
 http://github.com/acrosa/scala-redis

 


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



[Lift] Re: How to receive content-type application/json in a Lift API

2009-10-27 Thread GA
Thanks David.

It works with a little change.

I cannot do parse(new String(req.body, UTF-8)) directly, because the  
type of req.body is net.liftweb.util.Box[Array[Byte]]. So I did this:

 var message = 
 for (i - req.body) {
 message = new String(i, UTF-8)
 }
 val json = parse(message)

Is there an easier way to write this? I am quite new in scala yet.

Thanks,

GA



On Oct 27, 2009, at 5:09 PM, David Pollak wrote:



 On Tue, Oct 27, 2009 at 9:05 AM, GA my_li...@me.com wrote:

 Hello guys,

 I have a small Lift API that has to receive JSON content. The content-
 type is specified as application/json. The API method is written as
 follows:

 def jsonTest(req: Req): LiftResponse = {

 implicit val formats = net.liftweb.json.DefaultFormats //
 Brings in default date formats etc.
 case class Person(name: String, password: String)
 val json = parse(req.body.toString) /* Line that fails */
 val person = json.extract[Person]
 CreatedResponse(wrapXmlBody(operation id=jsonTest
 success=true /operation), application/json)
 }


 I want to parse the content using the net.liftweb.jsonParser but the
 server returns HTTP 500 error.

 req.body is an Array[Byte].  calling .toString on it will not yield  
 a String representing the Array[Byte].

 Try parse(new String(req.body, UTF-8))

 If this doesn't work, please include the stack trace.


 If the content-type is text/xml, the message comes inside of req.xml,
 where does it come when it is application/json?

 Thanks in advance,

 GA






 -- 
 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 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: Two entity class map onto one DB table?

2009-10-27 Thread David Pollak
Sure.

Please remember to set the dbTableName in each of your classes to the same
value:

class Promotion extends LongKeyedMapper[Promotion] {
  override def dbTableName = shared_table_name
}


On Tue, Oct 27, 2009 at 9:08 AM, Ferdinand Chan unique...@gmail.com wrote:


 Hi,

 I'm a newbie to Lift and still learning Lift by coding a pet project.

 One question I have is about the Mapper.

 For example, if I have two classes, say Promotion and Discount. They
 are two different classes but having a one to one relationship to each
 other, i.e. Each Promotion will have one Discount object and vise
 versa.


 If I model them in Lift by two classes and each of them extends from
 LongKeyedMapper. Then each of them will be mapped to a DB table. Hence
 I will have two tables created in DB.

 Its it possible to setup or construct these two class such that in
 code level, they will be two different classes but in DB level, they
 are both mapped to a table.

 For example, if Promotion have properties like name , expiry date and
 Discount have properties like original price and discounted price. Can
 they map to a table named PromotionDetails in DB with columns id,
 name, expiry date, original_price and discounted_price ?

 Thanks

 Ferdinand


 



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



[Lift] Re: How to receive content-type application/json in a Lift API

2009-10-27 Thread David Pollak
On Tue, Oct 27, 2009 at 10:02 AM, GA my_li...@me.com wrote:

 Thanks David.

 It works with a little change.

 I cannot do parse(new String(req.body, UTF-8)) directly, because the type
 of req.body is net.liftweb.util.Box[Array[Byte]]. So I did this:

 var message = 
 for (i - req.body) {
 message = new String(i, UTF-8)
 }
 val json = parse(message)


val json = parse(req.body.map(bytes = new String(bytes, UTF-8)) openOr
)




 Is there an easier way to write this? I am quite new in scala yet.

 Thanks,

 GA



 On Oct 27, 2009, at 5:09 PM, David Pollak wrote:



 On Tue, Oct 27, 2009 at 9:05 AM, GA my_li...@me.com wrote:


 Hello guys,

 I have a small Lift API that has to receive JSON content. The content-
 type is specified as application/json. The API method is written as
 follows:

 def jsonTest(req: Req): LiftResponse = {

 implicit val formats = net.liftweb.json.DefaultFormats //
 Brings in default date formats etc.
 case class Person(name: String, password: String)
 val json = parse(req.body.toString) /* Line that fails */
 val person = json.extract[Person]
 CreatedResponse(wrapXmlBody(operation id=jsonTest
 success=true /operation), application/json)
 }


 I want to parse the content using the net.liftweb.jsonParser but the
 server returns HTTP 500 error.


 req.body is an Array[Byte].  calling .toString on it will not yield a
 String representing the Array[Byte].

 Try parse(new String(req.body, UTF-8))

 If this doesn't work, please include the stack trace.



 If the content-type is text/xml, the message comes inside of req.xml,
 where does it come when it is application/json?

 Thanks in advance,

 GA






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




 



-- 
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 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: Folder for resource bundles possible?

2009-10-27 Thread Marius

well we use ResourceBundles which means that you should be able to use
any base name that you want.

Please see LiftRules.resourceBundleFactories

Br's,
Marius

On Oct 27, 5:05 pm, Heiko Seeberger heiko.seeber...@googlemail.com
wrote:
 Hi,

 Is there a way to configure Lift such that it is possible to but resource
 bundles (properties files, used by S.?) into another folder but the top
 level one?
 I would like to put them into a i18n folder, just like the core-lift
 properties.

 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
--~--~-~--~~~---~--~~
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: Two entity class map onto one DB table?

2009-10-27 Thread Naftoli Gugenheim

Why do you want this? What's wrong with one Mapper or two tables?

-
Ferdinand Chanunique...@gmail.com wrote:


Hi,

I'm a newbie to Lift and still learning Lift by coding a pet project.

One question I have is about the Mapper.

For example, if I have two classes, say Promotion and Discount. They
are two different classes but having a one to one relationship to each
other, i.e. Each Promotion will have one Discount object and vise
versa.


If I model them in Lift by two classes and each of them extends from
LongKeyedMapper. Then each of them will be mapped to a DB table. Hence
I will have two tables created in DB.

Its it possible to setup or construct these two class such that in
code level, they will be two different classes but in DB level, they
are both mapped to a table.

For example, if Promotion have properties like name , expiry date and
Discount have properties like original price and discounted price. Can
they map to a table named PromotionDetails in DB with columns id,
name, expiry date, original_price and discounted_price ?

Thanks

Ferdinand




--~--~-~--~~~---~--~~
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: Two entity class map onto one DB table?

2009-10-27 Thread Ferdinand Chan

David,

Thanks for the quick reply.

Cheers,

Ferdinand

On Oct 28, 1:03 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Sure.

 Please remember to set the dbTableName in each of your classes to the same
 value:

 class Promotion extends LongKeyedMapper[Promotion] {
   override def dbTableName = shared_table_name





 }
 On Tue, Oct 27, 2009 at 9:08 AM, Ferdinand Chan unique...@gmail.com wrote:

  Hi,

  I'm a newbie to Lift and still learning Lift by coding a pet project.

  One question I have is about the Mapper.

  For example, if I have two classes, say Promotion and Discount. They
  are two different classes but having a one to one relationship to each
  other, i.e. Each Promotion will have one Discount object and vise
  versa.

  If I model them in Lift by two classes and each of them extends from
  LongKeyedMapper. Then each of them will be mapped to a DB table. Hence
  I will have two tables created in DB.

  Its it possible to setup or construct these two class such that in
  code level, they will be two different classes but in DB level, they
  are both mapped to a table.

  For example, if Promotion have properties like name , expiry date and
  Discount have properties like original price and discounted price. Can
  they map to a table named PromotionDetails in DB with columns id,
  name, expiry date, original_price and discounted_price ?

  Thanks

  Ferdinand

 --
 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] build issue - javax.mail - is anyone having this problem?

2009-10-27 Thread Dano

Hello,

We did a build this morning and are getting an error from maven on the
javax.mail dependency (see below).  We are currently referencing
version 1.4.  It seems to get this from the central maven repository
(http://repo2.maven.org/maven2).  The site appears to be up and has
version 1.4.

Did anyone else have this problem?  If so, is there a pom.xml change
which solves this issue?

Thanks in advance.


Dan

 mvn -U clean install
Picked up JAVA_TOOL_OPTIONS: -Xms128m -Xmx768m
[INFO] Scanning for projects...
[INFO]

[INFO] Building InnovationGames
[INFO]task-segment: [clean, install]
[INFO]

[INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for
updates from scala-tools.org
[INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for
updates from central
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin:
checking for updates from scala-tools.org
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin:
checking for updates from central
[INFO] [clean:clean]
[INFO] Deleting directory /home/doleary/ptpt2/trunk/baf/target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] snapshot net.liftweb:lift-util:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-util:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-base:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-base:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift:1.1-SNAPSHOT: checking for updates
from scala-tools.org
[INFO] snapshot net.liftweb:lift:1.1-SNAPSHOT: checking for updates
from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-actor:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-actor:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-common:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-common:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] artifact javax.mail:mail: checking for updates from scala-
tools.org
[INFO] artifact javax.mail:mail: checking for updates from scala-
tools.org.snapshots
[INFO] artifact javax.mail:mail: checking for updates from central
[INFO] artifact javax.activation:activation: checking for updates from
scala-tools.org
[INFO] artifact javax.activation:activation: checking for updates from
scala-tools.org.snapshots
[INFO] artifact javax.activation:activation: checking for updates from
central
[INFO] snapshot net.liftweb:lift-paypal:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-paypal:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-modules:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-modules:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-webkit:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-webkit:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-mapper:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-mapper:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-persistence:1.1-SNAPSHOT: checking
for updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-persistence:1.1-SNAPSHOT: checking
for updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-widgets:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-widgets:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] snapshot net.liftweb:lift-textile:1.1-SNAPSHOT: checking for
updates from scala-tools.org
[INFO] snapshot net.liftweb:lift-textile:1.1-SNAPSHOT: checking for
updates from scala-tools.org.snapshots
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from
scala-tools.org
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from
scala-tools.org.snapshots
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from
central
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] suggestion: remove the scalaVersion from pom.xml
[INFO] Checking for multiple versions of scala
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] version was null for javax.mail:mail
[INFO]


[Lift] Re: build issue - javax.mail - is anyone having this problem?

2009-10-27 Thread Ross Mellgren

I had this problem -- updating the maven-scala-plugin from 2.10 to  
2.12.1 fixed it for me.

-Ross

On Oct 27, 2009, at 1:39 PM, Dano wrote:


 Hello,

 We did a build this morning and are getting an error from maven on the
 javax.mail dependency (see below).  We are currently referencing
 version 1.4.  It seems to get this from the central maven repository
 (http://repo2.maven.org/maven2).  The site appears to be up and has
 version 1.4.

 Did anyone else have this problem?  If so, is there a pom.xml change
 which solves this issue?

 Thanks in advance.


 Dan

 mvn -U clean install
 Picked up JAVA_TOOL_OPTIONS: -Xms128m -Xmx768m
 [INFO] Scanning for projects...
 [INFO]
 
 [INFO] Building InnovationGames
 [INFO]task-segment: [clean, install]
 [INFO]
 
 [INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for
 updates from scala-tools.org
 [INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for
 updates from central
 [INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin:
 checking for updates from scala-tools.org
 [INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin:
 checking for updates from central
 [INFO] [clean:clean]
 [INFO] Deleting directory /home/doleary/ptpt2/trunk/baf/target
 [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] snapshot net.liftweb:lift-util:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-util:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-base:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-base:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift:1.1-SNAPSHOT: checking for updates
 from scala-tools.org
 [INFO] snapshot net.liftweb:lift:1.1-SNAPSHOT: checking for updates
 from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-actor:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-actor:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-common:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-common:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] artifact javax.mail:mail: checking for updates from scala-
 tools.org
 [INFO] artifact javax.mail:mail: checking for updates from scala-
 tools.org.snapshots
 [INFO] artifact javax.mail:mail: checking for updates from central
 [INFO] artifact javax.activation:activation: checking for updates from
 scala-tools.org
 [INFO] artifact javax.activation:activation: checking for updates from
 scala-tools.org.snapshots
 [INFO] artifact javax.activation:activation: checking for updates from
 central
 [INFO] snapshot net.liftweb:lift-paypal:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-paypal:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-modules:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-modules:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-webkit:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-webkit:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-mapper:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-mapper:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-persistence:1.1-SNAPSHOT: checking
 for updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-persistence:1.1-SNAPSHOT: checking
 for updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-widgets:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-widgets:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] snapshot net.liftweb:lift-textile:1.1-SNAPSHOT: checking for
 updates from scala-tools.org
 [INFO] snapshot net.liftweb:lift-textile:1.1-SNAPSHOT: checking for
 updates from scala-tools.org.snapshots
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from
 scala-tools.org
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from
 scala-tools.org.snapshots
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from
 central
 [INFO] [compiler:compile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [scala:compile {execution: default}]
 [INFO] suggestion: remove the scalaVersion from pom.xml
 [INFO] Checking for multiple versions of scala
 [INFO]
 

[Lift] Re: Newbie: zero parameter functions, bind call-by-name function curiosity

2009-10-27 Thread Strom

Yes Ross, I did mean () = processForm. Thanks for the clarification.
The one thing in moving from Java to Scala is that there are a lot of
things that look similar that aren't, as you've pointed out. Newbie
error caught ;)

Thanks Marius, I made that assumption, but it still bugs me that the
scala interpreter evaluates both the value and the function when I
use:

scala def testFunc() : Int = 3

scala testFunc
Int = 3

scalatestFunc()
Int = 3


Strom

On Oct 27, 7:19 am, Ross Mellgren dri...@gmail.com wrote:
 Did you mean () = processForm by chance? () - processForm is a pair  
 of () and processForm's result.

 -Ross

 On Oct 27, 2009, at 2:52 AM, Strom wrote:



  I'm not sure if this is a scala or a lift related question, but when I
  try to bind a submit button, I'm having some confusion on using zero
  parameter functions as the () - Any parameter in the submit
  signature.

  The signature for the method in question is
  SHtml.submit(value : String, func : () = Any, attrs : (String,  
  String)
  *)

  1. My first question is about the following method definitions
  def processForm () : Unit = {...}
  vs
  def processForm = {...}  //no parentheses after method declaration

  Why can I call processForm as well as processForm() for the first
  example, but only processForm for the second example. If there is
  scala/lift documentation on this simple question?

  2. Why do I get a compiler error when I use the following code:
  bind( ...
   submit - SHtml.submit( Process Form, processForm() )  /*type
  mismatch error*/
  )
  vs
  bind( ...
   submit - SHtml.submit( Process Form, processForm ) /*compiles
  successfully*/
  )

  It's my impression that the above bind calls are equivalent given the
  way the scala compiler behaves when I call processForm or
  processForm().

  Also, I wasn't even sure the method itself would allow the code to
  compile.  I thought I'd have to do () - processForm or () -
  processForm().

  The error I was getting was this:
  error type mismatch
   found : Unit
   required : () - Any

  Can someone please clarify? Thanks so much.

--~--~-~--~~~---~--~~
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: Dynamic radio button

2009-10-27 Thread Derek Chen-Becker
I think that we should be able to provide an SHtml.ajaxRadio method that
generates an AJAXified radio button. Please file an issue.

Derek

On Thu, Oct 22, 2009 at 4:06 PM, sunanda sunanda.pa...@gmail.com wrote:


 Hi Derek,

 I am displaying the contents of a table in ReadOnly mode as follows.
 The sample code is given below

  table
   tr
   td bDisplay Name/b/td
   td{coldef.displayname}/td
   /tr
   tr
   tdbRequire Cookies for Link/b /td
   td {coldef.requirecookies}/td
   /tr
button onclick={SHtml.ajaxInvoke(getEditMode _)._2}Edit2/
 button
 table

 onclick of Edit2 button I make it editable by making the
 coldef.displayname using ajaxText. But the coldef.requirecookies is a
 raidio button field(which has got two options Yes and No)
 Hence in editable mode I need to insert two radio buttons (with one
 button checked based on the value of coldef.requirecookies) .  I was
 able to insert using Shtml.radio
 But I need to do ajax call on click of the button to modify the value
 of requirecookies field.

 Could you please suggest me how to achieve this.
 Thanks
 Sunanda







 On Oct 23, 1:39 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
  I don't quite understand what you're trying to do. Could you give some
 more
  details? Are you trying to add more radios to an existing radio button
 set?
 
 
 
  On Wed, Oct 21, 2009 at 8:45 PM, sunanda sunanda.pa...@gmail.com
 wrote:
 
   Hi,
   I need to add radio button dynamically with one of the button checked
   and  I need to invoke ajaxCall onclick of a radio button.
   How can I do this.
   Sunanda- Hide quoted text -
 
  - Show quoted text -
 


--~--~-~--~~~---~--~~
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: Foreign Key Constraints in PostgreSQL through MappedLongForeignKey fields?

2009-10-27 Thread Derek Chen-Becker
At this time we don't support it, but feel free to file an issue. I'll have
time at some point to work on it, and I think that it would be useful to
generate.

Derek

On Fri, Oct 23, 2009 at 10:04 AM, yk ying.kwang...@gmail.com wrote:


 I was running the models of One-To-Many example from WiKi (http://
 wiki.github.com/dpp/liftweb/how-to-work-with-one-to-many-
 relationships) against PostgreSQL hoping to see a foreign key
 constraint on the Book table. I got an index instead.

 Is there a way to get schemifier to acknowledge the foreign key
 constraints?
 


--~--~-~--~~~---~--~~
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: Newbie: zero parameter functions, bind call-by-name function curiosity

2009-10-27 Thread Marius



On Oct 27, 8:50 pm, Strom strommo...@gmail.com wrote:
 Yes Ross, I did mean () = processForm. Thanks for the clarification.
 The one thing in moving from Java to Scala is that there are a lot of
 things that look similar that aren't, as you've pointed out. Newbie
 error caught ;)

 Thanks Marius, I made that assumption, but it still bugs me that the
 scala interpreter evaluates both the value and the function when I
 use:

 scala def testFunc() : Int = 3

 scala testFunc
 Int = 3

 scalatestFunc()
 Int = 3

Right ... and this is correct. Because there is no context the
interpreter (and compiler) assume that you mean a function-
application.  But try this:

scala testFunc _
res5: () = Int = function

the _ here means eta expansion. A method is converted into a function.
SLS 6.25.5


But context matters:

scala def testFunc(): Int = 3
testFunc: ()Int

scala def other(f: () = Int) = f()
other: (() = Int)Int

scala other(testFunc)
res0: Int = 3

scala other(testFunc())
console:7: error: type mismatch;
 found   : Int
 required: () = Int
   other(testFunc())
 ^


In the above example textFunc and testFunc() means two different
things


 Strom

 On Oct 27, 7:19 am, Ross Mellgren dri...@gmail.com wrote:

  Did you mean () = processForm by chance? () - processForm is a pair  
  of () and processForm's result.

  -Ross

  On Oct 27, 2009, at 2:52 AM, Strom wrote:

   I'm not sure if this is a scala or a lift related question, but when I
   try to bind a submit button, I'm having some confusion on using zero
   parameter functions as the () - Any parameter in the submit
   signature.

   The signature for the method in question is
   SHtml.submit(value : String, func : () = Any, attrs : (String,  
   String)
   *)

   1. My first question is about the following method definitions
   def processForm () : Unit = {...}
   vs
   def processForm = {...}  //no parentheses after method declaration

   Why can I call processForm as well as processForm() for the first
   example, but only processForm for the second example. If there is
   scala/lift documentation on this simple question?

   2. Why do I get a compiler error when I use the following code:
   bind( ...
    submit - SHtml.submit( Process Form, processForm() )  /*type
   mismatch error*/
   )
   vs
   bind( ...
    submit - SHtml.submit( Process Form, processForm ) /*compiles
   successfully*/
   )

   It's my impression that the above bind calls are equivalent given the
   way the scala compiler behaves when I call processForm or
   processForm().

   Also, I wasn't even sure the method itself would allow the code to
   compile.  I thought I'd have to do () - processForm or () -
   processForm().

   The error I was getting was this:
   error type mismatch
    found : Unit
    required : () - Any

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



[Lift] Re: Lift 1.1 Milestone 7

2009-10-27 Thread David Pollak
On Mon, Oct 26, 2009 at 7:59 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 Could someone fix #121 (loginRedirect using S.uri; not getting part after
 '?')


I've got a fix for this on review board.  It'd be ideal if you could build
dpp_issue_121 and insure that it does what you want.



 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.com
 wrote:

  Folks,
 
  may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from that?
  (It'd eliminate the potential problems of synchronizing on a master/HEAD
  freeze)


 And it makes it more complex to figure out what to merge off master, please
 it means that testing against SNAPSHOT isn't testing against what will be
 in
 M7.


 
 
  On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
  feeder.of.the.be...@gmail.com wrote:
 
  Folks,
 
  We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
  4th.
 
  We would like to release M7 against Scala 2.7.7 final if EPFL's schedule
  can accommodate this.
 
  We are going into code-slush on Thursday October 29th (this means we're
  not going to make material changes to the codebase unless it's to fix a
  material bug).
 
  Please post any blocking defects to this list (with links to the
 ticket).
  We'll endeavor to close any of these defects this week.
 
  If you're a production site running against M6 and planning to upgrade
 to
  M7, please start testing as soon as possible so we can get fixes into M7
  sooner rather than later.
 
  Thanks,
 
  David
 
 
  --
  Lift, the simply functional web framework http://liftweb.net
  Beginning Scala http://www.apress.com/book/view/1430219890
  Follow me: http://twitter.com/dpp
  Surf the harmonics
 
 
 
 
 
  --
  Viktor Klang
  | A complex system that works is invariably
  | found to have evolved from a simple system
  | that worked. - John Gall
 
  Blog: klangism.blogspot.com
  Twttr: viktorklang
  Code: github.com/viktorklang
 
 
  
 


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



 



-- 
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 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] Milestone 7, getting very slushy

2009-10-27 Thread David Pollak
Folks,

Just a reminder that Milestone 7 will be built on November 4th.  Any tickets
that are blocking for your project that you want in Milestone 7 need to be
coded by end of day Thursday.

Please, please, please make sure you post to the Lift list
liftweb@googlegroups.com any tickets you need closed for M7.

Thanks,

David

PS -- Committers, please get out your review board pencils and close the
review board posting.  Folks with review board stuff that's approved, please
merge it into master.

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



[Lift] Re: Proposal : Lift ticketing system

2009-10-27 Thread Derek Chen-Becker
OK, I just pushed the initial revision of my model to GitHub at
http://github.com/dchenbecker/LiftTicket. I think that this covers most of
the features that Marius discussed in his response. I agree with all of it,
although I'm not 100% sure about having both a severity and priority field
on the ticket. This was kind of a code vomit, so I'm going to split the
classes out into separate Scala files once I get some feedback and a better
idea of what needs to be done.

Cheers,

Derek

On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:

 I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've
 set up a repo here:

 http://github.com/dchenbecker/LiftTicket

 My preference is for this to be an issue tracking system first and a
 Wiki/CMS second, but I'm open to any and all ideas on how this can be
 fleshed out. I would also like to plan on doing a couple of iterations to
 get it all working. I like Marius' list of features but I'd like to start
 with a subset of those and expand it. My first milestone would be getting
 it to the point where it could self-host its own planning for enhancements
 and bug tracking, and I think I can do that with a small set of initial
 features.

 Derek


 On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim 
 naftoli...@gmail.comwrote:


 How about we integrate the wiki, blog, forum, and issue tracker into the
 CMS? ;)
 Seriously, maybe it would be a good idea to create a repo and list, and
 start serious discussion on all aspects of its design. Maybe it could become
 a big community project, with lots of feedback to Lift.


 -
 jlist9jli...@gmail.com wrote:


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

 On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote:
 
  I don't mean to be negative, but are other options being considered
  besides a ticketing system?  I kind of wonder if the effort is worth
  it when excellent alternatives exist (like JIRA -- their Git
  integration may interest you:
 https://plugins.atlassian.com/plugin/details/4984
  -- I have used their Subversion integration and was very pleased).
 
  I would be far more interested in seeing something done for the
  benefit of the Lift Web Site.  (Is it written with Lift?)  I don't see
  a Lift CMS -- and that is something that could evolve well over time.
  I think it is important for a web framework to use their own stuff,
  and it should be indicative of the cool things that it can do,
  stability, scale, and performance...  (I am amazed that I have seen
  rather poor demonstrations of this, specifically by Adobe and JBoss --
  but again, I'm not trying to be negative...)
 
  I see the Lift site integrating Google Analytics...  Is that something
  that could be out of the box with Lift?  That could be a selling
  point to people making external web sites.
 
  Another area that would be neat to develop is instrumentation.  Sort
  of the JMX-Console equivalent for Lift.  For scalability and sizing
  analysis, this would be really useful.
 
 
  Having said that, one major feature that I feel is missing from github
  is the lack of attachments for an issue.  How do you attach test cases
  or patches for an issue?
 
  
 



 



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



[Lift] Re: Proposal : Lift ticketing system

2009-10-27 Thread Marius

In my mind the severity says the level of impact for the submitter,
and priority is the result of comitters' bandwidth. But it's not a big
issue.

Br's,
Marius

On Oct 27, 11:23 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
 OK, I just pushed the initial revision of my model to GitHub 
 athttp://github.com/dchenbecker/LiftTicket. I think that this covers most of
 the features that Marius discussed in his response. I agree with all of it,
 although I'm not 100% sure about having both a severity and priority field
 on the ticket. This was kind of a code vomit, so I'm going to split the
 classes out into separate Scala files once I get some feedback and a better
 idea of what needs to be done.

 Cheers,

 Derek

 On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker
 dchenbec...@gmail.comwrote:

  I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've
  set up a repo here:

 http://github.com/dchenbecker/LiftTicket

  My preference is for this to be an issue tracking system first and a
  Wiki/CMS second, but I'm open to any and all ideas on how this can be
  fleshed out. I would also like to plan on doing a couple of iterations to
  get it all working. I like Marius' list of features but I'd like to start
  with a subset of those and expand it. My first milestone would be getting
  it to the point where it could self-host its own planning for enhancements
  and bug tracking, and I think I can do that with a small set of initial
  features.

  Derek

  On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim 
  naftoli...@gmail.comwrote:

  How about we integrate the wiki, blog, forum, and issue tracker into the
  CMS? ;)
  Seriously, maybe it would be a good idea to create a repo and list, and
  start serious discussion on all aspects of its design. Maybe it could 
  become
  a big community project, with lots of feedback to Lift.

  -
  jlist9jli...@gmail.com wrote:

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

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

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

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

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

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

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



[Lift] Re: Firefox issue with ajaxSelectObj and page refresh

2009-10-27 Thread Jeppe Nejsum Madsen

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

 What's the JavaScript to force the correct item to be selected?  I think we
 could append the JavaScript to the ajaxSelectObj to force the right thing to
 happen.

For jQuery, something like $(#dropdown).val(2); should work. But the
issue is that it should (ideally) only be done whenever the page is
refreshed, not on initial load where everything works. Dunno if hurts to
always force the selection.

/Jeppe


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



[Lift] Re: Proposal : Lift ticketing system

2009-10-27 Thread Derek Chen-Becker
Makes sense :)

On Tue, Oct 27, 2009 at 3:28 PM, Marius marius.dan...@gmail.com wrote:


 In my mind the severity says the level of impact for the submitter,
 and priority is the result of comitters' bandwidth. But it's not a big
 issue.

 Br's,
 Marius

 On Oct 27, 11:23 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
  OK, I just pushed the initial revision of my model to GitHub athttp://
 github.com/dchenbecker/LiftTicket. I think that this covers most of
  the features that Marius discussed in his response. I agree with all of
 it,
  although I'm not 100% sure about having both a severity and priority
 field
  on the ticket. This was kind of a code vomit, so I'm going to split the
  classes out into separate Scala files once I get some feedback and a
 better
  idea of what needs to be done.
 
  Cheers,
 
  Derek
 
  On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker
  dchenbec...@gmail.comwrote:
 
   I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning.
 I've
   set up a repo here:
 
  http://github.com/dchenbecker/LiftTicket
 
   My preference is for this to be an issue tracking system first and a
   Wiki/CMS second, but I'm open to any and all ideas on how this can be
   fleshed out. I would also like to plan on doing a couple of iterations
 to
   get it all working. I like Marius' list of features but I'd like to
 start
   with a subset of those and expand it. My first milestone would be
 getting
   it to the point where it could self-host its own planning for
 enhancements
   and bug tracking, and I think I can do that with a small set of initial
   features.
 
   Derek
 
   On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim 
 naftoli...@gmail.comwrote:
 
   How about we integrate the wiki, blog, forum, and issue tracker into
 the
   CMS? ;)
   Seriously, maybe it would be a good idea to create a repo and list,
 and
   start serious discussion on all aspects of its design. Maybe it could
 become
   a big community project, with lots of feedback to Lift.
 
   -
   jlist9jli...@gmail.com wrote:
 
   CMS, wiki, blog, forum also sound more interesting than bug tracking
   system to me :-)
 
   On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote:
 
I don't mean to be negative, but are other options being considered
besides a ticketing system?  I kind of wonder if the effort is worth
it when excellent alternatives exist (like JIRA -- their Git
integration may interest you:
  https://plugins.atlassian.com/plugin/details/4984
-- I have used their Subversion integration and was very pleased).
 
I would be far more interested in seeing something done for the
benefit of the Lift Web Site.  (Is it written with Lift?)  I don't
 see
a Lift CMS -- and that is something that could evolve well over
 time.
I think it is important for a web framework to use their own stuff,
and it should be indicative of the cool things that it can do,
stability, scale, and performance...  (I am amazed that I have seen
rather poor demonstrations of this, specifically by Adobe and JBoss
 --
but again, I'm not trying to be negative...)
 
I see the Lift site integrating Google Analytics...  Is that
 something
that could be out of the box with Lift?  That could be a selling
point to people making external web sites.
 
Another area that would be neat to develop is instrumentation.  Sort
of the JMX-Console equivalent for Lift.  For scalability and sizing
analysis, this would be really useful.
 
Having said that, one major feature that I feel is missing from
 github
is the lack of attachments for an issue.  How do you attach test
 cases
or patches for an issue?
 


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



[Lift] Re: Proposal : Lift ticketing system

2009-10-27 Thread Jeppe Nejsum Madsen

Derek Chen-Becker dchenbec...@gmail.com writes:

 OK, I just pushed the initial revision of my model to GitHub at
 http://github.com/dchenbecker/LiftTicket. I think that this covers most of
 the features that Marius discussed in his response. I agree with all of it,
 although I'm not 100% sure about having both a severity and priority field
 on the ticket. 

One thing about priority: I much prefer an open ended importance
field. This makes it (at least in theory :-) possible to have a well
defined ordering of all tickets. (And if you put an unique index on it
you force people to make a decision. Just kidding :-)

/Jeppe

--~--~-~--~~~---~--~~
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] Source file missing from -sources.jars?

2009-10-27 Thread Jeppe Nejsum Madsen

Hi,

It seems the *.scala files are missing from some of the
1.1-SNAPSHOT-sources.jars. But not all of them:

lift-webkit  lift-mapper only has the resource files
lift-util looks ok

/Jeppe


--~--~-~--~~~---~--~~
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: Firefox issue with ajaxSelectObj and page refresh

2009-10-27 Thread Jeppe Nejsum Madsen

On Tue, Oct 27, 2009 at 10:59 PM, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 David Pollak feeder.of.the.be...@gmail.com writes:

 What's the JavaScript to force the correct item to be selected?  I think we
 could append the JavaScript to the ajaxSelectObj to force the right thing to
 happen.

 For jQuery, something like $(#dropdown).val(2); should work. But the
 issue is that it should (ideally) only be done whenever the page is
 refreshed, not on initial load where everything works. Dunno if hurts to
 always force the selection.

 /Jeppe

I tried to see if I could hack a POC for this, but I failed to see how
I can get the id's of the options that are generated by ajaxSelect.
This makes it hard to manipulate  client side :-)

/Jeppe

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



[Lift] Re: Lift 1.1 Milestone 7

2009-10-27 Thread Naftoli Gugenheim

I won't be at a connection too soon. Could you paste the diff into the body of 
an email?
Thanks!

-
David Pollakfeeder.of.the.be...@gmail.com wrote:

On Mon, Oct 26, 2009 at 7:59 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 Could someone fix #121 (loginRedirect using S.uri; not getting part after
 '?')


I've got a fix for this on review board.  It'd be ideal if you could build
dpp_issue_121 and insure that it does what you want.



 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.com
 wrote:

  Folks,
 
  may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from that?
  (It'd eliminate the potential problems of synchronizing on a master/HEAD
  freeze)


 And it makes it more complex to figure out what to merge off master, please
 it means that testing against SNAPSHOT isn't testing against what will be
 in
 M7.


 
 
  On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
  feeder.of.the.be...@gmail.com wrote:
 
  Folks,
 
  We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
  4th.
 
  We would like to release M7 against Scala 2.7.7 final if EPFL's schedule
  can accommodate this.
 
  We are going into code-slush on Thursday October 29th (this means we're
  not going to make material changes to the codebase unless it's to fix a
  material bug).
 
  Please post any blocking defects to this list (with links to the
 ticket).
  We'll endeavor to close any of these defects this week.
 
  If you're a production site running against M6 and planning to upgrade
 to
  M7, please start testing as soon as possible so we can get fixes into M7
  sooner rather than later.
 
  Thanks,
 
  David
 
 
  --
  Lift, the simply functional web framework http://liftweb.net
  Beginning Scala http://www.apress.com/book/view/1430219890
  Follow me: http://twitter.com/dpp
  Surf the harmonics
 
 
 
 
 
  --
  Viktor Klang
  | A complex system that works is invariably
  | found to have evolved from a simple system
  | that worked. - John Gall
 
  Blog: klangism.blogspot.com
  Twttr: viktorklang
  Code: github.com/viktorklang
 
 
  
 


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



 



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



[Lift] Re: Proposal : Lift ticketing system

2009-10-27 Thread Naftoli Gugenheim

I'm not by an internet connection now (won't be for a while). Would it be 
possible for you to paste your code in an email to me (in the body)? Thanks.

-
Derek Chen-Beckerdchenbec...@gmail.com wrote:

OK, I just pushed the initial revision of my model to GitHub at
http://github.com/dchenbecker/LiftTicket. I think that this covers most of
the features that Marius discussed in his response. I agree with all of it,
although I'm not 100% sure about having both a severity and priority field
on the ticket. This was kind of a code vomit, so I'm going to split the
classes out into separate Scala files once I get some feedback and a better
idea of what needs to be done.

Cheers,

Derek

On Mon, Oct 26, 2009 at 12:29 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:

 I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've
 set up a repo here:

 http://github.com/dchenbecker/LiftTicket

 My preference is for this to be an issue tracking system first and a
 Wiki/CMS second, but I'm open to any and all ideas on how this can be
 fleshed out. I would also like to plan on doing a couple of iterations to
 get it all working. I like Marius' list of features but I'd like to start
 with a subset of those and expand it. My first milestone would be getting
 it to the point where it could self-host its own planning for enhancements
 and bug tracking, and I think I can do that with a small set of initial
 features.

 Derek


 On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim 
 naftoli...@gmail.comwrote:


 How about we integrate the wiki, blog, forum, and issue tracker into the
 CMS? ;)
 Seriously, maybe it would be a good idea to create a repo and list, and
 start serious discussion on all aspects of its design. Maybe it could become
 a big community project, with lots of feedback to Lift.


 -
 jlist9jli...@gmail.com wrote:


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

 On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote:
 
  I don't mean to be negative, but are other options being considered
  besides a ticketing system?  I kind of wonder if the effort is worth
  it when excellent alternatives exist (like JIRA -- their Git
  integration may interest you:
 https://plugins.atlassian.com/plugin/details/4984
  -- I have used their Subversion integration and was very pleased).
 
  I would be far more interested in seeing something done for the
  benefit of the Lift Web Site.  (Is it written with Lift?)  I don't see
  a Lift CMS -- and that is something that could evolve well over time.
  I think it is important for a web framework to use their own stuff,
  and it should be indicative of the cool things that it can do,
  stability, scale, and performance...  (I am amazed that I have seen
  rather poor demonstrations of this, specifically by Adobe and JBoss --
  but again, I'm not trying to be negative...)
 
  I see the Lift site integrating Google Analytics...  Is that something
  that could be out of the box with Lift?  That could be a selling
  point to people making external web sites.
 
  Another area that would be neat to develop is instrumentation.  Sort
  of the JMX-Console equivalent for Lift.  For scalability and sizing
  analysis, this would be really useful.
 
 
  Having said that, one major feature that I feel is missing from github
  is the lack of attachments for an issue.  How do you attach test cases
  or patches for an issue?
 
  
 



 





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



[Lift] Loc questions

2009-10-27 Thread Kris Nuttycombe

I'm somewhat puzzled by the signature of Loc.Link.createLink -
principally by the fact that it returns Box[NodeSeq] instead of some
more path-like object. Due to having this signature, you can't simply
override createLink to create an actual link (the way it's used by
SiteMap inhibits this). Instead, it returns a path-like string wrapped
in a Text in its default implementation. This seems like a
not-very-useful thing to return; you can't use it in an SHtml.a or
SHtml.link call without unwrapping it and the type system doesn't help
you at all (Box[NodeSeq] is definitely *not* the meaning of those
bytes).

Is there any better path-like construct that a Link could be
constructed around? Do people have their own Link implementations, or
is the Link class mostly used internally (such that its api could be
change to represent something path-link instead of xml-like?)

Kris

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



[Lift] Re: Lift 1.1 Milestone 7

2009-10-27 Thread David Pollak
On Tue, Oct 27, 2009 at 4:27 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 I won't be at a connection too soon. Could you paste the diff into the body
 of an email?


diff --git a/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
b/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
--- a/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
+++ b/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
@@ -716,6 +716,21 @@ object S extends HasParams {
*/
   def uri: String = request.map(_.uri).openOr(/)

+/**
+* Returns the query string for the current request
+*/
+def queryString: Box[String] =
+for {
+  req - request
+  queryString - req.request.queryString
+} yield queryString
+
+
+def uriAndQueryString: Box[String] =
+for {
+  req - this.request
+} yield req.uri + (queryString.map(s = ?+s) openOr )
+
   /**
* Redirects the browser to a given URL. Note that the underlying
mechanism for redirects is to
* throw a ResponseShortcutException, so if you're doing the redirect
within a try/catch block,
diff --git
a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
---
a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
+++
b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
@@ -156,10 +156,10 @@ trait MetaMegaProtoUser[ModelType :
MegaProtoUser[ModelType]] extends KeyedMeta
 loggedIn_? _,
 () = {
   import net.liftweb.http.{RedirectWithState, RedirectState}
-  val uri = S.uri
+  val uri = S.uriAndQueryString
   RedirectWithState(
 loginPageURL,
-RedirectState( ()={loginRedirect.set(Full(uri))})
+RedirectState( ()={loginRedirect.set(uri)})
   )
 }
   )


 Thanks!

 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 7:59 PM, Naftoli Gugenheim naftoli...@gmail.com
 wrote:

 
  Could someone fix #121 (loginRedirect using S.uri; not getting part after
  '?')
 

 I've got a fix for this on review board.  It'd be ideal if you could build
 dpp_issue_121 and insure that it does what you want.


 
  -
  David Pollakfeeder.of.the.be...@gmail.com wrote:
 
  On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.com
  wrote:
 
   Folks,
  
   may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from
 that?
   (It'd eliminate the potential problems of synchronizing on a
 master/HEAD
   freeze)
 
 
  And it makes it more complex to figure out what to merge off master,
 please
  it means that testing against SNAPSHOT isn't testing against what will be
  in
  M7.
 
 
  
  
   On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
   feeder.of.the.be...@gmail.com wrote:
  
   Folks,
  
   We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
   4th.
  
   We would like to release M7 against Scala 2.7.7 final if EPFL's
 schedule
   can accommodate this.
  
   We are going into code-slush on Thursday October 29th (this means
 we're
   not going to make material changes to the codebase unless it's to fix
 a
   material bug).
  
   Please post any blocking defects to this list (with links to the
  ticket).
   We'll endeavor to close any of these defects this week.
  
   If you're a production site running against M6 and planning to upgrade
  to
   M7, please start testing as soon as possible so we can get fixes into
 M7
   sooner rather than later.
  
   Thanks,
  
   David
  
  
   --
   Lift, the simply functional web framework http://liftweb.net
   Beginning Scala http://www.apress.com/book/view/1430219890
   Follow me: http://twitter.com/dpp
   Surf the harmonics
  
  
  
  
  
   --
   Viktor Klang
   | A complex system that works is invariably
   | found to have evolved from a simple system
   | that worked. - John Gall
  
   Blog: klangism.blogspot.com
   Twttr: viktorklang
   Code: github.com/viktorklang
  
  
   
  
 
 
  --
  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
 
 
 
  
 


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



 



-- 
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 liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 

[Lift] Re: Lift 1.1 Milestone 7

2009-10-27 Thread Naftoli Gugenheim

Looking in to it...
Why does uriAndQueryString return a Box?
Also I think it could be shortened to uriAndQuery. Not sure if it makes sense 
to shorten queryString.
Thanks.

-
David Pollakfeeder.of.the.be...@gmail.com wrote:

On Tue, Oct 27, 2009 at 4:27 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 I won't be at a connection too soon. Could you paste the diff into the body
 of an email?


diff --git a/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
b/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
--- a/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
+++ b/lift-base/lift-webkit/src/main/scala/net/liftweb/http/S.scala
@@ -716,6 +716,21 @@ object S extends HasParams {
*/
   def uri: String = request.map(_.uri).openOr(/)

+/**
+* Returns the query string for the current request
+*/
+def queryString: Box[String] =
+for {
+  req - request
+  queryString - req.request.queryString
+} yield queryString
+
+
+def uriAndQueryString: Box[String] =
+for {
+  req - this.request
+} yield req.uri + (queryString.map(s = ?+s) openOr )
+
   /**
* Redirects the browser to a given URL. Note that the underlying
mechanism for redirects is to
* throw a ResponseShortcutException, so if you're doing the redirect
within a try/catch block,
diff --git
a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
---
a/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
+++
b/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala
@@ -156,10 +156,10 @@ trait MetaMegaProtoUser[ModelType :
MegaProtoUser[ModelType]] extends KeyedMeta
 loggedIn_? _,
 () = {
   import net.liftweb.http.{RedirectWithState, RedirectState}
-  val uri = S.uri
+  val uri = S.uriAndQueryString
   RedirectWithState(
 loginPageURL,
-RedirectState( ()={loginRedirect.set(Full(uri))})
+RedirectState( ()={loginRedirect.set(uri)})
   )
 }
   )


 Thanks!

 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 7:59 PM, Naftoli Gugenheim naftoli...@gmail.com
 wrote:

 
  Could someone fix #121 (loginRedirect using S.uri; not getting part after
  '?')
 

 I've got a fix for this on review board.  It'd be ideal if you could build
 dpp_issue_121 and insure that it does what you want.


 
  -
  David Pollakfeeder.of.the.be...@gmail.com wrote:
 
  On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.com
  wrote:
 
   Folks,
  
   may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from
 that?
   (It'd eliminate the potential problems of synchronizing on a
 master/HEAD
   freeze)
 
 
  And it makes it more complex to figure out what to merge off master,
 please
  it means that testing against SNAPSHOT isn't testing against what will be
  in
  M7.
 
 
  
  
   On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
   feeder.of.the.be...@gmail.com wrote:
  
   Folks,
  
   We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
   4th.
  
   We would like to release M7 against Scala 2.7.7 final if EPFL's
 schedule
   can accommodate this.
  
   We are going into code-slush on Thursday October 29th (this means
 we're
   not going to make material changes to the codebase unless it's to fix
 a
   material bug).
  
   Please post any blocking defects to this list (with links to the
  ticket).
   We'll endeavor to close any of these defects this week.
  
   If you're a production site running against M6 and planning to upgrade
  to
   M7, please start testing as soon as possible so we can get fixes into
 M7
   sooner rather than later.
  
   Thanks,
  
   David
  
  
   --
   Lift, the simply functional web framework http://liftweb.net
   Beginning Scala http://www.apress.com/book/view/1430219890
   Follow me: http://twitter.com/dpp
   Surf the harmonics
  
  
  
  
  
   --
   Viktor Klang
   | A complex system that works is invariably
   | found to have evolved from a simple system
   | that worked. - John Gall
  
   Blog: klangism.blogspot.com
   Twttr: viktorklang
   Code: github.com/viktorklang
  
  
   
  
 
 
  --
  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
 
 
 
  
 


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



 



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

[Lift] The value is missing when i use the DatePicker to post data to the Server ?

2009-10-27 Thread Neil.Lv

Hi all,

   I use the datepicker to chose the date, and the value is missing
when posted to the server.

1:
   This is some code:

###   In the model
object date_time extends MappedDateTime(this) {
final val dateFormat =
  DateFormat.getDateInstance(DateFormat.SHORT)
override def asHtml = Text(dateFormat.format(is))
  }
  ...

   bind(e, form,
 date_time - text(, date = _) % (size - 10) % (id -
 entrydate),
 submit - submit(S.??(add), checkAndSave))
###

###   in the html page
  head
 .
   head
   tr
  tddate_time:/td
  tde:date_time eid=entrydate live:maxlength=10date_time/
e:date_time/td
/tr
  ...

  script type=text/javascript
$(function() {
  $('#entrydate').datepicker({dateFormat:'yy/mm/dd'});
});
  /script
###

  When the submit button clicked, the date_time doesn't have the
value .  --text(, date = _)
###
  date_time - text(, date = _) % (size - 10) % (id -
entrydate),
###

 2: I want to save the date_time into the database and the format is
like this,  2009-10-27 13:38:11,

but the DatePicker only contains the date not the time, How can i
achieve this purpose ?


###
object created_at extends MappedDateTime(this) {
override def defaultValue = new Date()
}
###

   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] Missing comm when use the Text in the model, Update version to M7 ?

2009-10-27 Thread Neil.Lv

Hi all,

   How can i update my app to M7 version ?

   My app 's current version is 1.1-M6 .

   If i update the version whether the app will be broken ?

   Thanks very much!

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: Missing comm when use the Text in the model, Update version to M7 ?

2009-10-27 Thread David Pollak
On Tue, Oct 27, 2009 at 7:52 PM, Neil.Lv anim...@gmail.com wrote:


 Hi all,

   How can i update my app to M7 version ?


M7 is not released.  You can try your app on 1.1-SNAPSHOT by updating your
pom.xml file and changing 1.1-M6 to 1.1-SNAPSHOT and adding:

repository
idscala-tools.org.snapshots/id
nameScala-Tools Maven2 Repository for Snapshots/name
urlhttp://scala-tools.org/repo-snapshots/url
snapshots/
/repository


to the repositories/ tag.



   My app 's current version is 1.1-M6 .

   If i update the version whether the app will be broken ?


You will have to update any Actor code and also make sure you do import
net.liftweb.common._ in all your Scala files.



   Thanks very much!

 Cheers,
  Neil

 



-- 
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 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: Loc questions

2009-10-27 Thread David Pollak
createLink returns an Option[NodeSeq].

The reason for it is that the Scala XML literals do very well with
Option[NodeSeq]:

a href={Some(Text(/foo/bar))}/ // a href=/foo/bar/

a href={None}/ // a/

I'm cool with a helper method that returns a Box[String] or something that
would otherwise be more flexible elsewhere.

On Tue, Oct 27, 2009 at 4:43 PM, Kris Nuttycombe
kris.nuttyco...@gmail.comwrote:


 I'm somewhat puzzled by the signature of Loc.Link.createLink -
 principally by the fact that it returns Box[NodeSeq] instead of some
 more path-like object. Due to having this signature, you can't simply
 override createLink to create an actual link (the way it's used by
 SiteMap inhibits this). Instead, it returns a path-like string wrapped
 in a Text in its default implementation. This seems like a
 not-very-useful thing to return; you can't use it in an SHtml.a or
 SHtml.link call without unwrapping it and the type system doesn't help
 you at all (Box[NodeSeq] is definitely *not* the meaning of those
 bytes).

 Is there any better path-like construct that a Link could be
 constructed around? Do people have their own Link implementations, or
 is the Link class mostly used internally (such that its api could be
 change to represent something path-link instead of xml-like?)

 Kris

 



-- 
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 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: Firefox issue with ajaxSelectObj and page refresh

2009-10-27 Thread David Pollak
On Tue, Oct 27, 2009 at 4:02 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


 On Tue, Oct 27, 2009 at 10:59 PM, Jeppe Nejsum Madsen je...@ingolfs.dk
 wrote:
  David Pollak feeder.of.the.be...@gmail.com writes:
 
  What's the JavaScript to force the correct item to be selected?  I think
 we
  could append the JavaScript to the ajaxSelectObj to force the right
 thing to
  happen.
 
  For jQuery, something like $(#dropdown).val(2); should work. But the
  issue is that it should (ideally) only be done whenever the page is
  refreshed, not on initial load where everything works. Dunno if hurts to
  always force the selection.
 
  /Jeppe

 I tried to see if I could hack a POC for this, but I failed to see how
 I can get the id's of the options that are generated by ajaxSelect.
 This makes it hard to manipulate  client side :-)


If you can write the JavaScript for a normal select (one where you know
the values), I can do the rest.  I'm thinking that we have a script that
comes with the select itself that, on load, sets the select to the right
value.



 /Jeppe

 



-- 
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 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: Register new StatefulSnippet

2009-10-27 Thread David Pollak
I opened a ticket for this.  I'll expose functionality so you can register
stateful snippets as part of the request process.

On Sun, Oct 25, 2009 at 1:09 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 This may be more of a feature request than a question.
 I generally use StatefulSnippets rather than RequestVars. I have several
 places in my Lift webapp where one should be redirected to a screen managed
 by a StatefulSnippet. Until recently I thought it would suffice to use
 S.mapSnippet to map the StatefulSnippet's method as a function.
 However, this approach has two shortcomings: (1) If the page uses multiple
 snippet methods it become tedious to write mapSnippet for each one. (2)
 Since the snippet can't be registered because it can only get a snippetName
 via private[http] API, any stateful links, redirects, or submits don't work.
 Of course a workaround may be custom replacement methods on the snippet that
 use multiple mapSnippets rather than registerThisSnippet, but again this can
 become tedious.
 Would it be possible to create a public API either to assign a snippet its
 name so it can be registered, or to retreive a snippet by name? Or better
 yet, assign its name in its constructor or the first time
 registerThisSnippet etc. is called?

 



-- 
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 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: maintaining logged in user longer outside of SessionVar

2009-10-27 Thread David Pollak
On Wed, Oct 21, 2009 at 2:44 PM, harryh har...@gmail.com wrote:


  It's going to load the user for each stateful request.

 What do you mean by a stateful request?

  I guess we can change it up to make the load lazy so it'll only happen in
 the requestvar is
  actually accessed.  Does that sould reasonable?

 If that makes it so I don't hit the database when loading static
 files, then yes.


btw... all the stuff related to serving css, etc. is done outside of the
user session state.  This is in SNAPSHOT.  Please give it a whirl and make
sure it's suiting your needs.



 -harryh
 



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



[Lift] Re: The value is missing when i use the DatePicker to post data to the Server ?

2009-10-27 Thread Neil.Lv


  I print the S.attr and get something like this:  ...Left(form)..
  println(S.attr)

  And how can i get the form value from the form that posted to the
server.

  I can't get the date_time value via the DatePicker.

  Thanks for any help!

Cheers,
  Neil


On Oct 28, 9:17 am, Neil.Lv anim...@gmail.com wrote:
 Hi all,

I use the datepicker to chose the date, and the value is missing
 when posted to the server.

 1:
This is some code:

 ###   In the model
 object date_time extends MappedDateTime(this) {
 final val dateFormat =
   DateFormat.getDateInstance(DateFormat.SHORT)
 override def asHtml = Text(dateFormat.format(is))
   }
   ...

bind(e, form,
  date_time - text(, date = _) % (size - 10) % (id - 
 entrydate),

  submit - submit(S.??(add), checkAndSave))
 ###

 ###   in the html page
   head
  .
head
tr
   tddate_time:/td
   tde:date_time eid=entrydate live:maxlength=10date_time/
 e:date_time/td
 /tr
   ...

   script type=text/javascript
 $(function() {
   $('#entrydate').datepicker({dateFormat:'yy/mm/dd'});
 });
   /script
 ###

   When the submit button clicked, the date_time doesn't have the
 value .  --text(, date = _)
 ###
   date_time - text(, date = _) % (size - 10) % (id -
 entrydate),
 ###

  2: I want to save the date_time into the database and the format is
 like this,  2009-10-27 13:38:11,

 but the DatePicker only contains the date not the time, How can i
 achieve this purpose ?

 ###
 object created_at extends MappedDateTime(this) {
 override def defaultValue = new Date()
 }
 ###

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: The value is missing when i use the DatePicker to post data to the Server ?

2009-10-27 Thread Naftoli Gugenheim

I think you want S.param, not S.attr.
Is the form being submitted via GET? What do you see in the URL string? Look 
first at the HTML source to see the name attribute generated by Lift--it's 
different each time.

-
Neil.Lvanim...@gmail.com wrote:



  I print the S.attr and get something like this:  ...Left(form)..
  println(S.attr)

  And how can i get the form value from the form that posted to the
server.

  I can't get the date_time value via the DatePicker.

  Thanks for any help!

Cheers,
  Neil


On Oct 28, 9:17 am, Neil.Lv anim...@gmail.com wrote:
 Hi all,

I use the datepicker to chose the date, and the value is missing
 when posted to the server.

 1:
This is some code:

 ###   In the model
 object date_time extends MappedDateTime(this) {
 final val dateFormat =
   DateFormat.getDateInstance(DateFormat.SHORT)
 override def asHtml = Text(dateFormat.format(is))
   }
   ...

bind(e, form,
  date_time - text(, date = _) % (size - 10) % (id - 
 entrydate),

  submit - submit(S.??(add), checkAndSave))
 ###

 ###   in the html page
   head
  .
head
tr
   tddate_time:/td
   tde:date_time eid=entrydate live:maxlength=10date_time/
 e:date_time/td
 /tr
   ...

   script type=text/javascript
 $(function() {
   $('#entrydate').datepicker({dateFormat:'yy/mm/dd'});
 });
   /script
 ###

   When the submit button clicked, the date_time doesn't have the
 value .  --text(, date = _)
 ###
   date_time - text(, date = _) % (size - 10) % (id -
 entrydate),
 ###

  2: I want to save the date_time into the database and the format is
 like this,  2009-10-27 13:38:11,

 but the DatePicker only contains the date not the time, How can i
 achieve this purpose ?

 ###
 object created_at extends MappedDateTime(this) {
 override def defaultValue = new Date()
 }
 ###

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: The value is missing when i use the DatePicker to post data to the Server ?

2009-10-27 Thread Neil.Lv

  And the date_time's value is always
date_time=Thu, 1 Jan 1970 00:00:00 UTC,

  Thanks very much!

Cheers,
  Neil

On Oct 28, 12:27 pm, Neil.Lv anim...@gmail.com wrote:
   I print the S.attr and get something like this:  ...Left(form)..
   println(S.attr)

   And how can i get the form value from the form that posted to the
 server.

   I can't get the date_time value via the DatePicker.

   Thanks for any help!

 Cheers,
   Neil

 On Oct 28, 9:17 am, Neil.Lv anim...@gmail.com wrote:

  Hi all,

 I use the datepicker to chose the date, and the value is missing
  when posted to the server.

  1:
 This is some code:

  ###   In the model
  object date_time extends MappedDateTime(this) {
  final val dateFormat =
DateFormat.getDateInstance(DateFormat.SHORT)
  override def asHtml = Text(dateFormat.format(is))
}
...

 bind(e, form,
   date_time - text(, date = _) % (size - 10) % (id - 
  entrydate),

   submit - submit(S.??(add), checkAndSave))
  ###

  ###   in the html page
head
   .
 head
 tr
tddate_time:/td
tde:date_time eid=entrydate live:maxlength=10date_time/
  e:date_time/td
  /tr
...

script type=text/javascript
  $(function() {
$('#entrydate').datepicker({dateFormat:'yy/mm/dd'});
  });
/script
  ###

When the submit button clicked, the date_time doesn't have the
  value .  --text(, date = _)
  ###
date_time - text(, date = _) % (size - 10) % (id -
  entrydate),
  ###

   2: I want to save the date_time into the database and the format is
  like this,  2009-10-27 13:38:11,

  but the DatePicker only contains the date not the time, How can i
  achieve this purpose ?

  ###
  object created_at extends MappedDateTime(this) {
  override def defaultValue = new Date()
  }
  ###

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