[Lift] Re: beginner's question about surround/bind/bind-at/with-param

2009-11-05 Thread jhonig
Thank you James, What I tried first was taken from http://wiki.github.com/dpp/liftweb/about-lift-tags. I don't have the code anymore. It was a surround without "at" attribute, and with multiple "bind-at"-s inside. Nothing got bound, as far as I could see. When I replaced the bind-at's with w

[Lift] Re: beginner's question about surround/bind/bind-at/with-param

2009-11-05 Thread jhonig
> > On Thu, Nov 5, 2009 at 3:04 PM, jhonig wrote: > > >> Thank you James, > > >> What I tried first was taken from > >>http://wiki.github.com/dpp/liftweb/about-lift-tags. > >> I don't have the code anymore. It was a surround without "at"

[Lift] Re: beginner's question about surround/bind/bind-at/with-param

2009-11-05 Thread jhonig
James, > That would be because those are examples of tags, not copy-and-paste-code > necessarily. I didn't just cut and paste, tried to extract the "rule" how to do it (of course). > I can think of about million definitions of "just didn't work". Which one > do you mean here? Blank page when

[Lift] Jetty beginner's question

2009-11-10 Thread jhonig
Maybe someone can point out if I'm missing something. I am trying to get a lift-war to run in a jetty instance on another machine. I assumed that the war would include everything needed to make my test application run, but apparently it doesn't include all the dependencies that are found when I

[Lift] Re: Jetty beginner's question

2009-11-10 Thread jhonig
> to create war file: > > mvn package Yes, that's what I did. And then I dropped the war into the appropriate directory and created the configuration file in the contexts dir. When I then try to go to the page I get: Well, that's weird. I'm doing the same as before and now it suddenly w

[Lift] How to execute client-side js from ajax callback?

2009-11-18 Thread jhonig
Hi All, I am trying to execute a local (ie: defined in the template) javascript function from an Ajax callback. This is the callback: def testAjax2 (theXhtml : NodeSeq) : NodeSeq = { def getWidth () = { Call ("getAvailableWidth").cmd; } def al

[Lift] How to make Ajax call from "onLoad"/"onResize"?

2009-11-18 Thread jhonig
Hi All, Yet another question: I need to make Ajax calls when a page is loaded or resized. The call would need to pass some local client information (browser size). The return should be javascript code that populates a div on that page (in particular: an image that is scaled on the server to matc

[Lift] Re: How to execute client-side js from ajax callback?

2009-11-18 Thread jhonig
Hi Eros, Thanks for your reply! > I ran into the same problem. The Alert case class takes only a string. > |case class Alert(val text : String > )| | > > |I.e. the result of getWidth is quoted such that it remains a plain > string when

[Lift] Re: How to execute client-side js from ajax callback?

2009-11-18 Thread jhonig
JSON.stringify(getAvailableWidth) > > It got pretty clear to me when I started looking at the source code. > Most of those JavaScript wrapper classes are simply one-liners that > create a small piece of JavaScript code. > > Btw, I found a nicer solution for your alert problem: > def

[Lift] Re: How to make Ajax call from "onLoad"/"onResize"?

2009-11-18 Thread jhonig
} > > result.openOr(/* JS command to send back to browser if we > failed to get arguments and so on */ JsCmds.Noop) > })._2 > > { Script { > Function("handleResize", Nil, handleResize) > } } >

[Lift] Re: How to make Ajax call from "onLoad"/"onResize"?

2009-11-22 Thread jhonig
Mellgren wrote: > Yes, jsonCall is an extension of ajaxCall that automatically does the > JSON conversion for you, which why you get an immutable.Map out of it > rather than a blob of text. Let me know how it works out. > > -Ross > > On Nov 18, 2009, at 4:16 PM, jhonig wrote: > &

[Lift] Re: How to make Ajax call from "onLoad"/"onResize"?

2009-11-22 Thread jhonig
r you, which why you get an immutable.Map out of it > rather than a blob of text. Let me know how it works out. > > -Ross > > On Nov 18, 2009, at 4:16 PM, jhonig wrote: > > > Hi Ross, > > > Thanks for your suggestion! So I can actually use any jsonCall as if >

[Lift] How to get the servlet context

2009-11-27 Thread jhonig
LS, After Ross' kind invitation to post any other questions I might have, I'll start with this one: The web application I am developing needs a scratch directory to white scaled images to. I first try to use a subdir of /tmp and put a symbolic link in place to access that directory from my proje

[Lift] Re: How to get the servlet context

2009-11-27 Thread jhonig
on non-servlet > web containers, so Lift does not guarantee there is a Servlet context > in scope. > > Hope that helps, > > -Ross > > On Nov 27, 2009, at 10:51 AM, jhonig wrote: > > > LS, > > > After Ross' kind invitation to post any other questions I

[Lift] Re: How to get the servlet context

2009-11-27 Thread jhonig
Dear Heiko, > According to the Servlet spec each webapp has got a private temporary > directory. I cannot remember exactly how to get this, maybe > ServletContext.getTmpDir(). Please take a look at the spec. I started reading the spec, but didn't find it yet. ServletContext doesn't have any obvi

[Lift] Re: How to get the servlet context

2009-11-27 Thread jhonig
this? Job H. On Nov 27, 6:56 pm, Heiko Seeberger wrote: > File tempdir = (File) > config.getServletContext().getAttribute("javax.servlet.context.tempdir") > > 2009/11/27 jhonig > > > > > Dear Heiko, > > > > According to the Servlet spec each web

[Lift] Re: How to get the servlet context

2009-11-28 Thread jhonig
Regarding serving images from there: Depending on the configuration of the > > servlet container WARs are not unpacked, hence there is no standard way to > > bring these images "into" your webapp. I think you will not be able to have > > the servlet container serve t

[Lift] Re: How to get the servlet context

2009-11-28 Thread jhonig
nks, Job On Nov 28, 3:47 pm, Jeppe Nejsum Madsen wrote: > jhonig writes: > > Dear Tim and Heiko, > > > I tested a few things under mvn jetty:run...: > > > getRealPath gives me "./src/main/webapp" > > the temp attribute is set to &quo

[Lift] Re: How to get the servlet context

2009-11-28 Thread jhonig
> Use explicitly imports, thus avoiding these problems: But the problem is knowing what to import :-) When there's no IDE support, all one has are the scaladocs... And *none* of the lift examples I found uses explicit imports, so you're on your own... Job -- You received this message becau

[Lift] Re: How to get the servlet context

2009-11-30 Thread jhonig
none of them worked. About to give up. Hope somebody will help me. Job H. On Nov 28, 3:14 pm, jhonig wrote: > Dear Tim and Heiko, > > I tested a few things under mvn jetty:run...: > > getRealPath gives me "./src/main/webapp" > the temp attribute is set t

[Lift] Re: How to get the servlet context

2009-11-30 Thread jhonig
ranted by an admin. So why do you need > "special" container allocated locations to write files? > > Br's, > Marius > > On Nov 30, 11:18 pm, jhonig wrote: > > > Hi Tim, Jeppe, and others who have replied... > > > I have spent a few more hours, but there

[Lift] Re: How to get the servlet context

2009-12-02 Thread jhonig
y server and served to the client. > > I used in the past both options with no problem at all for use cases > not so different than yours. > > Brs, > Marius > > On Nov 30, 11:36 pm, jhonig wrote: > > > Marius, > > > I tried to create a link from the w

[Lift] Re: How to get the servlet context

2009-12-02 Thread jhonig
Lift application could simply write files in the document-root folder > > hence would be seen by the proxy server and served to the client. > > > I used in the past both options with no problem at all for use cases > > not so different than yours. > > > Brs, > >

[Lift] Re: How to get the servlet context

2009-12-02 Thread jhonig
David, > I'm all for putting stuff in a well-know location in the filesystem... and > defining that well known location in the props file. OK, then this is what I want. But you refer to "THE" props file. Do you mean a Jetty props file, a general Lift props file, a user defined props file? I t

[Lift] Re: How to get the servlet context

2009-12-02 Thread jhonig
> Lift has a properties mechanism (see net.liftweb.util.Props). You can > define properties based on user name, machine name, and runmode. This > allows you to have different temporary directories depending on the > developer/machine/run mode. OK, I'll have a look. For now I am trying to serve

[Lift] Jetty question

2009-12-02 Thread jhonig
Can anybody point me to the proper documentation for Jetty 7? I found that http://docs.codehaus.org/display/JETTY/Static+Content is outdated, the classes referred to do not exist anymore in Jetty 7. Just replacing mortbay by eclipse in the class names didn't help... Then Google gave me: http://wi

[Lift] Re: Jetty question

2009-12-02 Thread jhonig
Hi Tim, > Lift is not yet compatible with Jetty 7 continuations... if you want to use > comet, please use Jetty 6 for the moment. I don't use comet. But is this dependency mentioned anywhere in the Lift docs? Can't remember having seen any such information! Job -- You received this message

[Lift] Re: Jetty question

2009-12-02 Thread jhonig
Hi Alex, > Which page(s) asked you for registration? Several of the configuration file pages. I will have a better look later today. Job -- 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.