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

2010-03-03 Thread Alex Black
s (we're serving them out of a /images folder). any ideas? thx - Alex -- 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 liftwe

Re: [Lift] Usage patterns for Scala traits

2010-02-24 Thread Alex Boisvert
{ def read(key: String): Any def write(key: String, value: Any): Unit } trait ActsLikeStore extends Store { val store: Store def read(key: String) = store.read(key) def write(key: String, value: Any) { store.write(key, value) } } I'm curious to hear where in the pattern landscape you&

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

2010-02-16 Thread Alex Black
ng order.  So from Lift's perspective > there is no additional computation involved comparing with current > situation except 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

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

2010-02-15 Thread Alex Black
We don't seem to have this problem with images.. Could this have to do with the fact that the CSS files and javascript are served out of the WAR file, whereas our images are served by a separate Jetty context? On Feb 13, 3:35 am, Marius wrote: > On 12 feb., 22:56, Alex Black wrote:

[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 (

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

2010-02-12 Thread Alex Black
PM, Alex Black 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 lik

[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 ema

[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 "Ex

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

2010-02-12 Thread Alex Black
ar enough (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 obe

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

2010-02-12 Thread Alex Black
t your own function > that reads this for a config file? > > Similarly would do the same. > > Br's, > Marius > > On 12 feb., 19:25, Alex Black wrote: > > > I'm wondering if other people have encountered this issue, or if we're > > doing someth

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

2010-02-12 Thread Alex Black
; > -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

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

2010-02-12 Thread Alex Black
it is new than x then: return resource - if it is not newer than x, then return 304 not modified - Alex On Feb 12, 2:35 pm, Marius wrote: > On 12 feb., 21:31, Jeppe Nejsum Madsen wrote: > > > > > On Fri, Feb 12, 2010 at 8:20 PM, Marius wrote: > > > Jeppe probably we ca

[Lift] Cached CSS (and Javascript?) issue

2010-02-12 Thread Alex Black
304 not modified, so I figured if the CSS was modified (when we update) then the server would not respond 304 not modified :) - Alex -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups

[Lift] Url Rewriting Extractors - Inheritance? Composition?

2010-02-08 Thread Alex Black
a sub url like this: /products/manufacturer/productId/view/viewName so I'd like to make a class to handle view and ViewName (or anything else that comes below productId), and re-use the functionality in ProductURL extractor. I can't seem to figure out a way to do it for unapply. though

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

2010-02-06 Thread Alex Black
100% following your example, but it looks to me like your case statements always match /page/level1/level2 etc without a check like does this particular level 2 (say "foo") make sense for this level1 ("bar"), but maybe I misunderstood. - Alex On Feb 6, 8:25 pm, philip wrote: >

[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 wrote: > Alex Black writes: > > Hi, I'd like to rewrite a url like this: > > > /manufacturer/product > > > e.g. > > >     LiftRules.statelessRewrit

[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] URL Rewriting - 'nested' ParsePath?

2010-02-05 Thread Alex Black
e RewriteRequest( ParsePath( Manufacturer(manufacturer) :: Product(manufacturer, product) :: Nil, _, _,_), _, _) => obviously doesn't work.. any suggestions welcome, thanks! - Alex -- You received this message because you are subscribed to the Google Groups "Lift" group

Re: [Lift] Is there any open source web apps based on lift ?

2010-01-28 Thread Alex Boisvert
And there's a simpler example mentioned here, http://www.mail-archive.com/liftweb@googlegroups.com/msg15536.html alex On Thu, Jan 28, 2010 at 7:55 AM, Jeppe Nejsum Madsen wrote: > Boern writes: > > > Hi,all: > > I am newbie for lift web framework and I hope * there

Re: [Lift] Lift logging improvements

2010-01-27 Thread Alex Boisvert
I think that's a great idea. alex On Wed, Jan 27, 2010 at 2:03 PM, David Pollak wrote: > It all sounds good to me as long as API breakage is minimal (or > non-existent) > > > On Wed, Jan 27, 2010 at 1:59 PM, Jeppe Nejsum Madsen wrote: > >> Hi, >> >>

Re: [Lift] buildr?

2010-01-26 Thread Alex Boisvert
Forgot to send this to the list earlier, I published a template project, http://github.com/aboisvert/lift-template which I use as basis for building Lift projects. (Haven't updated to 2.0-SNAPSHOT yet but should only be a matter of changing a few version numbers). alex On Fri, Jan 22,

Re: [Lift] buildr?

2010-01-21 Thread Alex Boisvert
more install/configuration steps than maven. granted, if you already use maven, it's an extra step. there's also an all-in-one-jar in the works which will make buildr even easier to install and use. this should be available soon after jruby 1.5.0 is out. i use buildr + lift on a re

Re: [Lift] Re: Replace HTML element after AJAX call

2010-01-18 Thread Alex Boisvert
Yes, using a div or span is recommended so you can replace multiple times. Alex On Jan 18, 2010 9:21 AM, "greekscala" wrote: Hello, I looked at the source and there is JsCmds.Replace which replaces a Node with another. I am always using div as containers for replacement best r

Re: [Lift] Re: Backbutton for Ajax

2010-01-14 Thread Alex Boisvert
navigation tool to support existing web idioms. alex On Thu, Jan 14, 2010 at 7:52 AM, Naftoli Gugenheim wrote: > If you press delete then back what will happen? > > - > Alex Boisvert wrote: > > On Wed, Jan 13, 2010 at 6:10 PM, Naftoli Gugenheim

Re: [Lift] Re: Backbutton for Ajax

2010-01-14 Thread Alex Boisvert
ink back button support would be a very nice usability enhancement there. alex -- 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

Re: [Lift] Re: Backbutton for Ajax

2010-01-13 Thread Alex Boisvert
s): JsCmd to programmatically change the browser's hash as a result of some AJAX processing. I don't have time to work on this yet but I'd be happy to hear what others think of the idea. alex On Wed, Jan 13, 2010 at 2:45 PM, greekscala wrote: > Hello, > > I would really

Re: [Lift] Re: NGinx and sticky sessions

2010-01-13 Thread Alex Boisvert
http://haproxy.1wt.eu/download/1.2/doc/architecture.txt alex On Wed, Jan 13, 2010 at 4:22 AM, Timothy Perrett wrote: > To follow up this thread for completeness, I communicated to Marius that he > needs to use: > > http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule > &

Re: [Lift] Nginx question

2010-01-12 Thread Alex Boisvert
follow this thread for a few suggestions: http://nginx.org/pipermail/nginx/2009-February/009791.html On Tue, Jan 12, 2010 at 4:33 PM, Naftoli Gugenheim wrote: > I have nginx set up as a frontend. How can I have it display "Down for > maintenance" instead of pointing to jetty? > > -- > You receive

Re: [Lift] Re: Binding a snippet in a comet actor?

2010-01-12 Thread Alex Boisvert
Yes. The issue is here: http://github.com/dpp/liftweb/issues/closed/#issue/93 It was fixed in 1.1M7 and later. alex On Tue, Jan 12, 2010 at 1:47 PM, Felipe Rodrigues < felipero.maill...@gmail.com> wrote: > I have a similar problem here. I didn't find this issue on github. &

Re: [Lift] Ajax forms and (multiple) submit buttons

2010-01-12 Thread Alex Boisvert
I like it a lot. Eliminates recent confusion about submit() in ajaxForm, prettier and semantically more correct than hidden fields and supports multiple actions. What's not to like? alex On Tue, Jan 12, 2010 at 2:39 PM, Marius wrote: > Dear all, > > Recently (and not only) t

Re: [Lift] User Presence Heartbeat

2010-01-12 Thread Alex Boisvert
ow is LiftSession.onBeginServicing where you can add you own function and correlate the request session id with the objects in your own application. Hope this helps, alex On Tue, Jan 12, 2010 at 1:02 PM, Daniel Spiewak wrote: > I'm looking to implement a user presence feature (think: Facebook or > Gmail cha

Re: [Lift] Lift on Stack Overflow

2010-01-12 Thread Alex Boisvert
mails) As someone who looks for or simply reads answers (I've never asked a question on SO yet), I prefer the experience of Stack Overflow. The answers are ranked, organized, filtered, etc. The main drawback for me there is there's possibly too much stuff that draws me away from actual wo

Re: [Lift] Backbutton for Ajax

2010-01-11 Thread Alex Boisvert
I've been playing with sammy.js <http://code.quirkey.com/sammy/> recently and I like the way they update the URL fragment identifier (hash) when doing AJAX which makes apps more back-button friendly, in a manner that's similar to GMail. It would be nice to have something simila

Re: [Lift] How many memory are assigned by default when starting the Jetty ?

2010-01-11 Thread Alex Boisvert
-javaagent:$JREBEL_HOME/jrebel.jar -Dorg.mortbay.util.FileResource.checkAliases=false -Xmx1024m" alex On Fri, Jan 8, 2010 at 5:12 PM, Neil.Lv wrote: > Hi all, > > I have a silly question about the memory of the jetty. > > How many the memory are assigned by default when starting the J

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

2010-01-10 Thread Alex Boisvert
Understood. I was referring to reusable snippets (e.g., flot widgets). For your own apps, I can't think of a good reason right now. Alex On Jan 10, 2010 4:18 PM, "Alex Black" wrote: hmm. We just upload a single WAR file to our server, its got everything in it including JS etc

[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 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, &

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

2010-01-10 Thread Alex Boisvert
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 Black" wrote: Hi Marius, I haven't heard of ResourceServer before, sounds interesting. Right now, our CSS and JS files are just in subfolders of webapp

[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

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

2010-01-09 Thread Alex Boisvert
This change has now been pushed to master. LiftRules.finder() has been removed since it offered (unsafe) duplicate functionality. cheers, alex On Mon, Jan 4, 2010 at 4:03 PM, Alex Boisvert wrote: > Instead of: > > > LiftRules.getResourceAsStream(name: String): Box[InputStream] >

[Lift] Re: Permit caching of certain pages

2010-01-08 Thread Alex Black
no-store; must-revalidate; max-stale=0; post-check=0; pre-check=0; max-age=0", "Pragma" -> "no-cache") }*/ thoughts? On Jan 8, 4:00 pm, David Pollak wrote: > On Fri, Jan 8, 2010 at 12:28 PM, Alex Black wrote: > > It looks like Lift

[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! -

[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
milar to a real-time personalized consumer reports. - Alex -- 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...@g

Re: [Lift] Re: SessionVars in different snippets

2010-01-06 Thread Alex Boisvert
dEntry") /* etc... */ } then I just import Session._ wherever needed. alex On Wed, Jan 6, 2010 at 11:31 AM, greekscala wrote: > Hello, > > I dont have to use SessionVars until now, but in near future. > But I had the same problem in mind. > > Is there not a central place to

[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) > w

[Lift] Re: IE6 Strict mode - skip 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 header.  Please take a look at the HTML and > headers actually emitted when IE6 is detected... it should be correct. > > > >

Re: [Lift] new line to

2010-01-05 Thread Alex Boisvert
The problem is that you're creating a String (not a NodeSeq) and the String content is being escaped inside the wrapping elements. Try this, { note.replyContent split '\n' map { Text(_) ++ } reduceLeft (_ ++ _) } alex On Tue, Jan 5, 2010 at 9:24 AM, daiwhea wrote: > my i

[Lift] IE6 Strict mode - skip header

2010-01-04 Thread Alex Black
plate, but Lift still spits it out. We're using: along with Content-Type=application/xhtml+xml; charset=utf-8 I'm also open to thoughts on other pragmatic solutions to getting browsers to render our XHTML nicely :) - Alex -- You received this message because you are subscribed to th

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

2010-01-04 Thread Alex Boisvert
Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream => T): Box[T]. And if you need laziness, you could use one of the usual suspects: "lazy val", unapplied function, FatLazy, etc. ale

[Lift] Re: Nice 404s sans Redirect

2010-01-01 Thread Alex Black
. Lift then would process > this template as the regular one 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 >

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

2009-12-31 Thread Alex Black
  > the new 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 th

[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 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 wrote: > >

[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 wrote: > On Wed, Dec 30, 2009 at 7:43 PM, Alex Black wrote: > > Ok, I tried this, it gets closer. > > > I noticed one issue: the head mer

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

2009-12-31 Thread Alex Black
igure out what I am missing. - Alex -- 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 opti

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

2009-12-30 Thread Alex Black
r where this is a problem, it will work fine, but others can avoid the "index" in the url. - Alex On Dec 30, 12:49 pm, David Pollak wrote: > On Wed, Dec 30, 2009 at 9:43 AM, Alex Black wrote: > > > In a 1.1-M8 based project, > >http://localhost:8080/andhttp://localho

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
Ok, I tried this, it gets closer. I noticed one issue: the head merge didn't get done, so I have two tags in the result. I'm attempting to set the title in the 404.html template, maybe there is a way I can set the title without using head merge? - Alex On Dec 30, 2:54 pm, David Pol

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
; for reviewboard. The solution I proposed has a breaking change by the > > > > introduction 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 chan

[Lift] Re: Nice 404s sans Redirect

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

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

2009-12-30 Thread Alex Black
I guess I will live with that issue. thx - Alex On Dec 30, 12:49 pm, David Pollak wrote: > On Wed, Dec 30, 2009 at 9:43 AM, Alex Black wrote: > > > In a 1.1-M8 based project, > >http://localhost:8080/andhttp://localhost:8080/indexbothcause the "Home" > > menu

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

2009-12-30 Thread Alex Black
//localhost:8080/ and http://localhost:8080/index). Is there any way to do that while maintaining the nice Sitemap feature that makes Home non clickable? - Alex > > > > > > > > Also, why do you using "Pair(List(...), false)"? > > > > Pair is depreca

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
I opened a ticket: http://github.com/dpp/liftweb/issues/#issue/265 I hope I wrote it in a reasonable/acceptable way, its my first ticket. - Alex On Dec 30, 11:26 am, Marius wrote: > Please open a defect herehttp://github.com/dpp/liftweb/issues... > whether or not this solution will make

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
> At any rate, I'm just trying to help Alex, I'm not invested in any   > reason other than it's informative to try and solve. Is there any way   > to get a templated 404 response? Sorry Ross, perhaps my response didn't convey my appreciation for your help, or maybe

[Lift] Re: Nice 404s sans Redirect

2009-12-30 Thread Alex Black
tempalte. Hence apply the normal rendering pipeline to the > template referenced by uriNotFound. > > This approach allows your 404 case to be handled by the normal > rendering pipeline without other hacks. > > Unless someone thinks this is a bad solution, Alex you could open an

[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 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
ers, its easy to build XHTML compliant pages etc. This is one of those areas where we (the lift community) should make sure that Lift makes it easy to do things the right way. Unlike say Microsoft of the past where they continually broke internet standards and made it easy to do things the wrong

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
y (without 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 wrote: > One more detail: > > notFoundNode is defined like this: > >   val notFoundNode = &

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
temap contains a number of entries. On Dec 30, 12:14 am, Alex Black wrote: > I emailed Ross directly and said I did run with -Drun.mode=production. > > Here's what I'm seeing: > 1. If I run with -Drun.mode=production, and I access a not found url, > say mysite.com/foobar, t

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

2009-12-29 Thread Alex Black
ere's an implicit conversion you can > simply declare the List(). Thanks for the tip. > > > > > > > to > > >    Menu(Loc("index", Pair("" :: Nil, false), "Home")) :: > > > So that my "Home" link goes to mysite

[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 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 solu

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
lateResponse extends HeaderStuff { def apply(nodeToRender: Node, statusCode: Int): LiftResponse = { val renderedNode = S.render(nodeToRender, S.request.get.request).first new XhtmlResponse(renderedNode, Empty, headers, cookies, statusCode, false) } } - Alex On Dec 29, 7:49 pm, Ross M

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
s you indicated, and added the passNotFoundToChain = false. Did you expect that - or is the passNotFoundToChain meant to solve the sitemap issue? - Alex On Dec 29, 6:10 pm, David Pollak wrote: > Keep in mind that Lift's behavior for 404s differs between development and > production mode i

Re: [Lift] Re: Form submit and Ajax

2009-12-29 Thread Alex Boisvert
eld is not invoked. So I get back "an ajax > response! init". > It's invoked but it's invoked before the form field callbacks have been called so the field still holds the initial value. (I've been wondering if this is the right behavior myself.) The SHtml.hidden

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

2009-12-29 Thread Alex Black
ponse you want, 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

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

2009-12-29 Thread Alex Black
index. But, I notice, when you're at mysite.com/ the sitemap doesn't show "Home" as selected, is there a way to fix that? Perhaps I've got something wrong here. Thanks, - Alex -- You received this message because you are subscribed to the Google Groups "Lift&qu

Re: [Lift] Re: Form submit and Ajax

2009-12-29 Thread Alex Boisvert
; templates xml or is there another way so that Lift can do it. > Actually, I just tested it because I wasn't sure anymore and sure enough, Lift processes the content passed to SetHtml, so there's no need to call templateFinder unless you need to do more dynamic things. (I forgot about

Re: [Lift] Re: Lift with MS Access database

2009-12-29 Thread Alex Boisvert
=closed&q=driver#issue/169 You can provide your own driver by overriding DriverType.calcDriver. alex -- 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 th

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
de and changes 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 wrote: > > If you want to display the contents of your 404.html, checkout > > NodeResponse...

Re: [Lift] Form submit and Ajax

2009-12-29 Thread Alex Boisvert
rying to make a browser request > to view the page, > the addBookmark method is already executed. Was this intended? > No, that's not supposed to happen. I'm guessing you're calling addBookmark() somewhere else in your code. alex -- You received this message because yo

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

2009-12-29 Thread Alex Black
Yes, that is what my question is, thanks for interpreting :) I was looking into this just to support solving my 404 issue, where I want to show a custom not found page with 404 status and no redirect. Tim's suggestion in the other thread looks promising so I am going to look more into that. -

Re: [Lift] Re: Snippet lifetime

2009-12-29 Thread Alex Boisvert
my initial expectation. I think this would make it more intuitive for newbies learning lift. alex On Tue, Dec 29, 2009 at 2:49 AM, Adam Warski wrote: > Hello, > > > These are the names we use in Lift - appreciate what your saying, but its > not confusing IMHO, just different to oth

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
this: val node404 = Not Found 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 RewriteR

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 wrote: > Switch to 1.1-M8, if you can. > > -Ross > > On Dec 29, 2009, at 1:04 PM, Alex Black wrote: > > > > >

[Lift] Re: Nice 404s sans Redirect

2009-12-29 Thread Alex Black
render, but I wasn't able 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.  

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

2009-12-29 Thread Alex Black
d in homepageTemp1. This *almost* 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 wrote: > In my effort to ha

[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. Thank

[Lift] Sitemap - A catch-all loc?

2009-12-29 Thread Alex Black
esn't work, it never matches. However: Menu(Loc("Catchall", Pair("bob" :: Nil, true), "", homepageTemp1)) :: That one does match one urls like mysite.com/bob and mysite.com/bob/ 1234 etc. - Alex -- You received this message because you are subscribed to t

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

2009-12-29 Thread Alex Black
nk", MyLink("path" :: "to" :: "link" :: Nil, "title > goes here"), "Some  Link", ...)) > > Thanks, Chris > > On Wed, Dec 23, 2009 at 2:25 PM, Alex Black wrote: > > Hi Xuefeng, I think will produce 1 tooltip for the entiresite

[Lift] Nice 404s sans Redirect

2009-12-29 Thread Alex Black
I'd like to display whenever there is a 404. I Just thought of something, perhaps I could add a RewriteRule that matches everything? - Alex -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googl

Re: [Lift] Re: Snippet lifetime

2009-12-28 Thread Alex Boisvert
StatefulSnippets lifetime is manually managed and may be "chained" to other pages by using link() or redirectTo() such that the same instance is reused for those targets. (And StatefulSnippet extends DispatchSnippet) alex On Mon, Dec 28, 2009 at 10:08 AM, Naftoli Gugenheim wrote: &g

Re: [Lift] Snippet lifetime

2009-12-28 Thread Alex Boisvert
ed) snippets, there's a direct binding between the tag and the class name + method. Well, unless you override LiftRules.snippetDispatch. alex -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@goo

[Lift] Re: Advanced lift binding, parameters?

2009-12-27 Thread Alex Black
ive both a shot, thanks for your help. Intuitively I seem to be leaning towards #1 I think for the same reason I don't normally use just one snippet call per xhtml page, instead I make several smaller snippet calls for each page. I appreciate all the ideas and advice. - Alex On Dec 23, 10:

[Lift] Re: Advanced lift binding, parameters?

2009-12-23 Thread Alex Black
: NodeSeq = { // do stuff based on _currentItem.is } - Alex On Dec 23, 5:05 pm, Ross Mellgren wrote: > So, with nested snippets you have two basic execution model options: > >    1) the default, the inner snippets get executed after the outer   > snippet has executed completely. th

[Lift] Re: Advanced lift binding, parameters?

2009-12-23 Thread Alex Black
l: NodeSeq): NodeSeq = { List(first,second).flatMap( item => renderItem(xhtml, item) ) } How then do I implement Item.picture, Item.points to know *which* item is currently being rendered? thx - Alex On Dec 23, 4:18 pm, Ross Mellgren wrote: > S.attr gives you attributes of the

[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 wrote: > bind("alsoKnownAs", in, "list" -> { (ns: NodeSeq) => bind("list", ns,   > "label" -> ... ) }) > > -Ross > > On Dec 23, 2009, at 3:59 PM, Alex Black wrote:

[Lift] Advanced lift binding, parameters?

2009-12-23 Thread Alex Black
;d like to keep the many snippet calls per block. So, more specifically, how can i write and more like this: thx - Alex -- 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 un

[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, se

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

2009-12-23 Thread Alex Black
code is: find the thing called alsoKnownAs:list, grab the xhtml below it, pass it into the list function, and replace its value with the output of list. Is there some trick I'm missing here to avoid specifying things twice? Just curious - the solution is pretty elegant as is. -

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

2009-12-23 Thread Alex Black
ad of > > > > On Tue, Dec 22, 2009 at 11:29 AM, Alex Black wrote: > > Hi Xuefeng, > > > I'm using the default Lift Sitemap, so I don't think I can use either > > of your suggestions, or, I don't see how to use them.  The sitemap > > renders

[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 wrote: > On Tue, Dec 22, 2009 at 4:28 PM, Alex Black wrote: > > Hi

[Lift] Re: Lift and chunked transfer-encoding

2009-12-22 Thread Alex Black
Hi David, Its a huge-ass google sitemap, so I'm forming XML for it, and its really large, and I thought I'd send chunks of it out at a time rather than composing all of it in RAM before sending it out. - Alex On Dec 22, 5:56 pm, David Pollak wrote: > On Tue, Dec 22, 2009 at 2:38 P

  1   2   3   4   >