Not at all, I just thought it would be hard to read. Here it is:
Peter
import _root_.java.sql.{ResultSet, Types}
import _root_.java.util.Date
import _root_.java.lang.reflect.Method
import _root_.net.liftweb._
import util._
import Helpers._
import http._
import S._
import js._
import _root_.sca
Hey there,
Does this help: http://wiki.github.com/dpp/liftweb/about-streamingresponse
Cheers,
Tim
On Aug 4, 5:23 am, DFectuoso wrote:
> I'm working on some landing pages that need to capture some
> information and after getting that, i will let the user download a
> file. The problem is tha
spoke too soon :-(
when I test this on a new browser or flush browser caches, I am
getting a javascript error: Undefined variable: JSON
I am not wrapping my the input field in a json form as described in
the book because when I do the page reloads. Could that be the
problem? In which case how do
Hi,
When I try to use internationalization via S.? in a Mapper class, I get the
below exception while booting Lift. It seems that S._resBundle is null when
Schemifier tries to do its work.
Is this a bug or a feature (S must not be used outside the request life
cycle). If last, how to i18n then?
thanks a lot;
though I couldn't find the demo, it was only the AutoComplete.init in
the bootstrap and the POST that I'd missed
So I think I'll switch to the snapshot - in 1.0 the value wasn't
returned after the submit
Is there a chance to get asynchronous access to the content of the
autocomple
My story here is a small online shopping site, with very a simple CMS,
so can't help you more :)
On Aug 4, 12:11 am, David Pollak
wrote:
> On Mon, Aug 3, 2009 at 8:31 AM, Lance Zheng wrote:
>
> > thank you David, I'll try it.
>
> So... you're building a CMS system?
>
> I just "volunteered" to c
In the lift-widgets project there is a pom.xml. type mvn jetty:run and
it will start the demo. The demo sources are in lift-widgets/src/test/
webapp.
Br's,
marius
On Aug 4, 10:20 am, fricke <00fri...@googlemail.com> wrote:
> thanks a lot;
>
> though I couldn't find the demo, it was only the Auto
S lifetime is per request. S is not constructed on Boot. Could you
post a code snippet on what you're trying to achieve?
Br's,
Marius
On Aug 4, 12:43 pm, Heiko Seeberger
wrote:
> Hi,
>
> When I try to use internationalization via S.? in a Mapper class, I get the
> below exception while booting
Well if you use a JSON form the Lift response will be text/javascript
mimetype and I assume you need some other mimetype ... One solution
would be from your JSON handler to return a RedirectTo (which is a
JsCmd) .. so you would redirect to some other URI where you have a
DispatchPF and serve back
One of the main reasons I'm attracted to Scala is the type-safety.
On Aug 3, 5:14 am, Timothy Perrett wrote:
> I think his point was that rails is doing un-type-safe operations at runtime
> which is *not* good!
>
> On 03/08/2009 08:15, "marius d." wrote:
>
>
>
>
>
> > The point being ... ?
>
>
I understand Lift works well with various Ajax frameworks such as YUI
and JQuery, and I really like the "rich internet application" (RIA)
look-and-feel provided by the Ajax framework ExtJS http://extjs.com,
which currently is dual-licensed (commercial or GPL).
I was wondering if it's possible / a
To make lift work with ExtJS you need to implement
net.liftweb.http.js.JsArtifacts trait and provide your implementation
in boot such as:
LiftRules.jsArtifacts = YourImplementationOfJsArtifacts
of course on top of this you would likely need to have specific .js
files. take a look on the current
Stefan,
Chas is doing work with ExtJS, but right now I think because of the GPL
licensing we cant "integrate" it with lift because of some legal stuff.
You might be interested to know that there is a current effort to integrate
with http://cappuccino.org/ which might be of interest (led my myse
excellent thanks.
On Aug 3, 11:58 pm, David Pollak
wrote:
> D'oh we were hitting that one as well.
>
> Fixed.
>
> On Mon, Aug 3, 2009 at 2:07 PM, Channing Walton wrote:
>
>
>
>
>
>
>
> > Hi,
> > I was using the testkit and HttpResponse.xml which was all good. But
> > after updating to the sn
Thanks, your instructions sound very straightforward.
On Aug 4, 11:00 am, "marius d." wrote:
> To make lift work with ExtJS you need to implement
> net.liftweb.http.js.JsArtifacts trait and provide your implementation
> in boot such as:
>
> LiftRules.jsArtifacts = YourImplementationOfJsArtifacts
Can you be a little more specific about what you want to achieve?
Do you want to have an "agree to these terms screen" and once that screen is
passed, then the user can access a link that contains the content?
Or do you mean "once the user clicks on 'submit' on the agree to these
terms, the user
Are you including the /classpath/json.js JavaScript file?
On Tue, Aug 4, 2009 at 1:15 AM, Channing Walton wrote:
>
> spoke too soon :-(
>
> when I test this on a new browser or flush browser caches, I am
> getting a javascript error: Undefined variable: JSON
>
> I am not wrapping my the input fie
Naftoli,
Functional programming systems are notoriously difficult to document.
The only way to really know what's going on is to meticulously trace
through the source. But that requires
time-consuming trial and error coding. So, without clear examples
demonstrating exactly what you have in mind,
I'm guessing that the easier one would be the way to go.
If the user clicks on agree to these terms and get a new screen with a
link, that link must only be accessible after agreeing in the last
screen.
If it could be the other way(click and get the file), it seems like
there would be no perma li
I am trying to get started with Scala and Lift over here (newbie alert
of course), but the download page has no Linux installers or downloads
available and it's not in the Ubuntu repos either.
Is there a simple way to just get the Lift libraries without having to
get knee deep into maven (I know
To "install" Lift on Ubuntu, please use Synaptics to install JDK 1.6 (or
some other Java 1.6 implementation) and Maven 2.0.9 or greater.
This is all you need on your system to run the Maven command to create a new
Lift project:
#!/bin/sh
mvn archetype:create -U -DarchetypeGroupId=net.liftweb \
I guess you're gently telling me I should just bite the bullet get
into maven after all
OK :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to liftweb@googlegroups
On Tue, Aug 4, 2009 at 10:11 AM, Jacek Furmankiewicz wrote:
>
> I guess you're gently telling me I should just bite the bullet get
> into maven after all
I think you can avoid Maven with SBT (
http://code.google.com/p/simple-build-tool/ ) but I don't know how to
install it.
>
>
> OK :-)
>
>
>
I have extended Mega*ProtoUser to achieve cookie-based perpetual
login.. and it was fairly easy to do except I ended up having to do
something hackish simply because there are two private object members
in the class that are core to the functionality I've extended.
Namely:
private object curUse
At the very least, you can do the maven steps, have it download
everything, and then harvest the JARs out of ~/.m2/repository
-Ross
On Aug 4, 2009, at 1:11 PM, Jacek Furmankiewicz wrote:
>
> I guess you're gently telling me I should just bite the bullet get
> into maven after all
>
> OK :-)
>
So, when the user agrees to the terms (or performs whatever they need to
perform), mark their record in the RDBMS as having agreed.
You can create a custom dispatch on a given URL that has a guard around it
such that it will only match if the user has done what the user has had to
do. The custom
In this case, if you change the type/behavior of the SessionVar and/or
RequestVar, you could mess up code that depends on these.
You also must *always* make RequestVar and SessionVar as object rather than
val so that they can make the determination of their unique string ID.
I view ProtoUser much
On Sun, Aug 2, 2009 at 4:35 PM, Naftoli Gugenheim wrote:
>
> How does the Title LocParam work?
The Title case class has a function that converts the current object
associated with the Loc into a String representing the title of the page
represented by the Loc.
>
> Is there a way to modify all
I have some dialog html files that are loaded through a 3rd party app
which are altered by lift to include the Liftajax.js. The issue is
these html files do no use jQuery so LiftAjax.js causes a jQuery
undefined error. Is there a way to add an import to the head merge
for these files once or wil
Why not use
"title" -> (title.toForm openOr NodeSeq.Empty)
?
On Mon, Aug 3, 2009 at 7:23 AM, Heiko Seeberger <
heiko.seeber...@googlemail.com> wrote:
> Hi,
> I have got a Mapper with a numeric MappedField (let's say Int).
> What is the best way to convert and validate from a HTML form?
>
> Obvi
This stuff looks good. Go ahead as long as you don't break any existing
APIs.
On Thu, Jul 30, 2009 at 11:27 PM, Naftoli Gugenheim wrote:
>
> Also I could refactor login to allow programmatic logging in, e.g., def
> login(email:String, pwd:String):Boolean. Then logInFirst could optionally
> take
Perfect, i think that gives me all the tools to make this!
Thanks!
On Aug 4, 12:39 pm, David Pollak
wrote:
> So, when the user agrees to the terms (or performs whatever they need to
> perform), mark their record in the RDBMS as having agreed.
>
> You can create a custom dispatch on a given URL
Maybe my setup is atypical then :)
My default.html is does not have a title tag; instead each view has its own,
relying on head merge.
I don't know if originally I had it in default using lift:Menu.title or not,
but the difficulty with that would be that some pages can be used to edit or
add a
Folks,
I spent a few days decoupling Lift from JEE web container
dependencies: javax.servlet._ The code is currently in wip-marius-http-
abstractions.
I still need to nail down a few things but the idea is:
1. Lift will work with its own traits that abstracts HTTP request,
response, HTTP sessio
I have some html files that are loaded as panel files through a 3rd
party js lib. These are are altered by lift to include the
Liftajax.js. The issue is these html files do no use jQuery or have
the import for jQuery in them, so the insertion LiftAjax.js causes a
jQuery undefined error when the
Why not use logUserIdIn, logUserIn, logoutCurrentUser/logUserOut(), and
currentUserId, and currentUser?
-
E. Biggs wrote:
I have extended Mega*ProtoUser to achieve cookie-based perpetual
login.. and it was fairly easy to do except I ended up having to do
so
Didn't look very closely, but if you extend MappedDate you lock yourself out of
MappedDatTime and vice versa. However both of them extend MappedField[Date, T]
which is a trait not a class, so if you extend that it should be mixable in to
both.
What was the compile error?
Aren't you writing a lo
To answer your immediate question, the listing should not refer to the
snippet's view but new ModelView instances for each entity. Then editAction is
shorthand for the snippet's link method with a callback to call load on the
ModelView. To set the snippet's view's entity, either call load on th
I don't necessarily have a problem with this, but what's the gain? Are there
other HTTP frameworks that don't use the javax.servlet API? Just curious.
Derek
On Tue, Aug 4, 2009 at 1:51 PM, Marius wrote:
>
> Folks,
>
> I spent a few days decoupling Lift from JEE web container
> dependencies: jav
On Tue, Aug 4, 2009 at 1:37 PM, Derek Chen-Becker wrote:
> I don't necessarily have a problem with this, but what's the gain? Are
> there other HTTP frameworks that don't use the javax.servlet API? Just
> curious.
Yes, Jersey directly, portlets, etc.
>
>
> Derek
>
>
> On Tue, Aug 4, 2009 at 1:5
Assuming your HTML files are located in the "no_lift" path, in Boot.scala:
LiftRules.autoIncludeAjax = session => S.request match {
case Full(Req("no_lift" :: _, _, _)) => false
case _ => true
}
On Tue, Aug 4, 2009 at 12:50 PM, Avo Reid wrote:
>
> I have some html files that are loaded a
doh! I missed that.
On Aug 4, 4:38 pm, David Pollak wrote:
> Are you including the /classpath/json.js JavaScript file?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email
Actually, you're right.. I suppose I got too focused on how I wanted
to do it and didn't think of how it could be done more pleasingly
this seems to work great:
override def currentUserId: Box[String] = {
super.currentUserId match {
case Full(_) => super.currentUserId
cas
I bugged you on twitter Dave before I learned there was a community
(or of this good heads up). My apologies. Sadly I believe many first
time lift users will become confused as to the nature of lift
development and believe you to be the primary contact incorrectly.
On Jul 9, 1:28 pm, David Pollak
This seems to be a pretty easy problem to solve. Maybe I'm just not
looking at the right place?
I want to dynamically set the "class" attribute on a div or span in
html. But I don't know how I can do it in Lift.
If I use something like , the IDE complains
that the tag not closed and I get the
How do you tell maven to install even if tests fail?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send em
Excellent, thanks for your help
On Aug 4, 4:48 pm, David Pollak wrote:
> Assuming your HTML files are located in the "no_lift" path, in Boot.scala:
>
> LiftRules.autoIncludeAjax = session => S.request match {
> case Full(Req("no_lift" :: _, _, _)) => false
> case _ => true
>
> }
> On Tue, Au
Telling maven to never fail:
mvn -fn (NEVER fail the build, regardless of project result)
Telling maven to skip test: (quite different from never failing)
mvn -Dmaven.test.skip=true
/irc
On 05/08/09 2:27 AM, Naftoli Gugenheim wrote:
>
> How do you tell maven to install even if tests fail?
>
> >
Thanks. Not sure why only the latter did an install.
-
Indrajit Raychaudhuri wrote:
Telling maven to never fail:
mvn -fn (NEVER fail the build, regardless of project result)
Telling maven to skip test: (quite different from never failing)
mvn -Dmaven.test.sk
Ahh, good idea. The compile errors all had to do with the the type
parameters. I don't know much about Scala's type system yet, so I was
defining the trait incorrectly based upon code I had copied and
pasted.
I'm now trying to have MappedTimestamp extend MappedField[Date, T]
instead and I am this
Cool. I'll have to look at portlets and see what they do.
Derek
On Tue, Aug 4, 2009 at 2:38 PM, David Pollak
wrote:
>
>
> On Tue, Aug 4, 2009 at 1:37 PM, Derek Chen-Becker
> wrote:
>
>> I don't necessarily have a problem with this, but what's the gain? Are
>> there other HTTP frameworks that do
In Safari 4.0.2, and Opera 9.64 on OS X, I get RangeError: Maximum
call stack size exceeded at line 27 in json.js
But in the latest nightly build of webkit, it works.
I will try on windows asap.
--~--~-~--~~~---~--~~
You received this message because you are subsc
Please put together some simple code that reproduces the problem and I'll
make it go away.
On Tue, Aug 4, 2009 at 2:48 PM, Channing Walton wrote:
>
> In Safari 4.0.2, and Opera 9.64 on OS X, I get RangeError: Maximum
> call stack size exceeded at line 27 in json.js
>
> But in the latest nightly b
Ignore my question please. I just read the part where it says that
Lift is not a MVC framework. :-)
On Aug 4, 1:53 pm, Simon wrote:
> This seems to be a pretty easy problem to solve. Maybe I'm just not
> looking at the right place?
>
> I want to dynamically set the "class" attribute on a div o
See Exploring Lift 7.6.2.
In short, the lift:snippet specifies a method that returns extra attributes.
Also, you can bind an element to a function from NodeSeq to NodeSeq which can
do whatever processing it wants.
-
Simon wrote:
Ignore my question please. I
thanks a lot;
demo:
found the demo - I stupidly looked into the jars
asynch call:
I already thought about the options-parameter, but it doesn't give
the end result. Now I did it with a page-reload
thanks a lot for your quick help
markus
On Aug 4, 1:19 pm, "marius d." wrote:
> In the lift-wid
will do
On Aug 4, 10:51 pm, David Pollak
wrote:
> Please put together some simple code that reproduces the problem and I'll
> make it go away.
>
> On Tue, Aug 4, 2009 at 2:48 PM, Channing Walton wrote:
>
>
>
> > In Safari 4.0.2, and Opera 9.64 on OS X, I get RangeError: Maximum
> > call stack si
Well... only sort-of :(
1) if you're using the id attribute, doesn't that mean i can only use
one per page?
2) i don't think it explains why is was getting the JavaScript
error...
In the meantime, I downloaded jQuery and include it explicitly on the
page and use style classes, so it seems to work
Guys,
As you may or may not know there have been several issues with the
lift installers than configure maven, add javarebal etc etc and this
has caused several users problems.
So, I *finally* pulled my finger out and fixed the problems and
removed the now defunct javarebel - note, if you still
Thanks for this info, Marius.
To get started with Lift I'm reading through the excellent book
"Exploring Lift" you wrote with Eric and Tyler (version 27 July 2009),
plus the source for the PocketChange app and liftweb, downloaded from
GitHub.
As I'm still finding my way through the various packa
My guess is that while -fn tells maven never to fail, it doesn't tell
it at what point in the lifecycle to finish. It's likely that the
test goal failed, maven stopped (before executing the install goal)
and reported a successful build. In the second case you're removing
the test goal from the m
Thanks for this how-to, David.
So far, I've only been using lift locally on my WinXP laptop.
But I'm saving this page for when I get ready to use lift on my VPS
server - which runs Debian Etch (which is similar to Ubuntu as far as
I understand).
On Aug 4, 2:08 pm, David Pollak wrote:
> To "ins
Hi. I am writing a webapp to be run mainly on BlackBerries, including older
ones that have basically no Javascript or Ajax support. I had the jquery script
tag commented out in the default template, and everything was fine. Only now
Internet Explorer is complaining about a javascript error (a r
How can a StatefulSnippet redirect to a page that does not use it, which links
or redirects back to it and it needs to remember its state?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to thi
How can you Or QueryParams (e.g. find text in any field)?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this g
>From http://groups.google.com/group/liftweb/msg/a66e58b85523a1d9
Add to Boot:
+// Do not insert Javascript-based GC
+LiftRules.enableLiftGC = false;
+
+// Do not include Ajax include
+LiftRules.autoIncludeAjax = _ => false;
On Aug 4, 8:38 pm, Naftoli Gugenheim wrote:
> Hi. I a
Thanks.
Will disabling Lift GC cause functions that need to be disposed of not to be or
cause Lift to dispose of functions that are needed?
-
jon wrote:
>From http://groups.google.com/group/liftweb/msg/a66e58b85523a1d9
Add to Boot:
+// Do not insert Ja
I would like to internationalize my code. Something like:
Mapper class:
class Course
extends LongKeyedMapper[Course]
with IdPK {
...
override val validations =
valMinLen(3, ?("minLen", 3)) _ ::
valMaxLen(50, ?("maxLen", 50)) _ ::
Nil
}
Localized messages:
minLen=A
Things like AsyncWeb, some HTTP stacks on top of Netty ...
Br's,
Marius
On Aug 4, 11:37 pm, Derek Chen-Becker wrote:
> I don't necessarily have a problem with this, but what's the gain? Are there
> other HTTP frameworks that don't use the javax.servlet API? Just curious.
>
> Derek
>
> On Tue, A
I thought validations is a function not a val:
override val validations should probably be
override def validations ?
or
override lazy val validations ?
Br's,
Marius
On Aug 5, 7:48 am, Heiko Seeberger
wrote:
> I would like to internationalize my code. Something like:
> Mapper class:
>
> cla
In any case why is localization attached to state?
-
marius d. wrote:
I thought validations is a function not a val:
override val validations should probably be
override def validations ?
or
override lazy val validations ?
Br's,
Marius
On Aug 5, 7:48 am
Ah, MappedFields know how to make themselves to form fields. Very nice!
Next question: Now I can enter some characters into the MappedInt field and
will get a 0 (zero) on form submission. But that is not what I want. I would
like to show a validation message (FieldError). Any chances to hook into t
In StatefulSnippet you have a redirectTo function that essentially
does a redirect with state
The definition is something like:
def redirectTo(where: String) = S.redirectTo(where,
registerThisSnippet)
So you can do it like
S.redirectTo(where, () => registerThisSnippet)
... of course would be
def can be overridden with val. But this is a Scala thingy, please do not
bother. If it makes you easier replace val with def.
The question remains: How can i18n be done in "stateless" (request state)
cases?
2009/8/5 marius d.
>
> I thought validations is a function not a val:
>
> override val v
I'm aware about the override thing but I don't see why you would do it
in such way. Since you don't have state, you don't have a session =>
you don't have S. Are you using a statelesDispatchPf ?
You can do:
1. Use your own ResourceBundles
2. Or a hacky thingy like:
val session = LiftRules.getLi
The point marius was making is that if it was a def or lazy val it wouldn't get
called so early.
-
Heiko Seeberger wrote:
def can be overridden with val. But this is a Scala thingy, please do not
bother. If it makes you easier replace val with def.
The questi
But when I navigate from that page back will it still be registered?
Page load 1 - snippet instantiated
Button clicked - redirect, register snippet
Page load 2 (somewhere else)
Button clicked - redirect to prev page
Page load 3 - snippet still registered?
Do I have to store a call to registerSnipp
On Aug 5, 9:16 am, Naftoli Gugenheim wrote:
> But when I navigate from that page back will it still be registered?
> Page load 1 - snippet instantiated
> Button clicked - redirect, register snippet
> Page load 2 (somewhere else)
This "somewhere else" is still a Lift page right? ... if so when
Okay. Thanks.
-
marius d. wrote:
On Aug 5, 9:16 am, Naftoli Gugenheim wrote:
> But when I navigate from that page back will it still be registered?
> Page load 1 - snippet instantiated
> Button clicked - redirect, register snippet
> Page load 2 (somewhere
79 matches
Mail list logo