[Lift] Re: Getting Started tutorial - not understanding some syntax

2009-07-31 Thread Naftoli Gugenheim
I think the difference is only true in a class body. Inside a code block I think the def is syntactic sugar for the other syntax. - Viktor Klangviktor.kl...@gmail.com wrote: On Thu, Jul 30, 2009 at 11:02 PM, DFectuoso santiago1...@gmail.com wrote: Viktor,

[Lift] Re: User questions

2009-07-31 Thread Naftoli Gugenheim
Also I could refactor login to allow programmatic logging in, e.g., def login(email:String, pwd:String):Boolean. Then logInFirst could optionally take an autologin function, which it calls if !loggedIn_?, and then checks loggedIn_? again. This way you can check cookies or IPs etc. and skip the

[Lift] Re: Simple Javascript question(from a lift snippet of course...)

2009-07-31 Thread marius d.
Yes. And as much as possible redundancies eliminated. Say script tags with the same src etc. Br's, Marius On Jul 31, 7:20 am, Naftoli Gugenheim naftoli...@gmail.com wrote: Related question - if there are multiple head sections buried in different places in the xml are they all removed and

[Lift] Re: Help on Build from source

2009-07-31 Thread nile black
David: I build again on windows. and fond there are also some error. I log I've fixed it . and log my modify follow: # On branch master # Changed but not updated: # (use git add file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory)

[Lift] Re: Wymeditor or FCKEditor

2009-07-31 Thread Avo Reid
So I can't use text/html or use java components that write to the DOM, except for JQuery? The error is the neither wymeditor or fckeditor work with Lift. Let's make things simple, shouldn't it be possible to simply add a wymeditor to the default html of the hello world example and have it render

[Lift] Re: AJAX form with returned NodeSeq

2009-07-31 Thread Calen Pennington
Sorry my original question was unclear. I'm looking to submit data with the form, and then get a response back from the server to act on. The use case is that I have a list of things that I would like to add elements to on the fly. The desired action is to have the list on the page, with an add

[Lift] Re: Wymeditor or FCKEditor

2009-07-31 Thread Ross Mellgren
I can't post the whole thing, as it's part of a larger work thing, but here are the TinyMCE relevant portions: Boot.scala: LiftRules.useXhtmlMimeType = false; ResourceServer.allow { case tiny_mce::_ = true } In my snippet bind:

[Lift] Re: Wymeditor or FCKEditor

2009-07-31 Thread Avo Reid
Yes I am getting errors on inner html from the lift site. So if I understand you correctly I can't use any java component that changes the DOM with write or serves text/html like wymeditor or CKeditor? So what are the options for an editor for a commercial application using Lift? And what are

[Lift] Re: erro: MappedDouble is not mapped to 'double precision' datatype in PostgreSQL?

2009-07-31 Thread JanWillem Tulp
Thanks, yes, I'll try tomorrow and let you know! On Jul 29, 12:43 am, Derek Chen-Becker dchenbec...@gmail.com wrote: OK, I've pushed 1.0.1-SNAPSHOT to the repo with something that should fix the PostgreSQL stuff. Can you update your POM to 1.0.1-SNAPSHOT and try it? Thanks, Derek On Tue,

[Lift] Re: Jersey + Lift, whats the story?

2009-07-31 Thread Paul Sandoz
On Jul 30, 2009, at 7:57 PM, David Pollak wrote: I wonder if one day we can kinda get Jersey to expose its own SiteMap (of sorts) into Lift's SiteMap? There's a way to dynamically create submenus based on a function in SiteMap. We could wire that up to Jersey's mechanisms to expose

[Lift] Re: JSON form with

2009-07-31 Thread James Kearney
I have had a look at the change, while better than the old one it still causes problems if you use a in a text box because you are building JSON as a string and then parsing it. In my example code you go from a javascript object to another one there is no need for parsing so you don't run into

[Lift] Re: How to use Mapper and record framework

2009-07-31 Thread pravin
Hi Giuseppe, Thanks for u r valuable support.i got the flavor of this framework. I did one POC(sample application) with MySQL ...and its worked very smoothly. Is Lift provides support for MS SQL.? Now i am using same thing with MS SQL but i am getting following error :- Message:

[Lift] Re: How to use Mapper and record framework

2009-07-31 Thread Timothy Perrett
Yup - Im using it no problems at all with MS SQL... Cheers, Tim In short - Is lift's mapper framework provides Support for MS SQL ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this

[Lift] Implementing KeyedRecord[T,K]

2009-07-31 Thread Timothy Perrett
Guys, What is the intended implementation of KeyedRecord? The work done so far on DBRecord appears not to use it? When / How should one go about implementing a custom record backend? We could really do with some docs on this :-) Cheers, Tim --~--~-~--~~~---~--~~

[Lift] Re: ajaxCall jlift.js and json2.js

2009-07-31 Thread James Kearney
Thanks On Jul 30, 5:38 pm, Timothy Perrett timo...@getintheloop.eu wrote: James, Correct, you do indeed need to include this in a page where you want to use json forms etc... Cheers, Tim On Jul 30, 3:53 pm,JamesKearneyghostf...@googlemail.com wrote: I wanted to use ajaxCall on a page

[Lift] how 10 seconds works?

2009-07-31 Thread Caesar You
Hi everyone, i am a rookie of lift and scala. now i am cofused about sth in the lift. Line 226 in LiftSession.scala ActorPing schedule (this, CheckAndPurge, 10 seconds) Does anybody tell me how 10 seconds works? that is how does the scala convert it to type TimeSpan?

[Lift] Re: how 10 seconds works?

2009-07-31 Thread marius d.
Implicit conversions. In TimeHelpers.scala we have: 1. TimeSpanBuilder which contains method minutes, seconds etc. 2. And the implicits such as: implicit def intToTimeSpanBuilder(in: Int): TimeSpanBuilder = TimeSpanBuilder(in) therefore compiler automatically applies intToTimeSpanBuilder

[Lift] Re: How to use Mapper and record framework

2009-07-31 Thread Giuseppe Fogliazza
Hi Pravin, I'm sorry but I have no experience with MS SQL. By any chance does it change something if you modify the name of your MappedField from id to empId ? Regards Giuseppe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Lift] Submit like SHtml.text but with ajaxText

2009-07-31 Thread Richard Dallaway
I'm looking for some guidance on how best to have the value of text field that's been ajax-ified picked up on a regular submit. What I mean is: If I have a field of object word extends RequestVar() which I bind like this bind(f, xhtml, word - SHtml.text(word,word(_)),

[Lift] Re: JSON form with

2009-07-31 Thread David Pollak
I'm curious as to why we have this function floating around in the first place. Isn't this something best done by a JavaScript library that has been tested cross browser (e.g., something in jQuery or YUI)? Also, doesn't the param function hardcode a dependency on jQuery... and we're support to be

[Lift] Re: JSON form with

2009-07-31 Thread marius d.
On Jul 31, 4:42 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I'm curious as to why we have this function floating around in the first place.  Isn't this something best done by a JavaScript library that has been tested cross browser (e.g., something in jQuery or YUI)? Also, doesn't

[Lift] Re: Wymeditor or FCKEditor

2009-07-31 Thread David Pollak
On Thu, Jul 30, 2009 at 8:29 PM, Avo Reid avor...@cox.net wrote: So I can't use text/html or use java components that write to the DOM, except for JQuery? No. Who ever said that? Lift *by default* serves content as application/xhtml+xml. You can change the behavior as another post in this

[Lift] Re: Wymeditor or FCKEditor

2009-07-31 Thread glenn
Avo, Yes, I'm using wymeditor in a lIft app with great success. You need to put all the wymeditor js files in a source/main/resources/ toserve directory. Then I create a snippet: def onInit(xhtml: NodeSeq):NodeSeq = head script type=text/javascript src={/ +

[Lift] Lift maven archetypes seem to be broken ... again

2009-07-31 Thread glenn
Seems like every time I create a new LIft project in Eclipse with , drawing on the snapshots in http://scala-tools.org/repo-snapshots, I get errors, telling me I'm missing some Apache commons jar, or worse. Could It be a problem with my system? It's worked in the past without a hitch, but

[Lift] Re: Wymeditor or FCKEditor

2009-07-31 Thread Avo Reid
David, My apologies, I didn't mean to communicate that there is something wrong with Lift, I am very interested in Lift and have a great deal of respect for what you have accomplished here. My question about making things simple was frankly to clarify whether it was possible to drop in a java

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread Timothy Perrett
Glenn, What command are you using to pull the archetype? Its certainly not an issue in lift as we don't have any 2.7.4 refs in the codebase now. The archetype catalog at http://scala-tools.org/ however still points to 1.0 of Lift, so that's on 2.7.3... Cheers, Tim On 31/07/2009 16:26, glenn

[Lift] Re: JSON form with

2009-07-31 Thread marius d.
James, I just tested jsonForm with #$%^*(){}[]:;'|\,.?/|\ characters and الصفحة الر for testing international chars. Everything worked correctly. I am using FF3 on Ubuntu. What problems did you run into? P.S. What I committed yesterday is exactly your code so I don't get what the problem is.

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread glenn
Tim, I'm using Eclipse's maven plugin to create a new maven project with the following parameters: groupIdnet.liftweb/groupId artifactIdlift-archetype-basic/artifactId version1.1-SNAPSHOT/version repositoryhttp://scala-tools.org/repo-snapshot/repository The pom this creates in my project uses

[Lift] Re: Implementing KeyedRecord[T,K]

2009-07-31 Thread Giuseppe Fogliazza
To my understanding, KeyedRecord as well as KeyedField should provide the basis to implement relationship between model objects. If in my model object I have a relationship with another model object this will required the referred class to be at least a KeyedRecord. Such ReferenceField similar to

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread David Pollak
On Fri, Jul 31, 2009 at 8:55 AM, glenn gl...@exmbly.com wrote: Tim, I'm using Eclipse's maven plugin to create a new maven project with the following parameters: groupIdnet.liftweb/groupId artifactIdlift-archetype-basic/artifactId version1.1-SNAPSHOT/version

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread glenn
Tim I cleaned out my local repository and even did a reindexing. When I tried to run the basic archetype this time, I got the following error: Couldn't find a version in [6.1.17, 6.1.18, 6.1.19] to match range [6.1.6,6.1.6] org.mortbay.jetty:jetty:jar:null from the specified remote

[Lift] Re: how 10 seconds works?

2009-07-31 Thread Alex Cruise
marius d. wrote: Implicit conversions. It's worth noting that Rails accomplishes a similar trick by adding methods to the Integer class at runtime. *shudder* :) -0xe1a --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread David Pollak
Glenn, I think you're pulling from a repository that is not the scala-tools.orgrepo. Unfortunately, I don't have enough Maven fu to diagnose the issue. :-( Sorry. David On Fri, Jul 31, 2009 at 9:36 AM, glenn gl...@exmbly.com wrote: Tim I cleaned out my local repository and even did a

[Lift] Re: JSON form with

2009-07-31 Thread James Kearney
Ah, sorry my mistake I was looking at the first of the two commits you made On Jul 31, 4:52 pm, marius d. marius.dan...@gmail.com wrote: James, I just tested jsonForm with #$%^*(){}[]:;'|\,.?/|\ characters and الصفحة الر for testing international chars. Everything worked correctly. I am

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread Timothy Perrett
This has only been happening recently - its like maven cant find 6.1.6 version of jetty. Change the line in your pom.xml to: [6.1.6,) That will fix the problem for now... I need to change this in the archetypes but it will then mean that Eclipse wont run the tests out of the box (it appears to

[Lift] Re: Lift maven archetypes seem to be broken ... again

2009-07-31 Thread David Pollak
On Fri, Jul 31, 2009 at 9:47 AM, Timothy Perrett timo...@getintheloop.euwrote: This has only been happening recently - its like maven cant find 6.1.6 version of jetty. Change the line in your pom.xml to: [6.1.6,) [6.1.6, 6.1.19) This will find the latest versions, but won't try to find

[Lift] Re: Automatic background AJAX: best way to do it?

2009-07-31 Thread David Pollak
On Wed, Jul 29, 2009 at 11:45 PM, Nolan Darilek no...@thewordnerd.infowrote: On 07/28/2009 07:28 PM, David Pollak wrote: I'd do the REST API thing. The mechanisms that Lift has for handling API calls from the browser are numerous, but they are associated with a session (you can do

[Lift] Re: Getting Started tutorial - not understanding some syntax

2009-07-31 Thread ben
Thankyou all for your posts, I now understand whats going on ! Victor : Thanks for the great examples of how to pass functions into other functions - a very illuminating example, I'm sitting here thinking about how much that will make a difference to code conciseness compared with Java ! David

[Lift] Re: AJAX form with returned NodeSeq

2009-07-31 Thread David Pollak
On Thu, Jul 30, 2009 at 8:13 PM, Calen Pennington calen.penning...@gmail.com wrote: Sorry my original question was unclear. I'm looking to submit data with the form, and then get a response back from the server to act on. The use case is that I have a list of things that I would like to add

[Lift] Re: Asynchronous Javascript problem

2009-07-31 Thread David Pollak
On Thu, Jul 30, 2009 at 10:55 PM, Channing Walton channingwal...@mac.comwrote: Are you putting the result of: Script(Function(sendPointToServer, point, PointHandler.call(setPoint, JsVal(point Anywhere on your page? I believe so, the page has a snippet:

[Lift] Offline building and documentation

2009-07-31 Thread Grant Wood
I'm up at a cabin and hoped to be able to work offline, but am finding that Maven secretly assumes that you will always be on the internet and won't co-operate with me even using the -o (offline) option. Answers to some very (I'm hoping) simple questions can go a long way towards helping me out.

[Lift] Re: Offline building and documentation

2009-07-31 Thread Naftoli Gugenheim
Don't know about scaladoc, but there was a bug in older maven versions about offline usage. What version do you have? As far as JavaRebel, scala users get a free license but you currently have an expired one. You have to replace the jar and .lic file. In the meantime can you comment it out

[Lift] Re: Asynchronous Javascript problem

2009-07-31 Thread Channing Walton
cool thanks, that did it. Google recommends running a script on unload, their example has: body onload=initialize() onunload=GUnload() I couldn't see any Unload function anyway, I guess it would be a useful thing to add? --~--~-~--~~~---~--~~ You received this

[Lift] Re: Offline building and documentation

2009-07-31 Thread David Pollak
Grant, Are you on Windows or OS X? Thanks, DAvid On Fri, Jul 31, 2009 at 12:40 PM, Grant Wood smackt...@gmail.com wrote: I'm up at a cabin and hoped to be able to work offline, but am finding that Maven secretly assumes that you will always be on the internet and won't co-operate with me

[Lift] Re: Offline building and documentation

2009-07-31 Thread Kevin Wright
Maven is a bit tricky when trying to go offline if you have snapshot dependencies. Having said that... I've definitely not been bitten by the issue since upgrading to 2.2 - so you really want to check you're on the latest version, as it looks like they've recently done a lot of releases in quick

[Lift] Re: New features

2009-07-31 Thread glenn
Naftoli, I set up my mapper to use your new ManyToMany trait, but I'm not sure how exactly to use it in a snippet or view. Here's what I have so far, a User, Role and UserRole for my model classes: class Role extends LongKeyedMapper[Role] with IdPK { def getSingleton = Role object name

[Lift] Re: Submit like SHtml.text but with ajaxText

2009-07-31 Thread David Pollak
I just committed code that allows: bind(form, xhtml, first - text(firstName, firstName = _, s = {S.notice(First name +s); Noop}), last - text(lastName, lastName = _, s = {S.notice(Last name +s); Noop}), submit - submit(Send, validate _)) You can have an onblur

[Lift] Re: New features

2009-07-31 Thread Naftoli Gugenheim
I didn't yet look at your code too closely, but the idea is that the field that represents the relationship implements Buffer, so you can add, remove, and iterate its elements, which are the other side of the relationship. These changes are remembered until you call save, when they are acted

[Lift] Re: New features

2009-07-31 Thread Naftoli Gugenheim
I should probably take Mapped out of the name, because it's not a MappedField. - glenngl...@exmbly.com wrote: Naftoli, I set up my mapper to use your new ManyToMany trait, but I'm not sure how exactly to use it in a snippet or view. Here's what I have so

[Lift] Re: Offline building and documentation

2009-07-31 Thread Timothy Perrett
Grant, If your on windows or OSX, just take a look at your $M2 environment variable and remove the javarebel path... We didn¹t know at the time of making that installer that it would expire in one year ­ if we had, we probably would have thought twice about enabling it. That¹s another story...

[Lift] Hudson failing again and Lift build failure

2009-07-31 Thread Timothy Perrett
Guys, From a fresh github clone im now seeing the following when trying a full build: [WARNING] /Users/timperrett/repositories/lift/lift-framework/lift/src/ main/scala/net/liftweb/http/LiftServlet.scala:302: error: type mismatch; [WARNING] found : java.lang.Object [WARNING] required:

[Lift] Re: Hudson failing again and Lift build failure

2009-07-31 Thread Timothy Perrett
Looks like hudson now recognizes the code failure too: http://hudson.scala-tools.org/job/Lift/1075/ Cheers, Tim On Aug 1, 12:24 am, Timothy Perrett timo...@getintheloop.eu wrote: Guys, From a fresh github clone im now seeing the following when trying a full build: [WARNING]

[Lift] Re: Hudson failing again and Lift build failure

2009-07-31 Thread Naftoli Gugenheim
Is it somehow a result of too many open files? What did Derek do last time there was an error of too many open files? - Timothy Perretttimo...@getintheloop.eu wrote: Looks like hudson now recognizes the code failure too:

[Lift] Re: Hudson failing again and Lift build failure

2009-07-31 Thread Timothy Perrett
It's two issues - one is that we have busted code in the lift code base that needs correcting (looking at commits I can't see who changed it)... The other issue is the Hudson box; before the DoS attack we had no problems at all so that to me says it's something different now than compared

[Lift] Re: Hudson failing again and Lift build failure

2009-07-31 Thread David Pollak
On Fri, Jul 31, 2009 at 4:36 PM, Timothy Perrett timo...@getintheloop.euwrote: It's two issues - one is that we have busted code in the lift code base that needs correcting (looking at commits I can't see who changed it)... The other issue is the Hudson box; before the DoS attack we had no