[Lift] Re: Can lift strip all the leading and trailing blank characters?

2010-01-10 Thread Marius
Could you please open a defect here? http://github.com/dpp/liftweb/issues Br's, Marius On Jan 10, 5:15 am, daiwhea daiw...@gmail.com wrote: I saw the html source generated by the lift both in dev and production mode, there are many leading and trailing blank characters and new lines. Is it

[Lift] Re: Is this correct way to handle RESTful like URL in Lift Framework?

2010-01-10 Thread Marius
Or you could use something like if you'r building REST API's: LiftRules.dispatch.append { case Req(test :: _, suffix, reqType) = // return a () = LiftResponse } or for non REST API you could use LiftRules.statefulRewrite.append { case RewriteRequest(ParsePath(test :: _, _, _, _), reqType,

[Lift] JNDI error when switching to M8 ?

2010-01-10 Thread Neil.Lv
Hi all, There is a problem that i switch the M7 to M8, the JNDI is error. I didn't change anything before moving M7 to M8. It seems that the Lift looks for the lift ConnectionIdentifier not the OneDB or TwoDB. ### java.lang.NullPointerException: Looking for Connection Identifier

[Lift] Re: Can lift strip all the leading and trailing blank characters?

2010-01-10 Thread daiwhea
Here it is. http://github.com/dpp/liftweb/issues/#issue/278 Thanks *_* On Jan 10, 4:43 pm, Marius marius.dan...@gmail.com wrote: Could you please open a defect here?http://github.com/dpp/liftweb/issues Br's, Marius On Jan 10, 5:15 am, daiwhea daiw...@gmail.com wrote: I saw the html

Re: [Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Adam Warski
Hello, thanks, but my use-case is a bit different. I want the whole form to be still submitted using a POST (the normal way), and only use ajax for a small fragment of the page (the element editor). So I can't use ajaxForm(...), as this would make all submit buttons use ajax. Adam On Jan 9,

Re: [Lift] Re: Can lift strip all the leading and trailing blank characters?

2010-01-10 Thread Timothy Perrett
Marius, I dont mean to butt in, but this has been discussed on the list before and DPP rejected it as a requirement because of the performance impact it would have on lifts rendering pipeline? Either way, I would say this is a feature request, not a defect ;-) Cheers, Tim On 10 Jan 2010, at

[Lift] Re: Is this correct way to handle RESTful like URL in Lift Framework?

2010-01-10 Thread Brian Hsu
Thanks for your reply, But I would like them combine with Menu tightly, so I could setup them only in my Model, just like CRUDify trait. In the end, I created a Loc subclass myself, and use it to handle all the rewrite stuff, it seems works pretty well and make thing much simpler (at least for

[Lift] Re: Is this correct way to handle RESTful like URL in Lift Framework?

2010-01-10 Thread Marius
You can use LiftRules.statelessRewrite which is processed very early before the SiteMap comes into the picture. Hence you can rewrite at this level. LiftRules.statefulRewrite is processed a little later on (but you have full S context) but still before SiteMap is processed. If this doesn't fit

Re: [Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Adam Warski
There is also a related problem: how can I have two ajax buttons on one form which submit the form and execute different functions on the server? Using the standard trick: SHtml.ajaxForm(bind(...) ++ SHtml.hidden(submitFunction)) won't work, as I want different functions executed for different

[Lift] Re: Can lift strip all the leading and trailing blank characters?

2010-01-10 Thread Marius
No problem Tim, thanks for reminding me. Either way I think having the issue there (defect OR feature doesn't really matter) is good for tracking purposes that people would like to see this in. If this will be fixed or rejected is a different story IMO. Br's, Marius On Jan 10, 11:46 am, Timothy

[Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Marius
The ajax buttons doesn't have to be inside the form if you use SHtml.submitAjaxForm(form_ID) button onclick={SHtml.submitAjaxForm(form_ID).toJsCmd}blah/button Br's, Marius On Jan 10, 1:08 pm, Adam Warski a...@warski.org wrote: There is also a related problem: how can I have two ajax buttons

Re: [Lift] Mapper: Hook into owner lifecycle from field

2010-01-10 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim naftoli...@gmail.com writes: How would this be implemented in terms of database table structure? Something like this: CREATE TABLE person (name VARCHAR(20) , id BIGINT NOT NULL AUTO_INCREMENT) CREATE TABLE address (id BIGINT NOT NULL AUTO_INCREMENT , street VARCHAR(20) ,

Re: [Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Adam Warski
right, I wrote about that in my original post, but how can I execute a button-specific method on the server-side? Thanks, Adam On Jan 10, 2010, at 12:15 PM, Marius wrote: The ajax buttons doesn't have to be inside the form if you use SHtml.submitAjaxForm(form_ID) button

[Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Marius
Well you could have a hidden for field containing some information about the submitter, thus when you click the button you first set the value of the hidden field and then call submitAjaxForm Or Try: ajaxButton(Press me would ya'?, SHtml.submitAjaxForm (form_ID).toJsCmd, (some) = { do your

[Lift] Re: JNDI error when switching to M8 ?

2010-01-10 Thread Neil.Lv
Here is the test code . g...@github.com:anim510/two_db_demo.git It works fine when using only one database, it failed when using two db connection. Thanks.! Cheers, Neil On Jan 10, 5:04 pm, Neil.Lv anim...@gmail.com wrote: Hi all,    There is a problem that i switch the M7 to

Re: [Lift] Lift WebKit 1.1-M8 - broken mvn site

2010-01-10 Thread David Bernard
The version of yuicompressor-maven-plugin used is not compatible with openjdk. (see mailing list archive). On Sat, Jan 9, 2010 at 21:06, Jaroslaw Zabiello hipertrac...@gmail.com wrote: $ uname -a Linux Ubuntu-904-jaunty-64-minimal 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009

Re: [Lift] Re: Lift Modules 1.1-M8 broken mvn site

2010-01-10 Thread JAZ
On Sat, Jan 9, 2010 at 8:55 PM, David Pollak feeder.of.the.be...@gmail.com wrote: There is a known issue with the openjdk and the YUI compressor library.  If it's possible for you to try the Sun JDK, I think things should work. There is no problem in Mac OS-X 10.6.2, but it is in Ubuntu (I

Re: [Lift] Re: Lift Modules 1.1-M8 broken mvn site

2010-01-10 Thread Indrajit Raychaudhuri
Hmm, scala:doc doesn't like this. Please do a mvn clean before doing the site generation. mvn clean site should work. Cheers, Indrajit On 10/01/10 8:11 PM, JAZ wrote: On Sat, Jan 9, 2010 at 8:55 PM, David Pollak feeder.of.the.be...@gmail.com wrote: There is a known issue with the openjdk

Re: [Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Adam Warski
Hello, ajaxButton(Press me would ya'?, SHtml.submitAjaxForm (form_ID).toJsCmd, (some) = { do your stuff here }) Looking at the source code I think this might work, but I'm having trouble constructing the correct expression to pass to ajaxButton. The method signature requires a Call

[Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Marius
On Jan 10, 5:20 pm, Adam Warski a...@warski.org wrote: Hello, ajaxButton(Press me would ya'?, SHtml.submitAjaxForm (form_ID).toJsCmd, (some) = { do your stuff here }) Looking at the source code I think this might work, but I'm having trouble constructing the correct expression to

[Lift] Re: Lift and Akka Actors in comparison?

2010-01-10 Thread greekscala
Hello, I read only little about AKKA, but I read that the Lift Actors are now decopled and you can use AKKA Actors or Scala Actors as implementation. with best regards On 9 Jan., 08:48, Franz Bettag fr...@bett.ag wrote: Hey guys, i was wondering if i can implement a real distributed

[Lift] Re: Ajax button + submitting a form

2010-01-10 Thread Marius
Sorry I think the syntax would be (I haven't tested it though): button onclick={((JqId(hidden_field_id) JqAttr(value, add)) SHtml.submitAjaxForm(form_ID)).toJsCmd}add/button button onclick={((JqId(hidden_field_id) JqAttr(value, edit)) SHtml.submitAjaxForm(form_ID)).toJsCmd}edit/button

[Lift] Code generation plugin for SBT

2010-01-10 Thread Timothy Perrett
Hi all, I've started a little project to add code-generation to SBT and I would like to hear from anyone who wants to collaborate (and has time to). This could be very important for the lift community, and my aim is to make something like thus: generate lift snippet WhateverName where

[Lift] Re: what provides classpath/jquery.js?

2010-01-10 Thread Alex Black
Hi Marius, I haven't heard of ResourceServer before, sounds interesting. Right now, our CSS and JS files are just in subfolders of webapp, e.g src/main/webapp/js, what are the advantages of (or reasons behind) putting js files in resources? - Alex On Jan 9, 3:04 am, Marius

Re: [Lift] Re: what provides classpath/jquery.js?

2010-01-10 Thread Alex Boisvert
One reason is to bundle html/js/... along with their corresponding snippet in a jar file. Alex On Jan 10, 2010 3:34 PM, Alex Black a...@alexblack.ca wrote: Hi Marius, I haven't heard of ResourceServer before, sounds interesting. Right now, our CSS and JS files are just in subfolders of webapp,

[Lift] Re: what provides classpath/jquery.js?

2010-01-10 Thread Alex Black
hmm. We just upload a single WAR file to our server, its got everything in it including JS etc. On Jan 10, 5:16 pm, Alex Boisvert alex.boisv...@gmail.com wrote: One reason is to bundle html/js/... along with their corresponding snippet in a jar file. Alex On Jan 10, 2010 3:34 PM, Alex

Re: [Lift] Re: what provides classpath/jquery.js?

2010-01-10 Thread Alex Boisvert
Understood. I was referring to reusable snippets (e.g., flot widgets). For your own apps, I can't think of a good reason right now. Alex On Jan 10, 2010 4:18 PM, Alex Black a...@alexblack.ca wrote: hmm. We just upload a single WAR file to our server, its got everything in it including JS

[Lift] Re: Parcing Json

2010-01-10 Thread Randinn
Forgive my ignorance but I was wondering why (json \ observations).extract[Observation], is it to save as a flat file? On Jan 4, 7:13 am, Randinn rand...@gmail.com wrote: I tried some of the changes you made but not all of them, and (json\ observations).extract[Observation], I had no idea about

[Lift] Re: Parcing Json

2010-01-10 Thread Randinn
I should explain what we are planning, the idea is to get the json file into a string, parse it and save the caught information into a Observation map. On Jan 11, 11:23 am, Randinn rand...@gmail.com wrote: Forgive my ignorance but I was wondering why (json \ observations).extract[Observation],

[Lift] LiftRules organization

2010-01-10 Thread Naftoli Gugenheim
A while ago I started working on having separate parsers and formatters in LiftRules for date, date-time, and time values. These could then be used by Mapped(Date)(Time). I would like to continue working on it, and I would appreciate feedback on the following point. Marius pointed out that it

[Lift] Re: Parcing Json

2010-01-10 Thread Joni Freeman
Hi, I'm sorry but I'm not totally sure what you are trying to accomplish. What would be the key in that map and what would be its values? Cheers Joni On 11 tammi, 03:14, Randinn rand...@gmail.com wrote: I should explain what we are planning, the idea is to get the json file into a string,