[Lift] Re: Why do geeks like to use the language of ancient Ashdod instead of koine Greek or simple English?

2009-05-18 Thread Timothy Perrett
Johnie, If you have a problem with lift, or are finding something lift-related difficult to understand, by all means raise it on this list and there is a good chance if its a problem with lift we'll do something about it, pronto. However, if you have a problem with the way I construct sentences

[Lift] Re: Length too long for generated XML

2009-05-18 Thread marius d.
Scala's XML support is based in immutable objects meaning that you can not change them but rather generate new structures. Lift is very flexible and allows you to apply your own xhtml transformation right before the response is sent down to client. LiftRules.responseTransformers.append {

[Lift] Scala IDE for Eclipse: Expect a little turbulence on trunk ...

2009-05-18 Thread Miles Sabin
Hi folks, I'm at EPFL for the next two weeks for an intensive hacking stint with Martin and Iulian on the Scala IDE and on scalac's IDE interface. For now I would strongly recommend staying well away from trunk if you want to be able to get any useful work done: things are currently broken and

[Lift] Re: [scala-tools] Scala IDE for Eclipse: Expect a little turbulence on trunk ...

2009-05-18 Thread Miles Sabin
On Mon, May 18, 2009 at 1:23 PM, Ismael Juma mli...@juma.me.uk wrote: On Mon, 2009-05-18 at 13:12 +0200, Miles Sabin wrote: We have some very ambitious (but realistic) plans for this fortnight, and I think that by the beginning of June we'll have made an awful lot of progress on both

[Lift] Re: Using ExtJS

2009-05-18 Thread Josh Suereth
A question I've had is how hard would it be to support a ExtJS based application (i.e. the server side only needs to be a remote JSON framework). I assume this would be just-as-difficult as providing a REST-based API to your data. We use ExtJS extensively at work, and there are some pors/cons

[Lift] Recommended way for logging?

2009-05-18 Thread Heiko Seeberger
What is the recommended way for logging in Lift applications? (a) Use LiftLogger (b) Use custom application logging via Log4j, SLF4J, etc. because LiftLogger is meant for Lift internal only Thanx Heiko -- My blog: heikoseeberger.name Follow me: twitter.com/hseeberger OSGi on Scala:

[Lift] Beginner Lift question

2009-05-18 Thread Willis Blackburn
Hi all. I just picked up Lift and Scala a couple of weeks ago. I have been using mostly Wicket for the last couple of years. I have ordered David's Scala book and a Lift book from Amazon, but they're not here yet, so I am hoping that someone can help me with some conceptual issues. In Wicket,

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Barry Kaplan
@David Do you want everything to live in the same WAR file? ... No war at all, its a standalone app. Right now I have an embedded Jetty server with a registered jetty..RequestHandler. This app monitors machine tools on manufacturing floors, buffers the data, and provide a client http api for

[Lift] Re: Lift and interoperability

2009-05-18 Thread glenn
Yeah, that's the ticket. You've got a new technology or framework you want to promulgate, insult the one's who don't get it out of the box. A bit mean-spirited, don't you think. Frankly, lift raises more questions then it answers. That's not a complaint.. I don't get it. I don't get that I have

[Lift] Re: Why do geeks like to use the language of ancient Ashdod instead of koine Greek or simple English?

2009-05-18 Thread johnnie
On May 17, 10:58 pm, Christian christian.szeg...@gmail.com wrote: This might not be the baddest thread on this list, but perhaps be funkiest... ;) Although I do not fully understand your post, I understand that it is a great ambiguous joke. That is fine for you. But I dead serious and I hope

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Barry Kaplan
(Hmm, I replied yesterday but never saw the post, so apologies if both eventually show up) Do you want everything to live in the same WAR file?   This is a standalone app -- no war file. Currently it is using an embedded jetty server. The application (agent) monitors machine tools on the

[Lift] Re: Why do geeks like to use the language of ancient Ashdod instead of koine Greek or simple English?

2009-05-18 Thread David Pollak
On Mon, May 18, 2009 at 8:38 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I think that it's unreasonable to expect everyone to avoid idiomatic English on the list. If someone posts something that is ambiguous or uses language that is unclear, please post a polite request for

[Lift] Re: Lift vs JSF?

2009-05-18 Thread David Pollak
On Sun, May 17, 2009 at 8:56 PM, Narayanaswamy, Mohan mohan.narayanasw...@credit-suisse.com wrote: I am learning lift(and so scala) for the past 7 days. Myself and one of my friend were discussing about lift for our new project. When I was introducing the TODO project code and how to setup

[Lift] Re: Using ExtJS

2009-05-18 Thread David Pollak
On Mon, May 18, 2009 at 6:02 AM, Josh Suereth joshua.suer...@gmail.comwrote: A question I've had is how hard would it be to support a ExtJS based application (i.e. the server side only needs to be a remote JSON framework). I assume this would be just-as-difficult as providing a REST-based

[Lift] Re: Using ExtJS

2009-05-18 Thread Josh Suereth
Is there a way for me to *know* the potential stateful snippets I could call using the lift_page javascript variable? Most of my views are completely in JavaScript, and my server calls can take in any kind of data (JSON or raw parameters) and return JSON. IF you can point me at the right way to

[Lift] Re: Recommended way for logging?

2009-05-18 Thread David Pollak
On Mon, May 18, 2009 at 7:50 AM, Heiko Seeberger heiko.seeber...@googlemail.com wrote: What is the recommended way for logging in Lift applications? (a) Use LiftLogger (b) Use custom application logging via Log4j, SLF4J, etc. because LiftLogger is meant for Lift internal only The Lift

[Lift] Re: Another StatefulSnippet question...

2009-05-18 Thread David Pollak
On Sat, May 16, 2009 at 1:53 AM, ivan ivan.se...@gmail.com wrote: First I have to say sorry everyone for asking too many questions, asking a question is my last choice after i coludn't find an answer in a book or somewhere else. The question is: I am trying to use a StatefulSnippet. The

[Lift] select() and selectObj() vs just ajaxSelect()

2009-05-18 Thread Andrew Scherpbier
Lifted, Is there any reason why SHtml doesn't have ajaxSelectObj()? Is it hard to implement something like that outside of the SHtml object? (I looked at the source, but my Scala knowledge is not up to this quite yet. :-() --Andrew --~--~-~--~~~---~--~~ You

[Lift] Re: select() and selectObj() vs just ajaxSelect()

2009-05-18 Thread David Pollak
Good point... I'll add it. On Mon, May 18, 2009 at 10:50 AM, Andrew Scherpbier and...@scherpbier.orgwrote: Lifted, Is there any reason why SHtml doesn't have ajaxSelectObj()? Is it hard to implement something like that outside of the SHtml object? (I looked at the source, but my Scala

[Lift] Question about field validation

2009-05-18 Thread Heiko Seeberger
I am using Mapper with a class like that: class Participant extends LongKeyedMapper[Participant] with IdPK { override def getSingleton = Participant object firstName extends MappedString(this, 100) { override val displayName = First name override val validations = valMinLen(1,

[Lift] Re: Scala IDE for Eclipse: Expect a little turbulence on trunk ...

2009-05-18 Thread Derek Chen-Becker
Looking forward to seeing the fruits of your labor! Other than the well-known Maven issues, the 2.7.4 release is working really well for me. Derek On Mon, May 18, 2009 at 5:12 AM, Miles Sabin mi...@milessabin.com wrote: Hi folks, I'm at EPFL for the next two weeks for an intensive hacking

[Lift] ActorPingException error

2009-05-18 Thread glenn
I keep getting an ActorPingException error in the server console. It's not fatal, as the app doesn't crash. Any ideas on the cause? I'm not extending Actor in any of my classes. INFO - Service request (GET) /images/ajax-loader.gif took 1 Milliseconds net.liftweb.util.ActorPingException: ActorBug

[Lift] Re: Beginner Lift question

2009-05-18 Thread Derek Chen-Becker
There are two main approaches to this, both of which are covered in the Lift book that you've ordered (thanks!). The first is to use a StatefulSnippet. This lets you use the same snippet class instance, so any member variables are still there when the next page hit comes. You can see an example of

[Lift] Re: Lift and interoperability

2009-05-18 Thread Derek Chen-Becker
Glenn, most of the people on this list have come to Lift knowing pretty much nothing about it. Most of the people on this list have also read the APIs, source, and asked a ton of questions to learn about Lift and how it works. Very few other people on this list that I can recall have made

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Derek Chen-Becker
The URL is defined by the match list in the Req object. In your case, you're defining your match as : case r @ Req(api :: company :: Nil, , PutRequest)= () = addCompany(r) Your List is (api :: company :: Nil), So your URL would need to look like http://.../api/company Derek On Sun, May 17,

[Lift] Re: problems logging

2009-05-18 Thread Channing Walton
On May 17, 10:33 pm, Timothy Perrett timo...@getintheloop.eu wrote: Can you verify the log4j.xml file is being read? Not sure how I can tell. The JPA example here changes the logging environment so perhaps use it as an example to get started :) Grab it here:http://is.gd/AMAW Thanks, I

[Lift] Re: Using ExtJS

2009-05-18 Thread David Pollak
On Mon, May 18, 2009 at 9:28 AM, Josh Suereth joshua.suer...@gmail.comwrote: Is there a way for me to *know* the potential stateful snippets I could call using the lift_page javascript variable? Actually, you're not calling stateful snippets, you're calling a Json handler. Please take a look

[Lift] Re: ActorPingException error

2009-05-18 Thread David Pollak
Glenn, It looks like Jetty is restarting your application. This can cause issues with java.util.concurrent schedulers. Try setting the from scanIntervalSeconds5/scanIntervalSeconds to scanIntervalSeconds0/scanIntervalSeconds in your pom.xml file. Thanks, David On Mon, May 18, 2009 at 12:53

[Lift] Re: Using ExtJS

2009-05-18 Thread Josh Suereth
I'll let you know. Having a good ExtJS + LIft story would be very handy when I talk to the Grails fans in the office. -Josh On Mon, May 18, 2009 at 5:08 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, May 18, 2009 at 9:28 AM, Josh Suereth joshua.suer...@gmail.comwrote: Is

[Lift] More Actor garbage (collection)

2009-05-18 Thread David Pollak
Folks, As you all may or may not know, I've been battling memory retention issues with the Scala Actor libraries for 6 or so months now. I believe that I've finally nailed the complete issues. They are as follows: - There is an object called ActorGC that keeps track of all the actors in

[Lift] Re: Error with tictac example

2009-05-18 Thread David Pollak
Thanks for the patch! On Sun, May 17, 2009 at 2:35 PM, Xavi Ramirez xavi@gmail.com wrote: Hello, There seems to be an error in the tictac on the following line: registerCleanupFunc(() = is.foreach(who = LobbyServer ! RemoveLurker(who))) I've changed the code to this: override

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Derek Chen-Becker
That should work fine, too, as long as you're not using LiftRules.statelessDispatchTable to bind the dispatch (since S won't be initialized there). Derek On Mon, May 18, 2009 at 2:51 PM, glenn gl...@exmbly.com wrote: Deriek, Appreciate your response. What I did was change the case to just

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Derek Chen-Becker
BTW, what happens if the mime type is incorrect? Does the Req.xml method fail in a graceful way, or do you get exceptions? On Mon, May 18, 2009 at 2:51 PM, glenn gl...@exmbly.com wrote: Deriek, Appreciate your response. What I did was change the case to just case Req(api :: company ::

[Lift] Re: Model methods in either Class or Object?

2009-05-18 Thread David Pollak
On Sat, May 16, 2009 at 2:39 PM, g-man gregor...@gmail.com wrote: As I create the Models to define the real-world things of interest to my webapp, I'm wondering what to put into either the class or the object. Here is some pseudocode as I understand the Model table definition pattern: //

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Timothy Perrett
It just falls through to the default request handling which reads the whole stream in and should be accessible via req.body (where req is the instance val) - see it here: http://is.gd/B6VT Cheers, Tim On May 18, 11:00 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: BTW, what happens if the

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Derek Chen-Becker
Fabulous On Mon, May 18, 2009 at 4:27 PM, Timothy Perrett timo...@getintheloop.euwrote: It just falls through to the default request handling which reads the whole stream in and should be accessible via req.body (where req is the instance val) - see it here: http://is.gd/B6VT Cheers, Tim

[Lift] Re: Redirect after login

2009-05-18 Thread David Pollak
Glenn, Sorry... my mistake... the following code works: object loginReferer extends SessionVar(/) override def homePage = { var ret = loginReferer.*is* loginReferer.remove() ret } override def login = { for (r - S.referer if loginReferer.is == /) loginReferer.set(r)

[Lift] Re: immutable bindings

2009-05-18 Thread David Pollak
Oliver, Good stuff... please make sure that your branch is available on the GitHub repository for all to see and use. Thanks, David On Sat, May 16, 2009 at 1:36 AM, Oliver Lambert olambo...@gmail.com wrote: On Sat, May 16, 2009 at 4:32 AM, David Pollak feeder.of.the.be...@gmail.com

[Lift] Re: Lift broken in IE8

2009-05-18 Thread David Pollak
I'll fix it right now On Mon, May 18, 2009 at 4:25 PM, Charles F. Munat c...@munat.com wrote: One of my sites on Lift 1.0 is broken in IE8 because the XML parser is minimizing the liftAjax.js script tag and IE8 won't recognize it. I know there's a solution. I'm using XHTML 1.1. I don't

[Lift] Re: Lift broken in IE8

2009-05-18 Thread David Pollak
It's fixed in Lift 1.1-SNAPSHOT (I fixed it a while back.) Do you need a back-port to 1.0? On Mon, May 18, 2009 at 4:33 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I'll fix it right now On Mon, May 18, 2009 at 4:25 PM, Charles F. Munat c...@munat.com wrote: One of my sites on

[Lift] Re: Why do geeks like to use the language of ancient Ashdod instead of koine Greek or simple English?

2009-05-18 Thread Charles F. Munat
I don't know what your Ph.D. is in, but I hope it's not poetry. Chas. johnnie wrote: On May 17, 5:28 pm, Timothy Perrett timo...@getintheloop.eu wrote: Johnie, What on earth are you going on about? You qoute me there from a convesation on-list with Heiko about OSGi... out of context it

[Lift] Re: ActorPingException error

2009-05-18 Thread glenn
Setting the scan interval to 0 eliminates the pinging, but then I have to stop and restart jetty every time I modify my code. That's not a good option. With a 5 sec interval, that's all I had to wait for code changes to take effect. On May 18, 2:13 pm, David Pollak feeder.of.the.be...@gmail.com

[Lift] Re: ActorPingException error

2009-05-18 Thread glenn
Now, when I stop the server and restart, I get a whole slew of compiler warnings and the build fails. I have to run mvn:clean and then restart to clear it all up. Could my mvn pom be picking up another lift or scala jar file somewhere and that is causing confusion??? I'm puzzled. Here's just a

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread glenn
I'm just doing a minimal REST server implementation, and only allowing xml through. I suppose I could expand on this and add processing for req.body. That's a byte stream, though, I believe. But that brings up a whole lot of other issues, with handling different mime types. Yechhh On May 18,

[Lift] Re: Lift broken in IE8

2009-05-18 Thread Charles F. Munat
That might help. I have several sites frozen at 1.0 at the moment, and my Internet connection is currently hosed (I'm at a café), so I don't know when I'll be able to convert them and test them out. Do you mind? Chas. David Pollak wrote: It's fixed in Lift 1.1-SNAPSHOT (I fixed it a while

[Lift] Re: Lift broken in IE8

2009-05-18 Thread David Pollak
On Mon, May 18, 2009 at 5:08 PM, Charles F. Munat c...@munat.com wrote: That might help. I have several sites frozen at 1.0 at the moment, and my Internet connection is currently hosed (I'm at a café), so I don't know when I'll be able to convert them and test them out. Do you mind? I'll do

[Lift] Re: Why do geeks like to use the language of ancient Ashdod instead of koine Greek or simple English?

2009-05-18 Thread TylerWeir
+1 oddest thread on the lift group so far. On May 18, 7:42 pm, Charles F. Munat c...@munat.com wrote: I don't know what your Ph.D. is in, but I hope it's not poetry. Chas. johnnie wrote: On May 17, 5:28 pm, Timothy Perrett timo...@getintheloop.eu wrote: Johnie, What on earth are

[Lift] MappedDecimal question

2009-05-18 Thread Andrew Scherpbier
How does one format a BigDecimal? I don't want to .toString()... I'm using a MappedDecimal and I would to format its value. I've tried using java.lang.String.format() but it doesn't know what a scala.BigDecimal is... Help! BTW, I'm using 1.1-SNAPSHOT --Andrew

[Lift] Re: Beginner Lift question

2009-05-18 Thread Willis Blackburn
Thanks! That helps a lot. It took me a few minutes to realize that when the user clicks the link to editAcct, he will be directed to the account edit page, but the link's function will still be executed in the context of the snippet that generated it. It's a little different in Wicket: the

[Lift] Some DispatchSnippet Qs

2009-05-18 Thread Willis Blackburn
I'm back with another question. I see that StatefulSnippet extends DispatchSnippet. I understand what DispatchSnippet is about. But what is the reason that a StatefulSnippet must also be a DispatchSnippet? Aren't these concepts (stateful vs. stateless, dispatch vs. reflection) unrelated?

[Lift] Re: Some DispatchSnippet Qs

2009-05-18 Thread David Pollak
It's better practice to use DispatchSnippets. Snippets by convention are the easy toe in the water, but once you're dealing with state, etc., you should be graduating to declaring the methods that your snippets support, thus enforcing the DispatchSnippet being the base class of StatefulSnippet.

[Lift] Re: Beginner Lift question

2009-05-18 Thread Derek Chen-Becker
Ah, that's interesting (I haven't used Wicket). The reason that the link function executes in the scope of its definition is that it's a closure, so it captures its scope. In general, closures are the foundation for a lot of Lift functionality. The same mechanism is what makes ajax and comet so

[Lift] Re: MappedDecimal question

2009-05-18 Thread Derek Chen-Becker
The BigDecimal value of a MappedDecimal field is Scala's BigDecimal, which itself wraps the Java BigDecimal. At the very least you can use java.text.DecimalFormat to format the underlying java.math.BigDecimal. Let me know if you have any further questions. Derek On Mon, May 18, 2009 at 6:19 PM,

[Lift] Re: Lift for non UI, xml REST server embedded in existing application?

2009-05-18 Thread Derek Chen-Becker
Ugh. I like your current fall-through :) Derek On Mon, May 18, 2009 at 5:44 PM, glenn gl...@exmbly.com wrote: I'm just doing a minimal REST server implementation, and only allowing xml through. I suppose I could expand on this and add processing for req.body. That's a byte stream, though,

[Lift] Scala Sass Compiler

2009-05-18 Thread Derek Williams
Hi I discovered Scala and Lift about a month ago and have since been porting my webpage over to it from Ruby's Merb framework. Moving from Haml to HTML wasn't much of a problem as my HTML is usually quite simple, but keeping CSS organized is a pain. I liked the nested approach of Sass (which

[Lift] Re: Model methods in either Class or Object?

2009-05-18 Thread g-man
Thanks... Being a hobbyist rather than a professional, my questions will be more conceptual in nature, and may help others learn what I hope to find of the essence of Lift, which includes a little of its java-like heritage, as in the 'static' analogy. I see Lift as a vehicle with 'legs' for the

[Lift] Re: Scala Sass Compiler

2009-05-18 Thread David Pollak
Very nifty stuff. On Mon, May 18, 2009 at 8:09 PM, Derek Williams de...@nebvin.ca wrote: Hi I discovered Scala and Lift about a month ago and have since been porting my webpage over to it from Ruby's Merb framework. Moving from Haml to HTML wasn't much of a problem as my HTML is usually

[Lift] Re: MappedDecimal question

2009-05-18 Thread Andrew Scherpbier
Thanks Derek! I hadn't noticed the "bigDecimal" member of scala.BigDecimal.  (I'm still so used to looking for explicit getter methods!) I now have my code do this:     Text(String.format("$%,.2f", item.amount.bigDecimal)) instead of my old     Text(item.amount.toString) --Andrew Derek