[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Charles F. Munat
Charles F. Munat wrote: >> Running Ajax calls between fields for validation is pretty ugly, >> javascript validation would be better > > That's what I said. Sorry, Oliver. On re-reading, that sounds a little snippy, but I didn't mean it that way. I just meant that we agree -- after mentioning

[Lift] Re: not binding

2008-09-23 Thread Charles F. Munat
Damn. Sometimes I'm a bit dense. I just realized that I created my own Menu snippet, overriding the default one. A simple copy and paste fixed things. Just so I'm clear, the XML error is because the tag appeared in the output, and the tag appeared in the output because the "group" function t

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Charles F. Munat
Oliver wrote: > I like them to be validated as well, and to short circuit the remainder > of the field validation. Feel free to set your validation up that way. Personally, I'd like my validation code to be smart enough to note when two non-redundant validation problems occur and to mention bo

[Lift] Re: not binding

2008-09-23 Thread David Pollak
If the error is occurring in the browser, it's because the is not getting processed. So, what's the page source (the stuff that's getting delivered to the browser)? Charles F. Munat wrote: > I'm still not clear on what causes this type of error: > > XML Parsing Error: prefix not bound to a n

[Lift] not binding

2008-09-23 Thread Charles F. Munat
I'm still not clear on what causes this type of error: XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8081/ Line Number 37, Column 10: ^ Can anyone explain? Thanks, Chas. --~--~-~--~~~---~--~--

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Oliver
On Wed, Sep 24, 2008 at 5:35 AM, Charles F. Munat <[EMAIL PROTECTED]> wrote: > > Oliver Lambert wrote: > > Do/should validations stop at the first error message on the field, at > > least by default? > > I much prefer that they do not. It really irritates me when I'm using an > online form and it

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Charles F. Munat
http://liftweb.net/index.php/RequirementsForForms David Pollak wrote: > > > Charles F. Munat wrote: >> Oliver Lambert wrote: >> >>> Do/should validations stop at the first error message on the field, at >>> least by default? >>> >> >> I much prefer that they do not. It really irritates

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
Charles F. Munat wrote: > Oliver Lambert wrote: > >> Do/should validations stop at the first error message on the field, at >> least by default? >> > > I much prefer that they do not. It really irritates me when I'm using an > online form and it tells me that something is invalid, then

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
Derek Chen-Becker wrote: > If you want to tell them to enter a value, I'm sure that you could > write (if it doesn't already exist) a notEmpty validation that would > say the right thing and do something like: > > val validations = notEmpty("You must provide an email address") _ :: > valRegex(

[Lift] Re: HTTP Client?

2008-09-23 Thread David Pollak
Tim, I like the work, but I tend not to like mutable data structures (stuff with properties that one sets.) I'd structure things such that the PayPal object's "setters" return a new, immutable instance of the PayPal object, so you're code would look like: val pp: PayPal = new PayPal("sandbox

[Lift] Re: General Questions

2008-09-23 Thread David Pollak
As I said, Lift has semantically similar validation to Zend. At this point, all my implementations have been explicitly overriding validations in Mapped*. One could, if one wants, implement these as traits as well. Do you have any questions about this? philip wrote: > Hi David, > > I don't u

[Lift] Re: General Questions

2008-09-23 Thread philip
Hi David, I don't understand the Liftweb side of validation yet, will look into that longer email discussion later today. About PHP, I don't like it as a language, which it is effective for the outcome but not a pleasure to be doing. About Zend Form, It has a concept of validators which you add

[Lift] Re: Forms & variable scope

2008-09-23 Thread Kris Nuttycombe
It appears that my unfamiliarity with scala strikes again. If I change SubscriptionBinder to look like the following, it works. Why? class SubscriptionBinder(s : Subscription) extends EntityBinder[Subscription](s) { override def bind(xhtml : NodeSeq) : NodeSeq = { var cancelReason = ""

[Lift] Re: Wiki search busted...

2008-09-23 Thread David Pollak
Tim Perrett wrote: > We really must replace the wiki default search with a google powered > one. > > Who's looking after the site within the committers now? Is it David B > still? > > When we get the 1.0 (not 0.10) out of the way, we should really get > back to looking at building our proce

[Lift] Re: Wiki search busted...

2008-09-23 Thread Tim Perrett
We really must replace the wiki default search with a google powered one. Who's looking after the site within the committers now? Is it David B still? When we get the 1.0 (not 0.10) out of the way, we should really get back to looking at building our process/issue tracking and a new wiki

[Lift] Wiki search busted...

2008-09-23 Thread Derek Chen-Becker
FYI, I'm getting an "invalid special page" error when I try to search on the Wiki Derek --~--~-~--~~~---~--~~ 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 u

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Derek Chen-Becker
I agree. Currently I do something like that in my own code (really looking forward to replacing it thought :) ): def validMember_? = { val errorChecks = (if (member.userId == "") { S.error("You must provide a user Id"); false } else true) :: (if (member.userId.length < 6) { S.err

[Lift] Forms & variable scope

2008-09-23 Thread Kris Nuttycombe
Hi, all, I'm muddling about with forms, and am having problems getting a function called from a form submission. Here's the relevant part of my snippet code: class Subscriptions { def list(xhtml : NodeSeq) : NodeSeq = { Orders.orderForDisplay.is.openOr(throw new IllegalStateException("No o

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Charles F. Munat
Oliver Lambert wrote: > Do/should validations stop at the first error message on the field, at > least by default? I much prefer that they do not. It really irritates me when I'm using an online form and it tells me that something is invalid, then I fix it, resubmit, and get a new error. I'd

[Lift] Re: HTTP Client?

2008-09-23 Thread Tim Perrett
Thanks Derek :-) I have commited any code for ages, so its about time I did! My plan is this - once I get this roll out of the site im doing now (which just needs PDT) done, I'll add the IPN functions to it. From the docs, it looks pretty straight forward. You can configure a whole bunch of opti

[Lift] New Lift plugin for Eclipse

2008-09-23 Thread DavidV
Any news on when the next Lift Eclipse plugin will be available, to go with the latest Scala 2.7.2 RC2 plugin update? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to

[Lift] Re: HTTP Client?

2008-09-23 Thread Derek Chen-Becker
Tim, you rock :) On Tue, Sep 23, 2008 at 10:29 AM, Tim Perrett <[EMAIL PROTECTED]> wrote: > > Hey guys, > > Ok, i've abstracted it all out into a class which you call a little > like this: > >var paypal: PayPal = new PayPal("sandbox") >paypal.transactionToken = S.param("tx").openOr("") >

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Derek Chen-Becker
If you want to tell them to enter a value, I'm sure that you could write (if it doesn't already exist) a notEmpty validation that would say the right thing and do something like: val validations = notEmpty("You must provide an email address") _ :: valRegex(... Derek On Tue, Sep 23, 2008 at 9:41

[Lift] Re: HTTP Client?

2008-09-23 Thread Tim Perrett
Hey guys, Ok, i've abstracted it all out into a class which you call a little like this: var paypal: PayPal = new PayPal("sandbox") paypal.transactionToken = S.param("tx").openOr("") paypal.execute("pdt") And as your authentication token is global to your account, you can specify it

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Oliver Lambert
On 24/09/2008, at 1:00 AM, David Pollak wrote: > > > On Tue, Sep 23, 2008 at 7:26 AM, Oliver Lambert <[EMAIL PROTECTED]> > wrote: > > On 23/09/2008, at 9:47 PM, David Pollak wrote: > >> >> >> On Tue, Sep 23, 2008 at 4:29 AM, Oliver Lambert <[EMAIL PROTECTED]> >> wrote: >> I don't understand s

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
On Tue, Sep 23, 2008 at 7:26 AM, Oliver Lambert <[EMAIL PROTECTED]> wrote: > > On 23/09/2008, at 9:47 PM, David Pollak wrote: > > > > On Tue, Sep 23, 2008 at 4:29 AM, Oliver Lambert <[EMAIL PROTECTED]> wrote: > >> I don't understand some of what I see with the validation logic. >> >> Right now, th

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Oliver Lambert
On 23/09/2008, at 9:47 PM, David Pollak wrote: > > > On Tue, Sep 23, 2008 at 4:29 AM, Oliver Lambert <[EMAIL PROTECTED]> > wrote: > I don't understand some of what I see with the validation logic. > > >> Right now, this is the way it works with the exception of the >> client validation part.

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Marius
No issue Dave ... at least not for me. I was just that this "pattern" of doing things may lead to certain confusions to some people ... besides that in a declaration like: class MyRecord extends Record[MyRecord] { ... } there is some sort of redundant information as 'MyRecord' appears twice. Of

[Lift] Re: HTTP Client?

2008-09-23 Thread David Pollak
Tim Perrett wrote: > >> Lift has a little know feature that makes this kind of thing super simple >> and secure. >> >> S.addHighLevelSessionDispatcher(name: String, dispatch: >> LiftRules.DispatchPf) allows you to, on a session-by-session basis, specify >> what to do with a given URL. This al

[Lift] Re: HTTP Client?

2008-09-23 Thread Tim Perrett
> Lift has a little know feature that makes this kind of thing super simple > and secure. > > S.addHighLevelSessionDispatcher(name: String, dispatch: > LiftRules.DispatchPf) allows you to, on a session-by-session basis, specify > what to do with a given URL.  This allows you to have a PayPal land

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
Marius wrote: > I'm fully aware of that ... I was just wondering if there were other > rationales behind this approach ... > > or we can have > > trait Foo[T <: Foo[T]]) { > self: T => > def dog(t: T) = t.doSomething > > def doSomething > > } > Sorry for being clueless... but I'm not sur

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Marius
I'm fully aware of that ... I was just wondering if there were other rationales behind this approach ... or we can have trait Foo[T <: Foo[T]]) { self: T => def dog(t: T) = t.doSomething def doSomething } Br's, Marius On Sep 23, 3:07 pm, "David Pollak" <[EMAIL PROTECTED]> wrote: > On Tu

[Lift] Re: HTTP Client?

2008-09-23 Thread David Pollak
On Tue, Sep 23, 2008 at 5:13 AM, Tim Perrett <[EMAIL PROTECTED]> wrote: > > > > On Sep 23, 12:36 pm, David Pollak <[EMAIL PROTECTED]> wrote: > > I'd love to have a PayPal module in Lift. Are you able to contribute > > this part of your code into the Lift codebase? > > That was my plan! :-D > > Ri

[Lift] Re: HTTP Client?

2008-09-23 Thread Tim Perrett
On Sep 23, 12:36 pm, David Pollak <[EMAIL PROTECTED]> wrote: > I'd love to have a PayPal module in Lift.  Are you able to contribute > this part of your code into the Lift codebase? That was my plan! :-D Right now im thinking of using bind to post back to the lift app, then post it on to paypa

[Lift] Re: General Questions

2008-09-23 Thread David Pollak
On Mon, Sep 22, 2008 at 9:28 PM, philip <[EMAIL PROTECTED]> wrote: > > Hi Thnx, > > I think the validation is important as mostly a web app that I would > build is forms, validation, database. > > I generally use PHP Zend Framework due to the ability to outsource > some work to reduce my workload

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
On Tue, Sep 23, 2008 at 5:03 AM, Marius <[EMAIL PROTECTED]> wrote: > > Thoughts/comments on this? > > > Br's, > Marius > > On Sep 22, 11:23 pm, Marius <[EMAIL PROTECTED]> wrote: > > one clarification .. by "by which the only benefit that I see is that > > *this* and MyType are actually of the same

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Marius
Thoughts/comments on this? Br's, Marius On Sep 22, 11:23 pm, Marius <[EMAIL PROTECTED]> wrote: > one clarification .. by "by which the only benefit that I see is that > *this* and MyType are actually of the same type sometimes leading to > ease of writing expressions" are really meant that *thi

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
On Tue, Sep 23, 2008 at 4:29 AM, Oliver Lambert <[EMAIL PROTECTED]> wrote: > I don't understand some of what I see with the validation logic. > > Right now, this is the way it works with the exception of the client > validation part. > > An example is MappedEmail (forget for a moment that it's map

[Lift] Re: HTTP Client?

2008-09-23 Thread David Pollak
I'd love to have a PayPal module in Lift. Are you able to contribute this part of your code into the Lift codebase? Tim Perrett wrote: > Hey guys, > > Just a quick one - im putting together a little donation page on a > lift app im building and its using paypal for the donation / buynow > proce

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread Oliver Lambert
I don't understand some of what I see with the validation logic. On 23/09/2008, at 9:14 AM, David Pollak wrote: > > > Charles F. Munat wrote: >> >> Sorry, Tim, I wasn't clear. I wasn't arguing for validation to be >> specified in the persistence layer. I was just saying that using >> annotations

[Lift] Re: Making Record a reality [was: Validations, Server side controls etc]

2008-09-23 Thread David Pollak
On Mon, Sep 22, 2008 at 9:51 PM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote: > I like the idea of composing lists of filters and validations for fields. > Perhaps I'm being naive, but would it make sense to have corresponding > validation "components" that can both do the server-side validation as

[Lift] Re: Ajax/JSON robustness, new menu features ** Breaking Changes **

2008-09-23 Thread David Pollak
Sorry. Bug in the code. Fixed. Please try now. Charles F. Munat wrote: > Well, the funny thing is that I was able to download a copy from github > and that included the LocGroup (I wanted to see how it was implemented). > I've even done a mvn install on that and still I get: > > [INFO] Compil

[Lift] Re: HTTP Client?

2008-09-23 Thread Viktor Klang
Can't you use HTTPConnection? http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html Cheers! -Viktor On Tue, Sep 23, 2008 at 12:17 PM, Tim Perrett <[EMAIL PROTECTED]> wrote: > > Hey guys, > > Just a quick one - im putting together a little donation page on a > lift app im bui

[Lift] HTTP Client?

2008-09-23 Thread Tim Perrett
Hey guys, Just a quick one - im putting together a little donation page on a lift app im building and its using paypal for the donation / buynow process. With there PDT system you need to make a call back to there server and I was just wondering if there was a scala HTTP client kicking around or

[Lift] Re: Ajax/JSON robustness, new menu features ** Breaking Changes **

2008-09-23 Thread Charles F. Munat
Well, the funny thing is that I was able to download a copy from github and that included the LocGroup (I wanted to see how it was implemented). I've even done a mvn install on that and still I get: [INFO] Compiling 11 source files to /private/var/www/wapbis/target/classes [WARNING] /private/v