[Lift] Re: Snippets and Requests

2009-06-07 Thread marius d.
StatfulSnippet does not actually have session scope. It guarantees that for the same request you get the same snippet instance. If for some reason you still don't want a StatefulSnippet you can put your results in a RequestVar, set the value when you process the form and use it when render the

[Lift] Re: How to remove leading text in Msgs.error

2009-06-05 Thread marius d.
The reason for that is that if the node text is empty (and yes we explicitly trim it) we render the default text. To be honest I'm not a fan of this approach either. I think it should be ok to just not render a default text. Does anyone have any objections? If not I could change this real quick,

[Lift] Re: How to remove leading text in Msgs.error

2009-06-05 Thread marius d.
explicitly sets it to empty then we should honor that, although I wonder if we should emit a debug-level warning. Derek On Fri, Jun 5, 2009 at 7:26 AM, Bryan. germ...@gmail.com wrote: +1 on removing the default text. --Bryan On Jun 5, 6:46 am, marius d. marius.dan...@gmail.com wrote

[Lift] Re: How to remove leading text in Msgs.error

2009-06-05 Thread marius d.
it out, that would be confusing. Kind of a deprecation warning, so to speak. Derek On Fri, Jun 5, 2009 at 8:25 AM, marius d. marius.dan...@gmail.com wrote: Personally I don't think that a debug warning is necessary ... since if the node is empty it is very intuitive for the user

[Lift] Re: How to remove leading text in Msgs.error

2009-06-05 Thread marius d.
Committed. Let me know if that works for you. On Jun 5, 6:31 pm, marius d. marius.dan...@gmail.com wrote: Oh right ..that  makes sense. Thanks Derek ! On Jun 5, 6:28 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: Well, I meant for a period of time, since we're changing default behavior

[Lift] Re: Ideas for an ordered list in a form

2009-06-03 Thread marius d.
Cool ! On Jun 3, 12:18 am, Derek Chen-Becker dchenbec...@gmail.com wrote: Thanks for sending that. It looks like UI could also provide some drag and drop, so the asm select plugin is looking very nice :). Now I just need to get approval on changing multiSelect to use an LFuncHolder and I'm

[Lift] Re: Problem with Menu.builder li_path/li_item

2009-06-03 Thread marius d.
attribute with the same name but different prefixes should be ok as long as the prefixes are bound to namespace URL's. Br's, Marius On Jun 3, 12:24 am, Derek Chen-Becker dchenbec...@gmail.com wrote: I think that this has been discussed on the list before. It's definitely an issue with having

[Lift] Re: Future of the Lift wiki

2009-06-03 Thread marius d.
really like the format of the django documentation:http://docs.djangoproject.com/en/dev/.  Any other recommendations out there? Thanks, Bryan On Jun 2, 6:57 am, Kevin Wright kev.lee.wri...@googlemail.com wrote: Mark me down :) On Tue, Jun 2, 2009 at 9:36 AM, marius d. marius.dan

[Lift] Re: Future of the Lift wiki

2009-06-02 Thread marius d.
I believe Debbie was asking the community for a few folks willing to garden the wiki. Anyone interested? Br's, Marius On Jun 2, 11:07 am, Timothy Perrett timo...@getintheloop.eu wrote: Guys, I know you chaps are quite new on this lift, so just to add a bit of background - we've been here

[Lift] Re: JavaScript interface to Comet

2009-06-01 Thread marius d.
a comet stream? P.P.S.S.  I feel there's some utility in a JsCometActor.  If you all are amenable, I'd love to write up a proposal and maybe even lend a hand with implementing it. On Sun, May 31, 2009 at 4:07 AM, marius d. marius.dan...@gmail.com wrote: Yes looks like this is exactly what

[Lift] Re: JavaScript interface to Comet

2009-06-01 Thread marius d.
Sorry hit send too soon ... continuation below On Jun 1, 10:42 am, marius d. marius.dan...@gmail.com wrote: On Jun 1, 2:59 am, Xavi Ramirez xavi@gmail.com wrote: Thanks for pointing me into the right direction.  I've created a simple example (see attachment).  In my example, the user

[Lift] Re: Record and Field

2009-06-01 Thread marius d.
what Java version are you using? On Jun 1, 1:58 pm, Oliver Lambert olambo...@gmail.com wrote: When I try to run createRecord on a net.liftweb.record.Record, I get a java.lang.ExceptionInInitializerError. Any ideas what I might be doing wrong? cheers Oliver

[Lift] Re: Prevent direct access to templates

2009-06-01 Thread marius d.
What do you have in your SiteMap? .. only login or both login and login_ru. Normally you should only have login and login_ru would be picked up automatically by lift depending on what Locale the LiftRules.localeCalculator returns. Br's, Marius On Jun 1, 9:52 am, feelgood asseliva...@gmail.com

[Lift] Re: JavaScript interface to Comet

2009-05-31 Thread marius d.
. Essentially, I want to drag/drop a widget and have my movements reflected on other user's browsers. You mentioned that a CometActor can cause JsExp to be executed.  This might be what I'm looking for.  How does that work? Thanks, Xavi On Sat, May 30, 2009 at 5:02 PM, marius d. marius.dan

[Lift] Re: Showing a Box or Redirecting?

2009-05-31 Thread marius d.
class SomeSnippet { val foo: Box[Foo] = tryo(session1.get(S.param(id).getOrElse ())) // But I think with this code you'll always get a Full Box due to getOrElse ? def render(func: foo = NodeSeq) = foo.map(l = func(l)) openOr (your code in case foo is empty and potentially return

[Lift] Re: Ideas for an ordered list in a form

2009-05-31 Thread marius d.
A couple of years ago I did the same thing with drag and drop ... but I wrote the JS code, and for some reason I didn't really look for an existent solution :) ... I think I still have the damn thing and if you want to I could send it to you. On May 31, 3:01 am, Derek Chen-Becker

[Lift] Re: lift views

2009-05-31 Thread marius d.
Agreed with Tim. I also don't see any value. And the point of viewing the template statically is not an argument to me because the template is still incomplete for a proper rendering, xhtml browser would probably complain about prefixes it doesn't know about etc. Br's, Marius On May 31, 5:32 

[Lift] Re: Dependent fields in form

2009-05-30 Thread marius d.
That should be quite easy. See http://demo.liftweb.net/ajax-form Marius On May 29, 9:46 pm, feelgood asseliva...@gmail.com wrote: Is it real to create form with dependent field? Suppose whe have two select boxes: for the country and for the city. It would be quite good, if country selection

[Lift] Re: Lift does not display templates as described in the book.

2009-05-30 Thread marius d.
To access a page you need to add it in the SiteMap. I assume you are a bit confused about the relation between a Menu and a page. I mean after all maybe for your site you don't really need a menu but in Lift a Menu is much more then a visual representation of a way to navigate to your pages. It

[Lift] Re: JavaScript interface to Comet

2009-05-30 Thread marius d.
Lift generates the JavaScript for Comet so you essentially don't have to worry about it. From a CometActor you just provide the markup that you need to render asynchronously or just the JsExp to be executed by browser. However could you please provide an overview of what you're trying to

[Lift] Re: Lift does not display templates as described in the book.

2009-05-30 Thread marius d.
your problem and you will get answers. - Sean Reque On May 30, 2:56 pm, marius d. marius.dan...@gmail.com wrote: To access a page you need to add it in the SiteMap. I assume you are a bit confused about the relation between a Menu and a page. I mean after all maybe for your site you don't

[Lift] Re: Record with the new bind-immutable

2009-05-29 Thread marius d.
I see ... still the question remains. What are we going to do with two validators? I'd like to understand the principles of your addition (... I know I should have dig into the code but I don't have much time now). I'd like to understand as I said previously if we have redundant validators or

[Lift] Re: How important is AJAX to you?

2009-05-29 Thread marius d.
You can use Lift perfectly fine without Ajax, javaScript or even cookies. If you're turning off cookies from the container relative paths for links, forms etc. will be provided with JSESSIONID quantity for you so you don't have to do anything. This is otherwise known as URL rewriting. So you can

[Lift] Re: What version of Lift is that?

2009-05-28 Thread marius d.
SUPER NICE ! On May 28, 3:11 am, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I've just committed up a little bit of niceness to Lift.  You can do the following: Lift version lift:version_info.lift/ built on lift:version_info.date/ These are snippets that recall the Lift

[Lift] Re: What version of Lift is that?

2009-05-28 Thread marius d.
Dave is there a reason why you removed the the deprecation log call for snippet A? ... I thought we discussed on a different thread that it should be deprecated. Also I can't seem to find VersionInfo snippet. Did you add it ? Br's, Marius On May 28, 9:49 am, marius d. marius.dan...@gmail.com

[Lift] Re: ** Significant commits **

2009-05-28 Thread marius d.
I asked about the same thing on a different thread :). I think this is not related with the commit above but with the latest commit Dave made :) Br's, Marius On May 28, 11:58 am, Timothy Perrett timo...@getintheloop.eu wrote: Yup, thats now fixed, but lift is still broken. When doing a build

[Lift] Re: Session usage in Lift

2009-05-27 Thread marius d.
On May 27, 9:17 am, Kristinn kristinn.daniels...@gmail.com wrote: Yes, I understand your confusion, however sometimes people make designs that don't make much sense to others on first look (like using sessions for rendering all html). But there are often good reasons for these decisions

[Lift] Re: Serve a static xml file

2009-05-27 Thread marius d.
Have you tried to put that URL in the LiftRules.liftRequest ? .. you can decide there if that one will be served by lift or not. Br's, Marius On May 27, 3:23 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey guys, Is there a reason that I can not just place an xml file in webapp and

[Lift] Re: lift-tag discussion

2009-05-26 Thread marius d.
Ok I have a first draft implementation for #1 above and I'll check it in soon in wip-marius-dom-optimizations branch. I need to run more tests on it before putting it into master. Br's, Marius On May 25, 1:31 pm, marius d. marius.dan...@gmail.com wrote: No performance implications especially

[Lift] Re: lift-tag discussion

2009-05-26 Thread marius d.
the lift prefix configurable from LiftRules but I really don't see the value added by this. W On May 25, 6:31 am, marius d. marius.dan...@gmail.com wrote: No performance implications especially since built-in snippets are objects and invoked non reflectively. It's just that the way these two

[Lift] Re: Giving an Actor access to S

2009-05-26 Thread marius d.
not able to. These results are short lived and should expire at the end of a user's session. Thanks, Bryan On May 26, 1:42 am, marius d. marius.dan...@gmail.com wrote: Well and S object is initiated but in an asynchronous operation you wont really have request information cause you

[Lift] Re: lift-tag discussion

2009-05-26 Thread marius d.
On May 26, 2:18 pm, Willis Blackburn willis.blackb...@gmail.com wrote: is this too bad? lift:display      user:name/      user:address/ /lift:display No, it's not bad.  But allowing non-lift prefixes would neatly solve your problem by changing the definition of the lift prefix

[Lift] Re: Sticking the little toe in the LiftActor water

2009-05-26 Thread marius d.
So we essentially use LiftActors for ContinuationActors but still keep Scala Actors for CometActors. I'm more comfortable with this approach not from technical reasoning but from adoption/political. Br's, Marius On May 26, 9:09 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Folks,

[Lift] Re: lift-tag discussion

2009-05-25 Thread marius d.
No performance implications especially since built-in snippets are objects and invoked non reflectively. It's just that the way these two artifacts are processed right now it is not by the means of snippets but buried deeply into surround snippet processing. Thanks guys for your thoughts.

[Lift] Re: Giving an Actor access to S

2009-05-25 Thread marius d.
CometActors are asynchronous components that live beyond the scope of a given request. From a CometActor you can have access to LiftSession or SessionVars meaning that you could potentially store the last- seen from the last request host name in a SessionVar an then access it anytime from your

[Lift] Re: Giving an Actor access to S

2009-05-25 Thread marius d.
was always that CometActor's faked S so its usage was fairly transparent of course, thats specific to CometActors and wont wash with a normal scala.actor.Actor etc Cheers, Tim On May 25, 10:01 pm, marius d. marius.dan...@gmail.com wrote: CometActors are asynchronous components that live

[Lift] Re: Namespace prefix error.

2009-05-24 Thread marius d.
Do you see any errors in the server console/logs? ... Do you have the XHTML markup that browser gets? Br's, Marius On May 24, 4:40 am, KaniniPazham mohan.narayanasw...@credit- suisse.com wrote: I guess my previous post didn't reach. I have tried enough to my lift knowledge, but need someone's

[Lift] Re: The new LiftActor code is live

2009-05-24 Thread marius d.
I'm wondering maybe it would be good to abstract the actors in Lift such that when Scala Actors are in a better shape we could just switch the implementation back to Scala Actors with very little Lift code changes. Br's, Marius On May 24, 2:26 am, David Pollak feeder.of.the.be...@gmail.com

[Lift] Re: The new LiftActor code is live

2009-05-24 Thread marius d.
evolve it. P.S. This will probably raise some questions from folks that want to adopt Lift. Br's, Marius On May 24, 8:56 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, May 24, 2009 at 1:46 AM, marius d. marius.dan...@gmail.com wrote: I'm wondering maybe it would be good

[Lift] Re: Welcome Alexander Kiok, you're the 1,000th member of the Lift community

2009-05-22 Thread marius d.
WOOO H ! On May 22, 7:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, It's been a very good week in Lift and Scala-land:    - The Lift community has grown to 1,000 members.  That's a huge milestone    and an indication that Lift and Scala have achieved an important

[Lift] Re: Cron style job support?

2009-05-21 Thread marius d.
Or use Scala actors + ActorPing from lift. Marius On May 21, 12:54 am, Timothy Perrett timo...@getintheloop.eu wrote: Checkout the lift-machine module... should do what you want. Right now   it's tied to mapper, so if your not using that you'll have to look   elsewhere in normal JEE land :-)

[Lift] Re: how to serve html fragments

2009-05-20 Thread marius d.
As I understood you want to make an Ajax request and serve back a Document Fragment. If so please also take a look at Jx stuff. We discuss Jx classes in a fairly amount of details in the lift book. Br's, Marius On May 20, 9:32 am, fatu fab...@gmail.com wrote: Timothy, thanks for the links, I

[Lift] Re: Problems with the MenuWidget

2009-05-20 Thread marius d.
in the css and js files (I've putted them in the path /src/main/ webapp/classpath and ../classpath/menu, or should I put them in the ../main/resources/toserve/menu and reference them in the pom.xml)? Hope you understand. Thanks, GonzaloN On May 20, 6:26 pm, marius d. marius.dan...@gmail.com

[Lift] Re: Problems with the MenuWidget

2009-05-20 Thread marius d.
Could you please post your code ? ... Are you initializing the widget in your boot ? Br's, Marius On May 20, 7:52 pm, Gonzalo N gonn...@gmail.com wrote: Hi, I've recently started using Lift in a project and probably my difficulty is basic, but I've tried the Widgets that are uploaded in

[Lift] Re: Problems with the MenuWidget

2009-05-20 Thread marius d.
section, there is no reference to this widget. Many thanks, GonzaloN On May 20, 7:24 pm, marius d. marius.dan...@gmail.com wrote: It looks like the CSS and potentially the JSdependecies are not seen by the browser ... From your page rendered take the URI for the superfish CSS and JS

[Lift] Re: Lift vs JSF?

2009-05-19 Thread marius d.
LOL ! On May 19, 7:45 am, Meredith Gregory lgreg.mered...@gmail.com wrote: Marius, No, seriously, tell us how you really feel. ;-) Best wishes, --greg On Mon, May 18, 2009 at 12:22 PM, marius d. marius.dan...@gmail.com wrote: I've been working on JSF projects in the past and IMO

[Lift] Re: Scala Sass Compiler

2009-05-19 Thread marius d.
I'm not quite a SASS fan but this looks pretty cool. If there is a lot of buy in for SASS out there maybe in time it will make sense for Lift to provide SASS support out of the box Br's, Marius On May 19, 6:35 am, David Pollak feeder.of.the.be...@gmail.com wrote: Very nifty stuff. On Mon,

[Lift] Re: Length too long for generated XML

2009-05-18 Thread marius d.
Scala's XML support is based in immutable objects meaning that you can not change them but rather generate new structures. Lift is very flexible and allows you to apply your own xhtml transformation right before the response is sent down to client. LiftRules.responseTransformers.append {

[Lift] Re: Tail merge?

2009-05-16 Thread marius d.
PM, marius d. marius.dan...@gmail.com wrote: On May 10, 10:08 pm, Viktor Klang viktor.kl...@gmail.com wrote: What I've been noodling about for some time is to have dependency management as a part of the framework. That could be easily obtained by having widgets etc register

[Lift] Re: Bindings and Validation request cycle

2009-05-16 Thread marius d.
in the validation css name method call. The validation has a state that gets somehow lost/replaced. Any suggestions on that? On May 15, 11:00 pm, marius d. marius.dan...@gmail.com wrote: If you want to change CSS classes upon validation you can do: Non Ajax 1. . bind(myobject, xhtml

[Lift] Re: Tail merge?

2009-05-16 Thread marius d.
ooops .. checking it right now :( On May 16, 7:53 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I think you missed a file during your checkin.  The Tail object is missing :-( On Sat, May 16, 2009 at 7:15 AM, marius d. marius.dan...@gmail.com wrote: Folks, I just added

[Lift] Re: Tail merge?

2009-05-16 Thread marius d.
Done! ... very sorry about this. On May 16, 8:23 pm, marius d. marius.dan...@gmail.com wrote: ooops .. checking it right now :( On May 16, 7:53 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I think you missed a file during your checkin.  The Tail object is missing :-( On Sat

[Lift] Re: Another StatefulSnippet question...

2009-05-16 Thread marius d.
Could you please post the code ... which is most relevant to this issue ? Br's, Marius On May 16, 11:53 am, ivan ivan.se...@gmail.com wrote: First I have to say sorry everyone for asking too many questions, asking a question is my last choice after i coludn't find an answer in a book or

[Lift] Re: Bindings and Validation request cycle

2009-05-15 Thread marius d.
On May 15, 10:18 pm, Scalanewbie mc...@gmx.de wrote: Hi, as a lift-scala-newbie i am trying out various things with lift to see advantages etc. to other frameworks (rails, grails,...) I am now trying to integrate a third party java validation library and i want to embed the results into

[Lift] Re: Bindings and Validation request cycle

2009-05-15 Thread marius d.
class and does not do any special node manipulation (which is good, because its not the right place). On May 15, 9:37 pm, marius d. marius.dan...@gmail.com wrote: On May 15, 10:18 pm, Scalanewbie mc...@gmx.de wrote: Hi, as a lift-scala-newbie i am trying out various things with lift

[Lift] Re: A few things about the lift installer

2009-05-13 Thread marius d.
Windows... On May 13, 10:34 am, Timothy Perrett timo...@getintheloop.eu wrote: Which platform? windows? mac? Sent from my iPhone On 13 May 2009, at 07:41, Marius marius.dan...@gmail.com wrote: Hi, I had it everything working having the git sources and built lift from there. But

[Lift] Re: A few things about the lift installer

2009-05-13 Thread marius d.
 am, marius d. marius.dan...@gmail.com wrote: Windows... On May 13, 10:34 am, Timothy Perrett timo...@getintheloop.eu wrote: Which platform? windows? mac? Sent from my iPhone On 13 May 2009, at 07:41, Marius marius.dan...@gmail.com wrote: Hi, I had it everything working having

[Lift] Re: A few things about the lift installer

2009-05-13 Thread marius d.
On 13 May 2009, at 08:49, marius d. marius.dan...@gmail.com wrote: Windows... On May 13, 10:34 am, Timothy Perrett timo...@getintheloop.eu wrote: Which platform? windows? mac? Sent from my iPhone On 13 May 2009, at 07:41, Marius marius.dan...@gmail.com wrote: Hi, I had

[Lift] Re: A few things about the lift installer

2009-05-13 Thread marius d.
functionality   as it will download all the release or snapshot jars for you. Can we add some text that makes this clear? Cheers, Tim Sent from my iPhone On 13 May 2009, at 09:02, marius d. marius.dan...@gmail.com wrote: One other thing ... I just installed on Windows using the installer

[Lift] Re: A few things about the lift installer

2009-05-13 Thread marius d.
as well just download lift too and get the latest version. Thoughts? Cheers, Tim On 13/05/2009 09:23, marius d. marius.dan...@gmail.com wrote: So ... I'm lost :) ... Where are the lift's binaries? What I expected is this: 1. Install Lift via installer. 2. Create a lift project

[Lift] Re: Builing Lift ... again

2009-05-13 Thread marius d.
Well in the pom from master we have: 1. pluginRepositories points to repo-releases 2. repositories points to both repo-releases and repo-snapshots Br's, Marius On May 13, 4:17 pm, Josh Suereth joshua.suer...@gmail.com wrote: Do you have the scala-tools.org/repo-snapshots configured?   Maven

[Lift] Re: Confusion about Lift-Core

2009-05-12 Thread marius d.
Charles, The diagram for the lift book is a component level diagram showing the most relevant pieces of lift. Component diagram reveal very little information about the actual interactions. The Lift-Core in the diagram you posted is essentially the Lift's engine, the logic behind processing Lift

[Lift] Re: Confusion about Lift-Core

2009-05-12 Thread marius d.
Lift request/response cycle and detailed explanations on it so I could refer to it when I'm coding. Could also be useful on the wiki. I hope this clarifies the situation. Sorry for the confusion. Chas. marius d. wrote: Charles, The diagram for the lift book is a component level diagram

[Lift] Re: Tail merge?

2009-05-11 Thread marius d.
On May 10, 9:57 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, May 10, 2009 at 6:55 AM, marius d. marius.dan...@gmail.com wrote: People can choose to smash multiple js/css files into a single one, in fact it is a common practice. However for scripts that can

[Lift] Re: Alternating row colors

2009-05-11 Thread marius d.
Assume that in your snippet you have a List[String] that you want to render as table rows such as: val list = one :: two :: three :: Nil def render(xhtml: NodeSeq): NodeSeq = { table{ list.zipWithIndex((e, idx) = trtd{e}/td/tr % if (idx % 2 == 0) Null // Null is a MetaData

[Lift] Re: Alternating row colors

2009-05-11 Thread marius d.
JS= $('.striped tr:nth-child(odd)').css('background-color','#DD'); Ref:http://dev.opera.com/articles/view/zebra-striping-tables-with-css3/ Cheers, Viktor On Mon, May 11, 2009 at 3:54 PM, marius d. marius.dan...@gmail.com wrote: Assume that in your snippet you have a List[String

[Lift] Re: Tail merge?

2009-05-10 Thread marius d.
for larger page sizes.  I'd much rather see a tool that would analyze the scripts and css that was included across lots of pages and recommending to the developer to make 10 CSS files or 20 script files into 1.  But that's just me. Cheers, Tim On 08/05/2009 20:19, marius d. marius.dan

[Lift] Re: Tail merge?

2009-05-10 Thread marius d.
On May 10, 4:57 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, May 10, 2009 at 6:55 AM, marius d. marius.dan...@gmail.com wrote: People can choose to smash multiple js/css files into a single one, in fact it is a common practice. However for scripts that can be deferred

[Lift] Re: Tail merge?

2009-05-10 Thread marius d.
, especially the ecommerce tracking code. Here's something to keep an eye on as well:  http://blog.digg.com/?p=621 -- still very new and in development. --Bryan On May 10, 9:57 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, May 10, 2009 at 6:55 AM, marius d

[Lift] Re: Locale/Language in URL?

2009-05-09 Thread marius d.
Yeah ... Please see LiftRules.urlDecorate In your boot you can say something like: LiftRules.urlDecorate.append { case url = // here add the code that will add the lang query parameter } With this, all URI-s toward your app should have the information you appended. Br's, Marius On May

[Lift] Re: garbage collection

2009-05-08 Thread marius d.
On May 8, 10:49 am, Oliver Lambert olambo...@gmail.com wrote: On Fri, May 8, 2009 at 6:51 AM, marius d. marius.dan...@gmail.com wrote: Personally I'd be very reluctant exposing that to applications as this is Lift implementation specific and exposing an API tight to that leads to unnecessary

[Lift] Re: Tail merge?

2009-05-08 Thread marius d.
A lift:tail built in snippet might me a good addition. I could probably allocate some time to noodle on it. Br's, Marius On May 8, 5:05 pm, KWright kev.lee.wri...@googlemail.com wrote: It's becoming an established best practice that scripts should be put at the END of a page, where possible,

[Lift] Re: garbage collection

2009-05-07 Thread marius d.
In short the current Lift GC is: 1. Each page has an ID 2. Each mapped function is associated with the page ID 3. There are periodical Ajax request sent from the page that are refreshing the timestamps on the mapped functions 4. Mapped functions that exceeded the expiration time are de-

[Lift] Re: garbage collection

2009-05-07 Thread marius d.
, marius d. marius.dan...@gmail.com wrote: In short the current Lift GC is: 1. Each page has an ID 2. Each mapped function is associated with the page ID 3. There are periodical Ajax request sent from the page that are refreshing the timestamps on the mapped functions 4. Mapped functions

[Lift] Re: garbage collection

2009-05-07 Thread marius d.
messageCallback - The joys of private variables. thanks again Ol On Thu, May 7, 2009 at 9:55 PM, marius d. marius.dan...@gmail.com wrote: Please see LiftSession. On May 7, 1:41 pm, Oliver Lambert olambo...@gmail.com wrote: Thanks for this. I would like to look at the code that actually

[Lift] Re: garbage collection

2009-05-07 Thread marius d.
, Marius On May 7, 10:22 pm, Oliver Lambert olambo...@gmail.com wrote: Any chance of exposing a getter on messageCallback that would return some statistics (the number of functions being stored would be a good starting point)? On Thu, May 7, 2009 at 11:21 PM, marius d. marius.dan...@gmail.com

[Lift] Re: Some Lift enhancements

2009-05-05 Thread marius d.
Dave, if you need any help with optimizations just let me know. Br's, Marius On May 5, 1:29 am, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, Based on feedback, I've made some enhancements to Lift:    - Template caching is on by default when in Production mode    - Method

[Lift] Re: 1st draft of response to Martin's code challenge for scalable componentized lambda evaluator

2009-05-05 Thread marius d.
Any reason why not using Scala's combinator parsers? ... or this is beyond the point of the exercise? Br's Marius On May 5, 4:55 am, Meredith Gregory lgreg.mered...@gmail.com wrote: Lifted, Scalad and lasses, Recently Martin passed along a little code challenge regarding scalable

[Lift] Re: 1st draft of response to Martin's code challenge for scalable componentized lambda evaluator

2009-05-05 Thread marius d.
(community) that originated the parser combinator stuff, the parser combinator machinery is nicely hidden behind a more standard BNF frontend, such as Alex + Happy. This is the way it should be. Best wishes, --greg On Tue, May 5, 2009 at 4:15 AM, marius d. marius.dan...@gmail.com wrote: Any

[Lift] Re: Do you guys ever use lift:a key=... ... in your templates?

2009-05-05 Thread marius d.
sweet ! .. I'll take care of that. On May 5, 7:18 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, May 3, 2009 at 3:51 AM, Marius marius.dan...@gmail.com wrote: Hi, I'm asking this because SHtml.a is a bit a-typical in the sense of producing lift:a that will render the ajax

[Lift] Re: How to handle refresh with S.redirectTo with state?

2009-05-04 Thread marius d.
Not at all. They are safe. On May 3, 9:49 pm, Bryan. germ...@gmail.com wrote: Would that mean that the state of the RequestVar could accidentally be shared with multiple requests? On May 3, 1:51 pm, marius d. marius.dan...@gmail.com wrote: Hmmm ... the code seems to be fine (as far as I

[Lift] Re: how to hide /display div tag in lift

2009-05-04 Thread marius d.
There are so many ways ... 1. Use chooseTemplate technique. I think the examples application from /sites uses this. 2. In the snippet you have the snippet content and you can just strip it out 3. You can have a little JavaScript that is called when the page loads that shows or hides the div ...

[Lift] Re: Sample applications are somewhat slow - is Lift slow ?

2009-05-04 Thread marius d.
Dave if you're doing benchmarks can you try using the template caching mechanism ? .. and try to see the differences ? Br's, Marius On May 4, 6:23 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, May 3, 2009 at 4:11 PM, Daniel Guryca dun...@gmail.com wrote: I have just tried mvn

[Lift] Re: buttons and textbox

2009-05-03 Thread marius d.
Greg, ajaxCall returns a tuple (String, JsExp) ... so when you use it try something like: (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s = updateWhat(s))._2) Br's, Marius On May 3, 9:00 am, Meredith Gregory lgreg.mered...@gmail.com wrote: Lifted, When i look at the button

[Lift] Re: buttons and textbox

2009-05-03 Thread marius d.
it's returning lambda x.x. How do i access the contents of the textbox except by that call? Best wishes, --greg On Sun, May 3, 2009 at 12:11 AM, marius d. marius.dan...@gmail.com wrote: Greg, ajaxCall returns a tuple (String, JsExp) ... so when you use it try something like

[Lift] Re: Localize an image

2009-05-03 Thread marius d.
As a continuation to Tim's notes. You can have templates suffixed with the locale suffix. So for the template applicable for one locale or another just use different CSS files. I guess you can also use chooseTemplate to render different variants of the markup in question. Br's, Marius On May

[Lift] Re: Do you guys ever use lift:a key=... ... in your templates?

2009-05-03 Thread marius d.
Well SHtml.a yields a lift:a and processed in its own snippet now. I guess I'm only challenging the need for lift:a ... and try to understand in what context people really use it. Br's, Marius On May 3, 11:12 pm, Timothy Perrett timo...@getintheloop.eu wrote: Marius, To clarify, your saying

[Lift] Re: Showing a directory in lift

2009-04-30 Thread marius d.
Please see the lift-widgets project. There is a tree widget in there. Br's, Marius On Apr 30, 10:36 pm, lostem...@gmail.com lostem...@gmail.com wrote: I'm new to lift, so I'm sorry if it was covered somewhere, please point me to the link if it was. So the question is what is the best way

[Lift] Re: Javascript confirm(..) dialog with ajaxButton

2009-04-29 Thread marius d.
Ok, Here is what I'm thinking of: def ajaxButton(text: NodeSeq, jsFunc: Call, func: () = JsCmd, attrs: (String, String)*): Elem = { val params = (name: String) = jsFunc.params ++ List(AnonFunc (makeAjaxCall(Str(name+=true attrs.foldLeft(fmapFunc(func)(name = button

[Lift] Re: Javascript confirm(..) dialog with ajaxButton

2009-04-28 Thread marius d.
Pretty much all SHtml function related to Ajax invokes the ajax call as to click the link, button, etc. SHtml.ajaxCall function allow you to provide a JsExp (which could be any JavScript expression) who's result would be passed to the ajax call. But I don't think this will help your case a whole

[Lift] Re: Javascript confirm(..) dialog with ajaxButton

2009-04-28 Thread marius d.
, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree. Allowing for a guard JavaScript expression to be called before the Ajax call is made would be nice. Derek On Tue, Apr 28, 2009 at 3:02 PM, marius d. marius.dan...@gmail.comwrote: Pretty much all SHtml function related to Ajax

[Lift] Re: Upgrade to 2.7.4 breaks with-param?

2009-04-27 Thread marius d.
BTW ... there were previous discussions that for 1.1 we'll deprecate lift:bind, right? ... if so with-param would also be deprecated ... or am I missing something? Br's, Marius On Apr 27, 1:05 am, Timothy Perrett timo...@getintheloop.eu wrote: Things changed with this code 2 days ago...

[Lift] Re: Upgrade to 2.7.4 breaks with-param?

2009-04-27 Thread marius d.
On Apr 27, 11:23 am, Timothy Perrett timo...@getintheloop.eu wrote: Ah right, so your thinking that lift:bind will go, and be replaced with something similar that uses our existing snippet infrastructure? Cheers, Tim On 27/04/2009 07:28, marius d. marius.dan...@gmail.com wrote: BTW

[Lift] Re: Upgrade to 2.7.4 breaks with-param?

2009-04-27 Thread marius d.
template strategy. Cheers, Tim On 27/04/2009 10:13, marius d. marius.dan...@gmail.com wrote: Right now: bits me ... perhaps Dave has more input. However it seems to me that what we can do with lift:bind/lift:with-param today, it can be easily done without it using the other Lift artifacts

[Lift] Re: How to set different response in lift

2009-04-27 Thread marius d.
Of course ... You can use: 1. DispatchPf functions and return an XmlResponse 2. Try this: def ajaxButton(text: NodeSeq, func: () = NodeSeq, attrs: (String, String)*): Elem = { attrs.foldLeft(fmapFunc(NFuncHolder(func))(name = button lift:gc={name} onclick={makeAjaxCall(Str(name

[Lift] Re: How to set different response in lift

2009-04-27 Thread marius d.
BTW ... I'm not sure why you'd prefer an XML response back instead of JSON or JavaScript ... but it's up to you. Br's, Marius On Apr 27, 8:13 pm, marius d. marius.dan...@gmail.com wrote: Of course ...  You can use: 1. DispatchPf functions and return an XmlResponse 2. Try this:   def

[Lift] Re: Upgrade to 2.7.4 breaks with-param?

2009-04-27 Thread marius d.
I could implement this soon if you are too busy. Just let me know. Br's, Marius On Apr 27, 10:37 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Apr 27, 2009 at 12:33 PM, marius d. marius.dan...@gmail.com wrote: Good ... well then shouldn't the same rationale be applied

[Lift] Re: Customizing Javascript

2009-04-26 Thread marius d.
Can you provide more code to give more context on what you're trying to do? ... Lift does not process tags outside XML scope. Br's, Marius On Apr 26, 3:41 am, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Hello:    I have a javascript that needs to get a parameter from a snippet, for

[Lift] Re: Customizing Javascript

2009-04-26 Thread marius d.
Oh wow ... no offense but I haven't seen such code in a while :) .. I see the code but it's difficult to understand the problem that you are trying to solve ... looks like you are building a clock. For building reasonable small JavaScript I'd recommend using Lif't's JavaScript abstraction

[Lift] Re: with-param now appears to be broken?

2009-04-26 Thread marius d.
Yup the snippets stuff ... I'll fix it now. On Apr 26, 10:11 pm, Timothy Perrett timo...@getintheloop.eu wrote: Correction, it appears this commit broke the snippet code: http://github.com/dpp/liftweb/commit/c27d8497cf671d250c55370e4407c15b... Cheers, Tim On Apr 26, 8:06 pm, Timothy

<    1   2   3   4   5   6   >