[Lift] Re: Overriding binding of numbers?

2009-10-30 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim naftoli...@gmail.com writes: Is there already a BindParam implicit for String - Double? Because if not maybe you can create one. No there isn't, but I also need Int for which there is one, so probably my attempt is futile. I've solved it for now with a BindNumber method,

[Lift] Re: How to hidden the Menu Loc? This hidden attr doesn't work!

2009-10-30 Thread Jeppe Nejsum Madsen
Neil.Lv anim...@gmail.com writes: Hi all, I have a question about the Loc , and How to hidden the Menu if the user is not a superuser ? The code is : The Edit book 1 always shows in the home page if the user doesn't login. The Edit book 2 doesn't work both login in or

[Lift] Re: How to hidden the Menu Loc? This hidden attr doesn't work!

2009-10-30 Thread Neil.Lv
Does anybody know that how to hidden a Menu when the user is not logged in ? :) Cheers, Neil On Oct 30, 10:57 am, Neil.Lv anim...@gmail.com wrote: It doesn't work too. I use this code and the false maybe doesn't work yet, it always shows on the home page. If i don't add this

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Jeppe Nejsum Madsen
Xuefeng Wu ben...@gmail.com writes: Or can I register ajax event at server side? On Oct 30, 10:24 am, Xuefeng Wu ben...@gmail.com wrote: Hi, There're many ajax* control in SHtml such as ajaxButton and they can call server function by 'liftAjax.lift_ajaxHandler (F900890988391MRF=true,

[Lift] Re: How to hidden the Menu Loc? This hidden attr doesn't work!

2009-10-30 Thread Neil.Lv
Thanks Jeppe , it works now! I have a question about that how to use Link in the Loc to achieve this purpose ? - Link(List(edit_book), false, /book/edit_book) doesn't work. ### Menu(Loc(addBk2, Link(List(edit_book), false, /book/ edit_book),Edit book)) :: ### Cheers, Neil On Oct

[Lift] 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread Troy Noble
We are using Mapper with a legacy database with many columns that we are not allowed to rename in our database. For example CREATE_DATE for which we created the following seemingly simple mapped field in our model: object createDate extends MappedDateTime(this) { override def dbColumnName

[Lift] Re: Proposal : Lift ticketing system

2009-10-30 Thread Francois
On 29/10/2009 15:07, george wrote: The things I find really useful in redmine are: [...] - the git integration. For what it worth, Redmine + git + gitosis is my forge of choice nowaday, for internal needs. --~--~-~--~~~---~--~~ You received this message

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Xuefeng Wu
Sorry, Could you demo this? On Oct 30, 3:10 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Xuefeng Wu ben...@gmail.com writes: Or can I register   ajax event at server side? On Oct 30, 10:24 am, Xuefeng Wu ben...@gmail.com wrote: Hi, There're many ajax* control in SHtml such as

[Lift] Re: The plugin 'org.apache.maven.plugins:maven-scala-plugin' does not exist

2009-10-30 Thread Timothy Perrett
Indrajit, I found out what the problem is. I always run: mvn clean install scala:doc this fails with the new setup, where as: mvn clean install works no problem. Can you please configure the pom.xml so that its possible to run documentation from the root... its a pain in the ass to have

[Lift] Re: 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread David Pollak
On Thu, Oct 29, 2009 at 10:15 PM, Troy Noble econop...@gmail.com wrote: We are using Mapper with a legacy database with many columns that we are not allowed to rename in our database. For example CREATE_DATE for which we created the following seemingly simple mapped field in our model:

[Lift] Re: Overriding binding of numbers?

2009-10-30 Thread David Pollak
I would do something like: class NumberFormatter(number: Double) { def f: NodeSeq = ... } implicit def dToNF(in: Double): NumberFormatter = new NumberFormatter(in) bind(lc, in, avg_tco - res.filteredResult(lc).avgTCO.f) Thanks, David On Thu, Oct 29, 2009 at 7:12 AM, Jeppe Nejsum Madsen

[Lift] RSS Library

2009-10-30 Thread GA
Hello guys, is there any standard RSS Library to parse RSS and Atom feeds from a scala client? Thanks in advance, GA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send

[Lift] Error with the SHtml.select method ?

2009-10-30 Thread Neil.Lv
Hi all, There is a question that about the SHtml.select method. ### This code will be error ? def handleBook(id: String) { book.type_id(id.toLong) //Log.infoF _ } bind(book, xhtml, type - select(Book.getBooks, Empty, handleBook _) ... ) ### If i call the

[Lift] Re: The plugin 'org.apache.maven.plugins:maven-scala-plugin' does not exist

2009-10-30 Thread Indrajit Raychaudhuri
Tim, Got it! I'll try to fix this and post it in few hours. Committers, is it possible to make an exception to the cut off date for the M7 for this one? Cheers, Indrajit On 30/10/09 4:16 PM, Timothy Perrett wrote: Indrajit, I found out what the problem is. I always run: mvn clean

[Lift] Re: RSS Library

2009-10-30 Thread bob
i don't know if there's a specific RSS library for scala, but you can get pretty far with the builtin XML parsing stuff. this is the best resource I have found. http://burak.emir.googlepages.com/scalaxbook.docbk.html for the HTTP client, I am using DataBinder Dispatch:

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread bob
interesting! have you tried /* Log.infoF _ */ ? On Oct 30, 10:31 am, Neil.Lv anim...@gmail.com wrote: Hi all,   There is a question that about the SHtml.select method. ###  This code will be error ?   def handleBook(id: String) {      book.type_id(id.toLong)       //Log.infoF _    }  

[Lift] Re: AutoComplete, but optional

2009-10-30 Thread Trav
My solution was to copy and paste the AutoComplete code and remove the use of the hidden field. The hidden field was what was being used as the form value and it was only updated when the value typed and/or selected was one of the autocomplete values. Removing the hidden field still allows the

[Lift] Re: 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread Troy Noble
Certainly. I will open a ticket. I might have found 3 different issues... (one each for Mapper, schemify, CRUDify) all related to dbColumnName (see details below). I created a new scaled down project against 1.1-SNAPSHOT and an embedded Derby database, and it exhibits the Mapper dbColumnName

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Xuefeng Wu
I want call function on the server side form client. such as: HTML client: $.(#myLink).click(function{ //call server function }); Server side: def myFunction() :JsCmd = { JsRaw(alert(Ah~ you could call me from client directly!)) } On Oct 30, 3:10 pm, Jeppe Nejsum Madsen je...@ingolfs.dk

[Lift] Re: Tablesorter and Ajax/Comet

2009-10-30 Thread Tom Fiedler
i found the solution myself, it's easy once you know it, but i share it anyway since it might be usefull for noobs like myself: in order to get the tablesorter to work after you update your table you need to re-call the (#table).tablesorter() method. so my update-function inside my cometactor

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Xuefeng Wu
I want call function on the server side form client. such as: HTML client: $.(#myLink).click(function{ //call server function }); Server side: def myFunction() :JsCmd = { JsRaw(alert(Ah~ you could call me from client directly!)) } On Oct 30, 3:10 pm, Jeppe Nejsum Madsen

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread Neil.Lv
Yes, i have tries it. ### it works ! def handleBook(id: String) { book.type_id(id.toLong) Log.infoF _ } ### ### it doesn't work ! def handleBook(id: String) { book.type_id(id.toLong) // Log.infoF _ } ### I'm confused with this ! :) Cheers, Neil On Oct

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread David Pollak
Please post a complete example (a whole project that can be compiled). Your handleBook method is returning Unit, so anything at the end of the method (other than a var/val declaration) should be okay. On Fri, Oct 30, 2009 at 8:28 AM, Neil.Lv anim...@gmail.com wrote: Yes, i have tries it.

[Lift] Re: The plugin 'org.apache.maven.plugins:maven-scala-plugin' does not exist

2009-10-30 Thread David Pollak
On Fri, Oct 30, 2009 at 7:44 AM, Indrajit Raychaudhuri indraj...@gmail.comwrote: Tim, Got it! I'll try to fix this and post it in few hours. Committers, is it possible to make an exception to the cut off date for the M7 for this one? We're in code slush which means that code can be

[Lift] Re: The plugin 'org.apache.maven.plugins:maven-scala-plugin' does not exist

2009-10-30 Thread Indrajit Raychaudhuri
Found it! Looks like build plugin settings aren't picked up from reporting plugin settings unless that appears in buildplugin//build. This hurts :( Workaround coming up. Not a good one but should work. I'll investigate a cleaner fix/workaround at a later point. Cheers, Indrajit On 30/10/09

[Lift] SHtml.ajaxForm postSubmit addition?

2009-10-30 Thread Derek Chen-Becker
Hi, I'm working on a simple mixin trait that you can add to a MappedField to make it editable AJAX-style (like how Review Board does it). My first approach is to use an ajaxButton to allow the user to edit the field, and then use ajaxForm to handle submission of the data back so that the

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread Neil.Lv
Thanks David, it works now, it return the param that passed into the handleBook method. ### it works! def handleBook(id: String) { book.type_id(id.toLong) id } ### Cheers, Neil On Oct 30, 11:34 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Please post a complete

[Lift] Re: SHtml.ajaxForm postSubmit addition?

2009-10-30 Thread David Pollak
Sounds like a good idea. On Fri, Oct 30, 2009 at 10:03 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Hi, I'm working on a simple mixin trait that you can add to a MappedField to make it editable AJAX-style (like how Review Board does it). My first approach is to use an ajaxButton to

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread Naftoli Gugenheim
What is book.type_id? And are you sure there's no '=' before '{'? - David Pollakfeeder.of.the.be...@gmail.com wrote: On Fri, Oct 30, 2009 at 10:28 AM, Neil.Lv anim...@gmail.com wrote: Thanks David, it works now, it return the param that passed into the

[Lift] Re: Get the subfolders and all the files in the Directory in the Lift ?

2009-10-30 Thread bob
i had call to do something similar, and here's the code. i'm sure someone smarter could replace the for comprehension with filter().map () def getPaths(prefix : String) : Set[String] = { // Resource Paths as an Array[Object] var jpaths =

[Lift] Re: Get the subfolders and all the files in the Directory in the Lift ?

2009-10-30 Thread bob
when moved the file from /resources/foo.xml to /foo.xml (in the same path as index.html), it now finds it. i guess getResourcePaths() and getResourceAsStream() don't necessarily look in the same place. On Oct 30, 1:58 pm, bob rbpas...@gmail.com wrote: i had call to do something similar, and

[Lift] Re: Register new StatefulSnippet

2009-10-30 Thread Naftoli Gugenheim
Hi. I tried the new functionality. Step 1 works: In my edit client link function I call S.setSnippetForClass(Clients, editSnippet) and it brings up the page, using the correct snippet. Now the editing page has a submit button, Duplicate, which for testing purposes I commented out its function

[Lift] Re: Register new StatefulSnippet

2009-10-30 Thread David Pollak
File a ticket with a code sample. On Fri, Oct 30, 2009 at 11:03 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: Hi. I tried the new functionality. Step 1 works: In my edit client link function I call S.setSnippetForClass(Clients, editSnippet) and it brings up the page, using the correct

[Lift] Re: 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread Marcin Mielżyński
I have seen EXACTLY same behavior when dbColumnName returned _upcased_ names lopex --~--~-~--~~~---~--~~ 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

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread Neil.Lv
Thank you very much! Both of them works! Maybe i forget the = ### def handleBook(id: String) { book.type_id(id.toLong) id } ### def handleBook(id: String) = book.type_id(id.toLong) ### Cheers, Neil On Oct 31, 1:47 am, Naftoli Gugenheim naftoli...@gmail.com wrote:

[Lift] Re: Error with the SHtml.select method ?

2009-10-30 Thread David Pollak
Please send a complete example of how it failed. On Fri, Oct 30, 2009 at 11:22 AM, Neil.Lv anim...@gmail.com wrote: Thank you very much! Both of them works! Maybe i forget the = ### def handleBook(id: String) { book.type_id(id.toLong) id } ### def handleBook(id:

[Lift] Re: Get the subfolders and all the files in the Directory in the Lift ?

2009-10-30 Thread Neil.Lv
bob, Thank you very much, i will be try it. :) Cheers, Neil On Oct 31, 2:03 am, bob rbpas...@gmail.com wrote: when moved the file from /resources/foo.xml to /foo.xml  (in the same path as index.html), it now finds it. i guess getResourcePaths() and getResourceAsStream() don't

[Lift] Re: Register new StatefulSnippet

2009-10-30 Thread Naftoli Gugenheim
Do you need a complete project? On Fri, Oct 30, 2009 at 2:09 PM, David Pollak feeder.of.the.be...@gmail.com wrote: File a ticket with a code sample. On Fri, Oct 30, 2009 at 11:03 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: Hi. I tried the new functionality. Step 1 works: In my

[Lift] cucumber + webrat with Lift (switch off auto generation of name/id attrs)

2009-10-30 Thread ben
Hi, I love how Lift generates name/id attributes on form values - its a great security feature. But it does tend to make acceptance frameworks like cucumber+webrat impossible to use. For those not familar with cucumber+webrat, it is an acceptance framework for testing, amongst other things,

[Lift] Re: cucumber + webrat with Lift (switch off auto generation of name/id attrs)

2009-10-30 Thread Naftoli Gugenheim
Can't you go by input id instead of input name? You can use the _id_ arrow to set the bind name as the id Template: pre:label / Snippet: bind(pre, xhtml, label _id_SHtml.text( ... ) ) Should produce input id=label ... / On Fri, Oct 30, 2009 at 3:00 PM, ben b...@primrose.org.uk wrote: Hi,

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Jeppe Nejsum Madsen
Xuefeng Wu ben...@gmail.com writes: I want call function on the server side form client. such as: HTML client: $.(#myLink).click(function{ //call server function }); Server side: def myFunction() :JsCmd = { JsRaw(alert(Ah~ you could call me from client directly!)) } It looks

[Lift] Re: SHtml.ajaxForm postSubmit addition?

2009-10-30 Thread Derek Chen-Becker
I'll open a ticket and start working on the issue. Derek On Fri, Oct 30, 2009 at 11:46 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Sounds like a good idea. On Fri, Oct 30, 2009 at 10:03 AM, Derek Chen-Becker dchenbec...@gmail.com wrote: Hi, I'm working on a simple mixin

[Lift] Re: URL in PlainMailBodyType to BlackBerry

2009-10-30 Thread Naftoli Gugenheim
I guess you didn't get around to it yet. Any idea when? Thanks. http://github.com/dpp/liftweb/issues/#issue/110 On Thu, Oct 15, 2009 at 3:03 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Looking at the code I don't think that it would be hard to do the right thing depending on whether

[Lift] Re: Register new StatefulSnippet

2009-10-30 Thread Naftoli Gugenheim
I added the following comment: Adding println(names) in the submit function (even after calling S.setSnippetForClass) prints Set(). On the other hand if the snippet was instantiated by Lift then it prints as expected (in my case Set(Clients). On Fri, Oct 30, 2009 at 3:16 PM, Naftoli Gugenheim

[Lift] Re: SHtml.ajaxForm postSubmit addition?

2009-10-30 Thread Derek Chen-Becker
Another hopefully quick question. There are two ajaxForm signatures that are identical except for the argument order: def ajaxForm(onSubmit: JsCmd, body: NodeSeq) = (lift:form onsubmit={onSubmit.toJsCmd}{body}/lift:form) def ajaxForm(body: NodeSeq, onSubmit: JsCmd) = (lift:form

[Lift] Re: SHtml.ajaxForm postSubmit addition?

2009-10-30 Thread Naftoli Gugenheim
Especially with 2.8 named arguments around the corner... On Fri, Oct 30, 2009 at 3:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Another hopefully quick question. There are two ajaxForm signatures that are identical except for the argument order: def ajaxForm(onSubmit: JsCmd, body:

[Lift] Re: 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread David Pollak
Turns out this was the problem. Some RDBMSs are case insensitive on table/column names... others are not. I committed a fix (now on master thanks to fast review board turn-around) that causes all table and column names to lower case for all SQL transactions. 2009/10/30 Marcin Mielżyński

[Lift] Flawed JSONForm and ajaxForm ?

2009-10-30 Thread Timothy Perrett
Hey guys, So i was today doing some work with jsonform and wanted to style the button that submit the form - as i know that image submit buttons dont work with IE, i had to use an image with a JS submit or similar. All going well until I realise that onsubmit handler is not fired for

[Lift] Re: 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread Troy Noble
Thanks. I'll give it try. Dumb newbie question though... how do I access the update? Git + build from github, or can I just grab the latest 1.1-SNAPSHOT? Thanks again, Troy On Fri, Oct 30, 2009 at 3:01 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Turns out this was the problem.

[Lift] Re: 1.1-M6 Mapped fields with dbColumnName always displaying defaultValue

2009-10-30 Thread David Pollak
On Fri, Oct 30, 2009 at 3:06 PM, Troy Noble econop...@gmail.com wrote: Thanks. I'll give it try. Dumb newbie question though... how do I access the update? Git + build from github, or can I just grab the latest 1.1-SNAPSHOT? Check http://hudson.scala-tools.org/job/Lift/ You can see if the

[Lift] Re: ajax-loader not showing?

2009-10-30 Thread Timothy Perrett
Jeppe, did you get any further with this? Cheers, Tim On Oct 29, 1:21 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, In boot I have  LiftRules.ajaxStart =       Full(() = LiftRules.jsArtifacts.show(ajax-loader).cmd)  LiftRules.ajaxEnd =       Full(() =

[Lift] LiftTicket and AJAX

2009-10-30 Thread Derek Chen-Becker
I just committed some code for AJAX-editable fields that I think might be useful as a part of LiftWeb. Basically, if you've seen how ReviewBoard handles field editing, this is the same thing. It's a trait that can be mixed into any MappedField and as soon as M7 is release and I can merge the new

[Lift] Re: How can call server 'ajax' function by my ajax code?

2009-10-30 Thread Xuefeng Wu
Thank you Jeppe, It's great. On Oct 31, 3:28 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Xuefeng Wu ben...@gmail.com writes: I want call function on the server side form client. such as: HTML client: $.(#myLink).click(function{     //call server function }); Server side: