[Lift] Template help

2009-11-11 Thread aw
I need to create a snippet sequence that looks something like this: name description The anchor needs to be generated using SHtml.link, and name & description need to be bound. As a result, I end up with a template sequence like this: Then, I need snippet code

[Lift] XmlResponse with cookies

2009-11-11 Thread Atsuhiko Yamanaka
Hi, I need XmlResponse with cookies, but have gotten following error. $ mvn scala:console scala> import _root_.net.liftweb.http._ import _root_.net.liftweb.http._ scala> new XmlResponse(){ | override def cookies = S.responseCookies | } :8: error: type mismatch; fou

[Lift] Re: XmlResponse with cookies

2009-11-11 Thread Timothy Perrett
Wouldn't a more appropriate idiom be to use overloaded apply methods in a companion object? That is: def apply(node: NodeSeq): XmlResponse def apply(node: NodeSeq, cookies: List[HTTPCookie]): XmlResponse Thoughts? Cheers, Tim On 11 Nov 2009, at 10:21, Atsuhiko Yamanaka wrote: > > Hi, > >

[Lift] Re: javax.mail 1.4.3-SNAPSHOT

2009-11-11 Thread Indrajit Raychaudhuri
Fixed, and in master. http://github.com/dpp/liftweb/commit/0cac04cb0d05c07a222d07f980ecf9946ec49588 Cheers, Indrajit On Nov 7, 9:41 am, aw wrote: > Looking at this:  http://download.java.net/maven/2/javax/mail/mail/ > it would seem that Sun is close to releasing JavaMail 1.4.3. > > Technically

[Lift] does AutoComplete work ?

2009-11-11 Thread Christophe Dehlinger
Hi, does AutoComplete work ? I tried running the lift-example from snapshot on a local server, autocompletion isn't happening on the AJAX Samples page. The rest of the Ajax stuff works fine. AC does work on http://demo.liftweb.net/ajax though, so the problem doesn't seem to be browser-related. I

[Lift] Re: Novell Pulse, front end by Lift

2009-11-11 Thread David LaPalomento
I'm glad to hear you like what you've seen so far with Pulse! I don't think we could do half the stuff we're doing without Lift backing us up. Stay tuned, we'll have more than a video to share with the group soon :) David On Nov 8, 3:54 pm, Timothy Perrett wrote: > Kudos everyone - the fact t

[Lift] Re: Novell Pulse, front end by Lift

2009-11-11 Thread TylerWeir
I'm a little late to the party, but Pulse is really quite amazing. Well done all. David LaP, I eagerly await anything you have to share. Tyler On Nov 11, 1:14 am, David LaPalomento wrote: > I'm glad to hear you like what you've seen so far with Pulse!  I don't > think we could do half the stuf

[Lift] Re: ManyToMany decision

2009-11-11 Thread Jim Barrows
On Tue, Nov 10, 2009 at 2:16 PM, Naftoli Gugenheim wrote: > Hello. > When I wrote ManyToMany a couple of months ago, I designed it to internally > hold a collection of join table records, and to act as a collection of > elements of the child table. > For example, given Volunteer and VolunteerGroup

[Lift] Re: Unit testing a RESTful webservice with Lift

2009-11-11 Thread Alex Black
What are you unhappy about? Those tests look pretty simple and slick to me! It looks like the JettyTestServer is a singleton inside the test suite - what happens if you have another test suite? I think you'd then hit the same problem that I did, when the second test suite tries to fire up Jetty i

[Lift] Re: XmlResponse with cookies

2009-11-11 Thread David Pollak
On Wed, Nov 11, 2009 at 2:21 AM, Atsuhiko Yamanaka < atsuhiko.yaman...@gmail.com> wrote: > > Hi, > > I need XmlResponse with cookies, but have gotten following error. > > $ mvn scala:console > > scala> import _root_.net.liftweb.http._ > import _root_.net.liftweb.http._ > > scala> new XmlRespon

[Lift] Re: Unit testing a RESTful webservice with Lift

2009-11-11 Thread David Pollak
On Wed, Nov 11, 2009 at 7:09 AM, Alex Black wrote: > > What are you unhappy about? Those tests look pretty simple and slick > to me! > > Yeah, but with this change: http://reviewboard.liftweb.net/r/95/ You'll get: "Login" in { for{ login <- post("/api/login", "token" -> token) !@

[Lift] Re: Novell Pulse, front end by Lift

2009-11-11 Thread David Pollak
On Wed, Nov 11, 2009 at 5:55 AM, TylerWeir wrote: > > I'm a little late to the party, but Pulse is really quite amazing. > Well done all. > > David LaP, I eagerly await anything you have to share. > Me2 > > Tyler > > On Nov 11, 1:14 am, David LaPalomento wrote: > > I'm glad to hear you like w

[Lift] Re: lift-json bug (in Xml.toJson)

2009-11-11 Thread David Pollak
I think a fix to this was pushed this morning. Once this job is finished: http://hudson.scala-tools.org/job/Lift/1367/ It should be available on SNAPSHOT. On Tue, Nov 10, 2009 at 1:49 PM, harryh wrote: > > This is on M7: > > scala> import > scala.xml.Elem > import scala.xml.Elem > > scala> imp

[Lift] Re: form input tag name values changed when moving from M6 to M7

2009-11-11 Thread David Pollak
On Tue, Nov 10, 2009 at 2:36 PM, ben wrote: > > Which brings us back to my original point ... how can we preserve > acceptance tests ? > Do we need to have a stack-trace hash on the form ids or can we have a > non-unique-id-through-the-webapp but unique to the form in order to > achieve this. >

[Lift] Re: Template help

2009-11-11 Thread David Pollak
On Wed, Nov 11, 2009 at 12:35 AM, aw wrote: > > I need to create a snippet sequence that looks something like this: > > >name >description > > > > The anchor needs to be generated using SHtml.link, and name & > description need to be bound. As a result, I end up with a template > s

[Lift] Re: Issue 164: S.notice, S.error, etc. broken from within AJAX/JSON calls

2009-11-11 Thread David Pollak
It's stuck on review board. We're thinking of a M7.1 release because M7 is pretty broken with this issue and the Session-related issue that Harry reported. On Wed, Nov 11, 2009 at 9:18 AM, Ross Mellgren wrote: > Hey, any news on when this change will be pushed? I compiled a local copy > and ver

[Lift] Re: Unit testing a RESTful webservice with Lift

2009-11-11 Thread Alex Black
Looks nice. Singleton - ah, yes, that sounds like it will work well, good call. On Wed, Nov 11, 2009 at 12:05 PM, David Pollak < feeder.of.the.be...@gmail.com> wrote: > > > On Wed, Nov 11, 2009 at 7:09 AM, Alex Black wrote: > >> >> What are you unhappy about? Those tests look pretty simple and

[Lift] Re: ManyToMany decision

2009-11-11 Thread Naftoli Gugenheim
To clarify: The fundamental purpose of ManyToMany, like OneToMany, is that rather than dealing with "children" of an entity as they are in the database at a given moment, instead, they should have similar semantics to a MappedField: You load it from the database, modify it to your hearts conten

[Lift] Re: Issue 164: S.notice, S.error, etc. broken from within AJAX/JSON calls

2009-11-11 Thread Ross Mellgren
M7.1 would be extremely helpful to me as I'm trying to move a project into QA and I'm loathe to use a moving target for QA. However, if need be I can stick with a working SNAPSHOT up until M8, if M8 is really coming around first week Dec. -Ross On Nov 11, 2009, at 12:21 PM, David Pollak wro

[Lift] Re: Template help

2009-11-11 Thread Naftoli Gugenheim
You might need to surround the kids => ... function with parenthesis. - David Pollak wrote: On Wed, Nov 11, 2009 at 12:35 AM, aw wrote: > > I need to create a snippet sequence that looks something like this: > > >name >description > > > > The a

[Lift] Re: Template help

2009-11-11 Thread aw
OK, your suggestion definitely makes the snippet code more readable, but I fear I didn't make my point clear because the snippet code still is highly coupled with the view layout. Imagine that I want to change my view from this: name description to this: name description

[Lift] Re: Template help

2009-11-11 Thread Ross Mellgren
You can do a recursive bind, but you must make it explicit: def mySnippet(xhtml: NodeSeq): NodeSeq = { def doBind(xhtml: NodeSeq): NodeSeq = bind("b", xhtml, "link" -> { (kids: NodeSeq) => SHtml.link("next", () => clicked(b), doBind(kids)) }, "name" ->

[Lift] Re: Template help

2009-11-11 Thread Timothy Perrett
Take a look at: http://logji.blogspot.com/2009/09/composable-bindings-in-lift.html and then: http://logji.blogspot.com/2009/10/composable-bindings-in-lift-part-ii.html Sounds like this could provide a more flexible implementation pattern for your use case. Cheers, Tim On 11 Nov 2009, at 18

[Lift] Re: Template help

2009-11-11 Thread Jim Barrows
On Wed, Nov 11, 2009 at 11:21 AM, aw wrote: > > OK, your suggestion definitely makes the snippet code more readable, > but I fear I didn't make my point clear because the snippet code still > is highly coupled with the view layout. > If this was a MVC type framework, I think you're point would b

[Lift] Re: Template help

2009-11-11 Thread Naftoli Gugenheim
I didn't see Tim's blog post, but another option is to bind in two passes. First bind the outer level: b1:link should become an SHtml.link, preserving the same set of child elements. So here use a NodeSeq function: kids => SHtml.link(..., kids). Then pass the resulting NodeSeq to a bind invocat

[Lift] Minor Bug? MappedString.valUnique should return one FieldError

2009-11-11 Thread jon
Hi, I'm currently adding a uniqueness requirement to a field, but there are duplicate entries (for empty string) in my database already. Currently valUnique maps each match it found to a FieldError, but should probably return one FieldError regardless of how many matches it finds. - Jon --~--~--

[Lift] New Milestone coming soon

2009-11-11 Thread David Pollak
Folks, There are two critical issues with M7: - Issue 164 http://github.com/dpp/liftweb/issues#issue/164 JSON/Ajax messages do not carry Notices back to the client. - The Session manager is not initialized properly. Basically, this means that sessions will be expired by the web cont

[Lift] Re: form input tag name values changed when moving from M6 to M7

2009-11-11 Thread ben
Thanks for the reply David. Below is some code which might suit both our requirements ... def locateFirstUserStackElement(stack: Array[StackTraceElement]) : StackTraceElement = { stack.foreach(element => { if (!element.toString.startsWith("net.liftweb")) return eleme

[Lift] ScalaTest in Lift archetypes

2009-11-11 Thread Bill Venners
Hi, I was talking with David Pollak the other night about putting some ScalaTest examples into the Lift archetypes. He said I should post to the list. Can anyone out there let me know how we might go about that? Thanks. Bill Bill Venners Artima, Inc. http://www.artima.com --~--~-~

[Lift] How to use Box

2009-11-11 Thread Ferdinand Chan
Wondering what's the normal practice of using a Box. As a Java developer, I always want to get the boxed value by a method named "Value" like val optionalContent = Full("This is optional") Log.info( " The optional content is " + optionalContent.value) But I know its not a valid way to do so in

[Lift] Re: How to use Box

2009-11-11 Thread David Pollak
http://blog.lostlake.org/index.php?/archives/50-The-Scala-Option-class-and-how-lift-uses-it.html The for comprehension is your friend. On Wed, Nov 11, 2009 at 2:40 PM, Ferdinand Chan wrote: > > Wondering what's the normal practice of using a Box. As a Java > developer, I always want to get the

[Lift] Re: ScalaTest in Lift archetypes

2009-11-11 Thread Timothy Perrett
Bill, can I propose you and I get together at devoxx and discuss the options? I belive my talk is not long after yours! Cheers, Tim Sent from my iPhone On 11 Nov 2009, at 21:50, Bill Venners wrote: > > Hi, > > I was talking with David Pollak the other night about putting some > ScalaTest e

[Lift] Re: New Milestone coming soon

2009-11-11 Thread Jim McBeath
OracleDriver doesn't work with CRUDify when attempting to view a list of entries, it gets an SQL error due to use of LIMIT/OFFSET, which Oracle does not support. Defining brokenLimit_? = true in OracleDriver makes it work for me. I can do this myself by including my own copy of Driver.scala, so

[Lift] ReviewBoard upgrade

2009-11-11 Thread Derek Chen-Becker
I'll be working in the morning (US Mountain time) on upgrading ReviewBoard, just in case anyone notices any hiccups. Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send ema

[Lift] Re: 503 for url: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

2009-11-11 Thread ctrlspace
Sorry for what may seem like a stupid question, but I am very new to scala/lift. PCDataXmlParser solved my issue with w3 dtd but I am now getting a parse error when I get a http stream. :96:5: '<' not allowed in attrib valuegoogle_ad_type = "text_image";^ Exception in thread "main" java.lang

[Lift] Re: How to use Box

2009-11-11 Thread Naftoli Gugenheim
What do you want to happen if you call "value" on an Empty? - Ferdinand Chan wrote: Wondering what's the normal practice of using a Box. As a Java developer, I always want to get the boxed value by a method named "Value" like val optionalContent = Full("This

[Lift] Re: XmlResponse with cookies

2009-11-11 Thread Atsuhiko Yamanaka
Hi, On Wed, Nov 11, 2009 at 7:30 PM, Timothy Perrett wrote: > > Wouldn't a more appropriate idiom be to use overloaded apply methods in a > companion object? > > That is: > > def apply(node: NodeSeq): XmlResponse > def apply(node: NodeSeq, cookies: List[HTTPCookie]): XmlResponse > > Thoughts?

[Lift] Re: CometActor and render

2009-11-11 Thread jack
one more thing: I also ran the code without the piece that retrieves web pages and gets their length. Instead I just had the Calculator class sleep for 10 seconds (which is longer than the http request takes) and then return a random number. This worked fine. I can't see what the difference is. O