[Lift] Is this a defect at JqJsCmds.ModalDialog
Hi, When I use ModalDialog I want to setup the css but fail, My code would be: ModalDialog(someHtml, top: '10px') I found the ModalDialog code at Lift: class ModalDialog(html: NodeSeq, css: Box[String]) extends JsCmd { val toJsCmd = jQuery.blockUI({ message: + AltXML.toXML(Group(S.session.map(s = s.fixHtml(s.processSurroundAndInclude(Modal Dialog, html))).openOr(html)), false, true, S.ieMode).encJs + (css.map(w = , css: ' + w + ' ).openOr()) + }); } the css is wrap by ' ' , but I found http://malsup.com/jquery/block/#demos the css is wraped by { } Is this a defect at JqJsCmds.ModalDialog or I do something wrong? -- Scala中文社区: http://groups.google.com/group/scalacn -- 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] S.render function was removed
Hi, Any reason why the S.render function was first commented out: http://github.com/dpp/liftweb/commit/b2b6bb4979e6e8d7d700c079432ded11fbcf9748#diff-1 and then removed: http://github.com/dpp/liftweb/commit/523e97751833ac03b522a224b31020fb72f1f70b#diff-7 ? See the following discussion for some context as to why it was introduced: http://groups.google.com/group/liftweb/browse_thread/thread/dba9a11251aa5067/e934b1f2ef3b6ca9?lnk=gstq=strachan#e934b1f2ef3b6ca9 Paul. -- 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: S.render function was removed
I think Dave commented it out and I remove it after it was commented out. I'm don't like very much code commented out. Personally I really don't think such API should exist. You already have a LiftSession#runTemplate that would process surrounds, snippets etc.Why would this not suffice? Br's, Marius On Dec 3, 12:19 pm, Paul Sandoz paul.san...@sun.com wrote: Hi, Any reason why the S.render function was first commented out: http://github.com/dpp/liftweb/commit/b2b6bb4979e6e8d7d700c079432ded11... and then removed: http://github.com/dpp/liftweb/commit/523e97751833ac03b522a224b31020fb... ? See the following discussion for some context as to why it was introduced: http://groups.google.com/group/liftweb/browse_thread/thread/dba9a1125... Paul. -- 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.
Re: [Lift] Re: S.render function was removed
On Dec 3, 2009, at 11:33 AM, Marius wrote: I think Dave commented it out and I remove it after it was commented out. I'm don't like very much code commented out. Personally I really don't think such API should exist. You already have a LiftSession#runTemplate that would process surrounds, snippets etc.Why would this not suffice? The thread i linked to [1] provides the context as to why this was requested and implemented at the time. I do not know if anything has changed in the interim to render S.render redundant. Paul. [1] http://groups.google.com/group/liftweb/browse_thread/thread/dba9a11251aa5067?fwc=2 Br's, Marius On Dec 3, 12:19 pm, Paul Sandoz paul.san...@sun.com wrote: Hi, Any reason why the S.render function was first commented out: http://github.com/dpp/liftweb/commit/b2b6bb4979e6e8d7d700c079432ded11 ... and then removed: http://github.com/dpp/liftweb/commit/523e97751833ac03b522a224b31020fb ... ? See the following discussion for some context as to why it was introduced: http://groups.google.com/group/liftweb/browse_thread/thread/dba9a1125 ... Paul. -- 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 . -- 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: How to redirect to a specify url when logged in successfully?
I added this code in the User model, but it doesn't work yet. This println method is never executed. Maybe some configuration need to be set ? ### object User extends User with MetaMegaProtoUser[User] { ... override def loginFirst = If( loggedIn_? _, () = { import net.liftweb.http.{RedirectWithState, RedirectState} val uri = Full(/all_users) println( xxx ) RedirectWithState( loginPageURL, RedirectState( ()={loginRedirect.set(uri)}) ) } ) ... } ### Cheers, Neil On Dec 1, 8:15 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, Nov 29, 2009 at 12:17 AM, Neil.Lv anim...@gmail.com wrote: Hi all, I want to redirecto to a specify URL like this /all_users when logged in successfully via the default link, http://localhost:8080/user_mgt/login Is there a help method (i dont't find it) to configure it? When i logged in successfully via /user_mgt/login link and redirect to the /all_users link not the /index page. In your User object (singleton): override def loginFirst = If( loggedIn_? _, () = { import net.liftweb.http.{RedirectWithState, RedirectState} val uri = /all_users RedirectWithState( loginPageURL, RedirectState( ()={loginRedirect.set(uri)}) ) } ) Thanks for any help. Cheers, Neil -- 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.
Re: [Lift] Is this a defect at JqJsCmds.ModalDialog
On Thu, Dec 3, 2009 at 12:40 AM, Xuefeng Wu ben...@gmail.com wrote: Hi, When I use ModalDialog I want to setup the css but fail, My code would be: ModalDialog(someHtml, top: '10px') I found the ModalDialog code at Lift: class ModalDialog(html: NodeSeq, css: Box[String]) extends JsCmd { val toJsCmd = jQuery.blockUI({ message: + AltXML.toXML(Group(S.session.map(s = s.fixHtml(s.processSurroundAndInclude(Modal Dialog, html))).openOr(html)), false, true, S.ieMode).encJs + (css.map(w = , css: ' + w + ' ).openOr()) + }); } the css is wrap by ' ' , but I found http://malsup.com/jquery/block/#demos the css is wraped by { } Is this a defect at JqJsCmds.ModalDialog or I do something wrong? Yes, it looks like a bug. I'm guessing the code may have been written for BlockUI v1.x and that the API may have changed in 2.x.Please open a ticket and I'll fix it. alex -- 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] JSON Reponses
Hi all, I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how to send a JSON response back. Snippets take a NodeSeq and return a NodeSeq, so unless I'm missing something here, they are only good for XML. I've found various posts on JSON, but they all seem to relate to forms and AJAX, whereas all I really want to be able to do is render JSON instead of XML. Any pointers greatly appreciated, Matt -- 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.
Re: [Lift] JSON Reponses
Try using a dispatch: LiftRules.dispatch.append { case Req(my::path::Nil, _, _) = () = Full(JavaScriptResponse (JSObj(foo - bar))) } in boot. When you visit http://host/my/path, a JSON response with { foo: bar } should be generated. -Ross On Dec 3, 2009, at 12:06 PM, deadfolk wrote: Hi all, I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how to send a JSON response back. Snippets take a NodeSeq and return a NodeSeq, so unless I'm missing something here, they are only good for XML. I've found various posts on JSON, but they all seem to relate to forms and AJAX, whereas all I really want to be able to do is render JSON instead of XML. Any pointers greatly appreciated, Matt -- 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 . -- 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.
Re: [Lift] JSON Reponses
Matt, Lift has 2 major branches in its rendering pipeline: standard XHTML and Dispatch. The standard XHTML is the view-first, snippet-based mechanism that loads the templates and processes the snippet stuff in the templates. The dispatch mechanism requires that you register a handler during the boot phase (in Boot.scala): LiftRules.dispatch.append { case Req(api :: thing :: Nil, json, GetRequest) = // function that returns a Box[LiftResponse] } Okay... I can stop here 'cause Ross beat me to the punch (thanks for being awesomely fast Ross!) Thanks, David On Thu, Dec 3, 2009 at 9:06 AM, deadfolk deadf...@gmail.com wrote: Hi all, I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how to send a JSON response back. Snippets take a NodeSeq and return a NodeSeq, so unless I'm missing something here, they are only good for XML. I've found various posts on JSON, but they all seem to relate to forms and AJAX, whereas all I really want to be able to do is render JSON instead of XML. Any pointers greatly appreciated, Matt -- 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 framework http://liftweb.net Beginning Scala http://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.
Re: [Lift] JSON Reponses
On Thu, Dec 3, 2009 at 9:06 AM, deadfolk deadf...@gmail.com wrote: I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how to send a JSON response back. Snippets take a NodeSeq and return a NodeSeq, so unless I'm missing something here, they are only good for XML. I've found various posts on JSON, but they all seem to relate to forms and AJAX, whereas all I really want to be able to do is render JSON instead of XML. Any pointers greatly appreciated, The general process to expose web services (XML, json, ...) is to: 1) Add a new dispatch rules to LiftRules -- usually done in Boot: LiftRules.dispatch.prepend(MyService.dispatchRules) 2) Create the service dispatch rules: object MyService { def dispatchRules: LiftRules.DispatchPF = { case Req(List(api, myService, someParam), , GetRequest) = () = invokeService(someParam) } 3) Implement the service that returns a LiftResponse: object MyService { ... def invokeService(someParam: String): LiftResponse = { // create appropriate LiftResponse // e.g. JsonResponse, PlainTextResponse, ... } I'd recommend reading the Lift book chapter on web services. alex -- 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.
Re: [Lift] Re: S.render function was removed
Yeah I'm not sure why this code was removed. Please open a ticket and I'll put it back. On Thu, Dec 3, 2009 at 3:04 AM, Paul Sandoz paul.san...@sun.com wrote: On Dec 3, 2009, at 11:33 AM, Marius wrote: I think Dave commented it out and I remove it after it was commented out. I'm don't like very much code commented out. Personally I really don't think such API should exist. You already have a LiftSession#runTemplate that would process surrounds, snippets etc.Why would this not suffice? The thread i linked to [1] provides the context as to why this was requested and implemented at the time. I do not know if anything has changed in the interim to render S.render redundant. Paul. [1] http://groups.google.com/group/liftweb/browse_thread/thread/dba9a11251aa5067?fwc=2 Br's, Marius On Dec 3, 12:19 pm, Paul Sandoz paul.san...@sun.com wrote: Hi, Any reason why the S.render function was first commented out: http://github.com/dpp/liftweb/commit/b2b6bb4979e6e8d7d700c079432ded11 ... and then removed: http://github.com/dpp/liftweb/commit/523e97751833ac03b522a224b31020fb ... ? See the following discussion for some context as to why it was introduced: http://groups.google.com/group/liftweb/browse_thread/thread/dba9a1125 ... Paul. -- 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 . -- 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 framework http://liftweb.net Beginning Scala http://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.
Re: [Lift] Re: Filtering of script tags from ajax replies and executing the javascript
Jon, The joys of being a committer is that you can open a ticket for adding this feature (and others), add it, get it reviewed and get it into Lift. My general rules is that if a pattern is useful for builders of one or two production apps, they'll probably be useful for others. So, please don't break existing APIs without a thorough discussion, but adding and enhancing is cool by me. Thanks, David On Wed, Dec 2, 2009 at 12:57 PM, jon jonhoff...@gmail.com wrote: Comments below. On Dec 2, 2:00 pm, Marius marius.dan...@gmail.com wrote: Personally I have reservations about this. If you want to include templates in this manner why use script tags in those templates ? ... I have existing templates which load as static pages and want to convert to ajaxy style page transitions without changing too many things. Also, I'm using something similar to the LazyLoad, which harryh shared a few months ago, which looks like this: lift:LazyLoad div id=foo lift:SomeSnippet/ /div script type=text/javascript //![CDATA[ alert('loaded'); //do something with foo //]] /script /lift:LazyLoad I get your point though, perhaps these are esoteric use cases. Furthermore in some cases one may want Script tags preserved. And having multiple SetHtml is not something I'd like to see (but others could). Besides stripping nodes out is a pretty trivial task using pattern matching or Scala's RuleTransformer. I also explored creating a trait that can be mixed into JqSetHtml to achieve the same goal: http://gist.github.com/247557 But I think it's too brittle to be generally useful. Last but not least I would avoid using open_! in such contexts. Try using openOr for graceful degradation. Under most circumstances I wouldn't use open_!, but for the case of hard coded template paths, I want things to fail in as loud a way as possible if I were to rename or fatfinger a path and that somehow made it into production (I have a top level catch all for exceptions which shoots out notifications and displays a nice error message). I realize that it would be hard to quickly parse the error cause, so I'm using something like this instead: def findTemplate_!(path:List[String]) = findAnyTemplate(path) openOr (throw new Exception(Template not found: + path.mkString(/))) Br's, Marius On Dec 2, 8:40 pm, jon jonhoff...@gmail.com wrote: Hi, It would be cool if when I did something like this: SHtml.a(()= SetHtml(id, findAnyTemplate(List(foo)).open_!)) The script tags within the foo template were filtered out and the the contained JavaScript were executed. I created my own SetHtml to achieve that, but I'm wondering if this would be interesting enough to add to Lift in a more comprehensive way (so that it works for all JsCmds that render NodeSeqs)? Here's what I got so far:http://gist.github.com/247425 - Jon -- 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 framework http://liftweb.net Beginning Scala http://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: JSON Reponses
Hi Matt, I'm pretty new/novice myself, but I believe you do this through View instead of Snippet. Don't forget to add the specific View page to Sitemap otherwise it won't be accessible when you call it. Hope this is accurate / helpful. Dan On Dec 3, 11:06 am, deadfolk deadf...@gmail.com wrote: Hi all, I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how to send a JSON response back. Snippets take a NodeSeq and return a NodeSeq, so unless I'm missing something here, they are only good for XML. I've found various posts on JSON, but they all seem to relate to forms and AJAX, whereas all I really want to be able to do is render JSON instead of XML. Any pointers greatly appreciated, Matt -- 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.
Re: [Lift] Re: JSON Reponses
Views are for providing template XML, I believe, and so are still using NodeSeq and wouldn't address the problem. Looking at the type of LiftRules.viewDispatch seems to imply that, at least. -Ross On Dec 3, 2009, at 1:59 PM, Daniel Nelson wrote: Hi Matt, I'm pretty new/novice myself, but I believe you do this through View instead of Snippet. Don't forget to add the specific View page to Sitemap otherwise it won't be accessible when you call it. Hope this is accurate / helpful. Dan On Dec 3, 11:06 am, deadfolk deadf...@gmail.com wrote: Hi all, I'm still at the evaluation stage of Lift, so please forgive my ignorance, but I cannot figure out how to render any non-XML reponses. I'm looking to create a simple web service which can send reponses back in either XML or JSON. I have the XML side covered, but I can't figure out how to send a JSON response back. Snippets take a NodeSeq and return a NodeSeq, so unless I'm missing something here, they are only good for XML. I've found various posts on JSON, but they all seem to relate to forms and AJAX, whereas all I really want to be able to do is render JSON instead of XML. Any pointers greatly appreciated, Matt -- 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 . -- 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] Spaces getting removed from title in head merge?
In one of my templates I have this: lift:HelloWorld.foobar head titlehello:one vs hello:two/title /head /lift:HelloWorld.foobar The XHTML output I get looks like this: head titleOutput1vsOutput2/title /head Where hello:one is Output1 and hello:two is Output2, where did my spaces go, between the items and the vs? - Alex -- 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.
Re: [Lift] Spaces getting removed from title in head merge?
The example you posted isn't valid XML (needs to be hello:one / or something along those lines), so I'm wondering if you could post the actual example code? I can't think of any reason offhand those should be stripped. -Ross On Dec 3, 2009, at 2:41 PM, Alex Black wrote: In one of my templates I have this: lift:HelloWorld.foobar head titlehello:one vs hello:two/title /head /lift:HelloWorld.foobar The XHTML output I get looks like this: head titleOutput1vsOutput2/title /head Where hello:one is Output1 and hello:two is Output2, where did my spaces go, between the items and the vs? - Alex -- 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 . -- 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: Spaces getting removed from title in head merge?
Here's the actual code: head lift:Compare.products titlecompare:product1/ vs compare:product2//title /lift:Compare.products /head On Dec 3, 2:45 pm, Ross Mellgren dri...@gmail.com wrote: The example you posted isn't valid XML (needs to be hello:one / or something along those lines), so I'm wondering if you could post the actual example code? I can't think of any reason offhand those should be stripped. -Ross On Dec 3, 2009, at 2:41 PM, Alex Black wrote: In one of my templates I have this: lift:HelloWorld.foobar head titlehello:one vs hello:two/title /head /lift:HelloWorld.foobar The XHTML output I get looks like this: head titleOutput1vsOutput2/title /head Where hello:one is Output1 and hello:two is Output2, where did my spaces go, between the items and the vs? - Alex -- 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.
Re: [Lift] Re: Spaces getting removed from title in head merge?
Hmm I can't reproduce it. Here's the whole template I used: lift:surround with=default at=content head lift:Compare.products titlecompare:product1 / vs compare:product2 //title /lift:Compare.products /head h2Welcome to your project!/h2 p /p /lift:surround And snippet: class Compare { def products(in: NodeSeq): NodeSeq = Helpers.bind(compare, in, product1 - foo, product2 - bar) } Any more of your surrounding code that might point out the problem? -Ross On Dec 3, 2009, at 2:48 PM, Alex Black wrote: Here's the actual code: head lift:Compare.products titlecompare:product1/ vs compare:product2//title /lift:Compare.products /head On Dec 3, 2:45 pm, Ross Mellgren dri...@gmail.com wrote: The example you posted isn't valid XML (needs to be hello:one / or something along those lines), so I'm wondering if you could post the actual example code? I can't think of any reason offhand those should be stripped. -Ross On Dec 3, 2009, at 2:41 PM, Alex Black wrote: In one of my templates I have this: lift:HelloWorld.foobar head titlehello:one vs hello:two/title /head /lift:HelloWorld.foobar The XHTML output I get looks like this: head titleOutput1vsOutput2/title /head Where hello:one is Output1 and hello:two is Output2, where did my spaces go, between the items and the vs? - Alex -- 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 . -- 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: Spaces getting removed from title in head merge?
I copy and pasted your template and snippet, and it reproduced the problem for me... strange. Keep in mind I am on Lift 1.0, is it possible this behaviour has changed? Here is the output from the template: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns:lift=http://liftweb.net/; xmlns=http://www.w3.org/1999/ xhtml head meta content=text/html; charset=UTF-8 http-equiv=content-type / meta content= name=description / meta content= name=keywords / link href=/cs.css rel=stylesheet type=text/css / titlefoovsbar/title/headbody h2Welcome to your project!/h2 p /p script type=text/javascript // ![CDATA[ jQuery(document).ready(function() {lift_successRegisterGC();}); var lift_page = 'F856614382395SNQ'; // ]] /script/body /html On Dec 3, 3:04 pm, Ross Mellgren dri...@gmail.com wrote: Hmm I can't reproduce it. Here's the whole template I used: lift:surround with=default at=content head lift:Compare.products titlecompare:product1 / vs compare:product2 //title /lift:Compare.products /head h2Welcome to your project!/h2 p /p /lift:surround And snippet: class Compare { def products(in: NodeSeq): NodeSeq = Helpers.bind(compare, in, product1 - foo, product2 - bar) } Any more of your surrounding code that might point out the problem? -Ross On Dec 3, 2009, at 2:48 PM, Alex Black wrote: Here's the actual code: head lift:Compare.products titlecompare:product1/ vs compare:product2//title /lift:Compare.products /head On Dec 3, 2:45 pm, Ross Mellgren dri...@gmail.com wrote: The example you posted isn't valid XML (needs to be hello:one / or something along those lines), so I'm wondering if you could post the actual example code? I can't think of any reason offhand those should be stripped. -Ross On Dec 3, 2009, at 2:41 PM, Alex Black wrote: In one of my templates I have this: lift:HelloWorld.foobar head titlehello:one vs hello:two/title /head /lift:HelloWorld.foobar The XHTML output I get looks like this: head titleOutput1vsOutput2/title /head Where hello:one is Output1 and hello:two is Output2, where did my spaces go, between the items and the vs? - Alex -- 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 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.
Re: [Lift] Re: Spaces getting removed from title in head merge?
Ohh, I created a 1.1-SNAPSHOT one. It's possible, I guess, I'm not terribly familiar with 1.0. Can you upgrade to 1.1-SNAPSHOT? It's better in practically every aspect :-) -Ross On Dec 3, 2009, at 3:14 PM, Alex Black wrote: -- 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.
Re: [Lift] Re: Spaces getting removed from title in head merge?
Well, I'd recommend using 1.1-SNAPSHOT even so. It tends to be stable and 1.1-M8 (the next milestone) is going to be spun soon (next wednesday) As it is, I'm glad you found a workaround. -Ross On Dec 3, 2009, at 3:19 PM, Alex Black wrote: Ah.. I've worked around the problem for now. If my snippet outputs titlefoo vs bar/title then the spaces don't get removed. I'm waiting on 1.1 to be released before upgrading - but if there is a stable release now I might try it out. - Alex On Dec 3, 3:16 pm, Ross Mellgren dri...@gmail.com wrote: Ohh, I created a 1.1-SNAPSHOT one. It's possible, I guess, I'm not terribly familiar with 1.0. Can you upgrade to 1.1-SNAPSHOT? It's better in practically every aspect :-) -Ross On Dec 3, 2009, at 3:14 PM, Alex Black wrote: -- 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 . -- 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.
Re: [Lift] Re: Jetty question
On Wed, Dec 2, 2009 at 12:54 PM, Marius marius.dan...@gmail.com wrote: On Dec 2, 10:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 2, 2009 at 12:24 PM, Timothy Perrett timo...@getintheloop.euwrote: Hey Marius, Im not 100% sure that Servlet 3.0 will solve our problems... im worried that the vendors will not standardise once again (they are already diverging paths in early access servlet 3.0 implementations)... To this end, I cant help but wonder if we will end up falling back on something like Atmosphere to become container agnostic? Ummm... why would we put in a layer (Atmosphere) when we can do it better ourselves. Lift was the first JVM framework to support long polling. I am loath to layer in another piece when we can deal with things as well or better than Atmosphere. I think I proposed an abstraction layer for Comet more than an year ago but that was then. Do you think this would be helpful ? An abstraction layer that does not import any non-Servlet/non-Java/non-Scala packages would be cool. Cheers, Tim PS: Sorry for the semi thread-hijacking! On Dec 2, 8:15 pm, Marius marius.dan...@gmail.com wrote: Lift doesn't necessarily require Jetty 6. Lift runs pretty much on any JEE web container including jetty 7. But Lift comet support automatically detects Jetty 6 continuations API and use it. If that is missing Lift will gracefully fall back in using a locking based mechanism for Comet. Of course this model does not scale very well. The reason for that Jetty 7 continuations API is not in Lift yet is because we were waiting for Servlet 3.0 Async support (similar in many respects with Jetty 7 continuations). But servlet 3.0 is not there yet ... still Jetty 7 contains some more or less experimental implementation of Servlet 3.0 Async. I'm using at work jetty 7 continuations which is quite a nice API ... even nicer that servlet 3.0 spec :D Br's, Marius On Dec 2, 9:30 pm, jhonig al...@xs4all.nl wrote: Hi Tim, Lift is not yet compatible with Jetty 7 continuations... if you want to use comet, please use Jetty 6 for the moment. I don't use comet. But is this dependency mentioned anywhere in the Lift docs? Can't remember having seen any such information! Job -- 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 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@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.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://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.
Re: [Lift] Re: Spaces getting removed from title in head merge?
On Thu, Dec 3, 2009 at 12:19 PM, Alex Black a...@alexblack.ca wrote: Ah.. I've worked around the problem for now. If my snippet outputs titlefoo vs bar/title then the spaces don't get removed. I'm waiting on 1.1 to be released before upgrading - but if there is a stable release now I might try it out. In general, the 1.1-SNAPSHOT release is stable. There have been a few rare cased where SNAPSHOT was not stable. 1.1-M6 is currently the most stable and best of the milestone releases. A fair number of high profile sites are running against M6 and M7. I strongly encourage you to use Lift 1.1, even though it is not officially released. - Alex On Dec 3, 3:16 pm, Ross Mellgren dri...@gmail.com wrote: Ohh, I created a 1.1-SNAPSHOT one. It's possible, I guess, I'm not terribly familiar with 1.0. Can you upgrade to 1.1-SNAPSHOT? It's better in practically every aspect :-) -Ross On Dec 3, 2009, at 3:14 PM, Alex Black wrote: -- 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 framework http://liftweb.net Beginning Scala http://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: Spaces getting removed from title in head merge?
Thanks for the info - I'll look into trying out 1.1-M6. On Dec 3, 4:11 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Dec 3, 2009 at 12:19 PM, Alex Black a...@alexblack.ca wrote: Ah.. I've worked around the problem for now. If my snippet outputs titlefoo vs bar/title then the spaces don't get removed. I'm waiting on 1.1 to be released before upgrading - but if there is a stable release now I might try it out. In general, the 1.1-SNAPSHOT release is stable. There have been a few rare cased where SNAPSHOT was not stable. 1.1-M6 is currently the most stable and best of the milestone releases. A fair number of high profile sites are running against M6 and M7. I strongly encourage you to use Lift 1.1, even though it is not officially released. - Alex On Dec 3, 3:16 pm, Ross Mellgren dri...@gmail.com wrote: Ohh, I created a 1.1-SNAPSHOT one. It's possible, I guess, I'm not terribly familiar with 1.0. Can you upgrade to 1.1-SNAPSHOT? It's better in practically every aspect :-) -Ross On Dec 3, 2009, at 3:14 PM, Alex Black wrote: -- 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: Jetty question
Ok. I'll add a ticket on that and I'll start noodling on it followed up by a proposed solution. Br's, Marius On Dec 3, 10:51 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 2, 2009 at 12:54 PM, Marius marius.dan...@gmail.com wrote: On Dec 2, 10:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Dec 2, 2009 at 12:24 PM, Timothy Perrett timo...@getintheloop.euwrote: Hey Marius, Im not 100% sure that Servlet 3.0 will solve our problems... im worried that the vendors will not standardise once again (they are already diverging paths in early access servlet 3.0 implementations)... To this end, I cant help but wonder if we will end up falling back on something like Atmosphere to become container agnostic? Ummm... why would we put in a layer (Atmosphere) when we can do it better ourselves. Lift was the first JVM framework to support long polling. I am loath to layer in another piece when we can deal with things as well or better than Atmosphere. I think I proposed an abstraction layer for Comet more than an year ago but that was then. Do you think this would be helpful ? An abstraction layer that does not import any non-Servlet/non-Java/non-Scala packages would be cool. Cheers, Tim PS: Sorry for the semi thread-hijacking! On Dec 2, 8:15 pm, Marius marius.dan...@gmail.com wrote: Lift doesn't necessarily require Jetty 6. Lift runs pretty much on any JEE web container including jetty 7. But Lift comet support automatically detects Jetty 6 continuations API and use it. If that is missing Lift will gracefully fall back in using a locking based mechanism for Comet. Of course this model does not scale very well. The reason for that Jetty 7 continuations API is not in Lift yet is because we were waiting for Servlet 3.0 Async support (similar in many respects with Jetty 7 continuations). But servlet 3.0 is not there yet ... still Jetty 7 contains some more or less experimental implementation of Servlet 3.0 Async. I'm using at work jetty 7 continuations which is quite a nice API ... even nicer that servlet 3.0 spec :D Br's, Marius On Dec 2, 9:30 pm, jhonig al...@xs4all.nl wrote: Hi Tim, Lift is not yet compatible with Jetty 7 continuations... if you want to use comet, please use Jetty 6 for the moment. I don't use comet. But is this dependency mentioned anywhere in the Lift docs? Can't remember having seen any such information! Job -- 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 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@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.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] json form and checkboxes
Hi i tried the json form tutorial (HowTo_use_JSON_forms) and everything was ok until i put some checkboxes ... the thing is that no matter how many of them i check only one is being send to the server. example lift:JSONForm.show input type=text name=name / br / input type=text name=value / br / input type=radio name=vehicle value=Bike / input type=radio name=vehicle value=Car / input type=radio name=vehicle value=Airplane / br / select name=cars option value=volvoVolvo/option option value=saabSaab/option option value=opelOpel/option option value=audiAudi/option /select br / Soccer: input type=checkbox name=sports value=soccer / br / Football: input type=checkbox name=sports value=football / br / Baseball: input type=checkbox name=sports value=baseball / br / Basketball: input type=checkbox name=sports value=basketball / button type=submitSubmit/button /lift:JSONForm.show apparently it has to do with the way the formToJSON function creates the object im using 1.1-snapshot -- 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.
Re: [Lift] Foreign Key constraints are not created by schemify
I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.comwrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- 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. -- 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.
Re: [Lift] Foreign Key constraints are not created by schemify
On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift app in production against 8.0 Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.com wrote: Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the user expects (like I did) foreign keys to be created if he uses mapper classes referencing other mapper classes. This behaviour should at least be mentioned somewhere in the documentation (btw, the documentation is in my opinion the biggest problems of Lift at the moment). I think, using a relational database without foreign keys is somehow not very useful because you never really know whether you have referential integrity... It would be great if you looked at the code and enabled it. This would really be an improvement for the mapper stuff in Lift 1.1 Julian -- 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. -- 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 framework http://liftweb.net Beginning Scala http://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.
Re: [Lift] json form and checkboxes
Use the SHtml.checkbox to generate your checkboxes: From the ExploringLift book: The checkbox method generates a checkbox form element, taking an initial Boolean value as well as a function ( Boolean) = Any that is called when the checkbox is submitted. If you've done a lot of HTML form processing you might wonder how this actually occurs, since an unchecked checkbox is not actually submitted as part of a form. Lift works around this by adding a hidden form element for each checkbox with the same element name, but with a false value, to ensure that the callback function is always called. -- John Goodsen RADSoft / Better Software Faster jgood...@radsoft.comLean/Agile/XP/Scrum Coaching and Training http://www.radsoft.com Ruby/Rails, Scala/Lift and Java Solutions On Thu, Dec 3, 2009 at 4:33 PM, edgarchan edgarchancarri...@gmail.comwrote: Hi i tried the json form tutorial (HowTo_use_JSON_forms) and everything was ok until i put some checkboxes ... the thing is that no matter how many of them i check only one is being send to the server. example lift:JSONForm.show input type=text name=name / br / input type=text name=value / br / input type=radio name=vehicle value=Bike / input type=radio name=vehicle value=Car / input type=radio name=vehicle value=Airplane / br / select name=cars option value=volvoVolvo/option option value=saabSaab/option option value=opelOpel/option option value=audiAudi/option /select br / Soccer: input type=checkbox name=sports value=soccer / br / Football: input type=checkbox name=sports value=football / br / Baseball: input type=checkbox name=sports value=baseball / br / Basketball: input type=checkbox name=sports value=basketball / button type=submitSubmit/button /lift:JSONForm.show apparently it has to do with the way the formToJSON function creates the object im using 1.1-snapshot -- 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. -- John Goodsen RADSoft / Better Software Faster jgood...@radsoft.comLean/Agile/XP/Scrum Coaching and Training http://www.radsoft.com Ruby on Rails and Java Solutions -- 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.
Re: [Lift] json form and checkboxes
Yeah... this is a bug in the way we serialize the form. Please open a ticket at http://github.com/dpp/liftweb/issues On Thu, Dec 3, 2009 at 1:33 PM, edgarchan edgarchancarri...@gmail.comwrote: Hi i tried the json form tutorial (HowTo_use_JSON_forms) and everything was ok until i put some checkboxes ... the thing is that no matter how many of them i check only one is being send to the server. example lift:JSONForm.show input type=text name=name / br / input type=text name=value / br / input type=radio name=vehicle value=Bike / input type=radio name=vehicle value=Car / input type=radio name=vehicle value=Airplane / br / select name=cars option value=volvoVolvo/option option value=saabSaab/option option value=opelOpel/option option value=audiAudi/option /select br / Soccer: input type=checkbox name=sports value=soccer / br / Football: input type=checkbox name=sports value=football / br / Baseball: input type=checkbox name=sports value=baseball / br / Basketball: input type=checkbox name=sports value=basketball / button type=submitSubmit/button /lift:JSONForm.show apparently it has to do with the way the formToJSON function creates the object im using 1.1-snapshot -- 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 framework http://liftweb.net Beginning Scala http://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] Newbie question on the Scala Todo sample application.
Hi, when I was working on the tutorial I got to the point where it tells you to run it and go to localhost:8080. I was surprised to see a complete login/signup application which I didn't code. So when I set up the program by using the command: mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT there is some command in it which generates a standard application for me? I've been looking for the code of this application but it seems to be in .class files which (when I open them) don't really make sense to me. Could someone explain me what is going on behind my back since I want to be in complete control of the application. Also I would like to write the login application from scratch to learn lift/scala and it might be useful to have access to the code. Is that possible? These are probably dumb questions. Sorry if that's the case. Thanks, itsjar -- 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: Newbie question on the Scala Todo sample application.
Hey itsjar, The user account stuff was created for you because you used the lift- archetype-base archetype. Use lift-archetype-blank to get a truly blank setup. Peter On Dec 3, 3:47 pm, itsjar its...@gmail.com wrote: Hi, when I was working on the tutorial I got to the point where it tells you to run it and go to localhost:8080. I was surprised to see a complete login/signup application which I didn't code. So when I set up the program by using the command: mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases\ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT there is some command in it which generates a standard application for me? I've been looking for the code of this application but it seems to be in .class files which (when I open them) don't really make sense to me. Could someone explain me what is going on behind my back since I want to be in complete control of the application. Also I would like to write the login application from scratch to learn lift/scala and it might be useful to have access to the code. Is that possible? These are probably dumb questions. Sorry if that's the case. Thanks, itsjar -- 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.
Re: [Lift] Newbie question on the Scala Todo sample application.
On Thu, Dec 3, 2009 at 3:47 PM, itsjar its...@gmail.com wrote: Hi, when I was working on the tutorial I got to the point where it tells you to run it and go to localhost:8080. I was surprised to see a complete login/signup application which I didn't code. So when I set up the program by using the command: mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=1.0 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftworkshop \ -DartifactId=todo \ -Dversion=0.1-SNAPSHOT there is some command in it which generates a standard application for me? The above command creates a new application based on a template (or archetype in Maven terms) The lift-archetype-basic application contains the template with is run against the parameters. I've been looking for the code of this application but it seems to be in .class files which (when I open them) don't really make sense to me. The complete source code for the application can be found the in subdirectories of the src directory. If you do a find . -name *.scala you'll get a list of all the Scala source files. Could someone explain me what is going on behind my back since I want to be in complete control of the application. Also I would like to write the login application from scratch to learn lift/scala and it might be useful to have access to the code. Is that possible? Most of the code for the login part is supplied by the MegaProtoUser class in Lift. See http://scala-tools.org/mvnsites/liftweb-1.0/lift-mapper/scaladocs/net/liftweb/mapper/MegaProtoUser.html These are probably dumb questions. Sorry if that's the case. Thanks for making the effort to learn Lift. David Thanks, itsjar -- 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 framework http://liftweb.net Beginning Scala http://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.
Re: [Lift] Is this a defect at JqJsCmds.ModalDialog
http://github.com/dpp/liftweb/issues/#issue/218 Thanks On Thu, Dec 3, 2009 at 10:37 PM, Alex Boisvert alex.boisv...@gmail.comwrote: On Thu, Dec 3, 2009 at 12:40 AM, Xuefeng Wu ben...@gmail.com wrote: Hi, When I use ModalDialog I want to setup the css but fail, My code would be: ModalDialog(someHtml, top: '10px') I found the ModalDialog code at Lift: class ModalDialog(html: NodeSeq, css: Box[String]) extends JsCmd { val toJsCmd = jQuery.blockUI({ message: + AltXML.toXML(Group(S.session.map(s = s.fixHtml(s.processSurroundAndInclude(Modal Dialog, html))).openOr(html)), false, true, S.ieMode).encJs + (css.map(w = , css: ' + w + ' ).openOr()) + }); } the css is wrap by ' ' , but I found http://malsup.com/jquery/block/#demos the css is wraped by { } Is this a defect at JqJsCmds.ModalDialog or I do something wrong? Yes, it looks like a bug. I'm guessing the code may have been written for BlockUI v1.x and that the API may have changed in 2.x.Please open a ticket and I'll fix it. alex -- 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. -- Scala中文社区: http://groups.google.com/group/scalacn -- 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] Schemify has SQL Exception, IDENIFY instead of IDENTIFY is in the SQL query
I had used LIFT 1.0 to build my framework, and I am curious what I need to do to get beyond this error. I tried to use mvn -U clean install compile jetty:run I had set my dependency in pom.xml to point to LIFT 1.0, 1.0.2 and 1.1, but none of these made any difference, so I am not certain it made any change. INFO - CREATE TABLE educationinfo (key_c VARCHAR(100) , school VARCHAR (100) , de gree VARCHAR(100) , startyear INTEGER NOT NULL GENERATED ALWAYS AS IDENITY , end year INTEGER NOT NULL GENERATED ALWAYS AS IDENITY , resume BIGINT , id BIGINT NO T NULL GENERATED ALWAYS AS IDENTITY) ERROR - Failed to Boot java.sql.SQLSyntaxErrorException: Syntax error: Encountered IDENITY at line 1, column 141. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unkn own Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException (Unknown Source ) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException (Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Un known Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException (Unknown So urce) at org.apache.derby.impl.jdbc.ConnectionChild.handleException (Unknown So urce) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier $$maybeWr ite(Schemifier.scala:150) at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier $$ensureT able(Schemifier.scala:160) at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun $1.apply(Sc hemifier.scala:60) at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun $1.apply(Sc hemifier.scala:60) at scala.List.foldLeft(List.scala:1059) at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply (Schemifier.sc ala:60) at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply (Schemifier.sc ala:54) at net.liftweb.mapper.DB$.use(DB.scala:320) at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala: 53) at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala: 36) at bootstrap.liftweb.Boot.boot(Boot.scala:24) -- 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] (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet
Hi all, Here is an example code that about the ActorComet. ### package com.liftcode.comet import net.liftweb._ import http._ import js._ import JsCmds._ import net.liftweb.common._ import net.liftweb.util._ import Helpers._ import net.liftweb.http._ import _root_.scala.xml._ import scala.actors._ import scala.collection.mutable.Queue import net.liftweb.http.SessionVar case class Foo(getValue: String) object FooManager { private var foos: List[Foo] = Nil def getFoos: List[Foo] = synchronized { println( foos size: + foos.size) foos ::= Foo(System.currentTimeMillis.toString) foos } } class MyComet extends CometActor { override def defaultPrefix = Full(auth) private var foos = FooManager.getFoos def createDisplay(foos:List[Foo]):NodeSeq = { span id=gotable { for {foo - foos} yield trtd{foo.getValue}/td/tr } /table/span } def render = { bind(foo - createDisplay(foos)) } override def localSetup = { println( localSetup: ) super.localSetup this ! Tick } override def lowPriority = { case Tick = { println( Tick ) foos = FooManager.getFoos reRender(false) ActorPing.schedule(this, Tick, 10 seconds) } } } case object Tick ### When i run mvn jetty:run to start the server, and type the http://localhost:8080 in the browser. The result will be like this, the println( Tick ) method only execute 1 time every 10 seconds. ### INFO - Service request (GET) /comet_request/50054201120/farmqqw03xkm took 46 Mil liseconds Tick foos size: 2 INFO - Service request (GET) /comet_request/87077494133/farmqqw03xkm took 8625 M ### Then i don't close the browser, and Ctrl+C stop the jetty server, and mvn jetty:run restart the server, the result will be like this: The println( Tick ) method will be execute 3 times every 10 seconds. ### INFO - Service request (GET) /comet_request/74875169086/farmqqw03xkm took 0 Mill iseconds foos size: 8 localSetup: Tick foos size: 9 INFO - Service request (GET) / took 109 Milliseconds foos size: 10 localSetup: Tick foos size: 11 INFO - Service request (GET) / took 31 Milliseconds ### I don't know what's wrong with it . If when you stop the server, and close the browser immediately, then use mvn jetty:run to start the server, and open a new browser to visit http://localhost:8080, the result is correctly. Thanks for any suggestion! Cheers, Neil -- 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.