dpp / simply_lift Goto Github PK
View Code? Open in Web Editor NEWThe Simply Lift book
Home Page: http://simply.liftweb.net
The Simply Lift book
Home Page: http://simply.liftweb.net
This repository is for Simply Lift, a book that describes the Lift Web Framework. This repository is (c) 2010-2011 David Pollak, All Rights Reserved. This repsitory is licensed Creative Commons Attribution, Non Commercial, No Derivs: http://creativecommons.org/licenses/by-nc-nd/3.0/ If you have questions, comments, etc. about this book, please contact the Lift community http://liftweb.net/community
thanks
When I try to run sbt update ~jetty-run, I get the following error. My guess is that it has something to do with SBT version (mine is 0.13.1).
$ sbt update ~jetty-run
Loading /usr/share/java/sbt/bin/sbt-launch-lib.bash
scala.MatchError: 0.13.1 (of class java.lang.String)
at
at
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:175)
at sbt.EvaluateSettings$INode.evaluate(INode.scala:134)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:66)
at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:75)
at sbt.EvaluateSettings$$anon$3.run(INode.scala:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] scala.MatchError: 0.13.1 (of class java.lang.String)
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
I think the order the callback are called and S.formGroup should be described in the book. Possibly close to chapter 4.2 OnSubmit.
This is a description already written to the forum:
Functions on the server are executed in the order that the form elements are created on the server, unless you use the S.formGroup stuff that Diego mentions.
Each function is assigned a unique number from a source that is monotonically increasing. In addition to that number, there’s a random string of 6 characters appended. That makes up the GUID that maps to the function on the server. When Lift handles a request, it sorts the incoming parameters (GET, PUT, POST, DELETE) and, in sorted order, looks up the parameter name in the session’s function table. If the function exists, Lift applies the function to that parameter’s values.
S.formGroup increases or decreases the monotonically increasing number with a constant (100,000 times the formGroup) so that the GUID will be guaranteed to be sorted either before or after the GUIDs in the default (form group 0).
A long time ago, Kris Nuttycomb put forth a proposal for making Lift’s form elements monadic so that they would be evaluated in the order accessed by the handler code, rather than in the order that they were defined during page rendering. It’s still an open ticket, but I have not spent the time to make it happen.
I hope this helps and if you have more questions, please post them.
Thanks,
—David
Thanks for a good introduction,
Kim Hansen
I guess this has something to do with jetty being supported only as a plugin since sbt 0.10.
> sbt-version
[info] 0.10.1
> compile
[info] Updating {file:/home/vilius/simply_lift/}default-733e9a...
[info] Done updating.
[success] Total time: 1 s, completed Aug 25, 2011 9:11:34 AM
> jetty-run
[error] Not a valid command: jetty-run
[error] Not a valid project ID: jetty-run
[error] Not a valid configuration: jetty-run
[error] Not a valid key: jetty-run (similar: run)
[error] jetty-run
[error] ^
Hi. Are we supposed to be able to run the code from Chapter 3, in snippet_and_sitemap
? I can run the chat example fine, but it seems something is missing to be able to run the code form this directory. No build.sbt
?...
Some boxes appear empty, through all the tutorial.
Like here: http://simply.liftweb.net/index-3.2.html#prev
in Section "3.2.5 Hidden and Group". The 3 boxes are empty.
I'm using Chrome 19.0.1084.56 m.
Make sure that the examples can be used in Windows
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.