Hello,
ticket created: http://www.assembla.com/spaces/liftweb/tickets/368
On Feb 24, 2010, at 6:28 PM, David Pollak wrote:
On Wed, Feb 24, 2010 at 7:33 AM, Adam Warski a...@warski.org wrote:
Hello,
I'm integrating recaptcha into a Lift app that uses MegaProtoUser, and
there's one
in concrete user classes.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
Hello,
Can't you just override actionAfterSignup and don't call super if
captcha check fails?
But that already assumes that signup was successfull and in the end redirects
to the homepage instead of going back to the singup form.
--
Adam Warski
http://www.warski.org
http
Hello,
Question - Can I test Lift 2.0-M2 with Scala 2.0 Beta 1 now?
you need to use code from the 280_port_refresh branch
(http://github.com/dpp/liftweb).
The milestones are for 2.7.7 still.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message
= 0
^
one error found
same for timeSpan.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
using dispatch
snippets.
But why do you say to new users who just ask about statements from the wiki
that their posts are time-wasting and that they can get less attention in the
future I really don't understand.
Peace :)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
think it should be enough to run mvn jetty:run in the background.
My start-server.sh script:
#!/bin/bash
mvn jetty:run log.out 21
(puts all logs in log.out for further inspection)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message because you
wondered about this sentence when I was starting to get to
know lift.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
As mentioned earlier, please try *lifespan* instead.
def lifespan: Box[TimeSpan] is what you probably want.
Ah :D I thought you were correcting the type parameter in David's email, didn't
notice the function name.
Thanks a lot! :)
--
Adam Warski
http://www.warski.org
http
with snapshot and it works.
Thanks Marius :)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
, visit this group at
http://groups.google.com/group/liftweb?hl=en.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
Hmm right, although e.g. password already exists as a key and it wouldn't be
good to duplicate it as Password.
Same about Email.
On Feb 2, 2010, at 1:08 PM, Jeppe Nejsum Madsen wrote:
Adam Warski a...@warski.org writes:
We'll accept a patch for this issue.
Here's the patch.
Note
;)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received
.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
null =
case s = s.toString}}/textarea)}
}
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
the child and apply the datepicker creation.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
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
Hello,
This was considered later on a defect, and not a feature. To preserve
markup attributes in your bind use -% instead of -
thanks, although the -% is missing support for the .toForm, as it returns a
Box[NodeSeq]. And for % you need an Elem. Any ideas how to deal with that? :)
--
Adam
- LiftRules.early.append(_.setCharacterEncoding(UTF-8))
When the String is set on the model field it still is correct, so something
happens when trying to persist the value. Is there a way in lift to configure
jdbc so that it accepts utf-8 characters? Or am I missing something else?
--
Adam Warski
http
Heh, sorry, I knew the moment I write a post here I'll find the answer ;)
Forgot that when converting a table in mysql you not only need to set the
character encoding for the table but also for the individual columns.
Sorry again for the spam.
On Jan 29, 2010, at 3:01 PM, Adam Warski wrote
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message because you are subscribed to the Google Groups
Lift group.
To post to this group, send email
with other type params (that is, not Unit), where the default
value is Empty, and they are shown normally.
Is this a bug, or expected behaviour for some reason?
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message because you are subscribed to the Google
seem to work - no attributes get rendered on the resulting element. Is this
still supported? (the only difference from the example is that I don't use
e:id but my own prefix which I then bind to in my snippet)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received
Hello,
If you need a String:
(for {
loc - SiteMap.findLoc(Login)
path - loc.createDefaultPath
} yield path.text) openOr /
right, I could just convert it to text. That works, thanks :).
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received
will be called again, and fresh variables will be
created. So the values won't be retained. If you want to keep the values
between updating and re-rendering, you need something more global, like a
RequestVar or a StatefulSnippet.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You
:).
But looking at MetaMegaProtoUser trait I now see that there's for example a
loginPath val which I can simply use instead of lookuing up the loc. As well
as some other useful functions :)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message because you
)).toOption
which would be:
def createDefaultPath: Option[String] = currentValue.flatMap(p =
link.createPath(p)).toOption
(btw., why is it Option here, not Box?)
Then generating a link to the login page would simply be:
SiteMap.findLoc(Login).open_!.createDefaultPath
--
Adam Warski
http
!)
but unfortunately the compiler doesn't seem to recognize the fact that the type
parameter for loc is the same as the one returned for loc.currentValue.
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message because you are subscribed to the Google Groups
Lift group
Hello,
table cellpadding=7px title=User summary
thFirst Name/th
thLast Name/th
thHours Summary/th
thWage/th
lift:Users.list
tr
Hello,
Could you please point me, I can't find it.
if you mean the lift book, it's here:
http://groups.google.com/group/the-lift-book
--
Adam
--
You received this message because you are subscribed to the Google Groups
Lift group.
To post to this group, send email to
Hello,
Right ... and it's not even a hack ... css is the right way of
building layout not really the html. Putting buttons in the form ar
giving this perception in the page doesn't mean that the button has to
be physically in the form element (at least that's the way I see
it.).
actually I
Hello,
Hmm yes I wondered if the order in which the functions are bound is
significant, but my experiments showed that it's not simply a first bound,
first called principle. So I don't quite get it yet why it doesn't work.
We rely on JQuery (or other underlying library) to send the actual
.
Thanks!
Adam
Most likely I'll commit it today in master as it was approved by
review board.
Br's,
Marius
On Jan 14, 9:53 am, Adam Warski a...@warski.org wrote:
I would of course be very +1 to include the ajaxSubmit :). Thanks for the
work.
This looks a bit different to the button I
Hello,
Oh yeah contextFuncBuider ... good catch. I'll update today.
thanks :)
2. The button will work only with full ajax-forms right? So forms wrapped
with ajaxForm(...)? My initial use-case was for adding some ajax buttons to
normal forms (submitted with a normal http request), but I
I kinda doubt that as I tested with a bunch of form fields. In the
ajax request the function ID of the ajax function was always the last
in the parameters and functions are evaluated in canonical order (for
the same owner). But I think you sent me your source code location and
I need to look
multiple buttons for a ajax
form ... this version of ajaxButton does just that. Can you please
clarify your used case for for for those 3 steps? ...
Br's,
Marius
On Jan 12, 4:20 pm, Adam Warski a...@warski.org wrote:
Hello,
this *almost* works :).
I modified your code a bit and now I
Hello,
Yes please a small app would be best. Please use 2.0-SNAPSHOT.
Here it is:
http://github.com/adamw/lift-ajax-submit-test/
Steps to reproduce:
1. checkout from git :)
2. run mvn jetty:run
3. go to http://localhost:8080
4. click add once
5. fill in the two fields with some values e.g.
room name
bind room name
set container name container
set room name room
Adam
On Jan 13, 2010, at 10:13 AM, Adam Warski wrote:
Hello,
Yes please a small app would be best. Please use 2.0-SNAPSHOT.
Here it is:
http://github.com/adamw/lift-ajax-submit-test/
Steps to reproduce:
1
I would of course be very +1 to include the ajaxSubmit :). Thanks for the work.
This looks a bit different to the button I tried before, maybe you have a patch
so that I can try it out on the test app?
Adam
On Jan 12, 2010, at 8:39 PM, Marius wrote:
Dear all,
Recently (and not only) there
RequestVar
should be preserved due to contextFuncBuilde call.
Please let me know if this works. If it does we should probably add it
to SHtml.
Br's,
Marius
On Jan 11, 10:54 pm, Adam Warski a...@warski.org wrote:
Hello,
trying the solution a bit more I came into another problem which I
(form_ID)).toJsCmd}delete/button
Br's,
Marius
On Jan 10, 6:58 pm, Marius marius.dan...@gmail.com wrote:
On Jan 10, 5:20 pm, Adam Warski a...@warski.org wrote:
Hello,
ajaxButton(Press me would ya'?, SHtml.submitAjaxForm
(form_ID).toJsCmd, (some) = {
do your stuff here
})
Looking
Hello,
However for some reason, when I click the button, in the callback I get a
new elements RequestVar (so it's initialized to an initial value) and
moreover, nothing gets redrawn on the page. What is also quite weird is that
the RequestVar is re-initialized, but the snippet instance
Hello,
I don't think you need a SessionVar. You can just capture the RequestVar's
value in a local val and refer to that in the closure.
Basically if I understand correctly, this is a typical scenario where you
output a form and associate functions with its fields which are to be
executed
list of input
fields with add and delete operations :)
Adam
On Jan 11, 1:09 pm, Adam Warski a...@warski.org wrote:
Hello,
this almost works :).
Right now in my form I have a hidden element where the type of the operation
to execute will be set:
input type=hidden id=operation_id name
., 10:48, Adam Warski a...@warski.org wrote:
Hello,
I have a regular form, which is submitted with a POST (no AJAX here yet).
The form contains a list, to which you can add and remove elements using
AJAX. So the add and remove buttons are:
add - ajaxButton(Add element, () = { elements += new
buttons.
Adam
On Jan 10, 2010, at 10:42 AM, Adam Warski wrote:
Hello,
thanks, but my use-case is a bit different.
I want the whole form to be still submitted using a POST (the normal way),
and only use ajax for a small fragment of the page (the element editor). So I
can't use ajaxForm
={SHtml.submitAjaxForm(form_ID).toJsCmd}blah/button
Br's,
Marius
On Jan 10, 1:08 pm, Adam Warski a...@warski.org wrote:
There is also a related problem:
how can I have two ajax buttons on one form which submit the form and
execute different functions on the server?
Using the standard trick
Hello,
ajaxButton(Press me would ya'?, SHtml.submitAjaxForm
(form_ID).toJsCmd, (some) = {
do your stuff here
})
Looking at the source code I think this might work, but I'm having trouble
constructing the correct expression to pass to ajaxButton. The method signature
requires a Call
Hello,
I have a regular form, which is submitted with a POST (no AJAX here yet). The
form contains a list, to which you can add and remove elements using AJAX. So
the add and remove buttons are:
add - ajaxButton(Add element, () = { elements += new Element; reDraw })
The reDraw method is a
any idea why my example application produces such weird
results?
I looked in the RequestVar code and didn't find anything there that would make
it behave differently in the two scenarios.
Adam
Br's,
Marius
On Jan 5, 9:37 am, Adam Warski a...@warski.org wrote:
Hello,
Ah, I didn't spot
/271
By the way, do you have any idea why my example application produces such
weird results?
I looked in the RequestVar code and didn't find anything there that would
make it behave differently in the two scenarios.
Adam
Br's,
Marius
On Jan 5, 9:37 am, Adam Warski
Hello,
investigating further making the tutorial form submittable with ajax, I found
some weird behavior; I'm using 1.1-M8.
It seems that when the form is submitted with ajax, and there are form
validation errors, the error is not shown. However, the notices work fine. So:
- S.notice(Added
net.liftweb.builtin.snippet.Msg for a better example)
Hope that helps,
-Ross
On Jan 4, 2010, at 3:10 PM, Adam Warski wrote:
Hello,
investigating further making the tutorial form submittable with
ajax, I found some weird behavior; I'm using 1.1-M8.
It seems that when the form
Hello,
Well for changing the tutorial form into an ajax form I guess the best
solution is to store the model instance in a RequestVar and simply set it to
a new instance after saving. So I don't have any immediate use-cases.
But in other (Seam) projects I remember that I used the event
Hello,
That's true in practice. The implementation of those methods however are
equivalent to the S and SHtml versions except for the call to
registerThisSnippet. But if Lift will sometimes remember even ordinary class
instances as reusable snippets then why should the API for managing
Hello,
Yes, the article is out of date now... Lift now makes sure that multiple
references to a single snippet in the same request context use the same
instance of that snippet.
I've updated the wiki page a bit:
http://wiki.github.com/dpp/liftweb/about-snippets, if some lift gurus would
Hello,
These are the names we use in Lift - appreciate what your saying, but its not
confusing IMHO, just different to other things you are used to. Lift is Lift,
not RoR, or Seam, or any other framework ;-)
Sure, it's just a simple terminology switch, I don't really mind if they are
named
Hello,
on the wiki page about reflection snippets
(http://wiki.github.com/dpp/liftweb/about-snippets), it is written:
Every time you call the reflection snippet in your markup code, a new instance
is instantiated and the appropriate method invoked
However this doesn't seem to be true (I'm
-scope variable? I saw that there's
TransientRequestVar, but it's private in the liftweb package.
Adam
Cheers, Tim
On 28 Dec 2009, at 14:33, Adam Warski wrote:
Hello,
on the wiki page about reflection snippets
(http://wiki.github.com/dpp/liftweb/about-snippets), it is written:
Every
once per
request.
Br's,
Marius
On Dec 28, 6:04 pm, Adam Warski a...@warski.org wrote:
Hello,
Yes, the article is out of date now... Lift now makes sure that multiple
references to a single snippet in the same request context use the same
instance of that snippet.
I see, so
Yes, the article is out of date now... Lift now makes sure that multiple
references to a single snippet in the same request context use the same
instance of that snippet.
I see, so the rationale behind using dispatch snippets is out of date also.
Except that you save one reflection
Hello,
1) Can I have in lift a true request variable/snippet, that is such which
has a lifetime of one request (without any ajax callbacks)? I can't use
TransientRequestVar because it's private. It would be useful to complete my
ajax-form example (after an item is saved, a new one should
Heh, of course :)
Can you (or somebody else) fix Listing 12 in the tutorial then?
Adam
On Dec 23, 2009, at 11:19 PM, Marius wrote:
Why not something like:
div id=all_todos
lift:TD.list all_id=all_todos
...
/lift:TD.list
/div
Br's,
Marius
On Dec 23, 11:46 pm, Adam Warski
Hello,
I'm just starting with Lift, and there's one thing I can't figure out. I want
to modify the ToDo example from the tutorial so that the Add button makes an
ajax call, adds the element to a list and displays the modified result.
The problem is that I don't know how to redraw the list
can't test it yet because I can't get my form to be submitted with
ajax. Both surrounding the bind with SHtml.ajaxForm(...) and replacing submit
with ajaxButton causes the form to stop working (the values in the model aren't
updated).
Adam
Br's,
Marius
On Dec 23, 10:32 am, Adam Warski
Hello,
object MyMarkupVar extends RequestVar[NodeSeq](NodeSeq.empty)
ah, that's much better then my solution. Thanks! :)
Maybe you could also write, how to submit a whole form using AJAX? :) So far my
attempts are futile.
I get an ajax request, but the value of the field isn't bound to the
Hello,
A couple of observations...
First, having some XHTML in your Scala code is not a bad thing. When the
XHTML declares the meaning (not the layout) of the information, it's my
opinion that it's okay. This means that:
ul{list.map(i = li{i}/li}ul
Simply defines an unordered list.
67 matches
Mail list logo