[Lift] Re: Milestone 5 now available!

2009-09-08 Thread Randinn
I know it's been said, but it's never said enough. All of you are doing a great job, we appreciate it and thank you for all the work you do to make it easier to code for the rest of us. On Sep 9, 2:57 pm, "Charles F. Munat" wrote: > The Lift team proudly announces Milestone 5! Some text here tha

[Lift] Milestone 5 now available!

2009-09-08 Thread Charles F. Munat
The Lift team proudly announces Milestone 5! Some text here that I forgot to copy and paste. Go get it! Chas. Munat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email t

[Lift] Re: JsonHandler stops working

2009-09-08 Thread David Pollak
This is a bug that was introduced a few months ago and fixed last week. It'll be fixed in M5 and the fix is available on SNAPSHOT. On Tue, Sep 8, 2009 at 9:04 PM, dave wrote: > > Hi, > > I am new to lift so I hope this is not an ignorant question/problem. > I am having a problem where my json h

[Lift] JsonHandler stops working

2009-09-08 Thread dave
Hi, I am new to lift so I hope this is not an ignorant question/problem. I am having a problem where my json handler stops working. I believe it is timing out independent of the session. If I have my browser open for a short while, the json functions stop working but the ajax functions keep worki

[Lift] Re: Lift WebServices

2009-09-08 Thread David Pollak
On Tue, Sep 8, 2009 at 4:19 PM, abruzzo wrote: > > Whoops! Should have looked there. That fixed it. Thanks again for the > help. > Sure thing. > > On Sep 8, 4:44 pm, David Pollak wrote: > > You declared the LiftFilter twice in your web.xml file: > > > > > > LiftFilter > > Lift Filt

[Lift] Re: configuring web application

2009-09-08 Thread Naftoli Gugenheim
On whatever command line you use to launch jetty. - Jack Widman wrote: And (pardon the noobality of this question) Where do I put the -Djetty.port=80? On Tue, Sep 8, 2009 at 10:30 PM, Naftoli Gugenheim wrote: > -Djetty.port=80 I think. > Or set up a "front e

[Lift] How do I hook up JS events to onsubmit on a lift-controlled form?

2009-09-08 Thread DMB
Hi, folks, I'm moving one of my old ruby based apps over to Scala/Lift to learn Lift better, and here's one thing I was not able to find how to do. Some forms in the old app have onsubmit event on the tag which combines / pre-validates things in the form, puts the output into a hidden field and

[Lift] Re: Retrieving the URL anchor

2009-09-08 Thread David Pollak
On Tue, Sep 8, 2009 at 6:55 PM, Xavi Ramirez wrote: > > Hello, > > I'm having trouble finding the URL anchor (e.g. > www.foo.com/test.html#this-is-the-url-anchor) while performing a URL > rewrite. i looked through the HTTPRequest object, but I can't seem to > find it any where. > > Any idea wher

[Lift] Re: configuring web application

2009-09-08 Thread Naftoli Gugenheim
-Djetty.port=80 I think. Or set up a "front end" web server like nginx or apache that routes between 80 and 8080. - jack wrote: Simple, but appropriate, I think, question. I am using jetty on port 8080. How do configure my server so that when people just ty

[Lift] configuring web application

2009-09-08 Thread jack
Simple, but appropriate, I think, question. I am using jetty on port 8080. How do configure my server so that when people just type in my domain name, they get the index.html of my application. Its been a few years since I did this. --~--~-~--~~~---~--~~ You rece

[Lift] Re: Crazy idea for lift's mega proto user: admin panel.

2009-09-08 Thread g-man
Right -- not knowing personally as to core vs widget (that is up to 'management'), but I would also look to the web2py and django (even Google app engine) frameworks for nice admin interface inspiration... On Sep 7, 4:16 pm, DFectuoso wrote: > I was thinking about how wonderful it is to get a lo

[Lift] Retrieving the URL anchor

2009-09-08 Thread Xavi Ramirez
Hello, I'm having trouble finding the URL anchor (e.g. www.foo.com/test.html#this-is-the-url-anchor) while performing a URL rewrite. i looked through the HTTPRequest object, but I can't seem to find it any where. Any idea where it might be? Thanks, Xavi --~--~-~--~~~--

[Lift] Re: setting user-agent header

2009-09-08 Thread Jack Widman
Cool. Thanks. The useful things about Lift seem to never end. On Tue, Sep 8, 2009 at 6:51 PM, Derek Chen-Becker wrote: > S.setHeader can be used in Lift to set a response header. > > Derek > > > On Tue, Sep 8, 2009 at 9:02 AM, jack wrote: > >> >> Has anyone used dispatch from databinder.net? It

[Lift] Re: Lift WebServices

2009-09-08 Thread abruzzo
Whoops! Should have looked there. That fixed it. Thanks again for the help. On Sep 8, 4:44 pm, David Pollak wrote: > You declared the LiftFilter twice in your web.xml file: > >   >     LiftFilter >     Lift Filter >     The Filter that intercepts lift calls >     net.liftweb.http.LiftFilter >  

[Lift] Re: setting user-agent header

2009-09-08 Thread Derek Chen-Becker
S.setHeader can be used in Lift to set a response header. Derek On Tue, Sep 8, 2009 at 9:02 AM, jack wrote: > > Has anyone used dispatch from databinder.net? Its an http library in > Scala. > I do not know how to set the User-Agent header. > > > --~--~-~--~~~---~--

[Lift] Re: Mapper subclasses

2009-09-08 Thread rstradling
I am trying to do what is mentioned below but am struggling with the object side of things for my particular case. This all relates back to trying to auto-generate some classes that I posted back a while ago on. I would love to generate 1 file that has the trait and the object in it that I then

[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread Jack Widman
Sorry. should have thought to tell everyone. I have been coding all day with tunnel vision! The <:< method adds a Map[String, String] of headers to the request object: http://databinder.net/sxr/dispatch-http/0.5.2/main/Http.scala.html#10878 For user agent it would be something like val req_with_a

[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread Randinn
What was the answer now that you have attained it? On Sep 9, 3:02 am, Jack Widman wrote: > You are right. I will fine tune my determine which is a good question to ask > mechanism :) > > On Tue, Sep 8, 2009 at 12:54 PM, Timothy Perrett > wrote: > > > > > IMHO, you'd probably get better traction

[Lift] Re: Box and bind

2009-09-08 Thread Naftoli Gugenheim
Yup - José María wrote: OMG So, as -> begins with "-" then it has the precedence of the operator - On Sep 8, 7:52 pm, Naftoli Gugenheim wrote: > Precedence is determined by the first character of an operator. > > -

[Lift] Re: Lift WebServices

2009-09-08 Thread David Pollak
You declared the LiftFilter twice in your web.xml file: LiftFilter Lift Filter The Filter that intercepts lift calls net.liftweb.http.LiftFilter THis caused the filter to be loaded twice. Remove one of the filter declarations and you should be fine. On Tue, Sep 8, 2009 at

[Lift] Re: Box and bind

2009-09-08 Thread José María
OMG So, as -> begins with "-" then it has the precedence of the operator - On Sep 8, 7:52 pm, Naftoli Gugenheim wrote: > Precedence is determined by the first character of an operator. > > - > > Ross Mellgren wrote: > > Because the compiler interpret yo

[Lift] Re: Box and bind

2009-09-08 Thread Naftoli Gugenheim
Precedence is determined by the first character of an operator. - Ross Mellgren wrote: Because the compiler interpret your expression as you expect. Instead of: "url_enlace" -> ("/product/" + product.id.toString) which is what you wanted, it got: ("url_e

[Lift] Re: Box and bind

2009-09-08 Thread Naftoli Gugenheim
Operators starting with - and + have the same precendence so they are combined left to right. Thus you are concatenating a BindParam with a String, returning a String. - José María wrote: It worked when I put the () around the bind param and the questi

[Lift] Re: Box and bind

2009-09-08 Thread Ross Mellgren
Because the compiler interpret your expression as you expect. Instead of: "url_enlace" -> ("/product/" + product.id.toString) which is what you wanted, it got: ("url_enlace" -> "/product/") + product.id.toString) which it can do because it can take an arbitrary object: ("url_enlace" -> "/pr

[Lift] Re: Some XML special chars rendered by lift, others not in 1.1-SNAPSHOT

2009-09-08 Thread David Pollak
Okay... I'll check in the change after Charles finishes the M5 build On Tue, Sep 8, 2009 at 12:10 PM, jon wrote: > > Aha, > > It is a header problem. If the charset is specified in the content- > type IE will pick the right encoding. I added the following to my > Boot (I already had LiftRules.

[Lift] Re: Box and bind

2009-09-08 Thread José María
It worked when I put the () around the bind param and the question is ... why? On Sep 8, 7:35 pm, Ross Mellgren wrote: > So that doesn't seem to be a box-related thing so much as a bind   > argument related thing, probably because you have a precedence   > problem... try: > > producto.ma

[Lift] Re: Box and bind

2009-09-08 Thread José María
I adapted the code but not the error, Producto is Product in Spanish. On Sep 8, 7:35 pm, Ross Mellgren wrote: > So that doesn't seem to be a box-related thing so much as a bind   > argument related thing, probably because you have a precedence   > problem... try: > > producto.map(product => >

[Lift] Re: Box and bind

2009-09-08 Thread Ross Mellgren
So that doesn't seem to be a box-related thing so much as a bind argument related thing, probably because you have a precedence problem... try: producto.map(product => bind("product", xhtml, "url_enlace" -> ("/product/" + product.id.toString), ) ).openOr(NodeSeq.Empty) Also

[Lift] Re: Box and bind

2009-09-08 Thread José María
That's my code: val product = Product.find(id) producto.map(product => bind("product", xhtml, "url_enlace" --> "/product/" + product.id.toString , ) ).openOr(NodeSeq.Empty) } and I get this error: [INFO] use java command with args in file

[Lift] Re: Box and bind

2009-09-08 Thread Ross Mellgren
Well it depends on precisely what you want. If you want your snippet to become empty if the product is not there, try: productBox.map(product => { bind("product", ns, ...) }).openOr(NodeSeq.Empty) If you want only certain bind positions empty, do the same thing inside the bind: bind("pro

[Lift] Re: Box and bind

2009-09-08 Thread Naftoli Gugenheim
There should be implicits that allow you to bind to a Box of a NodeSeq, so you can bind to prodBox.map(_.toForm). Otherwise bind to prodBox.map(_.toForm).openOr(NodeSeq.Empty) etc. - José María wrote: Hi. Boxes are giving me a hard time. Say you have a mo

[Lift] Re: Some XML special chars rendered by lift, others not in 1.1-SNAPSHOT

2009-09-08 Thread jon
Aha, It is a header problem. If the charset is specified in the content- type IE will pick the right encoding. I added the following to my Boot (I already had LiftRules.useXhtmlMimeType = false): LiftRules.determineContentType = { case _ => "text/html; charset=utf-8" } Maybe

[Lift] Box and bind

2009-09-08 Thread José María
Hi. Boxes are giving me a hard time. Say you have a model of a Product. If I've a snippet that retrieves a Product from the DB: val product : Box[Product] = Product.find(2) And now I want to bind "product" with bind(), product is a Box and it can be empty, how can I bind something that doesn

[Lift] Re: how do you set system properties in lift?

2009-09-08 Thread jon
Note that if you're on 1.1-SNAPSHOT you can set customProperties on the Mailer which would allow to use some other configuration mechanism than system property (like Props or Configgy). val props = Map[String,String]("mail.smtp.host" -> "...") Mailer.customProperties = props Mailer.a

[Lift] Re: Some XML special chars rendered by lift, others not in 1.1-SNAPSHOT

2009-09-08 Thread David Pollak
On Tue, Sep 8, 2009 at 10:37 AM, jon wrote: > > Ah, IE7 seems to be confused about the character encoding of the > page. When the encoding is set to "Auto Select" it chooses "Western > European (Windows)" and the © displays as ©. If I turn off "Auto > Select" and manually set to "Unicode (UTF

[Lift] Re: how do you set system properties in lift?

2009-09-08 Thread Tim Nelson
You need to set system properties: System.setProperty("mail.smtp.starttls.enable","true"); System.setProperty("mail.smtp.host", host) System.setProperty("mail.smtp.port", "587") System.setProperty("mail.smtp.auth", "true") Mailer.authenticator = Full(new Authenticat

[Lift] Re: Some XML special chars rendered by lift, others not in 1.1-SNAPSHOT

2009-09-08 Thread jon
Ah, IE7 seems to be confused about the character encoding of the page. When the encoding is set to "Auto Select" it chooses "Western European (Windows)" and the © displays as ©. If I turn off "Auto Select" and manually set to "Unicode (UTF-8)" it displays correctly. I have LiftRules.early.app

[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread Jack Widman
Right. I will try to keep to the topic :) I actually found him and he quickly answered me. On Tue, Sep 8, 2009 at 12:24 PM, David Pollak wrote: > Jack, > I'm not sure where N8han (the author of Databinder) hangs out, but it's not > on the Lift list. :-( > > Sorry. > > David > > > On Tue, Sep 8,

[Lift] how do you set system properties in lift?

2009-09-08 Thread george
say I wanted to change the port / host that the Mailer uses. how would I go about that? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.

[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread Jack Widman
You are right. I will fine tune my determine which is a good question to ask mechanism :) On Tue, Sep 8, 2009 at 12:54 PM, Timothy Perrett wrote: > > IMHO, you'd probably get better traction with such questions in a > wider audience on the main scala-user list over at EPFL... > > Cheers, Tim > >

[Lift] Re: rewrite problem

2009-09-08 Thread David Pollak
On Tue, Sep 8, 2009 at 9:41 AM, night_stalker wrote: > > Can't find > > RewriteResponse.apply(List[String], Map[String, String], Boolean) > > in 1.0 API, is it a new feature? > It's probably a new feature in 1.1 to address the issue that you identified. I recommend running against 1.1-M4 or S

[Lift] Re: Lift WebServices

2009-09-08 Thread David Pollak
Can you privately send me a zipped file containing your project (please remove the target directory before sending). I think there is something very wrong, but can't diagnose it from the stack trace. On Tue, Sep 8, 2009 at 9:43 AM, abruzzo wrote: > > I'm trying to set up a simple web service us

[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread Timothy Perrett
IMHO, you'd probably get better traction with such questions in a wider audience on the main scala-user list over at EPFL... Cheers, Tim On 8 Sep 2009, at 17:26, Jack Widman wrote: > Right. I will try to keep to the topic :) > > I actually found him and he quickly answered me. > > On Tue, Se

[Lift] Re: Crazy idea for lift's mega proto user: admin panel.

2009-09-08 Thread Timothy Perrett
Agreed - cant help but feel this is a little gimmicky and not really part of lifts core values; that said, as Marius points out this might work as a widget. Cheers, Tim On 8 Sep 2009, at 11:36, marius d. wrote: > > Nice thoughts but personally I don't think this should be part of Lift > co

[Lift] Re: CRUDify

2009-09-08 Thread Ollie
I've added a page with links to my posts http://wiki.github.com/dpp/liftweb/example-crudify-a-entity . I am just starting out with Lift and Scala but am happy to receive any comments. On Sep 8, 12:16 am, Randinn wrote: > I'll ask the author. > > On Sep 2, 3:49 am, David Pollak wrote: > > > >

[Lift] Lift WebServices

2009-09-08 Thread abruzzo
I'm trying to set up a simple web service using Lift v1.0. I've scoured across many examples but because of changes in the api's, none of them compile. I finally found an example of a dispatcher tha compiles but in the sample as in others the dispatcher is added in the boot method of the Boot clas

[Lift] Re: rewrite problem

2009-09-08 Thread night_stalker
Can't find RewriteResponse.apply(List[String], Map[String, String], Boolean) in 1.0 API, is it a new feature? On Sep 8, 11:52 pm, David Pollak wrote: > or: > LiftRules.rewrite.append { >      case RewriteRequest(ParsePath(List("post", id), _, _, _), _, _) > => >        RewriteResponse(List(

[Lift] Re: setting user-agent header with Databinder

2009-09-08 Thread David Pollak
Jack, I'm not sure where N8han (the author of Databinder) hangs out, but it's not on the Lift list. :-( Sorry. David On Tue, Sep 8, 2009 at 8:58 AM, jack wrote: > > Please forgive me for including so much code but I have an important > demo fast approaching and I'm kind of in a bind. I am usi

[Lift] never mind. I contacted the author of Databinder. But thanks

2009-09-08 Thread jack
setting user-agent header. My question is answered --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email

[Lift] Re: Compiler crash

2009-09-08 Thread David Pollak
Over the years, I have seen lots of Scala compiler problems with complex types. The problems are less frequent, but they do come up. If you have a compiler problem: 1. Stop fsc and try again 2. Check the EPFL tickets 3. Post a reproducible example (either on this list or on the Scala

[Lift] Re: Hudson build down?

2009-09-08 Thread David Pollak
On Mon, Sep 7, 2009 at 11:22 AM, Timothy Perrett wrote: > > OK, so its been running for a while now and it looks like its > featuring that same file open problem as before > > Can one of the admins fix it? > restarted. Also, if there are scala-tools.org related issues, please send them to ad

[Lift] Re: Using Roles and LIftRules.authentication

2009-09-08 Thread marius d.
On Sep 8, 7:00 pm, glenn wrote: > Marius, > > I guess there is little more to be said on this issue. Keep in mind > that > in many real-world applications, dynamically assigned user roles are a > requirement. And it's possible for users to have multiple roles, each > in a different role hierarc

[Lift] Re: Using Roles and LIftRules.authentication

2009-09-08 Thread glenn
Marius, I guess there is little more to be said on this issue. Keep in mind that in many real-world applications, dynamically assigned user roles are a requirement. And it's possible for users to have multiple roles, each in a different role hierarchy, in the same application. Inevitably, I will

[Lift] setting user-agent header with Databinder

2009-09-08 Thread jack
Please forgive me for including so much code but I have an important demo fast approaching and I'm kind of in a bind. I am using Databinders Dispatch http library which is a wrapper around Javas HttpClient library. I have included the Http class below. Does anyone see how to set the user-agent hea

[Lift] Re: rewrite problem

2009-09-08 Thread David Pollak
On Tue, Sep 8, 2009 at 6:40 AM, night_stalker wrote: > > Cool, thank you very much! > > On Sep 8, 8:56 pm, Xavi Ramirez wrote: > > That's because the url "post/show" is being intercepted by the same > > rewrite rule that matches "post/" urls. To get around this, try > > adding an if statement t

[Lift] Re: Using Roles and LIftRules.authentication

2009-09-08 Thread marius d.
On Sep 8, 6:12 pm, glenn wrote: > Marius, > > With your help, I think I'm getting closer to understanding what is > needed > here. > > One thing though, is that I believe I do need to manually check if the > user has the > appropriate role (in the DB) before I can set userRoles RequestVar. > Se

[Lift] Re: Using Roles and LIftRules.authentication

2009-09-08 Thread glenn
Marius, With your help, I think I'm getting closer to understanding what is needed here. One thing though, is that I believe I do need to manually check if the user has the appropriate role (in the DB) before I can set userRoles RequestVar. See, in my application, I have no way of knowing in adv

[Lift] setting user-agent header

2009-09-08 Thread jack
Has anyone used dispatch from databinder.net? Its an http library in Scala. I do not know how to set the User-Agent header. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send em

[Lift] Re: rewrite problem

2009-09-08 Thread night_stalker
Cool, thank you very much! On Sep 8, 8:56 pm, Xavi Ramirez wrote: > That's because the url "post/show" is being intercepted by the same > rewrite rule that matches "post/" urls.  To get around this, try > adding an if statement to your rewrite rule: > > LiftRules.rewrite.append { >   case Rewrit

[Lift] Re: & vs & within attributes in templates

2009-09-08 Thread David Pollak
On Mon, Sep 7, 2009 at 9:17 PM, Grant Wood wrote: > > Hello Lifters, > > If I create a template with the following: > > > Foo > > > > I will be served an empty page, containing none of my snippets, and > throwing or logging no errors. By "empty" I mean, the page contains > only the outermos

[Lift] Re: Where did AnyVar go ?

2009-09-08 Thread David Pollak
Sorry. I did an end of friday commit and forgot to add some untracked files. I moved a bunch of stuff from http to util so that that stuff could be used more broadly. If I've got bandwidth today, I'll write up the changes and how they can help in a variety of situations. On Mon, Sep 7, 2009 at 9

[Lift] Re: Some XML special chars rendered by lift, others not in 1.1-SNAPSHOT

2009-09-08 Thread David Pollak
On Mon, Sep 7, 2009 at 11:38 PM, jon wrote: > > Hi, > > I've noticed that some special char xml tags are being interpreted by > lift rather than passing through to the browser. > > source code in my template: > > & > © > " > » > < > > > > >

[Lift] Re: solution to jetty:run locks files on windows problem

2009-09-08 Thread David Pollak
On Mon, Sep 7, 2009 at 3:05 PM, Timothy Perrett wrote: > > Thanks Jon, thats super. > Super +1 > > Cheers, Tim > > On Sep 7, 7:25 pm, jon wrote: > > Done: > http://wiki.github.com/dpp/liftweb/how-to-fix-file-locking-problem-wi... > > > > On Sep 7, 1:49 pm, Timothy Perrett wrote: > > > > > > >

[Lift] Re: rewrite problem

2009-09-08 Thread Xavi Ramirez
That's because the url "post/show" is being intercepted by the same rewrite rule that matches "post/" urls. To get around this, try adding an if statement to your rewrite rule: LiftRules.rewrite.append { case RewriteRequest(ParsePath(List("post", id), _, _, _), _, _) if (id != "show") =>

[Lift] Re: Crazy idea for lift's mega proto user: admin panel.

2009-09-08 Thread marius d.
Nice thoughts but personally I don't think this should be part of Lift core framework. However an admin panel could be provided via a lift widget and would be pretty interesting thing to have. Br's, Marius On Sep 8, 2:16 am, DFectuoso wrote: > I was thinking about how wonderful it is to get a l