[Lift] id# based pages

2009-04-21 Thread harryh
sure. -harryh, just getting started with lift --~--~-~--~~~---~--~~ 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] lift:surround with multiple content elements

2009-04-22 Thread harryh
Is there any simple way for me to abstract this sort of thing away in lift such that I can do something like(ish) this: lift:surround with=section lift:header bA header/b lift:header lift:content Some Content /lift:content /lift:surround -harryh

[Lift] passing an attribute to a named template

2009-08-10 Thread harryh
and the callsite to pass in an attribute for the div tag. In my exact use case I want to set a css width style on the div (sometimes 500px, from other callsites 750px)? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Lift] foreign key reference that will never be null

2009-08-11 Thread harryh
a City. Is there something I can do to enforce a stronger constraint? It would be great if A) I could avoid the Box entirely and just get a City B) The Schemafier set cityid NOT NULL and set a foreign key constraint in the database -harryh --~--~-~--~~~---~--~~ You

[Lift] how to do basic joins

2009-08-13 Thread harryh
like I should be using ByRef here? But it's not clear to me how to do it. -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

[Lift] Re: how to do basic joins

2009-08-13 Thread harryh
Now I get an NPE :( Message: java.lang.NullPointerException net.liftweb.mapper.In$$anon$3.init(MetaMapper.scala:1206) net.liftweb.mapper.In$.apply(MetaMapper.scala:1200) com.harryh.model.Venue.checkins(Venue.scala:40) -harryh

[Lift] Re: how to do basic joins

2009-08-14 Thread harryh
without problems. Haven't been able to figure out what it is though. Also, what version of Lift are you using? 1.0 -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send

[Lift] Re: how to do basic joins

2009-08-15 Thread harryh
, bazes.aliasid, bazes.userid, bazes.id FROM bazes, bars WHERE bazes.barid = bars.id AND bars.fooid = 22120; At least on MySQL (which is what I'm using). Is there any way to get Lift to use a query like the latter instead of the former? -harryh --~--~-~--~~~---~--~~ You

[Lift] SHtml.a generating an a with bad attributes

2009-08-17 Thread harryh
(in templates hidden), and this bit of HTML is also lift:surrounded with section.html. This is with Lift 1.1-M4. Any idea what might be going on here? This is very mysterious to me. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: SHtml.a generating an a with bad attributes

2009-08-17 Thread harryh
at=content key=xxxignore/a Still confused on how the with and at attributes are getting added to the a tag. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email

[Lift] Re: SHtml.a generating an a with bad attributes

2009-08-17 Thread harryh
Looks like a bug to me It does to me as well. And a somewhat serious one. FYI this bug (if it is indeed a bug) does *not* occur in Lift 1.0, but does in 1.1-M1 and later versions. -harryh --~--~-~--~~~---~--~~ You received this message because you

[Lift] how to construct a table with a set number of columns

2009-08-18 Thread harryh
I have a List[Foo] and I want to construct a table with 10 columns and however many rows necessary to contain all the Foos. I feel like I should do something like so, but it's not quite right yet: table lift:MyPage.func tdfoo:name//td /lift:MyPage.func /table def func(xhtml: NodeSeq):

[Lift] PreCache's use of WHERE ... IN

2009-08-18 Thread harryh
... IN queries. http://groups.google.com/group/liftweb/browse_thread/thread/14d4a5aac48ac73d/ -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: how to construct a table with a set number of columns

2009-08-18 Thread harryh
Ah, perfect! Thx! Incidentally, I simplified in two places by instead of doing this: List.range(0, rowNum).foldLeft(Util.emptyNodeSeq)((ns, i) = { }) doing this: List.range(0, rowNum).flatMap(i = { }) (simlar change in the row function) -harryh On Aug 18, 3:52 pm, Ryan Donahue donahu

[Lift] Re: PreCache's use of WHERE ... IN

2009-08-18 Thread harryh
to this), and this issue may speed up my move. What RDBMS are others generally using with Lift? Are there any general recommendations? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: PreCache's use of WHERE ... IN

2009-08-19 Thread harryh
And PostGIS rocks if you do any GIS-related stuff. Which I am (this was my other reason for planning on migrating over). I guess it's time to take the plunge. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Lift] Re: keep showing user entered value in toForm when it doesn't validate?

2009-08-25 Thread harryh
]) it if that exists the input should get that value instead of the current state of the Thing. -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] keep showing user entered value in toForm when it doesn't validate?

2009-08-25 Thread harryh
if there isn't, but what I want kind of seems like what should maybe be default behavior for MappedFoo objects. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email

[Lift] Re: keep showing user entered value in toForm when it doesn't validate?

2009-08-25 Thread harryh
based on David's first message. Thx to both of you for your help, I think I know what I need to do now. -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] how to ajaxInvoke on page load?

2009-08-26 Thread harryh
def someFunc(): JsCmd = { // some JsCmd } I want to run this on page load. This is close, but not quite right: {Script(OnLoad(ajaxInvoke(someFunc _)))} -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Lift] Re: how to ajaxInvoke on page load?

2009-08-26 Thread harryh
Answering my own question: val (name, exp) = ajaxInvoke(() = { SetHtml(id, xhtml) }) {Script(OnLoad(exp.cmd))} AFAIK I can just ignore name? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group

[Lift] Something you might find useful: easy lazy loading of page sections

2009-08-26 Thread harryh
) }) div id={id} img src=/img/ajax_spinner.gif height=32 width=32 alt=wait/ {Script(OnLoad(exp.cmd))} /div } Feel free to critique if there is a better way of doing this. It's working pretty good for me so far though. -harryh --~--~-~--~~~---~--~~ You

[Lift] Bug in MappedEmail: emailPattern is wrong

2009-08-26 Thread harryh
It doesn't allow for + in the name part of the e-mail (harryh +l...@gmail.com). Can one of the lift commiters fix this? It's a one character change. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift

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

2009-08-26 Thread harryh
What's the change to the RegEx? val emailPattern = Pattern.compile(^[a-z0-9._%-+]+@(?:[a-z0-9-]+\\.)+ [a-z]{2,4}$) note the addition of the + to the allowed characters before the @ -harryh --~--~-~--~~~---~--~~ You received this message because you

[Lift] weirdness with stateful snippets and multiple forms on the page

2009-08-27 Thread harryh
=postinput name=F110858803410EI0 type=hidden value=true //form This isn't a huge deal really, but it's kind of annoying. It almost seems like that a lift: element with a form attribute shouldn't generate the form if the snippet function returns NodeSeq.Empty -harryh

[Lift] Bug in HasManyThough causing unexpected deletions?

2009-08-28 Thread harryh
going on in HasManyThrough::afterUpdate -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: Bug in HasManyThough causing unexpected deletions?

2009-08-28 Thread harryh
will always be deleted. Is this really what is happening 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

[Lift] Re: weirdness with stateful snippets and multiple forms on the page

2009-08-28 Thread harryh
Yeah... that's a bug.  I'll have a fix committed up in a few. Bug fix FTW! 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

[Lift] initialization of back reference when using OneToMany

2009-08-31 Thread harryh
in automatically by the underlying code when the initial collection of Books is first instantiated. Is there any particular reason this isn't already happening? -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Lift] Re: initialization of back reference when using OneToMany

2009-08-31 Thread harryh
IN (SELECT authorid FROM books WHERE authorid = 111); But even that query shouldn't be necessary (if the OneToMany code was smarter) as the author for all the books in question is the top level object that the books field lives on. -harryh --~--~-~--~~~---~--~~ You

[Lift] Re: initialization of back reference when using OneToMany

2009-08-31 Thread harryh
authors.id, authors.name FROM authors WHERE id IN (SELECT authorid FROM books WHERE authorid = 111); But even that query shouldn't be necessary (if the OneToMany code was smarter) as the author for all the books in question is the top level object that the books field lives on. -harryh

[Lift] Re: initialization of back reference when using OneToMany

2009-09-01 Thread harryh
I wrote code in MappedOneToMany that calls primeObj on each child's foreign key. Do you think that makes sense? Yes, this makes sense. -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] XML - JSON converter?

2009-09-02 Thread harryh
} ] } Just checking to see if there was something Lift friendly to do this before writing my own (or picking a java library to use). -harryh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] Re: Mapper subclasses

2009-09-02 Thread harryh
class Foo extends LongKeyedMapper[Foo] with IdPK with Timestamp[Foo] { // additional fields that are Foo specific } I have quite a few traits similar to Timestamp at this point corresponding to various fields that appear in lots of different tables in my application. -harryh

[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

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

2009-09-10 Thread harryh
? If so, have you found it generally pretty stable, or would you not recommend it? -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] 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: 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] 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: 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] 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] 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: 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] 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] 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] 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] 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] 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] 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: 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] 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] 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] 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] 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] 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: 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] 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: 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] 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: 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

  1   2   >