On Tue, Mar 9, 2010 at 8:45 PM, aw wrote:
> It is time for me to add some serious widgets to my lift app.
>
> So far, I am most enamored by ExtJS.
> Another alternative could possibly be ZK.
>
> Does anybody have any experience with these frameworks? Can you
> comment on why integrating them wit
Hi,
I have 2 Stateful snippets in a page :
1. a InvoiceList snippet that
1. If no client RequestVar is present lists all the invoices in the
system
2. If a client RequestVar is present lists the invoices for that
client
2. a AddInvoice snippet that displays a form and adds an invoice
bind
You want to use it yourself or contribute it to Lift?
-
aw wrote:
It is time for me to add some serious widgets to my lift app.
So far, I am most enamored by ExtJS.
Another alternative could possibly be ZK.
Does anybody have any experience with these framewor
Hi All,
I'm attempting to write a simple game with lift and I'm really liking
the way a snippet can maintain state for a request and any ajax calls
it makes. This is quite simply brilliant.
I'm running into trouble with one area though. As part of my snippet
I'd like to create a script tag that c
It is time for me to add some serious widgets to my lift app.
So far, I am most enamored by ExtJS.
Another alternative could possibly be ZK.
Does anybody have any experience with these frameworks? Can you
comment on why integrating them with Scala/Lift would be a bad idea
(or not work)?
I searc
Oops in the previous code it's actually :
class AddInvoice {
val clientBox = ViewClient.currentClient
val client = ViewClient.currentClient.open_!
def add (inhtml: NodeSeq) : NodeSeq = {
val inInvoice = Invoice.create
def processEntry () {
S.notice ("Test " + client.firstNa
Unfortunately this did not solve my problem :
Let me paste the complete code :
Client View :
object ViewClient extends ViewClient
{
object currentClient extends RequestVar [Box [Client]] (Empty)
}
class ViewClient
{
val clientId = S.param ("id") openOr ""
val client = try {
Client.fi
Thanks Ross and David… the code seems to be working great now.
Stuart.
On Mar 9, 10:16 pm, David Pollak
wrote:
> On Tue, Mar 9, 2010 at 1:11 PM, Stuart Roebuck
> wrote:
>
> > Once again, thanks for all of this. I will now go away and
> > contemplate it all.
>
> > On the face of it, as a newby
On Tue, Mar 9, 2010 at 1:45 PM, DavidV wrote:
> Any thoughts on this? Still trying to get it to work.
>
See the enclosed example code. Specifically, there's a dpp.gif file in
src/main/resources and in Boot.scala:
LiftRules.statelessDispatchTable.append {
case Req("image" :: name ::
On Tue, Mar 9, 2010 at 1:11 PM, Stuart Roebuck wrote:
> Once again, thanks for all of this. I will now go away and
> contemplate it all.
>
> On the face of it, as a newby, this JavaScript DSL adds another layer
> of complexity to using Lift with JavaScript. Is there an option to
> use mostly raw
Le 09/03/2010 18:35, David Pollak a écrit :
On Tue, Mar 9, 2010 at 9:25 AM, Timothy Perrett mailto:timo...@getintheloop.eu>> wrote:
Wow, I wish I had 5 machines ;-) lol.
Thats an interesting outlook and an explanatory rationale. Can you
explain the implementation? Perhaps I can be
Is your dispatch defined it boot? It doesnt sound like it is...
Cheers, tim
On 9 Mar 2010, at 21:45, DavidV wrote:
> Any thoughts on this? Still trying to get it to work.
> Thanks
>
> On Mar 5, 2:56 pm, DavidV wrote:
>> I have recreated a number of StreamingResponse methods from both the
>>
Any thoughts on this? Still trying to get it to work.
Thanks
On Mar 5, 2:56 pm, DavidV wrote:
> I have recreated a number of StreamingResponse methods from both the
> Loop link above and the Lift book and I still can't seem to get the
> desired effect. I have been able to get a PlainTextRespons
Once again, thanks for all of this. I will now go away and
contemplate it all.
On the face of it, as a newby, this JavaScript DSL adds another layer
of complexity to using Lift with JavaScript. Is there an option to
use mostly raw JavaScript? What are the advantages / disadvantages?
Sorry, I t
Le 09/03/2010 21:27, David Pollak a écrit :
[...]
Does this help?
Yes, clearly, it seems to be what I was looking for. I missed at first
in lift example, until Jeppe point it to me.
With your explanation, it really looks like it's what I need :)
One of my open tickets is to provide docum
On Tue, Mar 9, 2010 at 6:17 AM, Francois wrote:
> Le 09/03/2010 10:12, Francois a écrit :
>
> Hello guys,
>>
>>
>> I'm often using forms without anything to do persistence and RDBMS
>> related, but I would like to be able to use Fields (StringField,
>> EmailField, my owns, etc), validation, erro
On Tue, Mar 9, 2010 at 11:45 AM, Marius wrote:
> Really nice talk Richard. Great stuff !!!
>
It's excellent stuff!
>
> On Mar 9, 9:05 pm, Richard Dallaway wrote:
> > On Sat, Feb 20, 2010 at 8:22 PM, andy wrote:
> > > The London Scala User Group (LSUG) will be presenting a talk by
> > > Richa
Ha ha! :) Good that's exactly what I needed ...
so I can do something like :
object postedValue extends RequestVar...
val clientBox = ViewClient.currentClient
map clientBox (postedValue (_.is))
And the value will be "copied" to the new RequestVar for the p
Howdy,
Lift does rendering most basically with Snippets. Snippets are functions
NodeSeq => NodeSeq... they take a NodeSeq and return a NodeSeq. Snippets
are generally independent entities. They do not know about each other.
They can ask about the state of the session and the state of the reque
Marius writes:
> I opened defect 412 and this is now on the review board:
> http://reviewboard.liftweb.net/r/263/diff/#index_header
Wow, that was fast :-) Thanks for looking into this!
/Jeppe
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post t
Really nice talk Richard. Great stuff !!!
On Mar 9, 9:05 pm, Richard Dallaway wrote:
> On Sat, Feb 20, 2010 at 8:22 PM, andy wrote:
> > The London Scala User Group (LSUG) will be presenting a talk by
> > Richard Dallaway on 'Getting started with Lift' at SkillsMatter
>
> It is done:http://icanha
I see almost any difference with JRebel
On Mar 9, 6:13 pm, David Pollak wrote:
> My development cycle has never worked well with JRebel.
>
> First, I've got so many machines I do development on (5, 3 of which get
> wiped each time Ubuntu releases a new version), getting all of those
> machines se
haha!! thanks Heiko... perhaps for my next trick i'll tap out a response using
only my nose ;-)
Cheers, Tim
On 9 Mar 2010, at 18:56, Heiko Seeberger wrote:
> Looks great, especially for a one-handed-writer ;-)
--
You received this message because you are subscribed to the Google Groups
"Lift
On Sat, Feb 20, 2010 at 8:22 PM, andy wrote:
> The London Scala User Group (LSUG) will be presenting a talk by
> Richard Dallaway on 'Getting started with Lift' at SkillsMatter
It is done: http://icanhaz.com/gswl ... where you will find a link to
the Skillsmatter video.
Richard
--
You received
A RequestVar is a container that transcends Scala's scope rules: multiple
instances of the class holding the RequestVar will see the same value in their
respective RequestVars.
On the other hand its value is per request. That has nothing to do with; two
simultaneous requests can set and get two
On Tuesday, March 9, 2010, Timothy Perrett wrote:
> how about:
> def stringTest(x: String): String = Box !! x openOr ""
Looks great, especially for a one-handed-writer ;-)
Heiko
> Cheers, Tim
> On 9 Mar 2010, at 17:30, Heiko Seeberger wrote:
> On 9 March 2010 16:48, David Pollak wrote:
>
> Ca
It is not set in the same request as it's being read exactly...
But how is that doable with RequestVars then ?
On Mar 9, 11:55 am, Naftoli Gugenheim wrote:
> You can use StatefulSnippets if you like, but what you want to do is
> perfectly doable with RequestVars.
> Clearly it's not being set
how about:
def stringTest(x: String): String = Box !! x openOr ""
Cheers, Tim
On 9 Mar 2010, at 17:30, Heiko Seeberger wrote:
> On 9 March 2010 16:48, David Pollak wrote:
> Can you be a little more specific?
>
> Sure ;-)
> I am looking for a method like this:
> def stringNullTest(s: String):
On Tue, Mar 9, 2010 at 9:30 AM, Heiko Seeberger <
heiko.seeber...@googlemail.com> wrote:
> On 9 March 2010 16:48, David Pollak wrote:
>
>> Can you be a little more specific?
>>
>
> Sure ;-)
> I am looking for a method like this:
> def stringNullTest(s: String): String = if (s != null) s else ""
>
On Tue, Mar 9, 2010 at 9:34 AM, Stuart Roebuck wrote:
> Ross,
>
> Thanks - yes, the NodeSeq is all generated from templates internally.
>
Then Ross's solution is the best for you.
> The end user does not have any access to change this stuff so this
> particular security issue shouldn't be a pro
On Tue, Mar 9, 2010 at 9:25 AM, Timothy Perrett wrote:
> Wow, I wish I had 5 machines ;-) lol.
>
> Thats an interesting outlook and an explanatory rationale. Can you explain
> the implementation? Perhaps I can be persuaded. Right now, i'm not convinced
> about hampering development mode in this wa
That's why I factored this as a JQueryNodeSeq, so you can pass anything to
dialog (I've used JQuery, and figured you'd need to pass something in there ;-)
JQueryNodeSeq(ns) ~> JsFunc("dialog", JsObj("autoOpen" -> JsTrue, "width" ->
500, ..., "close" -> AnonFunc(JsVal("this") ~> JsFunc("destroy")
Ross,
Thanks - yes, the NodeSeq is all generated from templates internally.
The end user does not have any access to change this stuff so this
particular security issue shouldn't be a problem in this case.
Stuart.
On Mar 9, 5:30 pm, Ross Mellgren wrote:
> Ah yes, the reason I went through the f
Thanks for that amazingly quick response!
I only wish I understood the proposed solution! :-)
So (confession time) I simplified things a little, the actual
JavaScript is…
var theDialog = $(…).dialog( { autoOpen: true, width: 500, modal:
true, close: function() { theDialog.destroy; }; } )
How do
Ah yes, the reason I went through the fixHtml route is because Stuart
specifically mentioned he wanted to process those.
Stuart, you should make sure to properly secure this stuff -- either as an
admin-only thing (understanding that that person has as much rights as you) or
by scrubbing the XML
I opened defect 412 and this is now on the review board:
http://reviewboard.liftweb.net/r/263/diff/#index_header
On Mar 9, 6:08 pm, Marius wrote:
> Dear Jeppe,
>
> I spent some time today in looking to your issue. I was able to
> reproduce. The problem was that a NPE was thrown as the S,functions
On 9 March 2010 16:48, David Pollak wrote:
> Can you be a little more specific?
>
Sure ;-)
I am looking for a method like this:
def stringNullTest(s: String): String = if (s != null) s else ""
Of course I could roll my own, but if it is already around (e.g. in
StringHelpers) I would use it from
Why is compilation running with JRebel?
Also, how critical is JRebel to people getting their feet wet? When I was new
to Lift, I used the default setting in the POM that caused a jetty hot redeploy
when class files were updated. (Possibly earlier on I restarted jetty
manually.) While that meant
On Tue, Mar 9, 2010 at 9:14 AM, Ross Mellgren wrote:
> Try this (I haven't tested it, so there could be lurking bugs):
>
> case class JQueryNodeSeq(ns: NodeSeq) extends JsExp with JQueryLeft with
> HtmlFixer {
>override def toJsCmd = "jQuery(" + JsStr(fixHtml("NodeSeqDialog",
> ns)).toJsCmd +
Wow, I wish I had 5 machines ;-) lol.
Thats an interesting outlook and an explanatory rationale. Can you explain the
implementation? Perhaps I can be persuaded. Right now, i'm not convinced about
hampering development mode in this way.
Cheers, Tim
On 9 Mar 2010, at 17:13, David Pollak wrote:
Whoops, I meant Str(fixHtml(...)) not JsStr(fixHtml(...))
-Ross
On Mar 9, 2010, at 12:14 PM, Ross Mellgren wrote:
> Try this (I haven't tested it, so there could be lurking bugs):
>
> case class JQueryNodeSeq(ns: NodeSeq) extends JsExp with JQueryLeft with
> HtmlFixer {
>override def toJsC
Try this (I haven't tested it, so there could be lurking bugs):
case class JQueryNodeSeq(ns: NodeSeq) extends JsExp with JQueryLeft with
HtmlFixer {
override def toJsCmd = "jQuery(" + JsStr(fixHtml("NodeSeqDialog",
ns)).toJsCmd + ")"
}
Then JQueryNodeSeq(ns) ~> JsFunc("dialog")
-Ross
On M
My development cycle has never worked well with JRebel.
First, I've got so many machines I do development on (5, 3 of which get
wiped each time Ubuntu releases a new version), getting all of those
machines set up with JRebel is something of a pain. Further, having JRebel
run in some cases is *ver
I'm trying to produce a web page with editable content.
When the user clicks an edit button on a line it uses jQuery to
display a modal dialog which allows fields of that line to be edited.
I can easily produce a snippet to produce the lines using the backend
data and an XHTML template and bindin
You can use StatefulSnippets if you like, but what you want to do is perfectly
doable with RequestVars.
Clearly it's not being set in the same request as it's being read.
-
hexa wrote:
I think we still have a miss understanding
The client_id code clientBox m
I think we still have a miss understanding
The client_id code clientBox map (_.id.toLong) work ok .. no problems
with that
What doesnt work would be doing something like :
val clientBox = ViewClient.currentClient
def processEntry () {
inInvoice.client (clientBox.open_!)
inInvoic
Your request needs to be like:
http://localhost:8080/download.html?link=http%3A%2F%2Ftest.com%2Ffile.zip%2612345678
and on the server side you can get the link from parameter with
S.param("link")
On Mar 9, 4:38 pm, "Neil.Lv" wrote:
> I want get the these strings (http://test.com/file.zip&12345
I think you could use plain Record and MetaRecord to do this.
-Ross
On Mar 9, 2010, at 9:27 AM, Jeppe Nejsum Madsen wrote:
> On Tue, Mar 9, 2010 at 3:17 PM, Francois wrote:
>> Le 09/03/2010 10:12, Francois a écrit :
>>>
>>> Hello guys,
>>>
>>>
>>> I'm often using forms without anything to do
Hi, thanks for the suggestions I like that match {} code.. will try
that..
But what you suggest but the post_id is similar to what I'm doing
now.. since this id is a long it will be copied by value
and I can pass it to multiple requests using a closure...
I'll try to clarify a bit :
A have a V
Ok i think I see the "bug". It is the magic which i don't understand
yet that if you change your client_id from val to var it will be auto
promoted into Heap and live out Snippet. Try this out.
Change:
val client_id = clientBox map (_.id.toLong)
To:
var client_id = clientBox map (_.id.toLong)
On
Dear Jeppe,
I spent some time today in looking to your issue. I was able to
reproduce. The problem was that a NPE was thrown as the S,functionsMap
was not initialized as I was doing a light S init to capture original
request state. I have a fix for it but I need to do some more testing
on it first
On Tue, Mar 9, 2010 at 3:17 PM, Francois wrote:
> Le 09/03/2010 10:12, Francois a écrit :
>>
>> Hello guys,
>>
>>
>> I'm often using forms without anything to do persistence and RDBMS
>> related, but I would like to be able to use Fields (StringField,
>> EmailField, my owns, etc), validation, erro
That took care of the compile issues. Thanks, Ross.
Craig
On Mar 8, 2010, at 11:05 PM, Ross Mellgren wrote:
> So I looked into this as best I could and it seems to be a type inference
> error where the compiler is inferring a too-loose type binding for EnumType
> and therefore rejecting the a
Can you be a little more specific? Are you saying that if you have a variable
of type String that is a null reference that in certain cases, when that
variable is in an xml literal, it becomes a zero length item, a Text(""), or
something else?
Sorry for being pedantic, but I'm trying to unders
There was one in MappedString, but I think DPP's recent refactoring of common
utilities for mapper etc. put it somewhere else (additionally, I assume).
-
Heiko Seeberger wrote:
Hi,
I am pretty sure there is a method somewhere converting a null String to an
em
On Mar 9, 9:56 pm, Marius wrote:
> You need to do URL encoding first. Helpers.urlEcnode(str) does this.
>
case RewriteRequest(
ParsePath(List("download", link), "html", _, _),
GetRequest, _) =>
RewriteResponse(List("download"
If the sitemap could be specified as a function JRebel could reload it.
One approach is along the lines that setSiteMap could be passed a function e.g.
()=>List[Menu]. In production mode the return value may or may not be cached.
Another approach is to have an optional method in Boot called say bu
Redirect means the destination will execute in another request.
However, redirectTo takes, as an optional second parameter, a function to
execute in that new request. So try setting the RequestVar there.
-
Lukasz Kuczera wrote:
IMHO you have three options:
1.
Hi all,
I have a silly question about the URL rewrite .
How to let the URL params can contains the & character.
Here is the code:
### The url rewrite.
case RewriteRequest(
ParsePath(List("download", link), "html", _, _),
GetRequest, _)
I think he means he wants to access query parameters.
-
Marius wrote:
You need to do URL encoding first. Helpers.urlEcnode(str) does this.
On Mar 9, 3:47 pm, "Neil.Lv" wrote:
> Hi all,
>
> I have a silly question about the URL rewrite .
>
> How to let the
Le 09/03/2010 10:12, Francois a écrit :
Hello guys,
I'm often using forms without anything to do persistence and RDBMS
related, but I would like to be able to use Fields (StringField,
EmailField, my owns, etc), validation, error management, etc. without
having everything to manage by hand.
A
Hi,
I am pretty sure there is a method somewhere converting a null String to an
empty String. But I have not found it yet ...
Thanks,
Heiko
Company: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web fram
No it doesn't work for sitemap... as thats loaded at boot only ;-) My point was
that it can still be a good experience without JR for our users.
Interesting what you were saying about your dev style... i'm usually the other
way around and implement sitemap last as I see it as a concrete setting
You need to do URL encoding first. Helpers.urlEcnode(str) does this.
On Mar 9, 3:47 pm, "Neil.Lv" wrote:
> Hi all,
>
> I have a silly question about the URL rewrite .
>
> How to let the URL params can contains the & character.
>
> Here is the code:
>
> ### The url rewrite.
> ca
On Mar 9, 1:08 pm, Timothy Perrett wrote:
> BTW, with SBT, don't forget you can do:
>
> jetty-run
> (make changes to your code)
> prepare-webapp
>
> That will redeploy chnaged files / classses to the running jetty
> instance so development with SBT can still be slick without
> javarebel :-)
I want get the these strings ( http://test.com/file.zip&12345678 )
from the
URL (http://localhost:8080/download.html?link=http://test.com/
file.zip&12345678)
Thanks very much!
Cheers,
Neil
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To
But on the other hand it happens not too often. I'm personally very
very happy with current productiveness using Lift + Jetty + JRebel.
But what happens when Zeroturnaround will turn back to Scala ? It is
quite possible that Scala will go mainstream. It might be viable
solution then.
Simple soluti
On Tue, Mar 9, 2010 at 12:08 PM, Timothy Perrett
wrote:
> BTW, with SBT, don't forget you can do:
>
> jetty-run
> (make changes to your code)
> prepare-webapp
>
> That will redeploy chnaged files / classses to the running jetty instance so
> development with SBT can still be slick without javarebe
IMHO you have three options:
1. Use statefull snippet
2. Use SessionVar.
3. User RequestVar.
I went for third option. Because I don't need to retain this value
between multiple requests.
In my code i use something like:
object Index {
object postidVar extends RequestVar(S.param("postid").
I assume you are using Lift from master ...
lazy-load should be able to wrap anything. I'll try to put in some
ajaxSelects to see if I can repro.
On Mar 8, 10:54 pm, Jeppe Nejsum Madsen wrote:
> On Mon, Mar 8, 2010 at 5:42 PM, Marius wrote:
> > Can you please send me a minimalistic example ? ..
BTW, with SBT, don't forget you can do:
jetty-run
(make changes to your code)
prepare-webapp
That will redeploy chnaged files / classses to the running jetty
instance so development with SBT can still be slick without
javarebel :-)
Lift is really elegant - some how, this approach feels pre
Hello guys,
I'm often using forms without anything to do persistence and RDBMS
related, but I would like to be able to use Fields (StringField,
EmailField, my owns, etc), validation, error management, etc. without
having everything to manage by hand.
Actually, I would like to be able to use
On Tue, Mar 9, 2010 at 9:33 AM, Timothy Perrett wrote:
> I'm afraid I agree with Marius... I'm just not sure on the benefit here over
> JRebel?
My main pain point was changes to Sitemap. JRebel doesn't help you
here as it's fixed once Lift is booted...
/Jeppe
--
You received this message becau
I'm afraid I agree with Marius... I'm just not sure on the benefit
here over JRebel?
Cheers, Tim
Sent from my iPhone
On 9 Mar 2010, at 08:05, Marius wrote:
I'm having seconds thoughts about this. Development mode can mean
slightly different things depending on the nature of the application
Le 09/03/2010 01:51, David Pollak a écrit :
Folks,
[...]
With those limitations, do you guys thing the feature would be
valuable? Should it be part of development mode or should there be
another demarcation of the dynamic reload mode?
There will always be limitation, and I think that every
Is this "currentClient(Full (c)), Text ("Ajouter Facture"))" called on
page X and ViewClient.add snippet on page Y?
If you want to preserve state between pages than you should use
SessionVars.
I don't know what "Destination Post snippet" means.
On Mar 9, 8:13 am, hexa wrote:
> Hi,
> I have a
David Pollak writes:
> Folks,
>
> I spent today "cracking the code" on how to implement a more dynamic Lift
> development cycle.
Awesome!
> Specifically, I figured out how to support (during development mode)
> having changes in compiled code reflected in the running application.
> The change t
I'm having seconds thoughts about this. Development mode can mean
slightly different things depending on the nature of the application.
The things you enlisted are for me only PROS for not including this
feature.
Sorry but personally I don't see much value in this approach ... but
this doesn't mea
78 matches
Mail list logo