[Lift] PasswordField in lift-record

2010-01-30 Thread Ross Mellgren
lift-mapper's MappedPassword has a method match_?, but PasswordField in lift-record does not, and I can't see a way around using it since salt_i is protected, other than subclassing PasswordField. I think a match_? method should be added to PasswordField, and if folks agree I'll create a ticket

Re: [Lift] Form submit redirect with query string

2010-01-26 Thread Ross Mellgren
Looks like you forgot to add form="POST" as an attribute to your snippet call. Without this, the tag does not get generated. That is, change to and I think it should start working. -Ross On Jan 27, 2010, at 1:24 AM, Strom wrote: > I'm having a hard time getting this working. I want to crea

[Lift] lift-couchdb

2010-01-24 Thread Ross Mellgren
So I've taken the Couch integration I had previously talked about and have done quite a bit of work on it: - Now has a record integration: - built with two layers -- JSONRecord which is a Record implementation that emits/consumes lift-json AST, and CouchRecord extends that with database acce

Re: [Lift] Welcome Jeppe to the Lift committers

2010-01-22 Thread Ross Mellgren
welcome Jeppe! -Ross On Jan 22, 2010, at 11:25 AM, David Pollak wrote: > Folks, > > Please join me in welcoming Jeppe as a Lift Committer. He's been helping > people on the Lift list and contributing his thoughts to the Lift community > for a while... now it's time for him to contribute code

Re: [Lift] Re: Snippet question

2010-01-21 Thread Ross Mellgren
nt side >> since it already does the output-generation in a nip of a second. >> >> Kudos! >> >> On 21 Jan., 01:24, Ross Mellgren wrote: >> >>> Use & to combine JsCmd. e.g. >> >>> JsShowId("ajax-spinner") & SetHtml(&quo

Re: [Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Ross Mellgren
"It doesn't work" is not sufficient to diagnose. What behavior did you get, and what were you expecting? Were there any errors, log messages, exceptions, etc? If so, please copy them. Finally, if you have a reproducible test case please post it to github. I note earlier in the thread that you we

Re: [Lift] Re: Snippet question

2010-01-20 Thread Ross Mellgren
ote: >> Of course i forgot to paste the snippet..http://pastie.org/787160 >> >> On 20 Jan., 21:44, Ross Mellgren wrote: >> >>> Scala can't figure out what type of parameter you mean, so you need to >>> annotate it -- "expand" -> (fooXhtml: N

Re: [Lift] Re: Snippet question

2010-01-20 Thread Ross Mellgren
Well, it would help to have the compiler error, but I may have gotten precedence wrong. Try: "expand" -> { (fooXhtml: NodeSeq) => ... } instead -Ross On Jan 20, 2010, at 3:51 PM, Franz Bettag wrote: > That doesn't seem to fix the compiler error. :) > > On

Re: [Lift] Re: Snippet question

2010-01-20 Thread Ross Mellgren
Scala can't figure out what type of parameter you mean, so you need to annotate it -- "expand" -> (fooXhtml: NodeSeq) => {... } Or use a separately named function with a type signature, e.g. def doTheStuff(ns: NodeSeq): NodeSeq) = { Log.error(ns.toStrnig); } bind(..., "expand" -> doTheStuff _

Re: [Lift] What happens between 7000 and 8000 requests?

2010-01-20 Thread Ross Mellgren
I'm not going to try and explain, but I do recommend you run ab two or more times in succession and take the average. HotSpot VMs (the java VM) does selective optimization, so the first run of a benchmark will not be near it's maximum speed. I'm not saying this will resolve the issue for you, bu

Re: [Lift] Re: [Lift committers] Re: Image resize code

2010-01-19 Thread Ross Mellgren
enheim wrote: > Does JAI need everything in RAM? > Also, how do you deal with DPI? > > ----- > Ross Mellgren wrote: > > Well, it has to keep the whole source (packed) in memory and the target > (unpacked / 32 bit RGBA) in memory, so I would as

Re: [Lift] Re: Why doesn't ProtoUser use IdPK?

2010-01-19 Thread Ross Mellgren
a primaryKey method that returns a Mapped field of the >> type of the key. To get the primary key field of a given KeyedMapper >> instance, just call primaryKey. >> >> >> >> On Tue, Jan 19, 2010 at 11:55 AM, Ross Mellgren wrote: >>> How about structur

Re: [Lift] Re: Why doesn't ProtoUser use IdPK?

2010-01-19 Thread Ross Mellgren
How about structural typing? trait Stamped[A <: LongKeyedMapper[A] with { val id: MappedLongIndex[A] }] ... I haven't tried it, but maybe it will work. -Ross On Jan 19, 2010, at 2:47 PM, Franz Bettag wrote: > > > On 19 Jan., 19:32, David Pollak wrote: >>> i am trying to extend my logging tr

Re: [Lift] Welcome Mads Hartmann Jensen to the Lift Committers

2010-01-19 Thread Ross Mellgren
Welcome, Mads! -Ross On Jan 19, 2010, at 2:15 PM, David Pollak wrote: > Folks, > > Please join me in welcoming Mads to the Lift committers. > > Thanks, > > David > > -- > Lift, the simply functional web framework http://liftweb.net > Beginning Scala http://www.apress.com/book/view/143021989

Re: [Lift] Re: Help required with utility method

2010-01-18 Thread Ross Mellgren
flatMap (with a capital M) -Ross On Jan 18, 2010, at 5:21 PM, pabraham wrote: > Hi Naftoli, > > The code I have is: > > def allexpenses(expenseTemplate: NodeSeq): NodeSeq = Expense.findAll(By > (Expense.month,m.toLong)).flatmap ({ month => > bind("month", expenseTemplate, > "name" -> Te

Re: [Lift] Re: Image resize code

2010-01-15 Thread Ross Mellgren
sanselan project to read > exif orientation information. > > On Fri, Jan 15, 2010 at 10:33 AM, Ross Mellgren wrote: >> Well, it has to keep the whole source (packed) in memory and the target >> (unpacked / 32 bit RGBA) in memory, so I would assume that as long as >>

Re: [Lift] Re: [Lift committers] Re: Image resize code

2010-01-15 Thread Ross Mellgren
like in terms of memory etc? > > I might have a bit of time to put this into a module and stuff it on review > board. > > Cheers, Tim > > On 15 Jan 2010, at 15:03, Ross Mellgren wrote: > >> According to Jon on the call, he said he was putting together just such

[Lift] Re: [Lift committers] Re: Image resize code

2010-01-15 Thread Ross Mellgren
ussed on the main list... > > Peter > > On Jan 14, 3:01 am, Ross Mellgren wrote: >> Oh I nearly forgot I said on the conference call the other day that I'd send >> the image resize code we built at work, in case it would be helpful. Here it >> is: >> >&g

[Lift] Re: CouchDB module status and tests

2010-01-14 Thread Ross Mellgren
Oh, if anyone who's familiar with or has a vested interest in Record could take a look at the changes in this commit of my branch, I would greatly appreciate it: http://github.com/dpp/liftweb/commit/eba18cbc2fcb1207ede22f0b2234fb47914d1ad0 -Ross On Jan 14, 2010, at 1:28 AM, Ross Mel

Re: [Lift] Re: Parcing Json

2010-01-14 Thread Ross Mellgren
Isn't it that the val Observation is being assigned to the (compiler synthesized) Observe singleton object? In either case, no save method. -Ross On Jan 14, 2010, at 4:41 PM, David Pollak wrote: > > > On Thu, Jan 14, 2010 at 1:37 PM, Randinn wrote: > Well here is the latest iteration of the

Re: [Lift] Re: HashMap to JsArray

2010-01-14 Thread Ross Mellgren
; > JsArray( > (m.elements.collect.map > { case (k, v) => JsObj(k -> JsArray(v._1, v._2)) } > : _*) > > ) > > Martin > > On 14 Jan., 18:32, Ross Mellgren wrote: >> Haven't compiled or teste

Re: [Lift] HashMap to JsArray

2010-01-14 Thread Ross Mellgren
Haven't compiled or tested it, but here's something that should work: JsArray(m.elements.map { case (k, v) => JsObj(k -> JsArray(v._1, v._2)) }: _*) -Ross On Jan 14, 2010, at 11:25 AM, martinsema...@googlemail.com wrote: > Hi > i need some help with a conversation from HashMap to JsArray. > >

[Lift] CouchDB module status and tests

2010-01-13 Thread Ross Mellgren
Pushed to rmm_wip_couch, in case anyone wants to take a look. I made the tests skip if couchdb is not (apparently) running at http://127.0.0.1:5984, as suggested by Alex Boisvert, but didn't have time to make the record integration test yet. -Ross On Jan 13, 2010, at 8:29 PM, Ross Mel

Re: [Lift] TimeHelpers and SimpleDateFormat

2010-01-11 Thread Ross Mellgren
The call to DateFormat.format mutates internal state of the DateFormat object and will cause two concurrent format calls to mix up dates that are being formatted. We've had this happen at work. I think Jeppe is probably right that it should be a def (and therefore manufacture a new format each t

Re: [Lift] Record and nulls / missing values

2010-01-11 Thread Ross Mellgren
; defaults :-) > > Cheers, Tim > > Sent from my iPhone > > On 8 Jan 2010, at 23:37, Ross Mellgren wrote: > >> So I'm trying to write the CouchDB / Lift-JSON record instance, however I've >> run into a major snag, which is null handling. The DBRecor

[Lift] Record and nulls / missing values

2010-01-08 Thread Ross Mellgren
So I'm trying to write the CouchDB / Lift-JSON record instance, however I've run into a major snag, which is null handling. The DBRecord implementation is not complete, so I can't see how other things are doing it, and I tried hacking around and I can't figure out how Record supports null fields

Re: [Lift] Re: SessionVars in different snippets

2010-01-06 Thread Ross Mellgren
SessionVars have an internal "name" which is an identifier unique to the SessionVar, not any surrounding context, so you can place the anywhere. -Ross On Jan 6, 2010, at 1:51 PM, greekscala wrote: > Hello, > > David I like the SessionVar Idea and the type safety. > But as Alex suggests, can I

Re: [Lift] issue with sitemap submenus ?

2010-01-06 Thread Ross Mellgren
By default sitemap will only show submenus "nearby" the current page. You can show the entire expanded menu by using Hi liftweb-list ! > > Happy New Year to all ! > > Well, I have an issue with sitemap submenus. > > Using the following code : > val entries = SiteMap(Menu(Loc("Home", "i

Re: [Lift] Re: QueryParams and joins

2010-01-05 Thread Ross Mellgren
It looks like you probably have some other dependencies somewhere or old jars pointing to the old lift version. Please first try mvn clean jetty:run, and if that doesn't work, run mvn dependency:tree to try and find where the other version of lift- webkit is coming from. If you're still stuc

Re: [Lift] Safe handling of long params

2010-01-05 Thread Ross Mellgren
They aren't. Here are the type signatures for map and flatMap, from Box (the type on Seq is the same, but not specialized to the Box return type): def map[B](f: A => B): Box[B] def flatMap[B](f: A => Box[B]): Box[B] The key is the return type of "f" -- in map, it always returns what goes in

Re: [Lift] Re: Errors not shown after AJAX form submit

2010-01-05 Thread Ross Mellgren
gt;> >>> Br's, >>> Marius >>> >>> On Jan 5, 9:37 am, Adam Warski wrote: >>>> Hello, >>>> >>>> Ah, I didn't spot this. I only have: >>>> >>>> >>>> >>>> which would suggest

Re: [Lift] Safe handling of long params

2010-01-04 Thread Ross Mellgren
; Cheers, Tim > > On 4 Jan 2010, at 21:45, Ross Mellgren wrote: > >> S.param("image").flatMap(asLong) > > -- > > You received this message because you are subscribed to the Google > Groups "Lift" group. > To post to this group, send email to lift.

Re: [Lift] Safe handling of long params

2010-01-04 Thread Ross Mellgren
I can answer b) -- S.param("image").flatMap(asLong) asLong comes from BasicTypesHelpers. -Ross On Jan 4, 2010, at 4:42 PM, Jim Wise wrote: > > So, in my endless retweaking of this code, getting better (and > learning > more lift) on each pass, I've got a rewrite rule like this > > case

Re: [Lift] Errors not shown after AJAX form submit

2010-01-04 Thread Ross Mellgren
S.error(NodeSeq) and S.error(List[FieldError]) differ in that the latter registers errors against particular fields, and the former is a page-wide error. The latter is more like S.error(String, NodeSeq). Do you have Msg snippets for each field, like this? ... field ... (see net.liftweb.bui

Re: [Lift] Re: Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder

2010-01-04 Thread Ross Mellgren
you mind telling me > the date of that commit? Thanks. > > ----- > Ross Mellgren wrote: > > You're probably out of date. Here is the commit that introduced it: > > http://github.com/dpp/liftweb/commit/5073a224cca39ab94ff3c3f7f4a8d093869e8f

Re: [Lift] Re: Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder

2010-01-04 Thread Ross Mellgren
You're probably out of date. Here is the commit that introduced it: http://github.com/dpp/liftweb/commit/5073a224cca39ab94ff3c3f7f4a8d093869e8f52 -Ross On Jan 4, 2010, at 1:43 PM, Naftoli Gugenheim wrote: > Maybe my repo is out of sync? Is it on master? When was it committed? > git grep Applier

[Lift] Re: [Lift committers] Re: Couch/Lift JSON/Dispatch integration

2010-01-04 Thread Ross Mellgren
t need polishing, I'd love to hear about. -Ross On Jan 4, 2010, at 2:34 AM, Marius wrote: > Since CouchDB is Apache 2.0 licence I think this project should make > it into /lift-persistence after some more polishing (like the ones you > mentioned). I think it would be a very cool additi

[Lift] Couch/Lift JSON/Dispatch integration

2010-01-04 Thread Ross Mellgren
(Reposting to the main list from the committers list where I tested the waters) Hi all, I've written a small library (http://github.com/Dridus/couchlift) that provides an integration to CouchDB using Lift JSON and Dispatch. Dispatch has an existing binding to Couch, but it uses its own JSON

Re: [Lift] Re: using .java files in lift's compile cycle

2010-01-03 Thread Ross Mellgren
Try adding this: org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.6 1.6

[Lift] Re: [Lift committers] Lift and Lift Ticket

2010-01-03 Thread Ross Mellgren
On Jan 3, 2010, at 2:01 PM, Derek Chen-Becker wrote: > Lift Ticket is very close to a basic functionality release, and in the > interest of having something useful come out of the time that I've already > invested in it, I'm keeping it licensed Apache. If anyone (Ross?) wants to > continue worki

Re: [Lift] warning: value rewrite in object LiftRules is deprecated

2009-12-31 Thread Ross Mellgren
Instead of LiftRules.rewrite, use LiftRules.statelessRewrite if you want the old behavior (e.g. rewriting while S is not available) If you have rewrites that require S to be available, then you can use the new LiftRules.statefulRewrite I'm not sure about the SiteMap question. -Ross On Dec 3

Re: [Lift] Re: Issue with Context Handling

2009-12-31 Thread Ross Mellgren
On Dec 31, 2009, at 11:55 AM, Marius wrote: > On Dec 31, 6:47 pm, Ross Mellgren wrote: >> On Dec 31, 2009, at 11:39 AM, Marius wrote: >> The only problem I thought of when I was thinking about this earlier >> is that LiftSession.contextPath can be calculated in the absence

Re: [Lift] Re: Issue with Context Handling

2009-12-31 Thread Ross Mellgren
textPath(this) or >>> S.curRequestContextPath) openOr _contextPath >> >>> thus can you try it by setting in boot: >> >>> LiftRules.calculateContextPath = {req => Empty} ? >> >>> that should get you the contexPath the same as S. BT S.contextPath

Re: [Lift] Re: Issue with Context Handling

2009-12-31 Thread Ross Mellgren
th) openOr _contextPath > > thus can you try it by setting in boot: > > LiftRules.calculateContextPath = {req => Empty} ? > > that should get you the contexPath the same as S. BT S.contextPath is > defined as: > > def contextPath: String = session.map(_.contextPath) openOr "

Re: [Lift] Re: Issue with Context Handling

2009-12-31 Thread Ross Mellgren
The problem I experienced with X-Lift-ContextPath is that it does not set LiftSession.contextPath, which is where the AJAX path is generated from. It set Req.contextPath, but not the session. I found this by using an nginx with this config: location /foobar { rewrite ^/

Re: [Lift] Issue with Context Handling

2009-12-30 Thread Ross Mellgren
This is the same issue mentioned in the "Postmortem thoughts" thread, that dpp mentioned has an issue at http://github.com/dpp/liftweb/issues#issue/68 , right? On Dec 30, 2009, at 4:16 PM, David Pollak wrote: > Lift doesn't seem to have any central place to handle URL issues > related to serv

Re: [Lift] Binding error

2009-12-30 Thread Ross Mellgren
A little background on implicits, maybe it'll help you. A particular expression will only ever have one implicit conversion applied -- the compiler will not attempt to chain together implicit conversions (as I believe that's an NP problem) So, the arguments to bind(...) are BindParams. There

Re: [Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Ross Mellgren
t;>> see LiftMerge.scala. HeadHelper holds the old merge. IMO it should >>> be >>> removed. >> >>> I'm not really sure why you guys don't like redirects, probably to >>> avoid traffic, but IMO this is not very relevant. But regar

Re: [Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Ross Mellgren
s not very relevant. But regardless, you > guys have your own reasons. > > Br's, > Marius > > On Dec 30, 9:39 am, Ross Mellgren wrote: >> I think the problem with the site map is that the request you have >> is for a page that doesn

Re: [Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Ross Mellgren
nse(( Silly goose >> html>), >>>Empty, List("Content-Type" -> "text/ >>> html; >>> charset=utf-8"), Nil, 404, S.ieMode) >>> } >> >>> I have: >> >>> // Catch 404s >

Re: [Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Ross Mellgren
This is the production run mode thing dpp talked about. Try your app with -Drun.mode=production -Ross On Dec 29, 2009, at 7:39 PM, Alex Black wrote: > Thanks for pointing that out, the catch-all sounds dangerous. > > I tried your suggestion, and it works well except I'm encountering one > issu

Re: [Lift] Snippet lifetime

2009-12-29 Thread Ross Mellgren
On Dec 29, 2009, at 6:28 PM, David Pollak wrote: > On Mon, Dec 28, 2009 at 8:04 AM, Adam Warski wrote: > Hello, > > > Yes, the article is out of date now... Lift now makes sure that > multiple references to a single snippet in the same request context > use the same instance of that snippet. >

Re: [Lift] Re: Lift is awesome (with reservations)

2009-12-29 Thread Ross Mellgren
We have a code review board (reviewboard.liftweb.net), but it's pretty geared towards changes. I don't know if it can be configured or used or what-have-you for reviewing the current state of code. -Ross On Dec 29, 2009, at 4:39 PM, Erkki Lindpere wrote: > Another option would be to use a sp

Re: [Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Ross Mellgren
ed M6 as > being the most stable of the milestones. > > On Tue, Dec 29, 2009 at 1:07 PM, Ross Mellgren > wrote: > Switch to 1.1-M8, if you can. > > -Ross > > On Dec 29, 2009, at 1:04 PM, Alex Black wrote: > > > > >> To be clear, RewriteResponse is a LiftRe

Re: [Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Ross Mellgren
Switch to 1.1-M8, if you can. -Ross On Dec 29, 2009, at 1:04 PM, Alex Black wrote: > >> To be clear, RewriteResponse is a LiftResponse, and therefore, valid. > > I had tried it, and got a compile error, keep in mind I'm still on > 1.0: > > http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb

Re: [Lift] How can I set a custom response StatusCode in a snippet?

2009-12-29 Thread Ross Mellgren
I don't think this addresses his question directly, which is how to change the response code while already yielding control of the generated LiftResponse to the template mechanism. If that's what the question is, then the answer (without a change to lift) is probably to alter LiftRules.conve

Re: [Lift] Re: Snippet lifetime

2009-12-28 Thread Ross Mellgren
On Dec 28, 2009, at 12:46 PM, Adam Warski wrote: > Hello, > >>> 1) Can I have in lift a "true" request variable/snippet, that is >>> such which has a lifetime of one request (without any ajax >>> callbacks)? I can't use TransientRequestVar because it's private. >>> It would be useful to com

Re: [Lift] Sending malformed HTML in custom dispatch

2009-12-26 Thread Ross Mellgren
You can use a standard xml-style response, but use Unparsed to embed unparsed (and possibly malformatted) XML as a string. -Ross On Dec 26, 2009, at 12:53 AM, tommycli wrote: > I'm using custom dispatch (to handle both XML & media files). Often, I > will want to send a page that contains user-i

Re: [Lift] Re: Advanced lift binding, parameters?

2009-12-23 Thread Ross Mellgren
t; > > > // Emit the block twice, once for each item (first,second). > def firstAndSecond(xhtml: NodeSeq): NodeSeq = { > List(first,second).flatMap( item => renderItem(xhtml, item) ) > } > > def renderItem( xhtml: NodeSeq, item: Item): NodeSeq = { > _currentItem(item) > //

Re: [Lift] Recursive bind within the same snippet

2009-12-23 Thread Ross Mellgren
Normally you'd probably do something like i.category.obj.map(_.name).openOr("unknown category!") That is, if I have a category object give me its name, otherwise give me "unknown category!" Also, if you have to collect the result a bunch of possibly-failing computations (like looking up the

Re: [Lift] Re: Advanced lift binding, parameters?

2009-12-23 Thread Ross Mellgren
ach item (first,second). > def firstAndSecond(xhtml: NodeSeq): NodeSeq = { > List(first,second).flatMap( item => renderItem(xhtml, item) ) > } > > How then do I implement Item.picture, Item.points to know *which* item > is currently being rendered? > > thx > > - Al

Re: [Lift] Recursive bind within the same snippet

2009-12-23 Thread Ross Mellgren
Move the bind to an inner function, and call that function recursively, for example: class Image extends DispatchSnippet { val dispatch: DispatchIt = { case "showAll" => showAll } def showAll(ns: NodeSeq): NodeSeq = { def doBinding(ns: NodeSeq): NodeSeq =

Re: [Lift] Advanced lift binding, parameters?

2009-12-23 Thread Ross Mellgren
S.attr gives you attributes of the current snippet calling tag, e.g. class Item extends DispatchSnippet { val dispatch: DispatchIt = { case "points" => points } def points(ns: NodeSeq): NodeSeq = { val points = S.attr("item") match { case Full("first"

Re: [Lift] Lift binding: is ChooseTemplate always necessary with nested tags?

2009-12-23 Thread Ross Mellgren
bind("alsoKnownAs", in, "list" -> { (ns: NodeSeq) => bind("list", ns, "label" -> ... ) }) -Ross On Dec 23, 2009, at 3:59 PM, Alex Black wrote: > I've got this xhtml in my template: > > > Also known as: > > > > > > > > with this snippet code: > > def alsoKnownAs( xhtml: Nod

Re: [Lift] Re: Foreach-like snippet: am I doing it right?

2009-12-23 Thread Ross Mellgren
that's > why I want the rendering of these objects to be separated into their > own template. > > But maybe I'll change my mind. Doing it like you suggested is probably > faster too. > > Erkki L > > On Dec 23, 8:31 pm, Ross Mellgren wrote: >> S.session.get.p

Re: [Lift] Foreach-like snippet: am I doing it right?

2009-12-23 Thread Ross Mellgren
S.session.get.processSurroundAndInclude has a couple issues, first is that it seems to be a much larger stick than you need, and the other reason is that you are using "get" (which is for Option, I presume you mean open_!, since S.session is a box) which is not safe -- it will throw NPE in

Re: [Lift] Reserved words in templates/snippets?

2009-12-23 Thread Ross Mellgren
There is a built in snippet called "Msg" (it's in net.liftweb.builtin.snippet). It is wired into LiftRules.snippetDispatch by default, which I believe will run before automatic snippet resolution via class name. If you want to use a snippet called "Msg", I think you might have to wire it i

Re: [Lift] Problem with LiftFilter in 2.8.0

2009-12-22 Thread Ross Mellgren
Where do you have the scala library jars? If you haven't taken pains to ensure that you have two entirely separate scala JARs (2.7.3 and 2.8) in two separate classloaders I could believe that you'll get all kinds of problems like this. You might be better served using two separate tomcat instanc

Re: [Lift] Re: [scala-internals] RC5 candidate for the first 2.8.0 beta

2009-12-22 Thread Ross Mellgren
http://www.dridus.com/liftweb-compiled-280.tar.gz It is still uploading -- it totals 240,976,056 bytes and should be completely uploaded in 15 minutes. -Ross On Dec 22, 2009, at 11:45 AM, martin odersky wrote: > I just verified that it did indeed use 2.7.7, because the generated > classfiles

Re: [Lift] Re: PayPal X

2009-12-22 Thread Ross Mellgren
of my > professional life using SOAP, and im scared for life! Right now I > have zero inclination to write an SOAP library for Scala... its just > too painful (soap, not scala) > > Cheers, Tim > > On 22 Dec 2009, at 15:49, Ross Mellgren wrote: > >> Roll your own? Wit

Re: [Lift] Re: PayPal X

2009-12-22 Thread Ross Mellgren
ame > problems there. Looks like Apache Axis is AP2 licensed, but I really > dont like Axis at all. Any ideas? > > Cheers, Tim > > On 22 Dec 2009, at 01:04, Ross Mellgren wrote: > >> Looks like JAX-WS reference implementation is dual licensed CDDL or >> GPLv2. >>

Re: [Lift] 280_port and yuicompressor problem

2009-12-21 Thread Ross Mellgren
This is actually due to OpenJDK, not due to Scala at all, if I recall correctly. Please try installing the Sun JDK and see if the problem goes away. If you're staunchly against that, you can just comment out the yuicompressor plugin, also. -Ross On Dec 21, 2009, at 8:10 PM, Alan M wrote: > I

Re: [Lift] Re: PayPal X

2009-12-21 Thread Ross Mellgren
Looks like JAX-WS reference implementation is dual licensed CDDL or GPLv2. -Ross On Dec 21, 2009, at 7:32 PM, David Pollak wrote: > > > On Mon, Dec 21, 2009 at 4:28 PM, Timothy Perrett > wrote: > Cool - I'll have a play overthe hols. > > It's a SOAP api so I'd need to depend on CXF or JAXWS

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Ross Mellgren
I like the source for the DSL very much, I think it's very well written. Thanks for sharing it. -Ross On Dec 17, 2009, at 9:34 PM, Naftoli Gugenheim wrote: > Okay! > The following code: > val jsFunc: JSFunc = Function("myFunc")("param1", "param2") {case param1 > :: param2 :: Nil => >

Re: [Lift] Generalized jQuery function missing?

2009-12-17 Thread Ross Mellgren
I usually just make one, since it's very simple, plus it can verify at compile time via the function type signature if you have the right number and type of arguments. -Ross On Dec 17, 2009, at 5:59 PM, Jonathan Hoffman wrote: > Does something like this exist? I didn't see it, but maybe it

Re: [Lift] Highlighting even/odd rows in a table

2009-12-16 Thread Ross Mellgren
lectors/odd > > alex > > > On Wed, Dec 16, 2009 at 4:04 PM, Ross Mellgren wrote: > You could use customers.zipWithIndex.flatMap({ case (customer, index) > => ... instead of customers.flatMap(customer => to get the index, and > then use index % 2 == 0 to see if it&#x

Re: [Lift] Highlighting even/odd rows in a table

2009-12-16 Thread Ross Mellgren
You could use customers.zipWithIndex.flatMap({ case (customer, index) => ... instead of customers.flatMap(customer => to get the index, and then use index % 2 == 0 to see if it's an even row or an odd row. How you get that style into your template is up to you -- using an attribute bind par

Re: [Lift] Funny behavior of head merging with nested head blocks

2009-12-16 Thread Ross Mellgren
On Dec 16, 2009, at 3:54 PM, David Pollak wrote: > On Wed, Dec 16, 2009 at 11:55 AM, Ross Mellgren > wrote: > I agree I'm doing the wrong thing here -- the tag > rightly should be outside of the head block, or the snippet should not > emit . However, the resulting behavior

[Lift] Funny behavior of head merging with nested head blocks

2009-12-16 Thread Ross Mellgren
I was diagnosing some incorrect HTML in our application using Lift, and I found a strange behavior of head merging (I assume) when you emit a tag into a tag from the snippet. The code speaks better than I do about this: ... object Dialog extends DispatchSnippet { val standardDialogOpt

Re: [Lift] Duplicate Keys Created by Schemefier

2009-12-15 Thread Ross Mellgren
On Dec 15, 2009, at 10:23 PM, David Pollak wrote: > On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett > wrote: > Should this be fixed? Or is the more helpful answer 'Don't use > MySQL'? ;-) > > I would use MySQL for a production site. Did you mean "wouldn't"? -Ross -- You received this message

Re: [Lift] Understanding SessionVars and Objects

2009-12-09 Thread Ross Mellgren
On Dec 9, 2009, at 8:44 PM, johncch wrote: > Hi, > > I'm trying to understand the implementation of MetaMegaProtoUser, > reading the code, there are a couple of conceptual questions that I'd > like to ask. > > I understand object as a singleton class, or perhaps vaguely similar > to a static cla

Re: [Lift] Sharing data between snippet functions during a single HTTP request

2009-12-07 Thread Ross Mellgren
{ > //here I try to get the categoryId if it selected. > val catId: Long = _categoryId.is > S.runTemplate(List("competence","_competence")). > map(ns => ModalDialog(doCompetenceEditor(ns,catId,competence))) &

Re: [Lift] Sharing data between snippet functions during a single HTTP request

2009-12-07 Thread Ross Mellgren
Xuefeng Wu wrote: > I use myId.is but get nothing. > I don't know what I could do with the information. > > On Tue, Dec 8, 2009 at 10:19 AM, Ross Mellgren wrote: > I think that message is just informative, letting you know that you don't > seem to be using the request v

Re: [Lift] Sharing data between snippet functions during a single HTTP request

2009-12-07 Thread Ross Mellgren
e"->a(() => selectNode, Text(nodeName)) > ) >} > > } > > the RequestVar must be used at Class? > > On Sat, Nov 21, 2009 at 12:09 AM, Ross Mellgren wrote: > RequestVar is the

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-07 Thread Ross Mellgren
Sha-bam http://github.com/dpp/liftweb/issues/#issue/229 -Ross On Dec 7, 2009, at 12:43 PM, David Pollak wrote: > Is there a ticket for this? I'm in ticket-closing mode today ;-) > > On Mon, Dec 7, 2009 at 9:29 AM, Ross Mellgren > wrote: > I looked at adding a Box vari

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-07 Thread Ross Mellgren
I looked at adding a Box variant, but it wasn't a strictly speaking trivial change since calcValue on BindParam is of type NodeSeq. I guess it could become Box[NodeSeq] and then when binding at element positions convert that to NodeSeq.Empty, but I also have had the need (which I've worked

Re: [Lift] XSLT?

2009-12-04 Thread Ross Mellgren
I don't know of any example code, but if you want I can probably whip up a quick example tonight or tomorrow to get you along. -Ross On Dec 4, 2009, at 12:19 PM, Jim Wise wrote: > Had asked this earlier on the scala-users list. It's not (quite) a > Lift > question, but maybe someone has don

Re: [Lift] Re: Spaces getting removed from title in head merge?

2009-12-03 Thread Ross Mellgren
roblem for now. If my snippet outputs > foo vs bar then the spaces don't get removed. > > I'm waiting on 1.1 to be released before upgrading - but if there is a > stable release now I might try it out. > > - Alex > > On Dec 3, 3:16 pm, Ross Mellgren wrote: >>

Re: [Lift] Re: Spaces getting removed from title in head merge?

2009-12-03 Thread Ross Mellgren
Ohh, I created a 1.1-SNAPSHOT one. It's possible, I guess, I'm not terribly familiar with 1.0. Can you upgrade to 1.1-SNAPSHOT? It's better in practically every aspect :-) -Ross On Dec 3, 2009, at 3:14 PM, Alex Black wrote: > -- You received this message because you are subscribed to the G

Re: [Lift] Re: Spaces getting removed from title in head merge?

2009-12-03 Thread Ross Mellgren
uct1" -> "foo", "product2" -> "bar") } Any more of your surrounding code that might point out the problem? -Ross On Dec 3, 2009, at 2:48 PM, Alex Black wrote: > Here's the actual code: > > > > vs >

Re: [Lift] Spaces getting removed from title in head merge?

2009-12-03 Thread Ross Mellgren
The example you posted isn't valid XML (needs to be or something along those lines), so I'm wondering if you could post the actual example code? I can't think of any reason offhand those should be stripped. -Ross On Dec 3, 2009, at 2:41 PM, Alex Black wrote: > In one of my templates I hav

Re: [Lift] Re: JSON Reponses

2009-12-03 Thread Ross Mellgren
Views are for providing template XML, I believe, and so are still using NodeSeq and wouldn't address the problem. Looking at the type of LiftRules.viewDispatch seems to imply that, at least. -Ross On Dec 3, 2009, at 1:59 PM, Daniel Nelson wrote: > Hi Matt, > > I'm pretty new/novice myself,

Re: [Lift] JSON Reponses

2009-12-03 Thread Ross Mellgren
Try using a dispatch: LiftRules.dispatch.append { case Req("my"::"path"::Nil, _, _) => () => Full(JavaScriptResponse (JSObj("foo" -> "bar"))) } in boot. When you visit http://host/my/path, a JSON response with { "foo": "bar" } should be generated. -Ross On Dec 3, 2009, at 12:06 PM, dead

Re: [Lift] Re: scaladocs

2009-12-01 Thread Ross Mellgren
left. Hope that helps, -Ross On Dec 1, 2009, at 8:11 PM, E. Biggs wrote: > hi, thanks.. i'm looking for the API documentation??? > > On Dec 1, 5:08 pm, Ross Mellgren wrote: >> Tryhttp://scala-tools.org/mvnsites-snapshots/liftweb/instead of with >> index.html >&g

Re: [Lift] scaladocs

2009-12-01 Thread Ross Mellgren
Try http://scala-tools.org/mvnsites-snapshots/liftweb/ instead of with index.html -Ross On Dec 1, 2009, at 8:01 PM, E. Biggs wrote: > should http://scala-tools.org/mvnsites-snapshots/liftweb/scaladocs/index.html > be something other than nothing? > > Is there a better way to get snapshot scala

Re: [Lift] Re: How can one bind value-less attributes?

2009-12-01 Thread Ross Mellgren
The second parameter is a function to do something when form is >>> submitted. >> >>>> alex >> >>>> On Tue, Dec 1, 2009 at 2:50 PM, Alex Black wrote: >>>>> Is there a good/reasonable way to conditionally output >>>>> checke

Re: [Lift] Re: lift-json escaping bug

2009-12-01 Thread Ross Mellgren
Fixed: d977c95589fbd5de8bc45e43c2867097dd75a807 -Ross On Nov 30, 2009, at 8:33 PM, harryh wrote: > Done: > > http://github.com/dpp/liftweb/issues/#issue/214 > > On Nov 30, 6:33 pm, Ross Mellgren wrote: >> If you file an issue on github I'll write up a patch for

Re: [Lift] How can one bind value-less attributes?

2009-12-01 Thread Ross Mellgren
Valueless attributes are prohibited by XML. The proper XHTML formulation is to use the name of the attribute as the value, e.g. checked="checked" -Ross On Dec 1, 2009, at 5:28 PM, Alex Black wrote: > For example, if my html template looks like this: > > >foobar >

Re: [Lift] Beware of using a body tag in a surrounded template, especially with nested surrounds

2009-12-01 Thread Ross Mellgren
Isn't XHTML schema validation turned on by default in dev mode? Wouldn't it detect this case? -Ross On Dec 1, 2009, at 12:24 PM, David Pollak wrote: > Putting a tag in templates is pretty much the only way to > go. If you don't put the body tag in the template that surrounds a > given pa

Re: [Lift] **URGENT** Archetypes broken

2009-11-30 Thread Ross Mellgren
On Dec 1, 2009, at 12:28 AM, David Pollak wrote: > On Mon, Nov 30, 2009 at 8:25 PM, Ross Mellgren wrote: > > archetype:create was working up through last week. There were no **BREAKING > CHANGES** notifications. archetype:generate forces me to answer questions > (the whole po

<    1   2   3   4   5   >