[Lift] Re: Signup Form: Some error messages are hidden by default
Are you sure it's a template issue? I mean the other forms (e.g. login form) work properly.. Taken my limited knowledge of lift I suspect the S.error(xs) line of the MetaMegaProtoUser testSignup() function to be responsible. Maybe the error() function has a bug for List[FieldError]? Link: http://scala-tools.org/mvnsites-snapshots/liftweb/lift-persistence/lift-mapper/scaladocs/net/liftweb/mapper/ProtoUser.scala.html Can anybody comment on this/confirm that? PS: I saw this in 1.1-M8 and 2.0-M1 Cheers, stephanos On Dec 30 2009, 9:01 am, Marius marius.dan...@gmail.com wrote: Any example of such situation? For more complex forms probably users would specify their own forms. Since you know that field's unqueId's you can just put the msg tags in the page manually. In Record there is a more flexible way as users can specify a form template ... se MetaRecord.formTemplate. I'm not sure if Mapper has something similar. Br's, Marius On Dec 30, 4:25 am, Naftoli Gugenheim naftoli...@gmail.com wrote: It would be nice if they did that. How would you tell Lift where to put the notice, in cases where it's not directly adjacent to the field? - Mariusmarius.dan...@gmail.com wrote: IMO lift:msg id=... should be generated by the same code that generates the form fields so that the field errors to appear nearby the field itself. I assume you are using ProtoUser. Looks like a bug to me. Br's, Marius On Dec 28, 2:36 am, tiro tim.romb...@googlemail.com wrote: Just discovered this issue (1.1-m8): Thesign-upform will not display field errors by default. The user therefore gets the impression that the application has simply stopped responding. The validation I checked (and this may be the only one) was the unique e-mail address validation. If the e-mail address has already been used before, it sends a FieldError to S.error. Displaying the message would require a specific call to the Msg-Snippet for that field afaik; but this call is not generated by the localForm method. For now I will explicitly call the snippet for the email field in the surrounding template, so that the message will be displayed above the whole form. -- 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...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Signup Form: Some error messages are hidden by default
Never mind - I found the answer in a separate thread: apparently my global msg tags were wrong BEFORE: lift:snippet type=msgs lift:error_msg strongError! The details are:/strong /lift:error_msg lift:error_classerror/lift:error_class lift:warning_msg strongWhoops, I had a problem:/strong /lift:warning_msg lift:warning_classnotice/lift:warning_class lift:notice_msg/lift:notice_msg lift:notice_classsuccess/lift:notice_class /lift:snippet AFTER: lift:Msgs showAll=true lift:error_classerror/lift:error_class lift:notice_classnotice/lift:notice_class lift:warning_classerror/lift:warning_class /lift:Msgs lift:snippet type=msgs On Jan 15, 3:16 pm, stephanos stephan.beh...@googlemail.com wrote: Are you sure it's a template issue? I mean the other forms (e.g. login form) work properly.. Taken my limited knowledge of lift I suspect the S.error(xs) line of the MetaMegaProtoUser testSignup() function to be responsible. Maybe the error() function has a bug for List[FieldError]? Link:http://scala-tools.org/mvnsites-snapshots/liftweb/lift-persistence/li... Can anybody comment on this/confirm that? PS: I saw this in 1.1-M8 and 2.0-M1 Cheers, stephanos On Dec 30 2009, 9:01 am, Marius marius.dan...@gmail.com wrote: Any example of such situation? For more complex forms probably users would specify their own forms. Since you know that field's unqueId's you can just put the msg tags in the page manually. In Record there is a more flexible way as users can specify a form template ... se MetaRecord.formTemplate. I'm not sure if Mapper has something similar. Br's, Marius On Dec 30, 4:25 am, Naftoli Gugenheim naftoli...@gmail.com wrote: It would be nice if they did that. How would you tell Lift where to put the notice, in cases where it's not directly adjacent to the field? - Mariusmarius.dan...@gmail.com wrote: IMO lift:msg id=... should be generated by the same code that generates the form fields so that the field errors to appear nearby the field itself. I assume you are using ProtoUser. Looks like a bug to me. Br's, Marius On Dec 28, 2:36 am, tiro tim.romb...@googlemail.com wrote: Just discovered this issue (1.1-m8): Thesign-upform will not display field errors by default. The user therefore gets the impression that the application has simply stopped responding. The validation I checked (and this may be the only one) was the unique e-mail address validation. If the e-mail address has already been used before, it sends a FieldError to S.error. Displaying the message would require a specific call to the Msg-Snippet for that field afaik; but this call is not generated by the localForm method. For now I will explicitly call the snippet for the email field in the surrounding template, so that the message will be displayed above the whole form. -- 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...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: problems with file upload inside modal
ah - that explains it :-) On Jan 12, 6:56 am, Naftoli Gugenheim naftoli...@gmail.com wrote: If you mean David I think he's off the list until Wednesday. Maybe one of the other committers or knowledgable users can help though. - stephanosstephan.beh...@googlemail.com wrote: I don't want to appear pushy but this thing is really show stopper for me and I bet it's pretty obvious/easy for you to fix. If not I apologize for my impatience :-) On Jan 9, 10:15 am, stephanos stephan.beh...@googlemail.com wrote: Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able touploada ZIPfile. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zipfileupload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opensfileuploadmodal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- 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...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: problems with file upload inside modal
Thanks for your feedback! I knew I was doing sth. obviously wrong. The idea with the hidden form element is cool - didn't think of that before. When I try/tried to submit the form via AJAX myself I fail: -I tried to use an ajaxButton - but then the processFile() method wasn't called anymore. -and when I try to use an ajaxForm (for which I can't find any documentation in the book) the response is empty for some reason def render(in: NodeSeq): NodeSeq = ajaxForm(Helpers.bind(upload, in, file - SHtml.fileUpload (processFile _))) ( unfortunately the lift demo is down right now so I can't look up examples for ajaxForm :-/ ) Can you give me a hint? ...or maybe I will look into the other option more closely Cheers, Stephan On Jan 12, 11:31 am, Timothy Perrett timo...@getintheloop.eu wrote: I just looked at it. Your getting this problem because you are literally doing a hard post to /ajax_request/.. its no wonder its dumping the response to the browser. I see you have two options; one is to just stuff the normal form in an element hidden within the page and then display that form within the box using javascript (thus giving the form the correct action). Otherwise, just submit the form via AJAX. Does that help? Cheers, Tim On 12 Jan 2010, at 05:50, stephanos wrote: I don't want to appear pushy but this thing is really show stopper for me and I bet it's pretty obvious/easy for you to fix. If not I apologize for my impatience :-) On Jan 9, 10:15 am, stephanos stephan.beh...@googlemail.com wrote: Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able touploada ZIPfile. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zipfileupload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opensfileuploadmodal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- 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...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: problems with file upload inside modal
I don't want to appear pushy but this thing is really show stopper for me and I bet it's pretty obvious/easy for you to fix. If not I apologize for my impatience :-) On Jan 9, 10:15 am, stephanos stephan.beh...@googlemail.com wrote: Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able touploada ZIPfile. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zipfileupload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opensfileuploadmodal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: problems with file upload inside modal
Okay, this took my a while (new to git/github) - but here is my stripped down version of the problem: http://github.com/stephanos/liftweb-fileupload-modal-issue/ Hope it helps :-) On Jan 7, 8:14 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Stephanos, It would be ideal if you could put up a quick project on GitHub that demonstrates the problem. Having reproducible code helps us solve problems faster. Any chance you could do that? Thanks, David On Wed, Jan 6, 2010 at 11:17 PM, stephanos stephan.beh...@googlemail.comwrote: Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able to upload a ZIP file. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zip file upload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opens file upload modal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] problems with file upload inside modal
Hi guys, I'm stuck with this problem for a few days now and need help. I want users to be able to upload a ZIP file. When I embed this functionality directly in the page it works flawlessly - but I need to put it into a modal and that's were the trouble starts. When I submit the form it executes correctly but it prints (!) the response to the browser: try{jQuery(#lift__noticesContainer__).each(function(i) {this.innerHTML = div class=\success\ulliThanks for the upload!/li/ul /div;});} catch (e) {} The code looks right but it shouldn't print to the screen. What am I doing wrong? # My current progress (using M8): HTML: lift:SourceUpload form=post multipart=true fieldset style=width: 90%; margin: 0 auto strongAt first/strong select the zip file upload:file/ br/br/ and strongthen/strong push input type=submit value=upload!/ /fieldset /lift:SourceUpload CODE: def request(in: NodeSeq) = // opens file upload modal ajaxButton(in, () = S.runTemplate(List(/katas/share)). map(ns = ModalDialog(ns)) openOr Alert(Internal error: Couldn't find template!)) def render(in: NodeSeq): NodeSeq = bind(upload, file - SHtml.fileUpload(processFile _)) Cheers, Stephan -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Tip for lift-textile syntax
In case I'm not the only one spending quite a few minutes to find out about the (great!) textile plugin syntax - see this: http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/textile/TextileParser.scala.html (scroll down to line 1008) Cheers, stephanos -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Login progamatically
Hi, where would I look for a login()-method to login a specific user on boot up (in development mode)? (Aggregated this could save me a few minutes every day *g*) Cheers, stephanos -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Login progamatically
it just occured to me that I can simply override my is logged in- condition: val ifIsLoggedIn = Props.mode match { case Development = If (true _, ) case _ = If(User.loggedIn_? _, You must be logged in!) } yet this only works for explicitly hidden/disabled functionality based on this condition. On Dec 7, 7:09 pm, stephanos stephan.beh...@googlemail.com wrote: Hi, where would I look for a login()-method to login a specific user on boot up (in development mode)? (Aggregated this could save me a few minutes every day *g*) Cheers, stephanos -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: lift modules
@Marius: Thanks, I will look into it :-) @Timothy: I'm just generally interested what additional modules there are - for example the best I could find about it (documentation-wise) is this: http://scala-tools.org/mvnsites/liftweb-1.0/lift-paypal/index.html. All I'm saying is there seem to be many great modules out there - they should be somehow presented/documented. On Nov 28, 6:01 pm, Timothy Perrett timo...@getintheloop.eu wrote: Stephan, I wrote the paypal module... what do you want to know? Cheers, Tim On Nov 28, 4:49 pm, stephanos stephan.beh...@googlemail.com wrote: Hi folks, I'm new to lift and was wondering about all the variousmoduleslike lift-paypal etc. I found in the maven repository. Is there an overview/documentation of them somewhere - I couldn't find one yet. Cheers, Stephan -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] lift modules
Hi folks, I'm new to lift and was wondering about all the various modules like lift-paypal etc. I found in the maven repository. Is there an overview/documentation of them somewhere - I couldn't find one yet. Cheers, Stephan -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.