Yeah, it get the same result .
So I'm very confused with the lift:loc ...
Is anyone know this problem ?
Thanks for help.
:)
Cheers,
Neil
On Nov 9, 2:53 pm, YING-KWANG TU ying.kwang...@gmail.com wrote:
Neil,
Considering that we are both using the lift-core_xx_XX in our
It works now !
I use the m.toList.sort(_ _) method to sort the result.
###
scala var m = Map(2 - yy, 3 - zz, 1- xx)
scala m.toList.sort(_ _)
res149: List[(Int, java.lang.String)] = List((1,xx), (2,yy), (3,zz))
###
:)
Cheers,
Neil
On Nov 9, 3:59 pm, Neil.Lv anim...@gmail.com wrote:
Thanx fro SBT. I have to look at this tool.
On 9 ноя, 06:43, harryh har...@gmail.com wrote:
I use JRebel and SBT (http://code.google.com/p/simple-build-tool/) and
very rarely have to restart my server when doing development. It's a
very quick dev-cycle. No big tips really. I save the code
Hello guys,
I thought the purpose of loginRedirect was to be able to override
where the newly logged-in user gets redirected to.
I'm doing it like so, in model/User:
loginRedirect(Full(/loadPrivateKey))
..but it just goes to the page I accessed before I clicked on /
user_mgt/login
Is there
Hello!
I am a Lift beginner. I have created a site with archetype 'lift-
archetype-basic'. In Boot.scala I add User.sitemap to LiftRules. In my
html file I create the menu by using lift:Menu.builder/.
Question 1: when I am logged in the order of the menu items from User
are 'Logout | Edit User
Ooo, thats my blog :-)
What is it you dont feel to be straight forward in what I described?
You will need to use a locale calculator at the very least, because
otherwise Lift has no way of knowing what language is being requested.
Cheers, Tim
On 9 Nov 2009, at 12:51, hmelchander wrote:
Thanks for your answer Tim,
and yes, I do believe that your description is straightforward.
But I was wondering if there is a really easy way to change the text
of the Loc's that are generated by User.sitemap; perhaps by
manipulating the User object (MetaMegaProtoUser actually)? I have
studied
On Sun, Nov 8, 2009 at 11:28 PM, Jack Widman jack.wid...@gmail.com wrote:
Thanks David. This is a big help. Can you tell me exactly how lowPriority,
mediumPriorty and highPriority work? When are they called?
When a message comes into the Actor's mailbox, the Actor determines if it
can handle
scala.collection.SortedMap
On Sun, Nov 8, 2009 at 11:59 PM, Neil.Lv anim...@gmail.com wrote:
Hi all,
Is there a Order Map in the lift ?
Example:
1- xx, 2 - yy, 3 - zz
1:) add 1- xx
Map(1- xx)
2:) add 3 - zz
Map(3 - zz, 1- xx)
3:) add 2 - yy
Map(2 - yy, 3 - zz, 1-
On 6 stu, 06:50, Indrajit Raychaudhuri indraj...@gmail.com wrote:
The archetypes needs some spit and polish.
I'll take them up next week.
Sorry for bothering but is there any news on when archetypes could be
fixed? I would realy like to start (again) with lift + jpa.
Cheers, Indrajit
On
On Sat, Nov 7, 2009 at 10:24 PM, Neil.Lv anim...@gmail.com wrote:
Hi all,
Is there a easy way to write javascript code (dynamic for caculating
flashvars )in the Snippet ?
import net.liftweb._
import http._
import js._
import JsCmds._
import util._
import Helpers._
class MySnippet {
def
Ah hah... xhtml strikes again.
I think if you do LiftRules.useXhtmlMimeType = false in Boot.scala, things
should work.
On Sat, Nov 7, 2009 at 9:51 PM, Neil.Lv anim...@gmail.com wrote:
It works well in the firefox, but not in IE.
Result:
swfobject.embedSWF(quot;/flash/test.swfquot;,
Hello guys,
I have the following code working ok:
JsonResponse(JsObj(Op - 0,e - 0,id -
newUser.id.toString))
The returned JSON message looks like the following:
{Op: 5, e: 0, id:123455}
I would like the message to be like this:
{Op: 5, e: 0, id: 123455}
If I
Bring the numToJsExp implicit into scope -- import
net.liftweb.http.js.JE.numToJsExp
-Ross
On Nov 9, 2009, at 12:22 PM, GA wrote:
Hello guys,
I have the following code working ok:
JsonResponse(JsObj(Op - 0,e - 0,id -
newUser.id.toString))
The returned JSON
Thanks for the answer.
This line does the trick:
newUser.id.asJsExp .
It returns a type net.liftweb.http.js.JE.numToJsExp.
GA
On Nov 9, 2009, at 6:31 PM, Ross Mellgren wrote:
Bring the numToJsExp implicit into scope -- import
net.liftweb.http.js.JE.numToJsExp
-Ross
On Nov 9, 2009,
Hello guys,
is it possible to concatenate JsObj objects?
Right now I have several JsonResponse calls depending on some
conditions. I am building the responses including some error codes and
different components.
I would like to build the answer part by part and concatenate the
pieces at
var responses: List[(String, JsExp)] = Nil
responses ::= a - 1
responses ::= b - 2
JsonResponse(JsObj(responses: _*))
If you really want to concatenate JsObj, you can do that too
val response1 = JsObj(a - 1)
val response2 = JsObj(b - 2)
JsonResponse(response1 +* response2)
-Ross
On Nov 9,
Is this in M7? It wasn't mentioned in the release notes, and I'm not
sure I'm seeing it working...
Chris
On Nov 2, 6:20 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
Fixed
On Sat, Oct 31, 2009 at 9:04 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:
David Pollak
Even without JRebel the cycle isn't that bad, especially if you don't
need to alter Snippets. Often I'm only tweaking the xhtml, in which
case I don't even have to restart the server.
Chris
On Nov 8, 11:43 pm, harryh har...@gmail.com wrote:
I use JRebel and SBT
Hi, I'm curious what your thoughts are on using LIFT to implement a
backend server for REST web services, e.g. respond to GET/PUT/POST/
DELETE requests with xml/json.
Is this a good use of Lift? What are the advantages of doing this with
Lift rather than just Jetty, or another library such as
Not scrictly a Lift question, but does anyone have a library they like
(or is there something in scalalib I'm not aware of) that will remove
whitespace from XML?
foo
barhello world/bar
/foo
to:
foobarhello world/bar/foo
-harryh
--~--~-~--~~~---~--~~
You
there are several advantages.
1: you get to leverage type safety and the excellent XML support
of Scala, and lift-json.
2: assuming it's not a open for all public REST server, you'd have to
deal with security/auth. Lift will help here.
3: In the past, every time I've done a backend REST server
Answering my own question, I wrote this. I think it should do what I
want:
def compactXml(node: Node): Node = node match {
case Elem(p, l, a, s, children @ _*) = Elem(p, l, a, s, children.map
(compactXml(_)) :_*)
case Text(data) = Text(data.trim)
case x = x
}
-harryh
This is why Lift usually wins out in my decision making - its just a
very well rounded tool and yes, its great for these kinds of task. I
would also like to point out that if you wanted to mix Akka and Lift
for the best of both worlds, then you can do that too.
Rock on.
Cheers, Tim
On 9
Also see trimProper in
http://lampsvn.epfl.ch/trac/scala/browser/scala/tags/R_2_7_7_final/src/library/scala/xml/Utility.scala?view=markup
--Bryan
On Mon, Nov 9, 2009 at 5:47 PM, harryh har...@gmail.com wrote:
Answering my own question, I wrote this. I think it should do what I
want:
def
How hard would this be to implement? I'm a big fan of pretty HTML
output, so I'd be interested in implementing this if it's not too
hard.
Peter Robinett
On Nov 7, 7:06 am, David Pollak feeder.of.the.be...@gmail.com wrote:
On Sat, Nov 7, 2009 at 1:01 AM, aw anth...@whitford.com wrote:
Is
I found this answer on
nabblehttp://old.nabble.com/How-to-disable-a-textfield-td25969916.htmlbut
it's regarding setting the values client side. I want to set them in
the snippet, depending on data.
This doesn't work, but will give you a better idea of what I'm trying to do:
def bindPerson(xhtml:
I would imagine it would consist of recursively iterating over xml elements,
with the recursive function taking an indent level argument and passing it to
iself incremented; and in each iteration returning the input with spaces added
before each element in propertion to the indent level, and
Hi,
I have set the unitils properties for h2 database.
I am getting the following error message for the unit test.
Can anyone tell me what am I missing?
Thanks.
Sunanda
java.lang.NullPointerException: Looking for Connection Identifier
ConnectionIdentifier(lift) but failed to find either a
JNDI
Thanks for the info guys - going to go ahead with Lift!
On Nov 9, 5:51 pm, Timothy Perrett timo...@getintheloop.eu wrote:
This is why Lift usually wins out in my decision making - its just a
very well rounded tool and yes, its great for these kinds of task. I
would also like to point out
Use None (Option) or Empty (Box) as the value of the attribute -- this
will cause the pairToUnprefixed implicit that is being used inside
SHtml to not generate an attribute.
e.g.:
val disableAttr: Box[String] = if (disableAll) Full(disabled) else
Empty
bind(person, xhtml,
...
Tim,
You can browse to http://219.94.110.243 for the test site running on Ubuntu
Server 9.10.
There is a down-loadable test project which you can test out.
Before this discussion thread on UTF-8 or ISO8859-1,
1. localization is running great on windows+maven2.2.1+liftweb1.1-M7
2. lift:loc
Can anyone suggest some good examples or strategies to use to test a
webservice written with Lift?
I've started down the path of firing up Jetty in a unit test, then
just hitting it with say a GET and checking the response. Whats a
good way of firing up Jetty? It looks like using ServletTester
Hi, I'm attempting to write a basic unit test for a webservice I'm
implementing in Lift, by test looks like this:
val foo = XML.load(http://localhost:8080;)
I'm getting an exception I assume because the XML parser is trying to
download the DTD and is getting denied. Whats the best way to
Exception:
java.io.IOException: Server returned HTTP response code: 503 for URL:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:1313)
at
Don't know but it's been asked so you should be able to search for it; I'm not
sure whether on this list or scala-user or both.
-
Alex Blacka...@alexblack.ca wrote:
Exception:
java.io.IOException: Server returned HTTP response code: 503 for URL:
I read these two:
http://old.nabble.com/Exception-loading-XML-with-DTD-td25213294.html
http://stackoverflow.com/questions/1096285/is-scala-java-not-respecting-w3-excess-dtd-traffic-specs
Not sure what the answer is, some ugly work arounds are presented...
Presumably Lift's XML output *should*
We fire up Jetty populate a temp database and then run a batch of tests.
Seems to work well for us.
Jono
2009/11/10 Alex Black a...@alexblack.ca
Can anyone suggest some good examples or strategies to use to test a
webservice written with Lift?
I've started down the path of firing up Jetty
By adding a println line in my localeCalculator churned the following
output:
en_US
en_us
en_us
en_us
en_us
INFO - Service request (GET) / took 53 Milliseconds
en_us
ms_my
ms_my
ms_my
ms_my
INFO - Service request (GET) / took 37 Milliseconds
ms_my
th_th
th_th
th_th
th_th
INFO - Service request
I can see it
herehttp://github.com/dpp/liftweb/blob/1.1-M7/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/ManyToMany.scalain
the 1.1M7 code base, but can't find it in the jar that Maven
downloaded.
The trait is there, but the Mapped version is missing.
The same for MappedOneToMany
MappedManyToMany is defined in the ManyToMay trait, which your mapper should
extend.
-
Jim Barrowsjim.barr...@gmail.com wrote:
I can see it
Maybe it's a bug with lift:loc locid=/
It's so confused.
Cheers,
Neil
On Nov 10, 12:11 pm, YING-KWANG TU ying.kwang...@gmail.com wrote:
By adding a println line in my localeCalculator churned the following
output:
en_US
en_us
en_us
en_us
en_us
INFO - Service request
The only difference between your working code and mine is that mine has a
process in the background that is always running and puts Foo objects on a
queue whenever they are ready. Where can I start this long running process
so that it doesn't interfere with the lowPriority method that takes things
It's in M7. If you created your code from an archetype prior to M7, you
have to manually put the spinning gif into your /images directory
On Mon, Nov 9, 2009 at 11:57 AM, CodeSlave9000 ccebelen...@gmail.comwrote:
Is this in M7? It wasn't mentioned in the release notes, and I'm not
sure I'm
On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman jack.wid...@gmail.com wrote:
The only difference between your working code and mine is that mine has a
process in the background that is always running and puts Foo objects on a
queue whenever they are ready. Where can I start this long running
It's not an issue of Lift's output working with XML.load, it's an issue of
the W3C blocking the Java libraries. This has nothing to do with Lift or
the XML Lift emits.
If you want to parse XML and not run into that problem, use
net.liftweb.util.PCDataXmlParser
On Mon, Nov 9, 2009 at 7:11 PM,
On Mon, Nov 9, 2009 at 3:28 PM, Peter Robinett pe...@bubblefoundry.comwrote:
How hard would this be to implement?
Does a Scala XML pretty-printer exist?
If one does, I could see adding a NodeSeq = NodeSeq function near the end
of the rendering pipeline.
I'm a big fan of pretty HTML
In your unit tests, you must call Boot.scala or alternatively, execute the
set-up code in Boot.scala in order to set up the RDBMS connections, etc.
On Mon, Nov 9, 2009 at 5:37 PM, sunanda sunanda.pa...@gmail.com wrote:
Hi,
I have set the unitils properties for h2 database.
I am getting the
http://www.scala-lang.org/docu/files/api/scala/xml/PrettyPrinter.html
But this can be done today using: val responseTransformers = RulesSeq
[LiftResponse = LiftResponse]
LiftRules.responseTransformers.append {
case response = // do some LiftResponse pattern matching here for
and
49 matches
Mail list logo