[Lift] Incomplete Site: Missing JavaDoc
I don't mean to be incredibly picky, but the LiftWeb site is /NOT/ doing any justice to the LiftWeb framework. At the very least I would expect working online JavaDoc. (http://scala-tools.org/mvnsites/liftweb/ right now appears to be much nothing) Even throwing an older/less pretty javadoc (I know I've seen this somewhere before) back up would be a better solution than this limbo that makes LiftWeb appear unloved :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [Jersey] jersey as filter
Greg, have you tried Jersey completely standalone and verified that it's working? Cheers, Viktor On Wed, Mar 4, 2009 at 12:08 AM, Meredith Gregory lgreg.mered...@gmail.comwrote: Viktor, et al, Well, i've scoped things down to just running the Jersey helloworld-webapp sample in jetty with Jersey as the ServletContainer, rather than a Filter. Even that is displaying the same behavior where the server is eating the requests, but it's not hitting the resource class get method. Frankly, i can't see a substantive difference between their sample and the one i've got -- apart from swapping out glassfish for jetty. Best wishes, --greg On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, The combined servlet is eating http requests, but it's not processing them correctly. i'm still not sure about all the Jersey path stuff. i'm the process of debugging. Best wishes, --greg On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote: Greg, Great, then it was just me finding the wrong API docs online :) But the real question is: Does it work? :) Cheers, Viktor On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the sources jar and if you include it in a scala/lift project and reflect it does the right thing. Best wishes, --greg On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote: Unfortunately, https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html says: public class *ServletContainer*extends javax.servlet.http.HttpServletimplements ContainerListener https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html which means that the ServletContainer is not implementing the javax.servlet.Filter This is just an idea, and I do not know if it will work, but you could try something like this, and map it as a filter: Java: (Feel free to rewrite as Scala :) ) public class JerseyFilter extends ServletContainer implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain fChain) throws IOException, ServletException { service(req,res); fChain.doFilter(req, res); } @Override public void init(FilterConfig fConfig) throws ServletException { super.init(); } @Override public void destroy() { super.destroy(); } } Please get back to us :) Cheers, Viktor On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Lifted, Well, at least i've got jetty launching and running with both filters. See the web.xml that worked below. Best wishes, --greg ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameJerseyFilter/filter-name display-nameJersey Filter/display-name descriptionAttempting to use Jersey as a Filter/description filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class init-param param-namecom.sun.jersey.config.property.packages/param-name param-valuecom.sap.dspace.model.constellation.resources/param-value /init-param /filter filter filter-nameLiftFilter/filter-name display-nameLift Filter/display-name descriptionThe Filter that intercepts lift calls/description filter-classnet.liftweb.http.LiftFilter/filter-class /filter filter-mapping filter-nameJerseyFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameLiftFilter/filter-name url-pattern/*/url-pattern /filter-mapping /web-app On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Alex, Thanks for all your help. i switched versions in the pom.xml (to 1.0.2 which is the most recent on the sun repo that is not labeled SNAPSHOT) and i get the right values from reflecting (BTW -- has anybody written a little lift browser app that hooks into reflection so that one can graphically browse the class/instances in memory?). Now i just need to figure out how to pass the resources context to Jersey. It's got a config for the ServletContainer class, but i don't see anything if i'm just using it as a filter. Best wishes, --greg On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.comwrote: No, sorry, I've grown allergic to mvn. If you must know, I wrote a 5-line ruby script that bootstraps the scala interpreter with a given classpath. #!/usr/bin/env scalarun classpath artifact(com.sun.jersey:jersey-server:jar:1.02) classpath artifact(javax.servlet:servlet-api:jar:2.5) classpath
[Lift] Re: url encoded javascript
If you use jQuery it's even simpler: jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.com wrote: Ah, sorry to be so cryptic. The idea is to create a link containing a 'javascript:' url that the user can then drag to the browser's bookmark bar. I had something like this: a href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src',' http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) Bookmarklet /a But the script is a little tricky to read and edit in that form, so I wanted to programmatically convert it from a more readable version. I figured out how to run mvn yui-compressor to remove comments from the script. Then I read the compressed version of the script file in the snippet code. If I were to polish it further, I'd next find a java version of encodeUriComponent... but it's probably enough for now. Lee On Sun, Mar 1, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, If you want to include a JavaScript script on the page, the easiest mechanism is: import net.liftweb.http._ import js._ import JsCmds._ import JE._ Script(JsRaw(a String containing the raw script)) This will create a script tag on the page and put a // ![CDATA[ in it followed by your script followed by //]] and the closing /script tag. If this is not what you were looking to do, please let us know. Thanks, David On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.comwrote: I'd like to make a bookmarklet snippet. So I want to take a short javascript file, encode it as url, and then include it in a snippet. Any suggestions? Not sure whether to solve this with mvn or lift -- I'm new to both. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Viktor Klang Senior Systems Analyst --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Tracking the latest with maven.. but not too quickly
David, great suggestion! I recommend either Archiva http://archiva.apache.org/ or Nexushttp://nexus.sonatype.org/for corporate or 'intranet' repositories. If you're using maven for any corporation and you don't have a corporate repository, you're certainly missing out! We're using Archiva at my workplace (with a slow/shared internet connection), and it has drastically improved build times. We've also manually edited our project poms so they only use the corporate repository (not central). This has the benefit of ensuring a company copy of all artifacts used from central (or other remote repositories) and drammatically decreasing internet traffic during builds. I also recommend backing up your Archiva/Nexus instance as if it were your VCS/SCM system. Just remember to set up automatic purging of SNAPSHOT artifacts when new snapshots become available. And if you're doing things locally and you have a spare box, throw a VM up that can run a repository. It's definitely worth it for any long-running project. -Josh On Tue, Mar 3, 2009 at 11:56 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, It's also possible for your to host your own Maven repository and just publish the versions of Lift you want up to your repository. If your repository comes first in your Maven config, it will be consulted before other Maven repositories. Thanks, David On Tue, Mar 3, 2009 at 5:34 PM, Lee Mighdoll leemighd...@gmail.comwrote: I've a local copy of the lift sources that I'd like to build and debug my app against. So I currently reference the 1.1-SNAPSHOT artifact in my application's pom.xml. But maven seems to pull stuff down from the net more often than I'd like. I'd like my snapshot not to change until I git pull the latest lift version manually. What's the best way to do this? I was thinking perhaps one way would be to locally modify the version in all the lift pom.xml files to 1.1-SNAPSHOT.local. Or maybe there's some configuration option? Or perhaps I should setup a local maven repository? -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] Actors in Lift
Dear All - I have had a look at Lift quite some time ago. I remember referring to this excellent post by David Pollak on the usage of actors in Lift (http://blog.lostlake.org/index.php?/archives/59-How-lift-uses-Scala- actors.html). Now that I am looking at the code base after quite some time, I find lots of changes in it. e.g. the above post refers to implementation of Session, Page, Controller etc. as Scala actors that nicely interacts in the Request / Response cycle of Lift. But the latest snapshot from Github indicates that the usage of actors in Lift is now different. Is there any document or pointer that describes the rationale of this change or explains the current usage of actors in request / response processing ? Thanks. - Debasish --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Incomplete Site: Missing JavaDoc
On a related note, whilst we appreciate this is not ideal for new users (right now), we are trying to make it better as Jorge says. The flip side of this is that whilst its more difficult to consolidate API documentation with the maven modules, its a lot more modular which is actually better for the implementation with end users (take what you need, leave what you don't). We are committed to improving the documentation and getting started material in and around lift, but its a mammoth task as you can imagine - if there is something you think missing, just crack onto the wiki and write an article. Power to the people :-) Cheers, Tim On Mar 4, 11:33 am, Jorge Ortiz jorge.or...@gmail.com wrote: The ScalaDocs are there. They're just hard to find. And they're split up by module. For example:http://scala-tools.org/mvnsites/liftweb/lift-util/scaladocs/index.htmlhttp://scala-tools.org/mvnsites/liftweb/lift-webkit/scaladocs/index.htmlhttp://scala-tools.org/mvnsites/liftweb/lift-mapper/scaladocs/index.html etc Yes, this is sub-optimal. Yes, it's being worked on. Cheers, --j On Tue, Mar 3, 2009 at 10:15 PM, Paul Stickney pstic...@gmail.com wrote: I don't mean to be incredibly picky, but the LiftWeb site is /NOT/ doing any justice to the LiftWeb framework. At the very least I would expect working online JavaDoc. (http://scala-tools.org/mvnsites/liftweb/right now appears to be much nothing) Even throwing an older/less pretty javadoc (I know I've seen this somewhere before) back up would be a better solution than this limbo that makes LiftWeb appear unloved :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Actors in Lift
On Wed, Mar 4, 2009 at 7:59 AM, debasish ghosh.debas...@gmail.com wrote: Dear All - I have had a look at Lift quite some time ago. I remember referring to this excellent post by David Pollak on the usage of actors in Lift (http://blog.lostlake.org/index.php?/archives/59-How-lift-uses-Scala- actors.html). Now that I am looking at the code base after quite some time, I find lots of changes in it. e.g. the above post refers to implementation of Session, Page, Controller etc. as Scala actors that nicely interacts in the Request / Response cycle of Lift. But the latest snapshot from Github indicates that the usage of actors in Lift is now different. Is there any document or pointer that describes the rationale of this change or explains the current usage of actors in request / response processing ? Howdy, As Lift evolved and I did performance analysis, I found that the places where Actors were used were not necessary, added complexity to the code, and had adverse performance characteristics. For example, as I added more methods to LiftSession, I found that it became increasingly difficult to choose between methods and messages. The problem became acute when Snippets and things external to LiftSession had to access LiftSession's state during the servicing of a request. LiftSession needed public methods, but those exposed state and thus the Actor model broke down. Yes, I could have created a CurrentLiftSessionState object that was exposed only to the current request via S (the thread-local state), but that seemed to be way too complex. So, at this point, Actors are used for CometActors and to help service Comet requests (event-based actors are used to suspend the long poll.) Does this help? Thanks, David Thanks. - Debasish -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] IDE
What IDE do you use to develop lift applications? Eclipse? NetBeans? I want to use Scala regurlarly, but Eclipse plugin is too bugged... Thanks in advance.. []s Paulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
On Wed, Mar 4, 2009 at 8:14 AM, Paulo Cheque pauloche...@gmail.com wrote: What IDE do you use to develop lift applications? Eclipse? NetBeans? I want to use Scala regurlarly, but Eclipse plugin is too bugged... I use NetBeans. Some folks have had good experiences with IntelliJ. I'm meeting with Miles Sabin in London next week to work with him on hardening the Eclipse plugin for Lift-related use. While none of the Scala IDE plugins is up to the quality level of Java, every one of the IDE plugin coders is hungry for input. Post your wants and desires (this list is fine as is the Scala-tools list.) Caoyuan (NetBeans), Miles (Eclipse) and Ilya (IntelliJ) are all working very hard and are very responsive. Thanks in advance.. []s Paulo -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
Paulo, Lots of people use netbeans and eclipse. Im sure if you have issues with the eclipse plugin its maintainers would love bug reports :-) Otherwise, I know a lot of use (myself included) just use TextMate with a compiler open in a terminal window which works great. Hope that helps Tim On Mar 4, 4:14 pm, Paulo Cheque pauloche...@gmail.com wrote: What IDE do you use to develop lift applications? Eclipse? NetBeans? I want to use Scala regurlarly, but Eclipse plugin is too bugged... Thanks in advance.. []s Paulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
NetBeans works well for me. I've always found that NetBeans's Maven integration is superior to that for Eclipse, and the fact that the Scala plugin interoperates smoothly with the Maven integration is a big plus for me. The Scala autocomplete functionality and automatic syntax checking in NetBeans has recently improved significantly, as well. Kris On Wed, Mar 4, 2009 at 9:21 AM, Timothy Perrett timo...@getintheloop.euwrote: Paulo, Lots of people use netbeans and eclipse. Im sure if you have issues with the eclipse plugin its maintainers would love bug reports :-) Otherwise, I know a lot of use (myself included) just use TextMate with a compiler open in a terminal window which works great. Hope that helps Tim - Show quoted text - On Mar 4, 4:14 pm, Paulo Cheque pauloche...@gmail.com wrote: What IDE do you use to develop lift applications? Eclipse? NetBeans? I want to use Scala regurlarly, but Eclipse plugin is too bugged... Thanks in advance.. []s Paulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
Oh, and one more thing about NetBeans - if you, like me, have vi hardwired into your nervous system, the jvi plugin (http://jvi.sourceforge.net) for NetBeans is a HUGE win. A fully featured vi in the editor window + NetBeans autocomplete, refactoring support, etc is bliss. Kris On Wed, Mar 4, 2009 at 9:27 AM, Kris Nuttycombe kris.nuttyco...@gmail.comwrote: NetBeans works well for me. I've always found that NetBeans's Maven integration is superior to that for Eclipse, and the fact that the Scala plugin interoperates smoothly with the Maven integration is a big plus for me. The Scala autocomplete functionality and automatic syntax checking in NetBeans has recently improved significantly, as well. Kris On Wed, Mar 4, 2009 at 9:21 AM, Timothy Perrett timo...@getintheloop.euwrote: Paulo, Lots of people use netbeans and eclipse. Im sure if you have issues with the eclipse plugin its maintainers would love bug reports :-) Otherwise, I know a lot of use (myself included) just use TextMate with a compiler open in a terminal window which works great. Hope that helps Tim - Show quoted text - On Mar 4, 4:14 pm, Paulo Cheque pauloche...@gmail.com wrote: What IDE do you use to develop lift applications? Eclipse? NetBeans? I want to use Scala regurlarly, but Eclipse plugin is too bugged... Thanks in advance.. []s Paulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
It would be amazing to use Scala with JUnitMax plugin in Eclipse. Untill now, JUnitMax support only Java, but I believe this is not hard to change. I believe that if Kent Beck has more time he will implement that. But I will try NetBeans! Thanks []s Paulo On Wed, Mar 4, 2009 at 1:27 PM, Kris Nuttycombe kris.nuttyco...@gmail.com wrote: NetBeans works well for me. I've always found that NetBeans's Maven integration is superior to that for Eclipse, and the fact that the Scala plugin interoperates smoothly with the Maven integration is a big plus for me. The Scala autocomplete functionality and automatic syntax checking in NetBeans has recently improved significantly, as well. Kris On Wed, Mar 4, 2009 at 9:21 AM, Timothy Perrett timo...@getintheloop.eu wrote: Paulo, Lots of people use netbeans and eclipse. Im sure if you have issues with the eclipse plugin its maintainers would love bug reports :-) Otherwise, I know a lot of use (myself included) just use TextMate with a compiler open in a terminal window which works great. Hope that helps Tim - Show quoted text - On Mar 4, 4:14 pm, Paulo Cheque pauloche...@gmail.com wrote: What IDE do you use to develop lift applications? Eclipse? NetBeans? I want to use Scala regurlarly, but Eclipse plugin is too bugged... Thanks in advance.. []s Paulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Actors in Lift
On Wed, Mar 4, 2009 at 8:26 AM, debasish ghosh.debas...@gmail.com wrote: David - Thanks a lot for the clear explanation. Just curious - do you think the previous implementation philosophy of controllers, sessions and pages as actors with state changes being done only through messages was a more FP oriented approach ? Actually, just the opposite. :-) Actors and OO are twin concepts. Actors provide state, data hiding and messaging (sound like words that come from Smalltalk) in a world where mutability is eschewed. It turns out that Actors have their roots in Scheme and that Smalltalk has its roots in Scheme's Actor implementation (if you need a reference, I'll dig it up.) Rarely is LiftSession state mutated directly. With the exception of SessionVars, S (threadlocal state) holds a list of state mutations (new functions that are bound to HTML elements). Having granular read operations on LiftSession and application of state changes accumulated in S as part of the completion of page rendering is about as close as I could get in Scala to Haskell's state monads. And that the actor model broke down since Session is inherently an abstraction that needs to be more stateful. The Session is an abstraction that is very, very complex and there's lots of highly granular data that needs to be exposed during the processing of a request. This granular data is better exposed on LiftSession than via request/response messages or some proxy thingy. Put another way, it depends on what you mean by state. It would be possible to pass a LiftSession around as an explicit parameter and return a mutated LiftSession... making things feel more functional, but this gets back to the limitations of Scala vis Haskell's state monad. Put another way, LiftSession has very few public mutator methods. It's mostly read-only. Is this state in the same way that a JavaBean is stateful. Now that's a debate worth having (better line up James and others.) :-) Thanks, David Thanks. - Debasish On Mar 4, 9:10 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 7:59 AM, debasish ghosh.debas...@gmail.com wrote: Dear All - I have had a look at Lift quite some time ago. I remember referring to this excellent post by David Pollak on the usage of actors in Lift (http://blog.lostlake.org/index.php?/archives/59-How-lift-uses-Scala- actors.html). Now that I am looking at the code base after quite some time, I find lots of changes in it. e.g. the above post refers to implementation of Session, Page, Controller etc. as Scala actors that nicely interacts in the Request / Response cycle of Lift. But the latest snapshot from Github indicates that the usage of actors in Lift is now different. Is there any document or pointer that describes the rationale of this change or explains the current usage of actors in request / response processing ? Howdy, As Lift evolved and I did performance analysis, I found that the places where Actors were used were not necessary, added complexity to the code, and had adverse performance characteristics. For example, as I added more methods to LiftSession, I found that it became increasingly difficult to choose between methods and messages. The problem became acute when Snippets and things external to LiftSession had to access LiftSession's state during the servicing of a request. LiftSession needed public methods, but those exposed state and thus the Actor model broke down. Yes, I could have created a CurrentLiftSessionState object that was exposed only to the current request via S (the thread-local state), but that seemed to be way too complex. So, at this point, Actors are used for CometActors and to help service Comet requests (event-based actors are used to suspend the long poll.) Does this help? Thanks, David Thanks. - Debasish -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [Jersey] jersey as filter
Viktor, Thanks for your note. i got things more or less working. See this thread: jersey and lift side-by-side + request for link to URL rewrite exampleBest wishes, --greg On Wed, Mar 4, 2009 at 1:35 AM, Viktor Klang viktor.kl...@gmail.com wrote: Greg, have you tried Jersey completely standalone and verified that it's working? Cheers, Viktor- Show quoted text - On Wed, Mar 4, 2009 at 12:08 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, et al, Well, i've scoped things down to just running the Jersey helloworld-webapp sample in jetty with Jersey as the ServletContainer, rather than a Filter. Even that is displaying the same behavior where the server is eating the requests, but it's not hitting the resource class get method. Frankly, i can't see a substantive difference between their sample and the one i've got -- apart from swapping out glassfish for jetty. Best wishes, --greg On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, The combined servlet is eating http requests, but it's not processing them correctly. i'm still not sure about all the Jersey path stuff. i'm the process of debugging. Best wishes, --greg On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote: Greg, Great, then it was just me finding the wrong API docs online :) But the real question is: Does it work? :) Cheers, Viktor On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the sources jar and if you include it in a scala/lift project and reflect it does the right thing. Best wishes, --greg On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote: Unfortunately, https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html says: public class *ServletContainer*extends javax.servlet.http.HttpServletimplements ContainerListener https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html which means that the ServletContainer is not implementing the javax.servlet.Filter This is just an idea, and I do not know if it will work, but you could try something like this, and map it as a filter: Java: (Feel free to rewrite as Scala :) ) public class JerseyFilter extends ServletContainer implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain fChain) throws IOException, ServletException { service(req,res); fChain.doFilter(req, res); } @Override public void init(FilterConfig fConfig) throws ServletException { super.init(); } @Override public void destroy() { super.destroy(); } } Please get back to us :) Cheers, Viktor On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Lifted, Well, at least i've got jetty launching and running with both filters. See the web.xml that worked below. Best wishes, --greg ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameJerseyFilter/filter-name display-nameJersey Filter/display-name descriptionAttempting to use Jersey as a Filter/description filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class init-param param-namecom.sun.jersey.config.property.packages/param-name param-valuecom.sap.dspace.model.constellation.resources/param-value /init-param /filter filter filter-nameLiftFilter/filter-name display-nameLift Filter/display-name descriptionThe Filter that intercepts lift calls/description filter-classnet.liftweb.http.LiftFilter/filter-class /filter filter-mapping filter-nameJerseyFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameLiftFilter/filter-name url-pattern/*/url-pattern /filter-mapping /web-app On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Alex, Thanks for all your help. i switched versions in the pom.xml (to 1.0.2 which is the most recent on the sun repo that is not labeled SNAPSHOT) and i get the right values from reflecting (BTW -- has anybody written a little lift browser app that hooks into reflection so that one can graphically browse the class/instances in memory?). Now i just need to figure out how to pass the resources context to Jersey. It's got a config for the ServletContainer class, but i don't see anything if i'm just using it as a filter. Best wishes, --greg On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.com wrote: No, sorry, I've grown allergic to
[Lift] Re: [Jersey] jersey as filter
Awesome Greg, I'm sorry I wasn't of much help :( On Wed, Mar 4, 2009 at 5:50 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Viktor, Thanks for your note. i got things more or less working. See this thread: jersey and lift side-by-side + request for link to URL rewrite exampleBest wishes, --greg On Wed, Mar 4, 2009 at 1:35 AM, Viktor Klang viktor.kl...@gmail.comwrote: Greg, have you tried Jersey completely standalone and verified that it's working? Cheers, Viktor - Show quoted text - On Wed, Mar 4, 2009 at 12:08 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, et al, Well, i've scoped things down to just running the Jersey helloworld-webapp sample in jetty with Jersey as the ServletContainer, rather than a Filter. Even that is displaying the same behavior where the server is eating the requests, but it's not hitting the resource class get method. Frankly, i can't see a substantive difference between their sample and the one i've got -- apart from swapping out glassfish for jetty. Best wishes, --greg On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, The combined servlet is eating http requests, but it's not processing them correctly. i'm still not sure about all the Jersey path stuff. i'm the process of debugging. Best wishes, --greg On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote: Greg, Great, then it was just me finding the wrong API docs online :) But the real question is: Does it work? :) Cheers, Viktor On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Viktor, Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the sources jar and if you include it in a scala/lift project and reflect it does the right thing. Best wishes, --greg On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote: Unfortunately, https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html says: public class *ServletContainer*extends javax.servlet.http.HttpServletimplements ContainerListener https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html which means that the ServletContainer is not implementing the javax.servlet.Filter This is just an idea, and I do not know if it will work, but you could try something like this, and map it as a filter: Java: (Feel free to rewrite as Scala :) ) public class JerseyFilter extends ServletContainer implements Filter { @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain fChain) throws IOException, ServletException { service(req,res); fChain.doFilter(req, res); } @Override public void init(FilterConfig fConfig) throws ServletException { super.init(); } @Override public void destroy() { super.destroy(); } } Please get back to us :) Cheers, Viktor On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Lifted, Well, at least i've got jetty launching and running with both filters. See the web.xml that worked below. Best wishes, --greg ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameJerseyFilter/filter-name display-nameJersey Filter/display-name descriptionAttempting to use Jersey as a Filter/description filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class init-param param-namecom.sun.jersey.config.property.packages/param-name param-valuecom.sap.dspace.model.constellation.resources/param-value /init-param /filter filter filter-nameLiftFilter/filter-name display-nameLift Filter/display-name descriptionThe Filter that intercepts lift calls/description filter-classnet.liftweb.http.LiftFilter/filter-class /filter filter-mapping filter-nameJerseyFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-nameLiftFilter/filter-name url-pattern/*/url-pattern /filter-mapping /web-app On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Alex, Thanks for all your help. i switched versions in the pom.xml (to 1.0.2 which is the most recent on the sun repo that is not labeled SNAPSHOT) and i get the right values from reflecting (BTW -- has anybody written a little lift browser app that hooks into reflection so that one can graphically browse the class/instances in memory?). Now i just need to figure out how to pass the resources context to Jersey. It's got a config for the ServletContainer class, but i don't see anything if i'm just using it as a
[Lift] Re: Actors in Lift
Thanks again for the cool details. I now get it. Thanks. - Debasish On Mar 4, 9:48 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 8:26 AM, debasish ghosh.debas...@gmail.com wrote: David - Thanks a lot for the clear explanation. Just curious - do you think the previous implementation philosophy of controllers, sessions and pages as actors with state changes being done only through messages was a more FP oriented approach ? Actually, just the opposite. :-) Actors and OO are twin concepts. Actors provide state, data hiding and messaging (sound like words that come from Smalltalk) in a world where mutability is eschewed. It turns out that Actors have their roots in Scheme and that Smalltalk has its roots in Scheme's Actor implementation (if you need a reference, I'll dig it up.) Rarely is LiftSession state mutated directly. With the exception of SessionVars, S (threadlocal state) holds a list of state mutations (new functions that are bound to HTML elements). Having granular read operations on LiftSession and application of state changes accumulated in S as part of the completion of page rendering is about as close as I could get in Scala to Haskell's state monads. And that the actor model broke down since Session is inherently an abstraction that needs to be more stateful. The Session is an abstraction that is very, very complex and there's lots of highly granular data that needs to be exposed during the processing of a request. This granular data is better exposed on LiftSession than via request/response messages or some proxy thingy. Put another way, it depends on what you mean by state. It would be possible to pass a LiftSession around as an explicit parameter and return a mutated LiftSession... making things feel more functional, but this gets back to the limitations of Scala vis Haskell's state monad. Put another way, LiftSession has very few public mutator methods. It's mostly read-only. Is this state in the same way that a JavaBean is stateful. Now that's a debate worth having (better line up James and others.) :-) Thanks, David Thanks. - Debasish On Mar 4, 9:10 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 7:59 AM, debasish ghosh.debas...@gmail.com wrote: Dear All - I have had a look at Lift quite some time ago. I remember referring to this excellent post by David Pollak on the usage of actors in Lift (http://blog.lostlake.org/index.php?/archives/59-How-lift-uses-Scala- actors.html). Now that I am looking at the code base after quite some time, I find lots of changes in it. e.g. the above post refers to implementation of Session, Page, Controller etc. as Scala actors that nicely interacts in the Request / Response cycle of Lift. But the latest snapshot from Github indicates that the usage of actors in Lift is now different. Is there any document or pointer that describes the rationale of this change or explains the current usage of actors in request / response processing ? Howdy, As Lift evolved and I did performance analysis, I found that the places where Actors were used were not necessary, added complexity to the code, and had adverse performance characteristics. For example, as I added more methods to LiftSession, I found that it became increasingly difficult to choose between methods and messages. The problem became acute when Snippets and things external to LiftSession had to access LiftSession's state during the servicing of a request. LiftSession needed public methods, but those exposed state and thus the Actor model broke down. Yes, I could have created a CurrentLiftSessionState object that was exposed only to the current request via S (the thread-local state), but that seemed to be way too complex. So, at this point, Actors are used for CometActors and to help service Comet requests (event-based actors are used to suspend the long poll.) Does this help? Thanks, David Thanks. - Debasish -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Record and JSON
:) .. ok ... let me noodle for while on this and I'll get back with more details ... perhaps a POC On Mar 4, 7:11 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 9:08 AM, Marius marius.dan...@gmail.com wrote: Hi, I was thinking that it might be useful to be able to obtain a JSON representation of a Record and also from a JSON construct to create a Record. Record defines now: def suplementalJs(ob: Box[KeyObfuscator]): List[(String, JsExp)] = Nil but that's not very intuitive ... not to mention not implemented yet. Thoughts ? I've been needing bi-directional JSON support to allow for the creation of complex JSON data structures. So, my thought is I have a need, but not a solution. :-) Br's, Marius -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Is there a reason why the getting started PDF is for version 0.1.0?
FYI, it's fixed on the site. On Tue, Mar 3, 2009 at 8:21 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Attached is an updated version. Can someone please put this up on static.liftweb.net? Derek- Show quoted text - On Tue, Mar 3, 2009 at 8:05 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: -DarchetypeVersion=1.0, not 0.10 Derek On Tue, Mar 3, 2009 at 2:32 AM, Ikai Lan ikai@gmail.com wrote: Paul, I am also a newbie, so take what I say with a grain of salt. The archetype is 0.10. This means that the skeleton application you generate is in its 0.10 versioning. Scala Lift is in 1.0, but there is a typo in the PDF in which the characters seem to be reversed. If you use this command you should be able to create a new project: vn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=0.10 -DremoteRepositories=http://scala-tools.org/repo-releases-DgroupId=$PACKAGE -DartifactId=$PROJECT -Dversion=1.0-SNAPSHOT $PACKAGE = com.yourcompany $PROJECT = yourapp Attached is a shell script that can generate the app for you. Ikai - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Record and JSON
Interesting thread. Whats going on with Record at the moment? Now 1.0 is out, will attention shift back to making record the primary persistence mech in lift? (sorry for the thread hi-jack) Cheers, Tim On Mar 4, 5:20 pm, marius d. marius.dan...@gmail.com wrote: :) .. ok ... let me noodle for while on this and I'll get back with more details ... perhaps a POC On Mar 4, 7:11 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 9:08 AM, Marius marius.dan...@gmail.com wrote: Hi, I was thinking that it might be useful to be able to obtain a JSON representation of a Record and also from a JSON construct to create a Record. Record defines now: def suplementalJs(ob: Box[KeyObfuscator]): List[(String, JsExp)] = Nil but that's not very intuitive ... not to mention not implemented yet. Thoughts ? I've been needing bi-directional JSON support to allow for the creation of complex JSON data structures. So, my thought is I have a need, but not a solution. :-) Br's, Marius -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Testing Help for Oracle?
The column type for the MappedDateTime is TIMESTAMP by default, so it should save hour, minute, second, etc. Are you using an existing schema or using Schemifier to generate it? If it's the latter, can you provide a code snippet showing where you set the timestamp on your mapper instance? As for the second one, can you give us a code snippet and a stack trace showing the exception? Also, would you mind keeping this on the mailing list for now so that if other people run into similar issues we at least have some history. Thanks, Derek On Wed, Mar 4, 2009 at 8:11 AM, radoslaw.holewa radoslaw.hol...@gmail.comwrote: On 2 Mar, 18:42, Derek Chen-Becker dchenbec...@gmail.com wrote: This sounds like a bug. I'm guessing that you mean the object's primary key field isn't updated after save, correct? According to the docs: http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/jdb... Oracle's driver should support auto-generated keys, which is what we use in Mapper. Can you confirm that what I'm saying is what you're seeing? First of all, sorry for late answer. Yes, you're right the primary key wasn't set, I made small workaround and it works fine. I've found other problems, this time with timestamps mapping and boolean mapping. In the first case my MappedDateTime field had database representation without hours, minutes etc. In the second case my JDBC driver has thrown exception when I was trying to save MappedBoolean value to database. Cheers, Radek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Record and JSON
On Wed, Mar 4, 2009 at 9:40 AM, Timothy Perrett timo...@getintheloop.euwrote: Interesting thread. Whats going on with Record at the moment? Now 1.0 is out, will attention shift back to making record the primary persistence mech in lift? (sorry for the thread hi-jack) We'll chat about that on the call a week from Thursday. If anyone in the community has requests for Lift 1.1, please speak up now (I'm thinking August/September release). Cheers, Tim On Mar 4, 5:20 pm, marius d. marius.dan...@gmail.com wrote: :) .. ok ... let me noodle for while on this and I'll get back with more details ... perhaps a POC On Mar 4, 7:11 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 9:08 AM, Marius marius.dan...@gmail.com wrote: Hi, I was thinking that it might be useful to be able to obtain a JSON representation of a Record and also from a JSON construct to create a Record. Record defines now: def suplementalJs(ob: Box[KeyObfuscator]): List[(String, JsExp)] = Nil but that's not very intuitive ... not to mention not implemented yet. Thoughts ? I've been needing bi-directional JSON support to allow for the creation of complex JSON data structures. So, my thought is I have a need, but not a solution. :-) Br's, Marius -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: url encoded javascript
That would be nice, and would work on the page containing the link, but not for a bookmarklet. With bookmarklets, the user drags the link to the browser bookmark menu or bookmark bar. Then the bookmarklet runs in the context of whatever page they're currently looking at. Lee On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.com wrote: If you use jQuery it's even simpler: jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote: Ah, sorry to be so cryptic. The idea is to create a link containing a 'javascript:' url that the user can then drag to the browser's bookmark bar. I had something like this: a href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src',' http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) Bookmarklet /a But the script is a little tricky to read and edit in that form, so I wanted to programmatically convert it from a more readable version. I figured out how to run mvn yui-compressor to remove comments from the script. Then I read the compressed version of the script file in the snippet code. If I were to polish it further, I'd next find a java version of encodeUriComponent... but it's probably enough for now. Lee On Sun, Mar 1, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, If you want to include a JavaScript script on the page, the easiest mechanism is: import net.liftweb.http._ import js._ import JsCmds._ import JE._ Script(JsRaw(a String containing the raw script)) This will create a script tag on the page and put a // ![CDATA[ in it followed by your script followed by //]] and the closing /script tag. If this is not what you were looking to do, please let us know. Thanks, David On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.comwrote: I'd like to make a bookmarklet snippet. So I want to take a short javascript file, encode it as url, and then include it in a snippet. Any suggestions? Not sure whether to solve this with mvn or lift -- I'm new to both. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Viktor Klang Senior Systems Analyst --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] SHtml.ajaxInvoke
I noticed that SHtml.ajaxInvoke now return a Tuple2(String, JsExp). What should / can I do with the first param? The source code tells me it's Lift's name for the function, but I'm unsure how I should do with it. Thanks, Joachim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: SHtml.ajaxInvoke
On Wed, Mar 4, 2009 at 10:28 AM, Joachim A. wallaby.po...@googlemail.comwrote: I noticed that SHtml.ajaxInvoke now return a Tuple2(String, JsExp). What should / can I do with the first param? The source code tells me it's Lift's name for the function, but I'm unsure how I should do with it. It was part of the lift:gc attribute garbage collection mechanism. For now, you can discard the String, but in the future, you'll have to include the value in a lift:gc attribute. Thanks, Joachim -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: url encoded javascript
thx - I'll keep an eye out for that. I think IE had a max url length of 2K or so, but I'll watch our for maximum attribute lengths as well. The basic idea is to use the bookmarklet to load and insert a larger script -- so hopefully it can stay small. Lee On Wed, Mar 4, 2009 at 10:37 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, Be careful. Different browsers have different maximum attribute lengths and, at least in the case of Safari, if the maximum length is exceeded, Safari will silently discard the attribute. Thanks, David On Wed, Mar 4, 2009 at 10:29 AM, Lee Mighdoll leemighd...@gmail.comwrote: That would be nice, and would work on the page containing the link, but not for a bookmarklet. With bookmarklets, the user drags the link to the browser bookmark menu or bookmark bar. Then the bookmarklet runs in the context of whatever page they're currently looking at. Lee On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.comwrote: If you use jQuery it's even simpler: jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote: Ah, sorry to be so cryptic. The idea is to create a link containing a 'javascript:' url that the user can then drag to the browser's bookmark bar. I had something like this: a href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src',' http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) Bookmarklet /a But the script is a little tricky to read and edit in that form, so I wanted to programmatically convert it from a more readable version. I figured out how to run mvn yui-compressor to remove comments from the script. Then I read the compressed version of the script file in the snippet code. If I were to polish it further, I'd next find a java version of encodeUriComponent... but it's probably enough for now. Lee On Sun, Mar 1, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, If you want to include a JavaScript script on the page, the easiest mechanism is: import net.liftweb.http._ import js._ import JsCmds._ import JE._ Script(JsRaw(a String containing the raw script)) This will create a script tag on the page and put a // ![CDATA[ in it followed by your script followed by //]] and the closing /script tag. If this is not what you were looking to do, please let us know. Thanks, David On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.comwrote: I'd like to make a bookmarklet snippet. So I want to take a short javascript file, encode it as url, and then include it in a snippet. Any suggestions? Not sure whether to solve this with mvn or lift -- I'm new to both. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Viktor Klang Senior Systems Analyst -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: url encoded javascript
On Wed, Mar 4, 2009 at 11:09 AM, Lee Mighdoll leemighd...@gmail.com wrote: thx - I'll keep an eye out for that. I think IE had a max url length of 2K or so, but I'll watch our for maximum attribute lengths as well. The basic idea is to use the bookmarklet to load and insert a larger script -- so hopefully it can stay small. Perhaps the bookmarklet could be kind of like a TinyURL... a durable, unique URL that points back to your server. When the user clicks on the link, your server can serve up as much as it needs to. Lee On Wed, Mar 4, 2009 at 10:37 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, Be careful. Different browsers have different maximum attribute lengths and, at least in the case of Safari, if the maximum length is exceeded, Safari will silently discard the attribute. Thanks, David On Wed, Mar 4, 2009 at 10:29 AM, Lee Mighdoll leemighd...@gmail.comwrote: That would be nice, and would work on the page containing the link, but not for a bookmarklet. With bookmarklets, the user drags the link to the browser bookmark menu or bookmark bar. Then the bookmarklet runs in the context of whatever page they're currently looking at. Lee On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.comwrote: If you use jQuery it's even simpler: jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote: Ah, sorry to be so cryptic. The idea is to create a link containing a 'javascript:' url that the user can then drag to the browser's bookmark bar. I had something like this: a href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src',' http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) Bookmarklet /a But the script is a little tricky to read and edit in that form, so I wanted to programmatically convert it from a more readable version. I figured out how to run mvn yui-compressor to remove comments from the script. Then I read the compressed version of the script file in the snippet code. If I were to polish it further, I'd next find a java version of encodeUriComponent... but it's probably enough for now. Lee On Sun, Mar 1, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, If you want to include a JavaScript script on the page, the easiest mechanism is: import net.liftweb.http._ import js._ import JsCmds._ import JE._ Script(JsRaw(a String containing the raw script)) This will create a script tag on the page and put a // ![CDATA[ in it followed by your script followed by //]] and the closing /script tag. If this is not what you were looking to do, please let us know. Thanks, David On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.com wrote: I'd like to make a bookmarklet snippet. So I want to take a short javascript file, encode it as url, and then include it in a snippet. Any suggestions? Not sure whether to solve this with mvn or lift -- I'm new to both. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Viktor Klang Senior Systems Analyst -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
On Wed, Mar 4, 2009 at 4:19 PM, David Pollak feeder.of.the.be...@gmail.com wrote: I'm meeting with Miles Sabin in London next week to work with him on hardening the Eclipse plugin for Lift-related use. Umm ... I think the concept of hardening the plugin left the theatre along with Sean ;-) Let's call a spade a spade: we'll be fixing bugs or adding features ... most likely both, but heavily weighted towards the former. Cheers, Miles -- Miles Sabin tel:+44 (0)1273 720 779 mobile: +44 (0)7813 944 528 skype: milessabin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
On Wed, Mar 4, 2009 at 4:30 PM, Paulo Cheque pauloche...@gmail.com wrote: It would be amazing to use Scala with JUnitMax plugin in Eclipse. Untill now, JUnitMax support only Java, but I believe this is not hard to change. I believe that if Kent Beck has more time he will implement that. I'd give it a try: the way the SDT integrates with the JDT in eclipse means that there's a reasonable chance that it'll Just Work ... if it doesn't I'd like to hear about the issues. Cheers, Miles -- Miles Sabin tel:+44 (0)1273 720 779 mobile: +44 (0)7813 944 528 skype: milessabin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] Awesome Scala, Lift, EMSE, and Buy a Feature press
http://www.adtmag.com/article.aspx?id=24080 -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: url encoded javascript
That's basically what the link above does -- hard to read in compressed form. :-). The server sends an arbitrarily script that's inserted and executed in the document that the user is currently viewing. The inserted script does the real work. The marklet parameter is issued per user, for security/manageability. And the server issued script is inserted into the head not the body to handle frameset documents. I suppose I could combine the requested script and marklet parameter into a bitly url, but I'm not sure it'd save much. The script insertion code needs to remain as part of the url so the browser will execute it without navigating to a new page. Lee On Wed, Mar 4, 2009 at 11:24 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Mar 4, 2009 at 11:09 AM, Lee Mighdoll leemighd...@gmail.comwrote: thx - I'll keep an eye out for that. I think IE had a max url length of 2K or so, but I'll watch our for maximum attribute lengths as well. The basic idea is to use the bookmarklet to load and insert a larger script -- so hopefully it can stay small. Perhaps the bookmarklet could be kind of like a TinyURL... a durable, unique URL that points back to your server. When the user clicks on the link, your server can serve up as much as it needs to. Lee On Wed, Mar 4, 2009 at 10:37 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, Be careful. Different browsers have different maximum attribute lengths and, at least in the case of Safari, if the maximum length is exceeded, Safari will silently discard the attribute. Thanks, David On Wed, Mar 4, 2009 at 10:29 AM, Lee Mighdoll leemighd...@gmail.comwrote: That would be nice, and would work on the page containing the link, but not for a bookmarklet. With bookmarklets, the user drags the link to the browser bookmark menu or bookmark bar. Then the bookmarklet runs in the context of whatever page they're currently looking at. Lee On Wed, Mar 4, 2009 at 1:38 AM, Viktor Klang viktor.kl...@gmail.comwrote: If you use jQuery it's even simpler: jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.comwrote: Ah, sorry to be so cryptic. The idea is to create a link containing a 'javascript:' url that the user can then drag to the browser's bookmark bar. I had something like this: a href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src',' http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28 ) Bookmarklet /a But the script is a little tricky to read and edit in that form, so I wanted to programmatically convert it from a more readable version. I figured out how to run mvn yui-compressor to remove comments from the script. Then I read the compressed version of the script file in the snippet code. If I were to polish it further, I'd next find a java version of encodeUriComponent... but it's probably enough for now. Lee On Sun, Mar 1, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Lee, If you want to include a JavaScript script on the page, the easiest mechanism is: import net.liftweb.http._ import js._ import JsCmds._ import JE._ Script(JsRaw(a String containing the raw script)) This will create a script tag on the page and put a // ![CDATA[ in it followed by your script followed by //]] and the closing /script tag. If this is not what you were looking to do, please let us know. Thanks, David On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.com wrote: I'd like to make a bookmarklet snippet. So I want to take a short javascript file, encode it as url, and then include it in a snippet. Any suggestions? Not sure whether to solve this with mvn or lift -- I'm new to both. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Viktor Klang Senior Systems Analyst -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To
[Lift] i can haz scala xml???
Sir and Dame Scalahads, i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated. - When i type the following into Scala version 2.7.2.final repl, it all works scala scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5))) res9: scala.xml.Elem = fubar5/bar/fu scala - But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't. [WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch; [WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope) [WARNING] required: scala.xml.MetaData [WARNING] TopScope, [WARNING] ^ - Where do i go to see the new api? It would be cooler if i could do something like {computeTag(context)}{computeTagContents(context)}/{computeTag(context} but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] i can haz scala xml???
David, Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following {computeTag(context)}{computeTagContents(context)}/{computeTag(context} is a scheme for what i'd like to do, but it's probably too hard to make work. Best wishes, --greg On Wed, Mar 4, 2009 at 1:13 PM, David Pollak feeder.of.the.be...@gmail.comwrote: scala fubar5/bar/fu res0: scala.xml.Elem = fubar5/bar/fu scala fu{(1 to 3).map(i = item{i}/item)}/fu res1: scala.xml.Elem = fuitem1/itemitem2/itemitem3/item/fu Does that give you what you want (XML literals are part of the language) On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Sir and Dame Scalahads, i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated. - When i type the following into Scala version 2.7.2.final repl, it all works scala scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5))) res9: scala.xml.Elem = fubar5/bar/fu scala - But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't. [WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch; [WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope) [WARNING] required: scala.xml.MetaData [WARNING] TopScope, [WARNING] ^ - Where do i go to see the new api? It would be cooler if i could do something like {computeTag(context)}{computeTagContents(context)}/{computeTag(context} but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] i can haz scala xml???
scala fubar5/bar/fu res0: scala.xml.Elem = fubar5/bar/fu scala fu{(1 to 3).map(i = item{i}/item)}/fu res1: scala.xml.Elem = fuitem1/itemitem2/itemitem3/item/fu Does that give you what you want (XML literals are part of the language) On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Sir and Dame Scalahads, i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated. - When i type the following into Scala version 2.7.2.final repl, it all works scala scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5))) res9: scala.xml.Elem = fubar5/bar/fu scala - But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't. [WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch; [WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope) [WARNING] required: scala.xml.MetaData [WARNING] TopScope, [WARNING] ^ - Where do i go to see the new api? It would be cooler if i could do something like {computeTag(context)}{computeTagContents(context)}/{computeTag(context} but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Awesome Scala, Lift, EMSE, and Buy a Feature press
Excellent stuff! On Mar 4, 2:55 pm, David Pollak feeder.of.the.be...@gmail.com wrote: http://www.adtmag.com/article.aspx?id=24080 -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] i can haz scala xml???
On Wed, Mar 4, 2009 at 1:16 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: David, Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following {computeTag(context)}{computeTagContents(context)}/{computeTag(context} is a scheme for what i'd like to do, but it's probably too hard to make work. Sorry for being dense about your question. If you want to send me your file directly, I think I know what's going on (I think it's an import related issue...) Best wishes, --greg- Show quoted text - On Wed, Mar 4, 2009 at 1:13 PM, David Pollak feeder.of.the.be...@gmail.com wrote: scala fubar5/bar/fu res0: scala.xml.Elem = fubar5/bar/fu scala fu{(1 to 3).map(i = item{i}/item)}/fu res1: scala.xml.Elem = fuitem1/itemitem2/itemitem3/item/fu Does that give you what you want (XML literals are part of the language) On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Sir and Dame Scalahads, i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated. - When i type the following into Scala version 2.7.2.final repl, it all works scala scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5))) res9: scala.xml.Elem = fubar5/bar/fu scala - But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't. [WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch; [WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope) [WARNING] required: scala.xml.MetaData [WARNING] TopScope, [WARNING] ^ - Where do i go to see the new api? It would be cooler if i could do something like {computeTag(context)}{computeTagContents(context)}/{computeTag(context} but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] i can haz scala xml???
David, Thanks for the attention to the problem. i resolved the issue. There was a missing param in my programmatic call: cut-n-pasto. Best wishes, --greg On Wed, Mar 4, 2009 at 2:03 PM, David Pollak feeder.of.the.be...@gmail.comwrote: On Wed, Mar 4, 2009 at 1:16 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: David, Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following {computeTag(context)}{computeTagContents(context)}/{computeTag(context} is a scheme for what i'd like to do, but it's probably too hard to make work. Sorry for being dense about your question. If you want to send me your file directly, I think I know what's going on (I think it's an import related issue...) Best wishes, --greg- Show quoted text - On Wed, Mar 4, 2009 at 1:13 PM, David Pollak feeder.of.the.be...@gmail.com wrote: scala fubar5/bar/fu res0: scala.xml.Elem = fubar5/bar/fu scala fu{(1 to 3).map(i = item{i}/item)}/fu res1: scala.xml.Elem = fuitem1/itemitem2/itemitem3/item/fu Does that give you what you want (XML literals are part of the language) On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Sir and Dame Scalahads, i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated. - When i type the following into Scala version 2.7.2.final repl, it all works scala scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5))) res9: scala.xml.Elem = fubar5/bar/fu scala - But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't. [WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch; [WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope) [WARNING] required: scala.xml.MetaData [WARNING] TopScope, [WARNING] ^ - Where do i go to see the new api? It would be cooler if i could do something like {computeTag(context)}{computeTagContents(context)}/{computeTag(context} but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] I would Love to see JSR 168/ 268 Portlet Support
Having evaluated by Grails and Lift, and being about ready to start a project, the only thing that inclines me to Grails is the portlet support. Is such a thing on the Lift roadmap? If not, how big a effort might it be to implement such support? My project will have substantial resources and it might be a good opportunity to give back a little. Regards, Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: I would Love to see JSR 168/ 268 Portlet Support
Robert, Lift does not currently support the Portlet spec... but it would be easy to add portlet support to Lift... because Lift's rendering machinery is an abstraction that's very close to the Portlet spec. So... we're currently working on the priorities for Lift 1.1. If your project decision depends on Lift supporting Portlets and you can act as a reference for Lift, I think there's a high likelihood that we'll put it on the Lift 1.1 roadmap. Thanks, David On Wed, Mar 4, 2009 at 3:11 PM, abut rmoska...@gmail.com wrote: Having evaluated by Grails and Lift, and being about ready to start a project, the only thing that inclines me to Grails is the portlet support. Is such a thing on the Lift roadmap? If not, how big a effort might it be to implement such support? My project will have substantial resources and it might be a good opportunity to give back a little. Regards, Robert -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] documentation for structural/partial type bounds
Dam and Sir Scalahads, Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] documentation for structural/partial type bounds
scala def doClose(in: {def close(i: Int): Unit}) {in.close(42)} doClose: (AnyRef{def close(Int): Unit})Unit On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Dam and Sir Scalahads, Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] documentation for structural/partial type bounds
David, Thanks! Best wishes, --greg On Wed, Mar 4, 2009 at 3:46 PM, David Pollak feeder.of.the.be...@gmail.comwrote: scala def doClose(in: {def close(i: Int): Unit}) {in.close(42)} doClose: (AnyRef{def close(Int): Unit})Unit On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Dam and Sir Scalahads, Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] documentation for structural/partial type bounds
Szymon, That's pretty nifty. Best wishes, --greg On Wed, Mar 4, 2009 at 3:54 PM, Szymon Jachim sjac...@gmail.com wrote: What surprised me recently is that you can use these in asInstanceOf: x.asInstanceOf[ {def aMethod(i: Int): Unit} ].aMethod(888) Interesting way to do reflective calls... On Thu, Mar 5, 2009 at 12:48 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: David, Thanks! Best wishes, --greg On Wed, Mar 4, 2009 at 3:46 PM, David Pollak feeder.of.the.be...@gmail.com wrote: scala def doClose(in: {def close(i: Int): Unit}) {in.close(42)} doClose: (AnyRef{def close(Int): Unit})Unit On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Dam and Sir Scalahads, Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐן ǝɥʇ sı sıɥʇ -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] documentation for structural/partial type bounds
On Wed, Mar 4, 2009 at 3:54 PM, Szymon Jachim sjac...@gmail.com wrote: What surprised me recently is that you can use these in asInstanceOf: x.asInstanceOf[ {def aMethod(i: Int): Unit} ].aMethod(888) Holy frickin' cow... that's cool Interesting way to do reflective calls... On Thu, Mar 5, 2009 at 12:48 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: David, Thanks! Best wishes, --greg On Wed, Mar 4, 2009 at 3:46 PM, David Pollak feeder.of.the.be...@gmail.com wrote: scala def doClose(in: {def close(i: Int): Unit}) {in.close(42)} doClose: (AnyRef{def close(Int): Unit})Unit On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory lgreg.mered...@gmail.com wrote: Dam and Sir Scalahads, Where is the documentation for the structural/partial type syntax? i want to express a bound on a type that says it has to at least have method m with signature sig. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com -- ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐן ǝɥʇ sı sıɥʇ -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] Tutorial No Schemify in Boot.scala
Hi All - I am new and pardon me if this is really a naive question. I am following GetStartedGuide and working on the todo app. However in 2.4, I cannot find the Schemifier statement in the Boot.scala file. Did I miss anything? I also didn't find the part on how to connect Lift with a backend database. Thanks, Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
I'm currently using Scala for NetBeans to develop Erlang plugins for NetBeans, I'm continually improving it as I'm the daily user too. Hope to release a new one when NetBeans 6.7 is released. Bug reports can be put on issue track which link can be found in http://wiki.netbeans.org/Scala -Caoyuan On Thu, Mar 5, 2009 at 3:49 AM, Miles Sabin mi...@milessabin.com wrote: On Wed, Mar 4, 2009 at 7:13 PM, Jon Hancock shellsha...@gmail.com wrote: I thought eclipse would be the best supported. But so far, I'm still wrestling with it. Which in particular is blocking you? Pointers to the issues in Trac would be helpful and might save me and David a little time next week :-) Cheers, Miles -- Miles Sabin tel: +44 (0)1273 720 779 mobile: +44 (0)7813 944 528 skype: milessabin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Tutorial No Schemify in Boot.scala
Hi Jeff, I just downloaded the pdf. If you look for section 2.4 named Boot and Schemifier you'll see: Listing 2.4: Updated Schemifier line Schemifier.schemify(true, Log.infoF _, User, ToDo) Does that help? Ty On Mar 4, 9:12 pm, jeff.chen.gr...@gmail.com jeff.chen.gr...@gmail.com wrote: Hi All - I am new and pardon me if this is really a naive question. I am following GetStartedGuide and working on the todo app. However in 2.4, I cannot find the Schemifier statement in the Boot.scala file. Did I miss anything? I also didn't find the part on how to connect Lift with a backend database. Thanks, Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Tutorial No Schemify in Boot.scala
Thanks for the reply - but my problem is that I cannot seem to find Listing 2.3 in my Boot.scala to replace with Listing 2.4. Do I simply add this statement somewhere? Jeff On Wed, Mar 4, 2009 at 9:54 PM, TylerWeir tyler.w...@gmail.com wrote: Hi Jeff, I just downloaded the pdf. If you look for section 2.4 named Boot and Schemifier you'll see: Listing 2.4: Updated Schemifier line Schemifier.schemify(true, Log.infoF _, User, ToDo) Does that help? Ty On Mar 4, 9:12 pm, jeff.chen.gr...@gmail.com jeff.chen.gr...@gmail.com wrote: Hi All - I am new and pardon me if this is really a naive question. I am following GetStartedGuide and working on the todo app. However in 2.4, I cannot find the Schemifier statement in the Boot.scala file. Did I miss anything? I also didn't find the part on how to connect Lift with a backend database. Thanks, Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Tutorial No Schemify in Boot.scala
Jeff, I am assuming that you are referring to Starting with Lift by Chen-Becker, Danciu, Pollak, and Weir. Chapter 1 introduces a simple application that is created from lift-archetype-blank and has no support for databases. In Chapter 2, that application is thrown away and a new application is created with lift-archetype-basic which does have support for databases. I think you are still trying to use a lift-archetype-blank application when following along with examples that require a lift-archetype-basic application. Hope this helps. Eric On Wed, Mar 4, 2009 at 9:12 PM, jeff.chen.gr...@gmail.com jeff.chen.gr...@gmail.com wrote: Hi All - I am new and pardon me if this is really a naive question. I am following GetStartedGuide and working on the todo app. However in 2.4, I cannot find the Schemifier statement in the Boot.scala file. Did I miss anything? I also didn't find the part on how to connect Lift with a backend database. Thanks, Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: IDE
Paulo, I use the Eclipse Scala Plugin; the continuous build integration is a major factor to me in selecting it over the NB plugin (but I haven't used NB in several months now). If you do use, it, I would recommend keeping up with the /latest/ 2.8.0.whatever development snapshot (or at least something recent). In my experience (which may not be quantitative) the 2.8.0.x builds work a good bit better than the older versions. Maybe one of these days it will have nice auto-formatting support and be less aggressive about parenthesis and not get the bug where... The 'mvn compile' phase for LiftWeb largely negates the version differences unless you hit corners. Happy Coding, Paul On Wed, Mar 4, 2009 at 6:54 PM, Caoyuan dcaoy...@gmail.com wrote: I'm currently using Scala for NetBeans to develop Erlang plugins for NetBeans, I'm continually improving it as I'm the daily user too. Hope to release a new one when NetBeans 6.7 is released. Bug reports can be put on issue track which link can be found in http://wiki.netbeans.org/Scala -Caoyuan On Thu, Mar 5, 2009 at 3:49 AM, Miles Sabin mi...@milessabin.com wrote: On Wed, Mar 4, 2009 at 7:13 PM, Jon Hancock shellsha...@gmail.com wrote: I thought eclipse would be the best supported. But so far, I'm still wrestling with it. Which in particular is blocking you? Pointers to the issues in Trac would be helpful and might save me and David a little time next week :-) Cheers, Miles -- Miles Sabin tel: +44 (0)1273 720 779 mobile: +44 (0)7813 944 528 skype: milessabin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: Fwd: unexpected crashing behavior...
Meredith Gregory wrote: trait XMLRenderer[T ...] { else if (value.isInstanceOf[T]) This test won't work - T is erased, it is not available at runtime. You might have received a compiler warning. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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] 1.1 lift idea: sync
I've been thinking about browser-server data sync for use in my next project. Sync is potentially more interesting than RPC style ajax, especially for rich clients, and I think sync could be a grand thing to add to lift. The basic idea is like this. A javascript client subscribes to a set of syncable objects. The objects are then mirrored on the client and the server. Modify a syncable object on the server and the changes are pushed via comet to the client. Modify a syncable object in javascript, and the changes propagate to the server. I've did some sketches on the javascript side, and I think it'll be a nice fit there. Saving changes made on the browser becomes more transparent in the same way that ORM/JDO makes persisting to a db simpler. And rich clients can reuse change notification rather than creating custom ajax endpoints for server push. Adobe has a Data Management Servicehttp://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=data_manage_4.htmlon this theme. I'm not sure what the closest thing in the java world would be. Perhaps browser sync would fit in lift as an alternate backend to record/mapper? Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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: [scala] Re: Fwd: unexpected crashing behavior...
Eric, Thanks for your note. If you look at the previous version of the code -- lower down in the thread -- there is no use of generics -- and i still get the crashing behavior. Best wishes, --greg On Wed, Mar 4, 2009 at 9:36 PM, Eric Willigers ewillig...@gmail.com wrote: Meredith Gregory wrote: trait XMLRenderer[T ...] { else if (value.isInstanceOf[T]) This test won't work - T is erased, it is not available at runtime. You might have received a compiler warning. -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To 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 -~--~~~~--~~--~--~---