Hi,
Guys i am new to Lift.
I want to use mapper and record framework.
I have following case:
1. Table with two column [id,name] ...// I have MySQL DB
2. i want to fire select query on above table
3. Display above result on GUI
How can i do this with mapper and record:
I done with
Excellent, thanks David.
On Jul 30, 1:17 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
You can put a little JavaScript on the page which contains a function that
you can call... for example:
define a JsonHandler:
object PointHandler extends JsonHandler {
def apply(in: Any):
Well assume you snippet returns a NodeSeq:
import net.liftweb.http._
import js._
import JE._
import JsCmds._
def myFunc(xml: NodeSeq): NodeSeq = {
...
resultingNode ++ head{Script(OnLoad(Call(myStartupFunction)))}/
head
}
In the above example we are returning a head node as well which
On 07/28/2009 07:28 PM, David Pollak wrote:
I'd do the REST API thing. The mechanisms that Lift has for handling
API calls from the browser are numerous, but they are associated with
a session (you can do ajaxCall or a S.buildJsonFunc).
Oh cool. When I listened to the podcast interview
Thank you very much! Good to find the lifty way; time to refactor some
code =)
On Jul 29, 11:43 pm, marius d. marius.dan...@gmail.com wrote:
Well assume you snippet returns a NodeSeq:
import net.liftweb.http._
import js._
import JE._
import JsCmds._
def myFunc(xml: NodeSeq): NodeSeq = {
Dear Pravin.
Your requests address very basic behaviour of the framework, and you
should not experience any problem in adapting examples from the
aforementioned book.
Even simpler you could follow the Todo example in Getting Started with
Lift accessible from liftweb site (http://liftweb.net/docs/
On Wed, Jul 29, 2009 at 10:22 PM, nile black nile.bl...@gmail.com wrote:
Thanks everyone for your help and replies!
It builds successful in my new clean colinux vm.
Does it also build on your Windows box? It should now... and if it doesn't
I didn't nail all the _root_ causes.
Nile
2009/7/17 Timothy Perrett timo...@getintheloop.eu:
Hey guys,
I've been taking a look at Jersey and how it operates with Lift by way
of the recent integration that cropped up on dev.java.net...
Though it did start here first! :)
I think the current implementation of the JSON form is broken.
If you put an in a text field and try to submit it via a JSON form
it doesn't get handled correctly.
To be precise the formToJSON function in jlift.js doesn't work, and
again to be more precise the params method is broken / not fit
Thank you James for your input. I hope I'll be able to look into it
today.
Br's,
Marius
On Jul 30, 4:42 pm, James Kearney ghostf...@googlemail.com wrote:
I think the current implementation of the JSON form is broken.
If you put an in a text field and try to submit it via a JSON form
it
I wanted to use ajaxCall on a page but it didn't seem to be working
due to javascript issues.
Eventually I found that I needed to include
script type=text/javascript src=classpath/jlift.js /
in the page.
I just wanted to check that you need to manually include these on
every page that uses
2009/7/30 James Strachan james.strac...@gmail.com:
2009/7/17 Timothy Perrett timo...@getintheloop.eu:
Hey guys,
I've been taking a look at Jersey and how it operates with Lift by way
of the recent integration that cropped up on dev.java.net...
Though it did start here first! :)
Oops, you're right, I just glossed over that. Using that I now get an
error when I try to use a pre-existing primary key:
scala Cat.create.mac(00:1d:c9:00:04:9f).save
ERROR 23505: The statement was aborted because it would have caused a
duplicate key value in a unique or primary key constraint or
Awesome! Thanks for the hard work guys.
Sorry, I haven't sent another list out. I moved last weekend and I
still don't have internet in my house. I'll try to send another list
in the next couple of days.
-Xavi
On Thu, Jul 30, 2009 at 12:51 AM, David
Pollakfeeder.of.the.be...@gmail.com wrote:
Xavi,
Have you got links for the new pages... seems like it would make a
complete picture then for the archives :-)
Cheers, Tim
On Jul 30, 4:23 pm, Xavi Ramirez xavi@gmail.com wrote:
Awesome! Thanks for the hard work guys.
Sorry, I haven't sent another list out. I moved last weekend
James,
Correct, you do indeed need to include this in a page where you want
to use json forms etc...
Cheers, Tim
On Jul 30, 3:53 pm, James Kearney ghostf...@googlemail.com wrote:
I wanted to use ajaxCall on a page but it didn't seem to be working
due to javascript issues.
Eventually I
James,
I just committed the fix based on your approach. Please give it a try.
Br's,
Marius
On Jul 30, 4:53 pm, marius d. marius.dan...@gmail.com wrote:
Thank you James for your input. I hope I'll be able to look into it
today.
Br's,
Marius
On Jul 30, 4:42 pm, James Kearney
I am using an H2 database for my lift app. If I start with a clean
database and let schemifier create the tables, the tables get created
ok, but then I get a java.util.NoSuchElementException: key not found:
fsite_users where fsite_users is my User table. The table is created
and the app runs fine
On Thu, Jul 30, 2009 at 8:16 AM, Peter Robinett pe...@bubblefoundry.comwrote:
Oops, you're right, I just glossed over that. Using that I now get an
error when I try to use a pre-existing primary key:
scala Cat.create.mac(00:1d:c9:00:04:9f).save
ERROR 23505: The statement was aborted because
Please create a ticket with a reproduceable example at
http://github.com/dpp/liftweb/issues
It might be best to fork http://github.com/dpp/lift_1_1_sample/tree/master in
order to create a reproduceable example.
On Thu, Jul 30, 2009 at 10:47 AM, Tim N tnell...@gmail.com wrote:
I am using an H2
On Thu, Jul 30, 2009 at 8:13 AM, James Strachan james.strac...@gmail.comwrote:
2009/7/30 James Strachan james.strac...@gmail.com:
2009/7/17 Timothy Perrett timo...@getintheloop.eu:
Hey guys,
I've been taking a look at Jersey and how it operates with Lift by way
of the recent
Not sure what I have messed up here but if I have a hardcoded link in
a template page where the href includes query params the lift runtime
stacktraces. As an example a href=http://www.yahoo.com?
a=4b=5Test/a blows up - see below. Removing the b=5 and all is
well. The doctype is:
?xml
URLs in XML need to be XML Encoded... so try
a href=http://www.yahoo.com?a=4amp;b=5;Test/a
---Mark
On Thu, Jul 30, 2009 at 10:53 AM, Ewanehar...@gmail.com wrote:
Not sure what I have messed up here but if I have a hardcoded link in
a template page where the href includes query params the
But that looks exactly like I have it...
On Jul 30, 7:02 pm, Mark McBride mark.mcbr...@gmail.com wrote:
URLs in XML need to be XML Encoded... so try
a href=http://www.yahoo.com?a=4b=5;Test/a
---Mark
On Thu, Jul 30, 2009 at 10:53 AM, Ewanehar...@gmail.com wrote:
Not sure what I have
Fat fingered the paste... change to amp;
On Thu, Jul 30, 2009 at 11:15 AM, Ewanehar...@gmail.com wrote:
But that looks exactly like I have it...
On Jul 30, 7:02 pm, Mark McBride mark.mcbr...@gmail.com wrote:
URLs in XML need to be XML Encoded... so try
a
I am trying to follow the radio input example in the Lift book(s), but
I cannot get it to work.
Firstly, the example in the book uses this call to the SHtml.radio
function
SHtml.radio(colorMap.keys.toList, Empty, myColor = colorMap(_))
Using Lift 1.1-SNAPSHOT and Scala 2.7.5 This gives me the
This issue has been entered. (40)
I was able to narrow it down to only being a problem if a user/
password are specified. I'm not sure if a user/password are needed in
embedded mode, but I filed the issue anyway.
Thanks
On Jul 30, 12:51 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
Hi,
I feel I must apologise for this post ... I've only been doing scala
for a week, and lift for 3 days, but I'm stuck.
I'm coming from an experienced java background, just struggling with
some scala constructs.
I feel I understand the basics of lambda and function literals - but
I'm blown
How about :
SHtml.radio(colorMap.keys.toList, Empty, (a:String) = myColor =
colorMap(a) ).flatMap(_.xhtml)
I haven't tested but SHtml.radio rturns a ChoiceHolde which contains a
Seq[ChoiceItem[T]]] ... and ChoiceItem has an xhtml member
Br's,
Marius
On Jul 30, 10:49 pm, george
Has anyone tried to use wymeditor or FCKEditor in a lift page? I
cannot get these plugins to work even thought they are based on JQuery.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Lift group.
To post to this
Please specify the problems you are seeing.
Br's,
Marius
On Jul 30, 11:24 pm, Avo Reid avor...@cox.net wrote:
Has anyone tried to use wymeditor or FCKEditor in a lift page? I
cannot get these plugins to work even thought they are based on JQuery.
Hello Ben!
the following:
val square = (x:Int) = x * x
val square is the equivalent of a final reference in Java.
(x : Int) = x * x
This constructs a Function instance that takes an Int and returns that Int
squared.
The equivalent Java code would be something like:
interface FunctionR,P
Hi,
I had to replace JsVal(point) with JsVar(point), but when I run it
up, I get ReferenceError: Can't find variable: F542198622797IUJ in
the browser console. The function in the page looks like this:
function sendPointToServer(point) {
F542198622797IUJ({'command': 'setPoint',
Thanks marius for pointing me in the right direction. I nearly got
there :)
Both of the following work:
SHtml.radio(colorMap.keys.toList, Empty, (a:String) = myColor =
colorMap(a) ).toForm
// Or if you want to override the XHTML output
SHtml.radio(colorMap.keys.toList, Empty, (a:String) =
Viktor, that was a great explanation, im sure ben will apraciate that
kind of teaching =)
A follow up question that just made me wonder, what is the diference
between
val square = (x : Int) = x * x
and
def square(x:Int):Int = x * x
?
On Jul 30, 1:49 pm, Viktor Klang viktor.kl...@gmail.com
thx that fixed it - I'd forgotten it was xhtml and not plain html.
On Jul 30, 7:45 pm, Mark McBride mark.mcbr...@gmail.com wrote:
Fat fingered the paste... change to amp;
On Thu, Jul 30, 2009 at 11:15 AM, Ewanehar...@gmail.com wrote:
But that looks exactly like I have it...
On Jul 30,
On Thu, Jul 30, 2009 at 11:02 PM, DFectuoso santiago1...@gmail.com wrote:
Viktor, that was a great explanation, im sure ben will apraciate that
kind of teaching =)
Well, thank you.
A follow up question that just made me wonder, what is the diference
between
val square = (x : Int) = x
Hi Viktor,
Thanks for your reply.
I do understand the simple examples, like the one you were kind enough
to post.
My problem is that I just can't seem to break through from the simple
examples to the code in the Getting Started tutorial
To elaborate, given the following in a scala
(If I've understood your question correctly)
the definition of ajaxText is as follows:
def ajaxText(value: String, func: String = JsCmd): Elem =
ajaxText_*(value, Empty, SFuncHolder(func))
So what you're doing is that you're sending a callback function to ajaxText,
and it will be called with
Hi,
Thanks for patience (and for the interesting subpost on the diff
between val def) !
OK, the callback thing you suggested is starting to clear the mist ...
I found this article :
http://www.ibm.com/developerworks/java/library/j-scala01228.html
I've not had time to read it fully yet, as its
Here's a short example:
val add = (a : Int, b : Int) = a + b
val sub = (a : Int, b : Int) = a - b
val div = (a : Int, b : Int) = a / b
val mul = (a : Int, b : Int) = a * b
//This is a method that takes an Int a, an Int b and a function that takes 2
Ints and produces an Int
def doMath(a : Int, b
But you can also create and pass a function inline:
scala doMath(1,2,(a : Int, b : Int) = a ^ b)
res5: Int = 3
On Thu, Jul 30, 2009 at 11:43 PM, Viktor Klang viktor.kl...@gmail.comwrote:
Here's a short example:
val add = (a : Int, b : Int) = a + b
val sub = (a : Int, b : Int) = a - b
val
I used TinyMCE and it integrated pretty well. It has a jQuery plugin
that makes it pretty jQuery-ish:
$(#my-textarea)
.tinymce({ script_url: /classpath/tiny_mce/
tiny_mce.js, ... });
-Ross
On Jul 30, 2009, at 4:47 PM, marius d. wrote:
Please specify the problems you
On Thu, Jul 30, 2009 at 12:37 PM, ben b...@primrose.org.uk wrote:
Hi,
I feel I must apologise for this post ... I've only been doing scala
for a week, and lift for 3 days, but I'm stuck.
I'm coming from an experienced java background, just struggling with
some scala constructs.
I feel I
On Thu, Jul 30, 2009 at 12:51 PM, Tim N tnell...@gmail.com wrote:
This issue has been entered. (40)
I was able to narrow it down to only being a problem if a user/
password are specified. I'm not sure if a user/password are needed in
embedded mode, but I filed the issue anyway.
Cool and
On Thu, Jul 30, 2009 at 1:51 PM, Channing Walton channingwal...@mac.comwrote:
Hi,
I had to replace JsVal(point) with JsVar(point), but when I run it
up, I get ReferenceError: Can't find variable: F542198622797IUJ in
the browser console. The function in the page looks like this:
function
On Thu, Jul 30, 2009 at 2:02 PM, DFectuoso santiago1...@gmail.com wrote:
Viktor, that was a great explanation, im sure ben will apraciate that
kind of teaching =)
A follow up question that just made me wonder, what is the diference
between
val square = (x : Int) = x * x
and
def
Is it possible, can someone point me to an example.
Cheers
Jono
--~--~-~--~~~---~--~~
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
Hi all,
As some of you may have noticed, I have been playing around with
timestamps[1] and mac addresses[2] in my models. I really like
Mapper's specialized fields, both to make it easier for people to read
model definitions and to better ensure that only valid values are used
along all levels
On 07/30/2009 07:53 PM, Peter Robinett wrote:
Are there any other mapped fields you'd like to see?
I'll be needing a MappedMap in one of my upcoming projects, basically a
way of associating keyword/value pairs with my models. I'd really rather
avoid the extra overhead of creating models and
I've been working on implementing a better Date solution in my apps,
and the best one I have found is to use a Long to store the instant in
millis, then pass that down the line in response, let JavaScript do
all the conversions to display and validations for submission client-
side, and then send
Hey, all,
I want to create a form that on submission executes some serverside code
that returns a NodeSeq, and then updates the page with that xml. It seems
like some combination of AjaxForm and SetHtml should do what I want, but I
can't seem to get the server to send a response to the client
Adding either editor into default.html template according to examples
does not work. In the case of Ckeditor the ckeditor.js file throws
exceptions where sample run outside lift page does not.
On Jul 30, 4:47 pm, marius d. marius.dan...@gmail.com wrote:
Please specify the problems you are
On Thu, Jul 30, 2009 at 7:39 PM, Avo Reid avor...@cox.net wrote:
Adding either editor into default.html template according to examples
does not work. In the case of Ckeditor the ckeditor.js file throws
exceptions where sample run outside lift page does not.
It's likely that the editors are
DB.use(DefaultConnectionIdentifier) { ... your transaction goes here
}
On Thu, Jul 30, 2009 at 5:46 PM, Jonathan Ferguson j...@spiralarm.comwrote:
Is it possible, can someone point me to an example.
Cheers
Jono
--
Lift, the simply functional web framework http://liftweb.net
On Thu, Jul 30, 2009 at 7:28 PM, Calen Pennington
calen.penning...@gmail.com wrote:
Hey, all,
I want to create a form that on submission executes some serverside code
that returns a NodeSeq, and then updates the page with that xml. It seems
like some combination of AjaxForm and SetHtml
Thank you very much. It works great now :)
On 30 Jul., 04:43, David Pollak feeder.of.the.be...@gmail.com wrote:
On Wed, Jul 29, 2009 at 5:54 PM, fbettag fr...@bett.ag wrote:
Now the last and final question: how would i go about and add this to
the trait:
object test extends
Here is some more specific code I should be able to include
wymeditor.js in a lift page and add the following. The wymeditor
doesn't come up it faults and a textarea comes up. If I include the
same code in a non lift web page, even like a menu item in the sitemap
to a page outside of the lift
Lift, by default, serves with a mime type of application/xhtml+xml (except
to IE). This puts browsers into a very strict mode for parsing and it means
that scripts may not use write to change the DOM.
So, what/where is the exception?
Are you serving the static page as text/html or
I think I had the same problem, and if I recall correctly it was because lift
wants to use the schema with the same name as the user. Create this schema with
the H2 console. I think my code actually uses ;schema=... in the url.
-
Tim Ntnell...@gmail.com
Maybe he meant to write it out as an entity (-amp-;) and the email software or
the browser made it back into an ampersand.
-
Ewanehar...@gmail.com wrote:
But that looks exactly like I have it...
On Jul 30, 7:02 pm, Mark McBride mark.mcbr...@gmail.com
Related question - if there are multiple head sections buried in different
places in the xml are they all removed and combined?
-
marius d.marius.dan...@gmail.com wrote:
Well assume you snippet returns a NodeSeq:
import net.liftweb.http._
import js._
Does doubling the brace escape it? Also you could build the string parts
outside of the xml and then embed them.
-
Nolan Darilekno...@thewordnerd.info wrote:
On 07/28/2009 07:28 PM, David Pollak wrote:
I'd do the REST API thing. The mechanisms that Lift
Maybe I'm missing something that was said, but why can't MappedTimestamp extend
MappedDate(Time)? Or better yet, provide a trait to mix in with either of the
above?
-
Peter Robinettpe...@bubblefoundry.com wrote:
Hi all,
As some of you may have noticed, I
I'm not clear what you're suggesting.
Currently there are two methods. sendValidationEmail takes a user and sends him
an email. signup has a nested function, testSignup, which (1) sets validated
based on skipEmailValidation, and resets uniqueId; (2) if skipEmailValidation
log in; otherwise
Should I add a variable to MetaMegaProtoUser var loginRedirect: Box[String],
and change login so that if it's Full it will redirect there instead of
homePage? (It could reset it to Empty too.)
-
Naftoli Gugenheimnaftoli...@gmail.com wrote:
Using
Also I could add a method called logInFirst which would return a TestAccess
that if the user is logged in returns Empty, and if not sets loginRedirect and
returns Full(RedirectResponse(User.loginPageURL)). I am currently using such a
TestAccess in one of the top menus (minus the nonexistent
Are you putting the result of:
Script(Function(sendPointToServer, point, PointHandler.call(setPoint,
JsVal(point
Anywhere on your page?
I believe so, the page has a snippet:
lift:mapSnippet.mapFunctions/
which looks like this:
def mapFunctions(xhtml : NodeSeq) : NodeSeq = {
68 matches
Mail list logo