[Lift] Set Expires headers for certain pages, files, etc

2010-03-03 Thread Alex Black
I asked about this before: http://groups.google.com/group/liftweb/browse_thread/thread/9daa4692acbfce6/00be519d77901fb0 Can anyone suggest a good way to set Expires headers? - I'd like our images, JS and CSS to have expires headers perhaps 1 month in the future - I'd like to set certain pages'

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-16 Thread Alex Black
we serve desired resources in one response. To sum up the random string is what I think we should start with. IMO it is a fairly good solution that can evolve in time towards something else. Cheers Tim On 13 Feb 2010, at 08:45, Marius wrote: On 12 feb., 23:04, Alex Black

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-15 Thread Alex Black
There is no proper API to see when file names are changed unless we poll. I prefer to have  LiftRules function that by default takes a value generated at startup. User's can override it to generate the token more frequently depending on their use-case. I was interested in less-frequently (not

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-15 Thread Alex Black
On 12 feb., 19:25, Alex Black a...@alexblack.ca wrote: I'm wondering if other people have encountered this issue, or if we're doing something wrong, or if there is a nice solution to this. Whenever we update our site, with new code andCSSand JS, any user who visits it gets

[Lift] Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
I'm wondering if other people have encountered this issue, or if we're doing something wrong, or if there is a nice solution to this. Whenever we update our site, with new code and CSS and JS, any user who visits it gets OLD css and js files (from their browser cache) unless they force a refresh.

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
hey guys, I love the enthusiasm, but putting a unique value on the css filenames seems like a hack, surely we can do better? Whats supposed to happen is: - browser requests resource (e.g. styles.css) with a conditonal get (if newer than X) - server checks to see if resource is newer than X - if

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
name. -Ross On Feb 12, 2010, at 3:48 PM, Alex Black wrote: hey guys, I love the enthusiasm, but putting a unique value on the css filenames seems like a hack, surely we can do better? Whats supposed to happen is: - browser requests resource (e.g. styles.css) with a conditonal get

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
that by default generates a sequence once per application time. Thus you could potentially set your own function that reads this for a config file? Similarly lift:js name=myjs.js/ would do the same. Br's, Marius On 12 feb., 19:25, Alex Black a...@alexblack.ca wrote: I'm wondering if other people have

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
(and particularly in certain industries) that it has to be supported for many companies :-/ -Ross On Feb 12, 2010, at 3:51 PM, Alex Black wrote: 1. Luckily IE6 is dying out :) unlesshttp://saveie6.com/works 2. surely even IE6 obeys expires headers or some caching rules? On Feb 12, 3:48 pm, Ross

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
Yes, that's how it should work if everything was configured correctly (which I think it wasn't for the OP) Heh, I'm the OP. I'll have to dig into why its not working as expected I guess. But what we were discussing (at least I was :-) was more that Lift should serve resources with an

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
Or just the MD5 hash of the contents... ah, now you're talking. That sounds like a good solution. -- 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

[Lift] Re: Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
, 2010 at 10:04 PM, Alex Black a...@alexblack.ca wrote: Yes, that's how it should work if everything was configured correctly (which I think it wasn't for the OP) Heh, I'm the OP. Ahh sorry :-) The other option is say you can cache this for like the next hour but every time you fetch

[Lift] Url Rewriting Extractors - Inheritance? Composition?

2010-02-08 Thread Alex Black
Has anyone found a good pattern/method of re-using Url Rewriting extractors? I've got a url like this: /products/manufacturer/productId And an extractor for that, that given a product gives you a URL (apply) and given a ParsePath gives you an Option[Product]. I'd then like to support a sub url

[Lift] Re: URL Rewriting - 'nested' ParsePath?

2010-02-06 Thread Alex Black
Hi Jeppe, thanks, that looks like what I need! On Feb 6, 3:03 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Alex Black a...@alexblack.ca writes: Hi, I'd like to rewrite a url like this: /manufacturer/product e.g.     LiftRules.statelessRewrite.append( {       case RewriteRequest

[Lift] Re: URL Rewriting - 'nested' ParsePath?

2010-02-06 Thread Alex Black
+ S.param(level + i).openOr(0)       val content:SiteContent = SiteContent.findByUniqueName(path) openOr new SiteContent       // Return the content inside a DIV       div{scala.xml.Unparsed(content.page_Content_Html.toString)}/ div     } } On 2月6日, 上午9時14分, Alex Black a...@alexblack.ca

[Lift] URL Rewriting - 'nested' ParsePath?

2010-02-05 Thread Alex Black
Hi, I'd like to rewrite a url like this: /manufacturer/product e.g. LiftRules.statelessRewrite.append( { case RewriteRequest( ParsePath( manufacturerName :: productName :: Nil, _, _,_), _, _) = RewriteResponse(productView :: Nil) }) But, I'd like to the

[Lift] Re: Help embedding lift in jetty

2010-02-05 Thread Alex Black
There is a RunWebApp.scala that seems to be included in the generated projects from the maven archetype, you can probably copy it? object RunWebApp extends Application { val server = new Server(8080) val context = new WebAppContext() context.setServer(server) context.setContextPath(/)

[Lift] Re: what provides classpath/jquery.js?

2010-01-10 Thread Alex Black
Hi Marius, I haven't heard of ResourceServer before, sounds interesting. Right now, our CSS and JS files are just in subfolders of webapp, e.g src/main/webapp/js, what are the advantages of (or reasons behind) putting js files in resources? - Alex On Jan 9, 3:04 am, Marius

[Lift] Re: what provides classpath/jquery.js?

2010-01-10 Thread Alex Black
hmm. We just upload a single WAR file to our server, its got everything in it including JS etc. On Jan 10, 5:16 pm, Alex Boisvert alex.boisv...@gmail.com wrote: One reason is to bundle html/js/... along with their corresponding snippet in a jar file. Alex On Jan 10, 2010 3:34 PM, Alex

[Lift] Permit caching of certain pages

2010-01-08 Thread Alex Black
It looks like Lift sets response headers to prohibit caching of responses. I have some pages I need to permit the browser to cache, whats the best way to go about that? Can I overwrite/change the response headers? I don't see a method to do this on S, I do see S.getHeaders? Thanks! - ALex --

[Lift] Re: Permit caching of certain pages

2010-01-08 Thread Alex Black
? On Jan 8, 4:00 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Jan 8, 2010 at 12:28 PM, Alex Black a...@alexblack.ca wrote: It looks like Lift sets response headers to prohibit caching of responses.  I have some pages I need to permit the browser to cache, whats the best way to go

[Lift] Re: Thanks for the all the help so far...

2010-01-07 Thread Alex Black
I love how the site looks like. VERY cool job ! Thanks! -- 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.

[Lift] Thanks for the all the help so far...

2010-01-06 Thread Alex Black
I've been a member of this group for a little while now and I wanted to thank everyone for your help so far! Hopefully I'll be able to start helping back in the future as I get more experienced with Lift. We've found Lift to be a great tool, and being able to get help from the community has

[Lift] Re: IE6 Strict mode - skip ?xml version 1.0... header

2010-01-05 Thread Alex Black
Yep, that works great, thanks! Lift automatically detects IE and IE6 and does the right thing in terms of headers as well as the ?xml ? header.  Please take a look at the HTML and headers actually emitted when IE6 is detected... it should be correct. - Alex -- You received this

[Lift] Re: Simple deployment of Lift apps on Jetty/Nginx

2010-01-05 Thread Alex Black
You can have more than one domain per IP address served by different applications with Nginx up front.  You can swap from one instance of an application to another (semi-seamless upgrades) with Nginx up front.  You can front many different Lift instances (some running on other machines) with

[Lift] IE6 Strict mode - skip ?xml version 1.0... header

2010-01-04 Thread Alex Black
I've read here: http://css-discuss.incutio.com/?page=RenderingMode and here: http://hsivonen.iki.fi/doctype/ that if you include the xml declaration: ?xml version=1.0 encoding=utf-8? Then IE6 (and others?) go into quirks mode. Is there a way in lift to omit this from IE? I tried removing it

[Lift] Re: Nice 404s sans Redirect

2010-01-01 Thread Alex Black
with the difference that it will use 404 status code automatically. Currently I have a prototype implementation and an offline discussion with David about other more internal implications. We'll see where it goes. Br's, Marius On Jan 1, 12:12 am, Alex Black a...@alexblack.ca wrote: That sounds

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

2009-12-31 Thread Alex Black
Two questions: 1. Whats the replacement for LiftRules.rewrite? 2. Is there a way I can write a custom Loc so that SiteMap is aware of the re-writing? I'm following the AccountLoc extends Loc[AccountInfo] example in the book, but my rewriting is not having any effect yet, I am trying to figure

[Lift] Re: Nice 404s sans Redirect

2009-12-31 Thread Alex Black
That sounds great. Just curious though, is there any chance runTemplate should just do the head merge? On Dec 31, 3:12 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 30, 2009 at 7:43 PM, Alex Black a...@alexblack.ca wrote: Ok, I tried this, it gets closer. I noticed one

[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-31 Thread Alex Black
That sounds great, much appreciated. On Dec 31, 2:52 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I was in SiteMap for another project today.  I'll add a flag on the SiteMap object that facilitates / rather than /index. On Wed, Dec 30, 2009 at 7:47 PM, Alex Black a...@alexblack.ca

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

2009-12-31 Thread Alex Black
LiftRules.statefulRewrite I'm not sure about the SiteMap question. -Ross On Dec 31, 2009, at 4:55 PM, Alex Black wrote: Two questions: 1. Whats the replacement for LiftRules.rewrite? 2. Is there a way I can write a custom Loc so that SiteMap is aware of the re-writing? I'm following

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
direct you as far as that goes. -Ross On Dec 30, 2009, at 12:32 AM, Alex Black wrote: I noticed another problem: the head merge is not working in this scenario, the resulting page is not valid XHTML because it has two head tags :)  So, this makes me think I'm going about things

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
Google's opinion: http://googlewebmastercentral.blogspot.com/2008/08/farewell-to-soft-404s.html On Dec 30, 10:05 am, Alex Black a...@alexblack.ca wrote: I'll try out that solution Russ, thanks.  Although as the solution gets a bit more complex, and taking into account Marius's advice

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
While I totally agree that a plain 404 + markup is much more straightforward, breaks internet are too big words :) .. sending back a 302 or 301 tells the UA you asked me for a resource that I know I don't have but I wont tell you explicitely, instead I want you to go to this location as an

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
  template to make only one head I guess, or wait until someone more   wise than I can direct you as far as that goes. -Ross On Dec 30, 2009, at 12:32 AM, Alex Black wrote: I noticed another problem: the head merge is not working in this scenario, the resulting page is not valid XHTML because

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
regardless needs to be announced. Other opinions on this? Br's, Marius On Dec 30, 6:20 pm, Alex Black a...@alexblack.ca wrote: While I totally agree that a plain 404 + markup is much more straightforward, breaks internet are too big words :) .. sending back a 302 or 301 tells the UA

[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread Alex Black
In a 1.1-M8 based project,http://localhost:8080/andhttp://localhost:8080/indexboth cause the Home menu item to be non-clickable.  The definition of the Home menu item is Menu(Loc(Home, List(index), Home)) Understood. However, in this scenario, when the user clicks on home they get taken

[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread Alex Black
with that issue. thx - Alex On Dec 30, 12:49 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote: In a 1.1-M8 based project, http://localhost:8080/andhttp://localhost:8080/indexbothcause the Home menu item to be non-clickable

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
, Marius On Dec 30, 6:20 pm, Alex Black a...@alexblack.ca wrote: While I totally agree that a plain 404 + markup is much more straightforward, breaks internet are too big words :) .. sending back a 302 or 301 tells the UA you asked me for a resource that I know I don't have

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
of Either[List[String], LiftResponse] instead of LiftResponse but I don't think that many people are using uriNotFound and it's really quite a small change which regardless needs to be announced. Other opinions on this? Br's, Marius On Dec 30, 6:20 pm, Alex Black

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
S.runTemplate() to locate and run the 404.html template. Finally, we create the XhtmlResponse with the 404 error code. So, you can put whatever you want in the 404.html template (including snippets) and all will work as expected. Thanks, David On Wed, Dec 30, 2009 at 10:45 AM, Alex Black

[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-30 Thread Alex Black
, it will work fine, but others can avoid the index in the url. - Alex On Dec 30, 12:49 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 30, 2009 at 9:43 AM, Alex Black a...@alexblack.ca wrote: In a 1.1-M8 based project, http://localhost:8080/andhttp://localhost:8080/indexbothcause

[Lift] Nice 404s sans Redirect

2009-12-29 Thread Alex Black
I'd like to handle 404s on my site in such a way that: - there is no redirect, e.g. if you type in a url like mysite.com/ foobarme, you'll stay at that url, so maybe you can correct it - the status code returned is 404 (not 200 OK) See stackoverflow: http://stackoverflow.com/bob So I tried

[Lift] Re: Sitemap - rendering title attributes for the links

2009-12-29 Thread Alex Black
, ...)) Thanks, Chris On Wed, Dec 23, 2009 at 2:25 PM, Alex Black a...@alexblack.ca wrote: Hi Xuefeng, I think will produce 1 tooltip for the entiresitemap, what i'm looking for is a tooltip for each link in thesitemap. On Dec 21, 11:39 pm, Xuefeng Wu ben...@gmail.com wrote: Sorry I

[Lift] Sitemap - A catch-all loc?

2009-12-29 Thread Alex Black
In my effort to handle 404s without a redirect (see http://groups.google.com/group/liftweb/browse_thread/thread/4a9806a63419644f), I am wondering if there is a way to add an item at the end of a sitemap which matches every url? E.g. Lift would look through the sitemap for a match, and always

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

2009-12-29 Thread Alex Black
In my snippet I'd like to change the response status code from the default 200 to something else, say 201, or 404. (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). I see there is a method on S to change the doctype, but I don't see one to change the status code. Thanks, - Alex --

[Lift] Re: Sitemap - A catch-all loc?

2009-12-29 Thread Alex Black
* works for 404 handling, except you still get a 200 OK response when you would expect a 404. I am hoping there is some mechanism in lift to let me change the status code to 404 for this menu. - Alex On Dec 29, 11:10 am, Alex Black a...@alexblack.ca wrote: In my effort to handle 404s without

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
to use that since I'm still on 1.0, it looks like it was added later. (I am considering moving to 1.1-M6). - Alex Cheers, Tim On 29 Dec 2009, at 15:23, Alex Black wrote: But of course RewriteResponse is not a LiftResponse.  Whats the best way to do this?  Basically I've got a template called

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

2009-12-29 Thread Alex Black
Is M8 pretty stable? A little while back DavidP recommended M6 as being the most stable of the milestones. On Tue, Dec 29, 2009 at 1:07 PM, Ross Mellgren dri...@gmail.com wrote: Switch to 1.1-M8, if you can. -Ross On Dec 29, 2009, at 1:04 PM, Alex Black wrote: To be clear

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
= lift:surround with=default at=content h1Not Found/h1 /lift:surround LiftRules.uriNotFound.prepend { case (req, _) = XhtmlResponse(S.render(node404, req), _, headers, cookies, 404, false) } Cheers, Tim On 29 Dec 2009, at 15:23, Alex Black wrote: But of course

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

2009-12-29 Thread Alex Black
, but at a base level,   InMemoryResponse will do what you want... as I said, you need to   look at LiftResponse subclasses and find the one that suits your   needs. Cheers, Tim On 29 Dec 2009, at 17:07, Alex Black wrote: In my snippet I'd like to change the response status code from

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
the url. I'd offer to write the new wiki page - is there a way for me to get an account on that wiki - or is it just for contributors? - Alex On Dec 29, 1:20 pm, Alex Black a...@alexblack.ca wrote: If you want to display the contents of your 404.html, checkout NodeResponse... just load up your

[Lift] Sitemap: Using instead of index and still having the current menu selected?

2009-12-29 Thread Alex Black
I've changed my sitemap from: Menu(Loc(index, Pair(index :: Nil, false), Home)) :: to Menu(Loc(index, Pair( :: Nil, false), Home)) :: So that my Home link goes to mysite.com/ instead of mysite.com/ index. But, I notice, when you're at mysite.com/ the sitemap doesn't show Home as

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

2009-12-29 Thread Alex Black
, Tim On 29 Dec 2009, at 17:07, Alex Black wrote: In my snippet I'd like to change the response status code from the default 200 to something else, say 201, or 404. (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). I see there is a method on S to change the doctype, but I

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
jetty:run I would strongly recommend against a catch-all entry in SiteMap as it will expose every page on your site to access. On Tue, Dec 29, 2009 at 11:17 AM, Alex Black a...@alexblack.ca wrote: Ok, I got this working, with 1.1-M8 using S.render.  // A node which embeds our 404 template (e.g

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
: 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 issue, my sitemap renders

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

2009-12-29 Thread Alex Black
? On Tue, Dec 29, 2009 at 1:40 PM, Alex Black a...@alexblack.ca wrote: Hi Marius, I was trying to find a way to give a custom 404 response without changing the url (e.g. using a redirect) and returning a 404 status code. Before I found a solution, I found an almost solution which let me use

[Lift] Re: Sitemap: Using instead of index and still having the current menu selected?

2009-12-29 Thread Alex Black
I've changed my sitemap from:    Menu(Loc(index, Pair(index :: Nil, false), Home)) :: Yes, the / directory will be rendered by Lift as /index  There's no way around that one. Can you explain? I don't understand. I'm not sure what rendered means in this context, and I'm not as far as I

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
for./p /lift:surround And my default.html hidden template has a site map tag in it, and the sitemap contains a number of entries. On Dec 30, 12:14 am, Alex Black a...@alexblack.ca wrote: I emailed Ross directly and said I did run with -Drun.mode=production. Here's what I'm seeing: 1. If I run

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
a redirect, with 404 status code), and processed by the template engine so it uses our default template with sitemap etc. - Alex On Dec 30, 12:22 am, Alex Black a...@alexblack.ca wrote: One more detail: notFoundNode is defined like this:   val notFoundNode = lift:embed what=404 / and 404

[Lift] Re: Advanced lift binding, parameters?

2009-12-27 Thread Alex Black
Yeah that looks like exactly what I'm looking for. I'm just debating the two options: 1. Use many snippets and pass the current item down through a request var. 2. Use one snippet (composed of many internal function calls) and pass the current item down as a parameter. I'll give both a shot,

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

2009-12-23 Thread Alex Black
I've got this xhtml in my template: lift:Compare.loserAlsoKnownAs Also known as: ul alsoKnownAs:list lilist:label //li /alsoKnownAs:list /ul /lift:Compare.loserAlsoKnownAs with this snippet code: def alsoKnownAs( xhtml: NodeSeq, product: Product): NodeSeq = { def list(

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

2009-12-23 Thread Alex Black
I missed a bit of code, probably not relevant, but just in case someone notices the issue: def loserAlsoKnownAs( xhtml: NodeSeq ): NodeSeq = { alsoKnownAs(xhtml, loser) } -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group,

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

2009-12-23 Thread Alex Black
Slick, thats perfect, thanks. On Dec 23, 4:16 pm, Ross Mellgren dri...@gmail.com wrote: 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

[Lift] Re: Advanced lift binding, parameters?

2009-12-23 Thread Alex Black
(...)      } } -Ross On Dec 23, 2009, at 4:07 PM, Alex Black wrote: I've got some xhtml blocks in one of my templates that are basically identical, and I'd like to avoid the duplication, by either writing the block once in my template and using a snippet to write it out twice (with different

[Lift] Re: Advanced lift binding, parameters?

2009-12-23 Thread Alex Black
calling from template, you say lift:MySnippet.foobar   itemId=1234.../lift:MySnippet.foobar, but if you're in some other   snippet you say MySnippet.foobar(theItem)(...) Hope that helps, -Ross On Dec 23, 2009, at 4:32 PM, Alex Black wrote: Thanks Ross, I think I get that.. I'm not seeing

[Lift] Lift and chunked transfer-encoding

2009-12-22 Thread Alex Black
I've got a large response I'd like to send out, and I'd like to chunk it up. http://en.wikipedia.org/wiki/Chunked_transfer_encoding Does Lift provide any built in support for this? I've explored using StreamingResponse, but it expects a dataLength, which I don't have. I had hoped to provide it

[Lift] Re: Lift and chunked transfer-encoding

2009-12-22 Thread Alex Black
, 2009 at 2:38 PM, Alex Black a...@alexblack.ca wrote: I've got a large response I'd like to send out, and I'd like to chunk it up. http://en.wikipedia.org/wiki/Chunked_transfer_encoding Does Lift provide any built in support for this? No. I've explored using StreamingResponse

[Lift] Re: Lift and chunked transfer-encoding

2009-12-22 Thread Alex Black
That could definitely work. I'd still (even for curiosity's sake) be interested in lower level access to the response, e.g. response.write that goes right out to the client. On Dec 22, 7:36 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Dec 22, 2009 at 4:28 PM, Alex Black

[Lift] Sitemap - rendering title attributes for the links

2009-12-21 Thread Alex Black
Can someone point me in the right direction to get tooltips (title attributes) rendered in my sitemap? I'd like to add text to each link, so they get rendered like this: lia href=link title=what will happen when you click on this linksome page/a/li thx - Alex -- You received this message

[Lift] Re: Sitemap - rendering title attributes for the links

2009-12-21 Thread Alex Black
. - Alex You could add MetaData 'title' by Elem 's method '%' a href=linksome page/a % (title - what will happen when you click on this link) or use { } a href=link title={myLinkTitle}some page/a On Mon, Dec 21, 2009 at 10:38 PM, Alex Black a...@alexblack.ca wrote: Can someone point me

[Lift] lift_successRegisterGC()

2009-12-16 Thread Alex Black
I see the following javascript on each of my pages in my site: // ![CDATA[ jQuery(document).ready(function() {lift_successRegisterGC();}); var lift_page = 'F1212351415633FZT'; // ]] I don't think its necessary for what I'm doing, is there a way to turn off this feature? Thanks! - Alex -- You

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
Are you using any Comet or Ajax or any Lift generated form elements?  If you are using any of these (anything where Lift is storing a function on the server-side and presenting the function as a GUID on the client side), then it is strongly advised that you enable GC. We're not using Comet or

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
Hi David, is there a way to turn off the output of this javascript code? On Dec 16, 8:51 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009 at 5:47 AM, Alex Black a...@alexblack.ca wrote: I see the following javascript on each of my pages in my site: // ![CDATA

[Lift] Re: Please review a simple app for displaying Flickr pictures

2009-12-16 Thread Alex Black
Hey Dave, great site, beautiful photography. If you had time you might add some URL rewriting, so that galleries had nice urls like: http://briccettiphoto.com/show/galleries/kenya - Alex On Dec 13, 1:44 am, Dave Briccetti da...@davebsoft.com wrote: For a lightning talk at Bay Area Scala

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
I found this in another thread: LiftRules.enableLiftGC = false On Dec 16, 12:55 pm, Alex Black a...@alexblack.ca wrote: Hi David, is there a way to turn off the output of this javascript code? On Dec 16, 8:51 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
cool, thanks for the info. We're not using those features yet, so we'll leave this off for now. On Dec 16, 4:03 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009 at 5:56 AM, Alex Black a...@alexblack.ca wrote: Are you using any Comet or Ajax or any Lift generated form

[Lift] Re: lift_successRegisterGC()

2009-12-16 Thread Alex Black
should be as stateless as possible - using state for callbacks doesn't sit well with me, yet. - Alex On Dec 16, 4:35 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 16, 2009 at 1:30 PM, Alex Black a...@alexblack.ca wrote: cool, thanks for the info. We're not using those

[Lift] Mapping virtual directories

2009-12-14 Thread Alex Black
Can anyone recommend a way to map a virtual directory in Jetty/Lift? E.g. I'd like /images to point to a file system location that is not in my project. Is there a simple Jetty mechanism, or Lift configuration for this type of thing? Thx! - Alex -- You received this message because you are

[Lift] Re: Mapping virtual directories

2009-12-14 Thread Alex Black
) will serve it. Option 2 is to put a front end rewrite in on your webserver / reverse proxy. Personally, the former is more portable so tends to be what I do. Cheers, Tim On 14 Dec 2009, at 18:06, Alex Black wrote: Can anyone recommend a way to map a virtual directory in Jetty/Lift? E.g. I'd

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

2009-12-07 Thread Alex Black
That looks like a great idea, thanks Harry, I didn't know you could next stuff like that. On Dec 7, 3:39 pm, harryh har...@gmail.com wrote: Another strategy, different from what Ross suggests, that I have found useful in some circumstances.  In the view do this: lift:YourPage  

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

2009-12-07 Thread Alex Black
}/scalaVersion /configuration /plugin /plugins /reporting /project On Dec 7, 3:28 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, Dec 6, 2009 at 5:44 AM, Alex Black a...@alexblack.ca wrote: We made this change for Lift 1.1.  So, if you're using 1.1, the same

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

2009-12-07 Thread Alex Black
feeder.of.the.be...@gmail.com wrote: On Sun, Dec 6, 2009 at 5:44 AM, Alex Black a...@alexblack.ca wrote: We made this change for Lift 1.1.  So, if you're using 1.1, the same instance of a snippet should be used for a given HTTP request. Hi David, I've just switch from Lift 1.0 to Lift 1.1-M6

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

2009-12-07 Thread Alex Black
Its not causing me any issue at the moment, just figured it'd be faster/more correct to call the constructor just once if only one instance was needed. - Alex On Dec 7, 5:25 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Dec 7, 2009 at 2:23 PM, Alex Black a...@alexblack.ca wrote

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

2009-12-07 Thread Alex Black
Thanks for the help on this guys, looks promising. On Dec 7, 12:57 pm, Ross Mellgren dri...@gmail.com wrote: 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 ;-)

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

2009-12-06 Thread Alex Black
) = // do something when the data has been loaded              case _ = // do something when the data has not been loaded          }      } } HTH, -Ross On Nov 20, 2009, at 10:59 AM, Alex Black wrote: I've got a template page, say foobar.html, that makes a number

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

2009-12-06 Thread Alex Black
If you output null for theattributevalue, theattributeis not rendered: I've just upgraded from 1.0 to 1.1-M6, and this doesn't seem to work any more - could this be a bug in M6? Message: scala.MatchError: null scala.runtime.ScalaRunTime$.boxArray(ScalaRunTime.scala:136)

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

2009-12-03 Thread Alex Black
In one of my templates I have this: lift:HelloWorld.foobar head titlehello:one vs hello:two/title /head /lift:HelloWorld.foobar The XHTML output I get looks like this: head titleOutput1vsOutput2/title /head Where hello:one is

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

2009-12-03 Thread Alex Black
to be hello:one / 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 have

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

2009-12-03 Thread Alex Black
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:    head            lift:Compare.products      titlecompare:product1/ vs compare:product2//title            /lift:Compare.products    /head On Dec 3, 2

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

2009-12-03 Thread Alex Black
wrote: 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

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

2009-12-03 Thread Alex Black
Thanks for the info - I'll look into trying out 1.1-M6. On Dec 3, 4:11 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Dec 3, 2009 at 12:19 PM, Alex Black a...@alexblack.ca wrote: Ah.. I've worked around the problem for now. If my snippet outputs titlefoo vs bar/title

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

2009-12-02 Thread Alex Black
Thanks Jeppe, that works perfectly. On Dec 2, 3:32 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Alex Black a...@alexblack.ca writes: Is there a good/reasonable way to conditionally output checked=checked or output nothing? If you output null for the attribute value, the attribute

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

2009-12-01 Thread Alex Black
For example, if my html template looks like this: lift:surround with=default at=content h2foobar/h2 lift:MySnippet.render input type=checkbox/ /lift:MySnippet.render /lift:surround I'd like to render it conditionally as:

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

2009-12-01 Thread Alex Black
, 2009, at 5:28 PM, Alex Black wrote: For example, if my html template looks like this: lift:surround with=default at=content                h2foobar/h2                lift:MySnippet.render                input type=checkbox/                /lift:MySnippet.render /lift:surround I'd

[Lift] Re: Pages getting redirected back to root, /ajax_request/?? and ActorPingException

2009-11-20 Thread Alex Black
Thanks Tim. Do you happen to know any way of also removing this line from my webpages: script type=text/javascript src=/ajax_request/liftAjax.js - Alex On Nov 20, 5:25 am, Timothy Perrett timo...@getintheloop.eu wrote: That would be: LiftRules.redirectAjaxOnSessionLoss = false Cheers, Tim

[Lift] Re: Pages getting redirected back to root, /ajax_request/?? and ActorPingException

2009-11-20 Thread Alex Black
: LiftRules.autoIncludeAjax = session = false -Ross On Nov 20, 2009, at 10:43 AM, Alex Black wrote: Thanks Tim. Do you happen to know any way of also removing this line from my webpages: script type=text/javascript src=/ajax_request/liftAjax.js - Alex On Nov 20, 5:25 am, Timothy Perrett

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

2009-11-20 Thread Alex Black
I've got a template page, say foobar.html, that makes a number of calls to functions in a snippet, e.g. mysnippet.foo1, mysnippet.foo2, mysnippet.foo3. I'd like to do some initial work in foo1, e.g. retrieve some data and do some work on it, then in foo2 and foo3 display parts of that data.

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

2009-11-20 Thread Alex Black
) = // do something when the data has been   loaded              case _ = // do something when the data has not been loaded          }      } } HTH, -Ross On Nov 20, 2009, at 10:59 AM, Alex Black wrote: I've got a template page, say foobar.html, that makes a number of calls

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

2009-11-20 Thread Alex Black
On Nov 20, 11:30 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Nov 20, 2009 at 8:17 AM, Alex Black a...@alexblack.ca wrote: We made this change for Lift 1.1.  So, if you're using 1.1, the same instance of a snippet should be used for a given HTTP request. Very cool. I'm

  1   2   >