[Lift] Re: More dynamic Lift

2010-03-08 Thread harryh
What's the advantage of this sort of setup over using JavaRebel? -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr

[Lift] conflicting slf4j versions when using M3 with smile

2010-03-04 Thread harryh
Smile (a scala memcached client) is pulling in slf4j-jdk14-1.5.2.jar, and lift-util is pulling in slf4j-log4j12-1.5.11.jar. What is the best way to deal with this conflict? -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group

[Lift] Re: conflicting slf4j versions when using M3 with smile

2010-03-04 Thread harryh
a big issue, but the error is disconcerting): SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/ lib_managed/compile/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/harryh

[Lift] Re: conflicting slf4j versions when using M3 with smile

2010-03-04 Thread harryh
Hmm, slf4j-log4j12-1.5.11.jar ends up being in the classpath twice (from /Users/harryh/foursquare.web/lib_managed/compile and /Users/harryh/foursquare.web/target/webapp/WEB-INF/lib). A quick fix would be to apply exclusion of slf4j-log4j12 in lift-util declaration. This will prevent having

[Lift] Re: conflicting slf4j versions when using M3 with smile

2010-03-04 Thread harryh
I tend to think the underlying problem (two slf4j-log4j12 jars on the classpath) is in SBT, so maybe you should ask on the sbt list. Ya, I'm pretty sure you're right. I posted there: http://groups.google.com/group/simple-build-tool/browse_thread/thread/4d088713c85dbdb -harryh -- You

[Lift] Add lock() to MetaMapper

2010-02-26 Thread harryh
Sent this to dpp the other day with the idea that it might be a useful addition to MetaMapper. Would others find this useful? (It's a tad PostgreSQL specific in its current form). object LockMode extends Enumeration { type LockMode = Value val AccessShare = Value(ACCESS SHARE) val RowShare =

[Lift] Re: Potential breaking change: MappedField.name, affects Mapper JSON

2010-02-18 Thread harryh
. -harryh On Feb 18, 6:22 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, As part of fixinghttps://www.assembla.com/spaces/liftweb/tickets/155-lift-mapper-%28re... , I would like to change the semantics of MappedField.name slightly: Currently, the name is always lowercased, ie: class

[Lift] Re: Lift Web Framework 2.0 Milestone 2 released

2010-02-11 Thread harryh
Huzzah! Gonna push the update out to here soon? http://scala-tools.org/mvnsites/ -harryh On Feb 11, 1:42 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote: The Lift Web Framework team is pleased to announce the framework-2.0- M2 release! Lift is an expressive and elegant framework

[Lift] Re: lifecycle callbacks in record

2010-02-11 Thread harryh
. But then, after 5 hours of tinkering you finally realize that you were implementing the mapper LifecycleCallbacks and not the record LifecycleCallbacks. -harryh On Feb 10, 9:10 pm, harryh har...@gmail.com wrote: Can anyone give me an example of how to implement a lifecycle callback in record?  I can't

[Lift] Re: lifecycle callbacks in record

2010-02-11 Thread harryh
. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http

[Lift] Re: lifecycle callbacks in record

2010-02-11 Thread harryh
Yeah that would be a bit of a problem!! Out of interest, what Record backend are you trying to use? http://wiki.github.com/eltimn/scamongo/ Which needs some work (I have a fork on my local machine that I'm tinkering with), but mostly seems to be getting the job done. -harryh -- You

[Lift] Re: lifecycle callbacks in record

2010-02-11 Thread harryh
fields (using Box) (don't save anything to the datastore if you have an empty box) 4) A change to DBRef to change the fetch method name to obj (to make it more like MappedForeignKeys) Hopefully you'll like the changes. -harryh On Feb 11, 5:33 pm, Tim Nelson tnell...@gmail.com wrote: At some point

[Lift] Re: Breaking changes in lift-record 2.0-SNAPSHOT - Optional fields

2010-02-11 Thread harryh
What is the advantage of doing it this way as opposed to having a collection of Field types who's value is a Box[Whatever] (OptionalStringField, OptionalLongField, etc). I'm finding the e-mail you sent to the list moderately confusing. Maybe it's just that more explanation is needed? -harryh

[Lift] lifecycle callbacks in record

2010-02-10 Thread harryh
Can anyone give me an example of how to implement a lifecycle callback in record? I can't, for the life of me, get it to work. Nor does there appear to be any documentation at all :( -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: how to set boolean (non-string) value in NodeSeq?

2010-02-10 Thread harryh
Do it XML style: button disabled=disabled /button On Feb 10, 10:56 pm, wm min...@gmail.com wrote: def seq(): NodeSeq = {       button disabled=true       /button   } it errors out: error: in XML literal: ' or delimited attribute value or '{' scala- expr '}' expected 0 doesn't work

[Lift] lift-json serialization

2010-02-08 Thread harryh
names. I'd really prefer to only use 4: { fn : Harry, ln : Heymann } It seems to me that through clever use of an implicit parameter I ought to be pass in a Map of field name - shortened names. Thoughts? -harryh -- You received this message because you are subscribed to the Google Groups Lift

[Lift] Mapper objects deserialized from json have all of their fields marked dirty

2010-02-04 Thread harryh
At least in my use case this is not idea as I am loading JSON serialized mapper objects from memcached and the fields are not, in fact, dirty. There should possibly be some sort of higher level mechanism that I can use to indicate that this is the case? -harryh -- You received this message

[Lift] Re: Mapper objects deserialized from json have all of their fields marked dirty

2010-02-04 Thread harryh
- Serializing the dirty-state of each field (e.g., field_name_$dirty: true) This further increases the size of the serialized objects which is not ideal - A thread-local flag for the default dirty/clean - A global flag indicating that the fields are marked clean/dirty on

[Lift] use S and templating without state?

2009-12-17 Thread harryh
that no Lift/Jetty session is created when serving this page? -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr

[Lift] Re: Lift 1.1-M8

2009-12-14 Thread harryh
Huzzah! Welcome M8! -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at

[Lift] S.attrs question

2009-12-14 Thread harryh
lift:OuterSnippet form=POST lift:InnerSnippet class=foo style=color:blue /lift:InnerSnippet /lift:OuterSnippet class InnerSnippet { def render(xhtml: NodeSeq) { // S.attrs will, at this point give me (form, POST), (class, foo), (style, color:blue). I only // want the

[Lift] Re: S.attrs question

2009-12-14 Thread harryh
Oh nevermind. S.currentAttrs is what I want. Just didn't see it before. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb

[Lift] lift-json and illegal field names

2009-12-10 Thread harryh
I feel like there has been a post on this before, but I can't seem to find it. How can I construct a case class that can deal with json like so: { type : image } since this won't work (as type is a scala keyword): case class Foo(type: String) -harryh -- You received this message because

[Lift] Re: lift-json and illegal field names

2009-12-10 Thread harryh
Thx all! Just couldn't remember that little trick. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr

[Lift] Re: Fwd: Watch Foursquare Lift talk live from NY

2009-12-08 Thread harryh
My slide deck (for any that are interested) can be found here: http://docs.google.com/present/view?id=dcbpz3ck_24f3v83ggz -harryh On Dec 8, 12:19 am, Xuefeng Wu ben...@gmail.com wrote: 6:30 p.m. the time zone is -8:00? On Tue, Dec 8, 2009 at 12:58 PM, David Pollak feeder.of.the.be

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

2009-12-07 Thread harryh
Another strategy, different from what Ross suggests, that I have found useful in some circumstances. In the view do this: lift:YourPage page:firstsection firstsection:username/ firstsection:foo/ /page:firstsection page:secondsection secondsection:username/

[Lift] lift-json escaping bug

2009-11-30 Thread harryh
getting a \ instead of a / -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit

[Lift] Re: lift-json escaping bug

2009-11-30 Thread harryh
Yes, what Ross said. Further, taking a look at JsonParser.scala the bug appears to be on line ~202 where there are a couple of missing escape sequences: \/ as well as \f. -harryh On Nov 30, 6:20 pm, Ross Mellgren dri...@gmail.com wrote: He's double escaping so that scala's string

[Lift] Re: lift-json escaping bug

2009-11-30 Thread harryh
Done: http://github.com/dpp/liftweb/issues/#issue/214 On Nov 30, 6:33 pm, Ross Mellgren dri...@gmail.com wrote: If you file an issue on github I'll write up a patch for you tonight. -Ross On Nov 30, 2009, at 6:30 PM, harryh wrote: Yes, what Ross said.  Further, taking a look

[Lift] Re: simple database question

2009-11-26 Thread harryh
)) // retrieve the person with name = Jack from the database val people = Person.findAll() // retrieve all people form the database val people = Person.findAll(By_(Person.id, 10)) // retrieve all the people with id 10 etc. -harryh On Nov 26, 1:39 pm, jack jack.wid...@gmail.com wrote: wow. thats

[Lift] lift-json question related to Lists of things

2009-11-25 Thread harryh
if there are none of them? -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit

[Lift] Re: Strip ?xml ? header from a subset of pages

2009-11-25 Thread harryh
It is not 100% obvious to me how I would, after this change is submitted, avoid sending an ?xml? header when serving pages under a certain path. Should we be adding something similar to S.skipDocType (S.skipXmlHeader)? -harryh -- You received this message because you are subscribed

[Lift] Memcached + Mapper (or Record?)

2009-11-20 Thread harryh
in this general area that might be useful. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options

[Lift] Re: Memcached + Mapper (or Record?)

2009-11-20 Thread harryh
I'd like to override findDbByKey() in my MetaMapper class, and save() in my Mapper class(1) and leave the rest of my code unchanged. -harryh (1) And maybe also bulkDelete_!! and delete, but you get the general idea. Personally, I'd use final case classes, serialize them via lift-json and put them

[Lift] Re: Memcached + Mapper (or Record?)

2009-11-20 Thread harryh
tell me if what I want to do sounds crazy to you for some reason. Ultimately what I want to do is decrease the load on my RDBMS. How I go about that exactly is all up for discussion. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] intro to lift-json?

2009-11-19 Thread harryh
this is simple, just a bit confused on the basics. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more

[Lift] Re: intro to lift-json?

2009-11-19 Thread harryh
Why does this parse into a JArray(List(..)) intead of a JArray(..) ? -harryh scala parse( { ids : [1, 2] } ) res5: net.liftweb.json.JsonAST.JValue = JObject(List(JField(ids,JArray (List(JInt(1), JInt(2)) On Nov 19, 3:51 pm, Tim Nelson tnell...@gmail.com wrote: Have you seen the readme

[Lift] Re: intro to lift-json?

2009-11-19 Thread harryh
Ah, ok. That makes sense. Thx! On Nov 19, 5:14 pm, Ross Mellgren dri...@gmail.com wrote: JArray is a case class that wraps a List. It's not an array-of-list or   anything, just that the actual elements are stored in a List that   JArray holds. -Ross On Nov 19, 2009, at 5:12 PM, harryh

[Lift] Re: Where are the dragons hiding?

2009-11-18 Thread harryh
. -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http

[Lift] Presenting on Lift @ NYC Scala Meetup: Dec 7

2009-11-18 Thread harryh
For anyone who lives in the NYC are and would be interested in this sort of thing: http://www.meetup.com/New-York-Scala-Enthusiasts/calendar/11900384/ -harryh -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift

[Lift] foursquare.com now basically all on Lift

2009-11-17 Thread harryh
the community know about what I hope will be a fairly high profile site that is using Lift. -harryh (1) Haven't quite ported feeds.foursquare.com, and there is a legacy PHP based REST api that will live on for a bit longer as it supports current versions of our iPhone app. -- You received

[Lift] unusually formed POSTs aren't handled correctly

2009-11-14 Thread harryh
POST /path/to/page?foo=bar HTTP/1.1 Host: harryh.org Content-Length: 0 req.param(foo) will return Empty instead of Full(bar) -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group

[Lift] Re: unusually formed POSTs aren't handled correctly

2009-11-14 Thread harryh
Hrm. They are *not* ignored with the following request: POST /index?foo=bar HTTP/1.1 Host: localhost Content-Length: 0 Content-Type: application/x-www-form-urlencoded Will look into the spec. -harryh On Nov 14, 4:10 pm, David Pollak feeder.of.the.be...@gmail.com wrote: This is defined

[Lift] Re: How to specify the SELECT statement in the Mapper ?

2009-11-13 Thread harryh
You'll be better off if you don't do it that way. Compute the day of week from created_at in your scala code (personally I prefer joda time for this sort of thing), instead of having the database do it for you. Use the database to store and retrieve data, not to perform calculations. -harryh

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

2009-11-10 Thread harryh
tipsgroup type=Nearbytipid10/id/tip/group/ tips res0: scala.xml.Elem = tipsgroup type=Nearbytipid10/id/ tip/group/tips scala go (res0) res1: String = { tips:{ group:{ type:Nearby, tip: { id:10 } }, type:Nearby } } Note how Nearby appears twice in res1 but only once in res0 -harryh

[Lift] Whitespace removal from XML

2009-11-09 Thread harryh
Not scrictly a Lift question, but does anyone have a library they like (or is there something in scalalib I'm not aware of) that will remove whitespace from XML? foo barhello world/bar /foo to: foobarhello world/bar/foo -harryh --~--~-~--~~~---~--~~ You

[Lift] Re: Whitespace removal from XML

2009-11-09 Thread harryh
Answering my own question, I wrote this. I think it should do what I want: def compactXml(node: Node): Node = node match { case Elem(p, l, a, s, children @ _*) = Elem(p, l, a, s, children.map (compactXml(_)) :_*) case Text(data) = Text(data.trim) case x = x } -harryh

[Lift] Re: How quick is webdev with Lift?

2009-11-08 Thread harryh
I use JRebel and SBT (http://code.google.com/p/simple-build-tool/) and very rarely have to restart my server when doing development. It's a very quick dev-cycle. No big tips really. I save the code and reload the page and see the results of my work. -harryh

[Lift] Re: Rendering a template bit

2009-11-05 Thread harryh
What you want can be done with very basic usage of snippets (the way that templates interface with code in Lift). In your template: lift:YourSnippet.foo/ Then in YourSnippet.scala: class YourSnippet { def foo(xhtml: NodeSeq) = Site.render() } Make sure render returns a NodeSeq. -harryh

[Lift] path based and hostname based UrlRewriting interacting badly

2009-10-28 Thread harryh
First, I rewrite URLs like /user/harryh to /user?uid=harryh Also, requests to http://m.harryh.org/foo/bar get rewritten to / subdomain/mobile/foo/bar Doing this with the following code: val urlRewriter: LiftRules.RewritePF = NamedPF(URLRewrite) { case RewriteRequest(ParsePath(user :: uid

[Lift] unnecessary COMMITs?

2009-10-23 Thread harryh
that something non ideal is going on here -harryh --~--~-~--~~~---~--~~ 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 to liftweb

[Lift] Re: S.deleteCookie broken in M6

2009-10-22 Thread harryh
File a ticket. Done  It's Harry's tickets day for me today.  The more you file, the more that get fixed. Oh my. That's really quite something there. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-21 Thread harryh
? Alternately, should this be considered a Lift bug? -harryh --~--~-~--~~~---~--~~ 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

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-21 Thread harryh
loading static files, then yes. -harryh --~--~-~--~~~---~--~~ 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 to liftweb

[Lift] Re: how to use JqKeypress?

2009-10-20 Thread harryh
Yes, but then how can I distinguish back on the server whether func is being executed because of a blur (in which case I don't really want to do anything) or because of a keypress of enter (in which case I want to perform an action as if the go button had been pressed). -harryh On Oct 20, 11:27

[Lift] Re: Menu entry to perform action then redirect

2009-10-20 Thread harryh
Menu(Loc(logout, List(logout), logout, Template(() = { User.logout }), ifLoggedIn)) :: object User { def logout = { logUserOut S.redirectTo(/) } } On Oct 20, 5:50 pm, Naftoli Gugenheim naftoli...@gmail.com wrote: Could someone give an example of a Sitemap menu entry that performs

[Lift] maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
other lift users trying to accomplish the same goal? How have you gone about it? Would it be a good feature for the framework to have something to do this a bit more built in? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
See ProtoExtendedSession Ah, this is perfect! Just hadn't noticed it before. Thx. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb

[Lift] Re: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
Is it more dangerous to store the user's uniqueId in a cookie than to store another uniqueId that's associated with the user's uniqueId? It is if your site has URLs like http://harryh.org/user/[uid] -harryh --~--~-~--~~~---~--~~ You received this message

[Lift] how to use JqKeypress?

2009-10-19 Thread harryh
(ajax style) when the user presses enter. -harryh --~--~-~--~~~---~--~~ 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: maintaining logged in user longer outside of SessionVar

2009-10-19 Thread harryh
See ProtoExtendedSession It might be kind of annoying to change at this point, but experation is a misspelling in this trait. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: Newbee question Datamapper

2009-10-16 Thread harryh
LongKeyedMapper[Bericht] with IdPK with MyMappedTimeSpan[DBObject] { } -harryh On Oct 16, 8:08 am, hyperion hyperion1...@googlemail.com wrote: Hello, I tried this: class MyMappedTimeSpan[T :Mapper[T]](val owner: T){     import net.liftweb.util._     import net.liftweb.http.S     import xml.NodeSeq

[Lift] binding bug inside of select elements

2009-10-15 Thread harryh
stats:options /div gets bound find (but then I, obviously, don't have proper HTML since the options are inside of a div instead of a select). Has anyone else seen this? Is it possible that this is what is really going on here? It seems like a very strange bug (if I have, in fact, hit a bug). -harryh

[Lift] Re: binding bug inside of select elements

2009-10-15 Thread harryh
Not seeing how to mark it high priority, but here is the ticket: http://github.com/dpp/liftweb/issues/#issue/102 will attach additional information as I figure it out. -harryh On Oct 15, 12:37 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Weird. When you have a repro case, please

[Lift] Re: Followup: Persisting a mapper with join tables in 1.0.2

2009-10-14 Thread harryh
There is no online API docs for 1.1-M6 http://scala-tools.org/mvnsites/liftweb-1.1-M6/lift-webkit/scaladocs/index.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email

[Lift] Re: collecting page load statistics for ajax requests

2009-10-14 Thread harryh
it is that jetty/ tomcat/whatever server you are using is already doing) and parsed with standard tools. callOnAjaxCompleteFunc could certainly create a log entry designed to look like the above, but it might be a bit more work for the developer. -harryh PS: Just so you know this isn't high priority

[Lift] Re: DB logging logs statements twice?

2009-10-13 Thread harryh
point. -harryh On Oct 13, 10:28 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I'm not sure how that could be getting logged twice, especially since it's the exact same ResultSet being returned. When I tested this on my local app (against both PG and MySQL) I didn't get this behavior

[Lift] LongKeyedMapper object where I can set the id

2009-10-08 Thread harryh
LongKeyedMapper object where I can set the id. I want a database object where I set the primary key myself (rather than having it be sequentially by the database). I thought I could do this: class Tombstone extends LongKeyedMapper[Tombstone] { def getSingleton = Tombstone def

[Lift] Re: Milestone 6 Released!

2009-10-08 Thread harryh
Huzzah! On Oct 8, 8:13 pm, Charles F. Munat c...@munat.com wrote: The Lift team is pleased to announce the lift-1.1-M6 release! Lift is an expressive and elegant framework for writing web applications. Lift stresses the importance of security, maintainability, scalability and performance

[Lift] MappedLong null values

2009-10-07 Thread harryh
. Additionally overriding defaultValue for the field and returning null does not appear to work. Is this by design? Is it possible that I am misunderstanding something here? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: How can I pass the result of Xml.toJson to JsonResponse

2009-10-06 Thread harryh
For now I am doing this. It's not so bad. def xmlToJson(xml: Elem): JsExp = { val json = Xml.toJson(xml) map { // some mappings specific to my json needs } JsRaw(Printer.compact(render(json)) } JsonResponse(xmlToJson(xml)) On Oct 6, 11:17 am, David Pollak

[Lift] Re: lift-json and attributes

2009-10-06 Thread harryh
! -harryh --~--~-~--~~~---~--~~ 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 to liftweb+unsubscr...@googlegroups.com For more

[Lift] Possible lift-json bug in Xml.toJson

2009-10-05 Thread harryh
Xml.toJson (in M5) is converting this: iconhttp://harryh.org/img/icons/foo.png/icon to this: JField(icon, JObject(Nil)) Is there some special handling of URLs going on here that might be causing me problems? -harryh --~--~-~--~~~---~--~~ You received

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

2009-10-05 Thread harryh
More info. If the code that generates the XML looks like this: icon{http://harryh.org+theUri}/icon everything is fine, but it breaks when like this: iconhttp://harryh.org{theUrl}/icon -harryh On Oct 5, 2:22 pm, harryh har...@gmail.com wrote: Xml.toJson (in M5) is converting

[Lift] Re: a question about host based url rewriting

2009-10-02 Thread harryh
the standard site and the mobile site. I can see how some people might want that, but it's not my particular use case. I just have a whole separate set of templates I want to serve off of m.harryh.org. -harryh --~--~-~--~~~---~--~~ You received this message because you

[Lift] Re: a question about host based url rewriting

2009-10-02 Thread harryh
to build + deploy. -harryh --~--~-~--~~~---~--~~ 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 to liftweb+unsubscr

[Lift] a question about host based url rewriting

2009-10-01 Thread harryh
), emptyMap, true) } This also makes the mobile site appear at http://harryh.org/mobile/ which I don't really want. Is there any way I can accomplish this goal (other than putting the mobile site in a weird path like / someRandomGuid/ -harryh --~--~-~--~~~---~--~~ You

[Lift] Change net.liftweb.mapper.ByList to take a Seq[T] instead of a List[T]?

2009-09-30 Thread harryh
Subject says it all. Is there any reason why this should not be done? -harryh --~--~-~--~~~---~--~~ 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

[Lift] Re: Change net.liftweb.mapper.ByList to take a Seq[T] instead of a List[T]?

2009-09-30 Thread harryh
We're going to have to turn it into a List under the covers anyway, so it's a performance wash. Taking a look at the code it does no appear to be the case that it will have to be turned into a List under the covers. It's just mapped over and then mkStringed. -harryh

[Lift] selecting random rows from a table

2009-09-29 Thread harryh
(harryh, 2009-9-29)), MaxRows(10)) This does not work, however, because when using SELECT DISTINCT you can't ORDER BY something that you aren't selecting (in PostgreSQL at least, might be ok in MySQL). -harryh --~--~-~--~~~---~--~~ You received this message because

[Lift] Re: Struggling with mapping a list of objects

2009-09-24 Thread harryh
But I cannot for the life of me work out of to store a list of objects What do you expect the underlying type in the database table to be? Normally this would be done with a separate table with a foreign key (MappedLongForeignKey) back to the users table. -harryh

[Lift] Re: XML - JSON converter?

2009-09-24 Thread harryh
This is really really great. Will totally help me out a lot. Thanks! -harryh On Sep 24, 3:24 am, Joni Freeman freeman.j...@gmail.com wrote: Hi, There is now improved XML support in lift master. See a short section in README:http://github.com/dpp/liftweb/tree/master/lift-json/ and some

[Lift] Re: suggestion: strip comments when serving templates

2009-09-23 Thread harryh
happy to describe in detail if dpp (or another committer) is interested. Personally though, I wouldn't consider this super high priority. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: access to raw HttpServletRequest/Response

2009-09-23 Thread harryh
= (r.asInstanceOf[HTTPRequestServlet]).req).open_! -harryh --~--~-~--~~~---~--~~ 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] low level lift exception when building with sbt

2009-09-22 Thread harryh
Experimenting with SBT, and everything works fine when running jetty from within sbt, but when I package up a war file and try to run in production, I'm getting the following exception. Any ideas? -harryh java.lang.NullPointerException at net.liftweb.http.provider.HTTPProvider$$anonfun

[Lift] suggestion: strip comments when serving templates

2009-09-22 Thread harryh
I would love to add comments to my templates: !-- Put the shiny new feature here as soon as we have time to build it -- that got stripped out before being served to end users. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: How to bind preserving element contents?

2009-09-18 Thread harryh
Personally, when doing this, I like splitting out the code to fill in the rows into a separate function like so: def row(xhtml: NodeSeq): NodeSeq = { questions.flatMap(question = { bind(question, xhtml, edit - ..., delete - ...) }) } bind(questions, xhtml, row - row _) On Sep 18, 3:05 

[Lift] Re: What's the best way to get the current request URL

2009-09-16 Thread harryh
S.uri On Sep 16, 9:35 am, Ryan Donahue donahu...@gmail.com wrote: I want to capture the the current request URL, so I can redirect back to it at a later point.  What's the best way to get at the URL?  The answer is probably obvious, but I can't seem to find it. Thanks, Ryan

[Lift] Re: Bug in MappedEmail: emailPattern is wrong

2009-09-16 Thread harryh
Hrm, MappedEmail is now rejecting e-mails with a - in the part before the @. is %-+ being interpreted as % through + and not % OR - OR + ? -harryh, who is easily confused by regular expressions On Aug 26, 7:32 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Thanks. Changed and pushed

[Lift] suggestion: make Mailer use n.l.util.Props

2009-09-16 Thread harryh
Rather than using System.getProperties should Mailer use net.liftweb.util.Props? It seems a little inconsistent as is. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group

[Lift] Problems with ByList on M5

2009-09-15 Thread harryh
[A]](net.liftweb.mapper.MappedField[T,A])T are possible conversion functions from com.foursquare.model.Venue.id.type to net.liftweb.mapper.MappedField [AnyVal,com.foursquare.model.Venue.MapperType] val venues = Venue.findAll(ByList(Venue.id, List(1, 2, 3))) -harryh

[Lift] Re: Problems with ByList on M5

2009-09-15 Thread harryh
Though strangely enough, this compiles fine: val ids: List[Long] = List(1,2,3) val venues = Venue.findAll(ByList(Venue.id, ids) Weird! -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] small bug in SHtml.ajaxText

2009-09-15 Thread harryh
Neither of the ajaxText methods take attrs: (String, String)* The private ajaxText_* does, but the public methods don't. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group

[Lift] Re: small bug in SHtml.ajaxText

2009-09-15 Thread harryh
http://reviewboard.liftweb.net/r/5/ Thanks! -harryh --~--~-~--~~~---~--~~ 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

[Lift] Re: Bug in HasManyThough causing unexpected deletions?

2009-09-14 Thread harryh
I'm still seeing this on M5. My diagnosis of the prolem in my 2nd e- mail is incorrect, but there is definitely a problem here. -harryh On Aug 28, 1:39 pm, harryh har...@gmail.com wrote: Tips are on TipLists based on TipListBinds. Tips are also hooked to a Venue: class Tip extends

[Lift] setting cookies in an ajax response

2009-09-12 Thread harryh
to the ajax call. It's not clear to me if this is correct behavior on lift's part, of if this is a bug. If it is correct behavior, is there a better way to do this sort of thing? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: Milestone 5 now available!

2009-09-10 Thread harryh
Are there generated scaladocs on the web for M5 anywhere? -harryh --~--~-~--~~~---~--~~ 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

[Lift] PreCache doesn't take into account OrderBy and MaxRows?

2009-09-10 Thread harryh
. -harryh --~--~-~--~~~---~--~~ 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 to liftweb+unsubscr...@googlegroups.com For more

[Lift] Re: PreCache doesn't take into account OrderBy and MaxRows?

2009-09-10 Thread harryh
of the thread I only need 10 users, but the query is spitting back thousands. -harryh On Sep 10, 2:16 pm, Viktor Klang viktor.kl...@gmail.com wrote: On Thu, Sep 10, 2009 at 8:15 PM, Viktor Klang viktor.kl...@gmail.comwrote: On Thu, Sep 10, 2009 at 6:23 PM, harryh har...@gmail.com wrote

[Lift] Re: PreCache doesn't take into account OrderBy and MaxRows?

2009-09-10 Thread harryh
A fix is in the works. Awesome. Thanks!!! -harryh --~--~-~--~~~---~--~~ 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

  1   2   >