[Lift] Re: Issue, The URL params can't contains ? ****

2010-03-09 Thread Neil.Lv
I want get the these strings ( http://test.com/file.zip12345678 ) from the URL (http://localhost:8080/download.html?link=http://test.com/ file.zip12345678) Thanks very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To

[Lift] Issue, The URL params can't contains ? ****

2010-03-09 Thread Neil.Lv
Hi all, I have a silly question about the URL rewrite . How to let the URL params can contains the character. Here is the code: ### The url rewrite. case RewriteRequest( ParsePath(List(download, link), html, _, _), GetRequest, _) =

[Lift] Re: Issue, The URL params can't contains ? ****

2010-03-09 Thread Neil.Lv
On Mar 9, 9:56 pm, Marius marius.dan...@gmail.com wrote: You need to do URL encoding first. Helpers.urlEcnode(str) does this. case RewriteRequest( ParsePath(List(download, link), html, _, _), GetRequest, _) =

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
On Mar 1, 3:53 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: I'm not sure if this can be handled with the standard ParsePath, but it is fairly easy to write your own extractor that can handle more complex scenarios. Here's an example: object ParamsExtractor { def

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
On Mar 1, 5:10 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Ahh yes, the example was from a Loc rewrite, The principle is the same I guess, you should be able to do something like this: case RewriteRequest(ParamsExtractor(account,orgUnit) , _, _) = RewriteResponse(path, Map(account -

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
I add these code in the Boot class, but it doesn't work. How can write the correct code to parse the url ? # object ParamsExtractor { def unapply(pp: ParsePath): Option[(String)] = { Log.info(wholePath: + pp.wholePath) val path = List(test) val result:Box[(String)] = if

[Lift] Re: About the url rewrite (more thant one params and get 404 not found error)

2010-03-01 Thread Neil.Lv
OK, Got it, Thank you very much! On Mar 2, 3:01 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Sun, Feb 28, 2010 at 8:28 PM, Neil.Lv anim...@gmail.com wrote: Hi all, I have a silly question about the url rewrite in the lift. It has another two params in the url after the img

[Lift] About the url rewrite (more thant one params and get 404 not found error)

2010-02-28 Thread Neil.Lv
Hi all, I have a silly question about the url rewrite in the lift. It has another two params in the url after the img. http://localhost:8080/show/img/version/id The url works fine. = http://localhost:8080/show/img = http://localhost:8080/show/img/v1/ =

[Lift] Re: (ISSUE) How to use the sbt with lift project ?

2010-01-30 Thread Neil.Lv
I have changed the code. use this code in the G:\project\test\project \TestProject.scala file, and get this error. The jetty val you are overriding is an internal val that you shouldn't be doing anything with. If you change that line to: val jetty6 = org.mortbay.jetty % jetty % 6.1.22 %

[Lift] Re: (ISSUE) How to use the sbt with lift project ?

2010-01-30 Thread Neil.Lv
Hi, Lift version is: 2.0-M1, i deleted all the files in the G:/Documents and Settings/Ruby/.ivy2/ directory but get these errors too. # [warn] :: [warn] :: UNRESOLVED DEPENDENCIES :: [warn]

[Lift] Re: (ISSUE) How to use the sbt with lift project ?

2010-01-30 Thread Neil.Lv
I use this command ~ jetty-restart and it can get continuous compilation and deployment. Thanks! Cheers, Neil On Jan 31, 1:10 pm, Neil.Lv anim...@gmail.com wrote:   It works now, but when i changing a file(HelloWorld.scala) in the snippet, it doesn't re-compile the HelloWorld.scala

[Lift] (ISSUE) How to use the sbt with lift project ?

2010-01-29 Thread Neil.Lv
Hi all, How to use the sbt with lift project ? I try to use the sbt and get this errors, Does anybody know what's wrong with it ? Maybe i missing something else ? Here is the log: # I create this file like this in the build directory.

[Lift] Re: Solr (or external API), curl, scala dispatch library, Quartz scheduling questions

2010-01-26 Thread Neil.Lv
Hi, I have a silly question about the http package. What's the package should be imported when using the dispatch? I try this code of the wiki, and get this error. error: not found: value http ### I have import the dispatch package, and where is the http ? import dispatch._ ###

[Lift] Re: Solr (or external API), curl, scala dispatch library, Quartz scheduling questions

2010-01-26 Thread Neil.Lv
Thanks, I have found it here, http://dispatch.databinder.net/Stdout_Walkthrough I have imported the Http package and it works now, ### import Http._ ### Thanks again, this article is very helpful. Cheers, Neil On Jan 27, 9:57 am, Neil.Lv anim...@gmail.com wrote: Hi, I have

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
I have added the demo code on the Github now. ( Mabye it's a bug with DB.runQuery and DB.use in the two db vender ) Here is the address: http://github.com/anim510/two_db_demo Thanks very much! Cheers, Neil On Jan 21, 11:26 am, Neil.Lv anim...@gmail.com wrote:   My email

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
transactional query between two DBs here } } Note that DB.use nests such that the transaction will only be committed when the last DB.use block for a given ConnectionIdentifier is exited. On Thu, Jan 21, 2010 at 3:17 AM, Neil.Lv anim...@gmail.com wrote:  I have added the demo code on the Github

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
Thanks guys very very much! I'm using the Windows XP, I reset the height buffer for the CMD now, and can see the full error message now. The code can work fine now ( it's so strange that I run this code on the another computer , and it's all OK... ) Maybe I need to delete all the

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
On Jan 22, 10:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: 'mvn clean' deletes them for you. - Got it, Thank you very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To post to this

[Lift] How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Hi all, I use two db connections in my app, and I want to use DB.prepareStatement to select the records from the second db. It failed, Here is the code: ### def getHotByTid(id : Long) = DB.use(bootstrap.liftweb.TwoDB) { conn = DB.prepareStatement(SELECT * FROM hots

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Thank you very much, But it doesn't work yet, maybe because of using two db connections. I'll test it later again. On Jan 21, 12:44 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Neil.Lv anim...@gmail.com writes: Hi all,   I use two db connections in my app, and I want to use

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
On Jan 21, 1:56 am, Neil.Lv anim...@gmail.com wrote: The DB.runQuery can works now, but the DB.prepareStatement also cant' work. Here is the test app address: http://github.com/anim510/two_db_demo Cheers, Neil On Jan 21, 1:16 am, Neil.Lv anim...@gmail.com wrote: Thank you very much

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
My email is : anim...@gmail.com On Jan 21, 11:17 am, Neil.Lv anim...@gmail.com wrote: Mabye it's a bug with DB.runQuery and DB.use in the two db vender Two question: (problem) 1: I don't know why the HelloWorld snippet code will be execute 2 times in this code. (See

[Lift] Re: Two database are broken in 1.1-M8, works fine in 1.1-M7 .

2010-01-13 Thread Neil.Lv
are using the same connection vendor for both connection identifiers *and* you're not defining a vendor for the DefaultConnectionIdentifier On Jan 11, 7:05 am, Neil.Lv anim...@gmail.com wrote: Hi all,    There is a problem when i upgrading the 1.1-M7 to 1.1-M8, the db connection

[Lift] Re: Two database are broken in 1.1-M8, works fine in 1.1-M7 .

2010-01-13 Thread Neil.Lv
David, Thank you very much! It works now, I'm so sorry about that I didn't see the yak demo yesterday . :) Cheers, Neil On Jan 14, 12:43 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Jan 13, 2010 at 6:18 AM, Neil.Lv anim...@gmail.com wrote: Hi David, I'm sorry

[Lift] Re: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master

2010-01-12 Thread Neil.Lv
Hi all, Maybe the mapper is broken in M8 ? I use only one database in M8 ( upgrade from M7) it works fine, but use two db connection and it doesn't work. (works fine in M7). Here is the topic about this issue. Thank you very much for any help! Cheers, Neil -- You received this

[Lift] Re: **IMPORTANT** Lift 2.0 Milestone1 is coming and it's time to test the SNAPSHOT in master

2010-01-12 Thread Neil.Lv
, Neil.Lv anim...@gmail.com wrote: Hi all, Maybe the mapper is broken in M8 ? I'm in meetings for most of today, but I will look at the DB issues you've reported tonight. I use only one database in M8 ( upgrade from M7) it works fine, but use two db connection and it doesn't work

[Lift] Re: JNDI error when switching to M8 ?

2010-01-11 Thread Neil.Lv
Does anyone know that what's wrong with it ? Cheers, Neil On Jan 10, 9:50 pm, Neil.Lv anim...@gmail.com wrote: Here is the test code . g...@github.com:anim510/two_db_demo.git It works fine when using only one database, it failed when using two db connection. Thanks.! Cheers

[Lift] Two database are broken in 1.1-M8, works fine in 1.1-M7 .

2010-01-11 Thread Neil.Lv
Hi all, There is a problem when i upgrading the 1.1-M7 to 1.1-M8, the db connection is broken. I use two database connection in my app, it's broken in 1.1-M8. ### object OneDB extends ConnectionIdentifier { override def jndiName = lift_proto } object TwoDB extends ConnectionIdentifier {

[Lift] JNDI error when switching to M8 ?

2010-01-10 Thread Neil.Lv
Hi all, There is a problem that i switch the M7 to M8, the JNDI is error. I didn't change anything before moving M7 to M8. It seems that the Lift looks for the lift ConnectionIdentifier not the OneDB or TwoDB. ### java.lang.NullPointerException: Looking for Connection Identifier

[Lift] Re: JNDI error when switching to M8 ?

2010-01-10 Thread Neil.Lv
Here is the test code . g...@github.com:anim510/two_db_demo.git It works fine when using only one database, it failed when using two db connection. Thanks.! Cheers, Neil On Jan 10, 5:04 pm, Neil.Lv anim...@gmail.com wrote: Hi all,    There is a problem that i switch the M7 to M8

[Lift] Re: Example project -- Image gallery

2010-01-06 Thread Neil.Lv
Thanks for sharing this, it's very useful and helpful to us (beginner). Cheers, Neil On Jan 7, 1:20 am, David Pollak feeder.of.the.be...@gmail.com wrote: Thanks for sharing! Double thanks for spelling my last name correctly!! On Wed, Jan 6, 2010 at 9:12 AM, Jim Wise jw...@draga.com

[Lift] Re: Happy New Year!

2009-12-30 Thread Neil.Lv
Thank you and Happy New Year to all the Lifter! Cheer, Neil On Dec 30, 9:48 pm, Marius marius.dan...@gmail.com wrote: Thank you. Happy new year to you too. Br's Marius On Dec 30, 2:12 pm, koveen liep...@xs4all.nl wrote: I would like to wish everybody on this list a happy new year.

[Lift] Re: How to reRender the page via js in Chat demo of the lift ?

2009-12-28 Thread Neil.Lv
update the difference between the incoming updates and your current chats. Derek On Sat, Dec 19, 2009 at 3:47 AM, Neil.Lv anim...@gmail.com wrote: Hi all,  How to reRender the page via js in Chat demo of the lift ?  Here is an example: ###  In the index page, show all the message

[Lift] Re: How could i send a HTTP get or post request in the Snippet or Views in the Lift?

2009-12-22 Thread Neil.Lv
the response to the client. Note that you need to set LiftRules.allowParallelSnippets Br's, Marius On Dec 22, 8:39 am, Neil.Lv anim...@gmail.com wrote: Hi all, How could i send a HTTP get or post request in the Snippet or Views in the Lift? For example, the weather API

[Lift] About the Chat demo of the Lift?

2009-12-21 Thread Neil.Lv
Hi all I have a silly question about the Chat demo. How could i create a Chat room in this demo ? Maybe i can define a variable or some other method to achieve the purpose ! Now all the people are in the same Chat room ( global ) in the example, so i want to create more than one

[Lift] How could i send a HTTP get or post request in the Snippet or Views in the Lift?

2009-12-21 Thread Neil.Lv
Hi all, How could i send a HTTP get or post request in the Snippet or Views in the Lift? For example, the weather API . I want to send an HTTP get request or post request to another website that it supplies some APIs, then in the lift we can receive the return data such as XML data,

[Lift] Re: About the Chat demo of the Lift?

2009-12-21 Thread Neil.Lv
13585201588http://maweis.com On Tue, Dec 22, 2009 at 2:31 PM, Neil.Lv anim...@gmail.com wrote: Hi all I have a silly question about the Chat demo. How could i create a Chat room in this demo ? Maybe i can define a variable or some other method to achieve the purpose ! Now all

[Lift] Re: How can i get the user IP address in the lift ?

2009-12-20 Thread Neil.Lv
get access and provide a handy default if need be. If you dont want that, just do a pattern match or whatever you want. Cheers, Tim On Dec 20, 2:38 am, Jarod Liu liuyuan...@gmail.com wrote: S.containerRequest.map(r=println(r.remoteAddress)) On Dec 20, 4:18 am, Neil.Lv anim...@gmail.com

[Lift] How to reRender the page via js in Chat demo of the lift ?

2009-12-19 Thread Neil.Lv
Hi all, How to reRender the page via js in Chat demo of the lift ? Here is an example: ### In the index page, show all the message that the users sent user 1: message 1 user 2: message 2 user 3: message 3 user 4: message 4 user 5: message 5 ### Here are 5 messages, then i want to refresh

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-12-19 Thread Neil.Lv
, 2009 at 5:44 AM, Neil.Lv anim...@gmail.com wrote:  I added this code in the User model, but it doesn't work yet.  This println method is never executed.  Maybe some configuration need to be set ? ### object User extends User with MetaMegaProtoUser[User] {  ...   override def

[Lift] How can i specify the Interval time for the Comet ?

2009-12-19 Thread Neil.Lv
Hi all, How can i specify the Interval time for the Comet ? Just like the chat demo in the lift examples, i have a problem that how to set the interval time for the every http request ? That means the user only post the message to the comet every 3 seconds, and doesn't post the message

[Lift] Re: How can i specify the Interval time for the Comet ?

2009-12-19 Thread Neil.Lv
the continuous long poll that is currently implemented? Thanks, David On Sat, Dec 19, 2009 at 5:01 AM, Neil.Lv anim...@gmail.com wrote: Hi all,  How can i specify the Interval time for the Comet ?  Just like the chat demo in the lift examples, i have a problem that how to set the interval

[Lift] Re: How can i update and insert record into database via Raw sql in Lift?

2009-12-19 Thread Neil.Lv
statement; or an SQL statement that returns nothing, such as a DDL statement.  return ResultSet       executeQuery()           Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query. FYI Marcin, On 19 Gru, 08:26, Neil.Lv anim...@gmail.com

[Lift] Re: How can i specify the Interval time for the Comet ?

2009-12-19 Thread Neil.Lv
polling. You could probably keep for each message the timestamp and look for the frequencies when the same message is posted. Br's, Marius On Dec 19, 5:37 pm, Neil.Lv anim...@gmail.com wrote:    If there are many people in the Chat room, and there is a person (not friendly) post the same

[Lift] How can i get the user IP address in the lift ?

2009-12-19 Thread Neil.Lv
Hi all, I want to get the IP address of the users. How can i get the remote IP address in the lift? Thanks for any suggestion! Cheers, Neil -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to

[Lift] Re: How can i update and insert record into database via Raw sql in Lift?

2009-12-18 Thread Neil.Lv
) stmt.executeUpdate()} Where first 1 in setLong is position in prepared statment where you will put second value. Since You have only one ? it always will be 1. WARNING: runQuery is vulnerable to SQL injection in many situations (mostly where string is passed to query) Marcin, On 18 Gru, 15:45, Neil.Lv

[Lift] Re: How can i update and insert record into database via Raw sql in Lift?

2009-12-18 Thread Neil.Lv
It works now. I use the same executeUpdate method, and it can insert into the db. Thanks Marcin, Cheers, Neil On Dec 19, 1:29 am, Neil.Lv anim...@gmail.com wrote: Hi Marcin,    Thank you very much! The update statement works now!    There is a question about the insert statement

[Lift] How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
Hi all, How can bind more than one element in the render method in CometActor ? The msg1 is an ### class TestComet extends CometActor { override def defaultPrefix = Full(info) ... def render = { bind(One - span1/span, Two - span2/span,

[Lift] Re: How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
BTW, when the partialUpdate method is called , the result is correct. But when refreshing the browser or open a new browser, the result also is 3, Cheers, Neil On Dec 9, 12:44 am, Neil.Lv anim...@gmail.com wrote: Hi all,    How can bind more than one element in the render method

[Lift] Re: How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
/lift:comet ### Thanks! Cheers, Neil On Dec 9, 12:49 am, Neil.Lv anim...@gmail.com wrote:   BTW, when the partialUpdate method is called , the result is correct.   But when refreshing the browser or open a new browser, the result also is 3, Cheers,   Neil On Dec 9, 12:44 am

[Lift] Re: How can bind more than one element in the render method in CometActor ?

2009-12-08 Thread Neil.Lv
it in your CometActor. Thanks, David On Tue, Dec 8, 2009 at 7:51 PM, Neil.Lv anim...@gmail.com wrote:  Whether I have to create six comet to archieve this purpose ?  I want to use only one comet to update the six parts.  The layouf is like this: ### part1             part2 part3

[Lift] Re: (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-07 Thread Neil.Lv
( localSetup: ) super.localSetup this ! Tick } override def lowPriority = { case Tick = { println( Tick ) foos = FooManager.getFoos reRender(false) ActorPing.schedule(this, Tick, 10 seconds) } } } case object Tick ### On Dec 7, 9:40 pm, Neil.Lv anim

[Lift] Re: (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-07 Thread Neil.Lv
Hi David, The demo is sent to you, please check it. Thanks ! Cheers, Neil On Dec 7, 10:26 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Mon, Dec 7, 2009 at 5:45 AM, Neil.Lv anim...@gmail.com wrote:   I think maybe it's a bug ~?   Btw, Does anybody know how to convert

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
= { // ## dbCalculateConnectionIdentifier case _ = Two } } ### I add the override def dbCalculateConnectionIdentifier method in every models But everytime it uses the database One, never uses the database Two. Thanks very much! Cheers, Neil On Dec 6, 3:02 pm, Neil.Lv anim...@gmail.com wrote

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Here is the db url, db.url1=jdbc:mysql://localhost:3306/blog1 db.url2=jdbc:mysql://localhost:3306/blog2 Cheers, Neil On Dec 6, 4:00 pm, Neil.Lv anim...@gmail.com wrote: In the Boot.scala ### class Boot {   def boot {     if (!DB.jndiJdbcConnAvailable_?)       DB.defineConnectionManager

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
don't want to use. You want to change this to use your 2 defined identifiers. Ie: DB.defineConnectionManager(OneDB, DBVendor) DB.defineConnectionManager(TwoDB, DBVendor) Tim On Sun, Dec 6, 2009 at 4:17 AM, Neil.Lv anim...@gmail.com wrote: Here is the db url, db.url1=jdbc:mysql

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
, DBVendor) Tim On Sun, Dec 6, 2009 at 4:17 AM, Neil.Lv anim...@gmail.com wrote: Here is the db url, db.url1=jdbc:mysql://localhost:3306/blog1 db.url2=jdbc:mysql://localhost:3306/blog2 Cheers,  Neil On Dec 6, 4:00 pm, Neil.Lv anim...@gmail.com wrote: In the Boot.scala

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
dbDefaultConnectionIdentifier Tim On Sun, Dec 6, 2009 at 6:01 AM, Neil.Lv anim...@gmail.com wrote:  If i remove the  DB.defineConnectionManager (DefaultConnectionIdentifier, DBVendor)  This error message occurs. ### java.lang.NullPointerException: Looking for Connection Identifier ConnectionIden

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
Thanks Tim, I have tried it in my code but it doesn't work yet! The lift version is: 1.1-M7 Scala Version is: 2.7.7 Cheers, Neil On Dec 6, 10:52 pm, Tim Nelson tnell...@gmail.com wrote: I did some more digging and got a sample app to work. You can see the code

[Lift] Re: How to configure two database connection in Lift?

2009-12-06 Thread Neil.Lv
It works now, I missing the dbDefaultConnectionIdentifier definition in the others models. Thank you very much! :) Cheers, Neil On Dec 7, 12:06 am, Neil.Lv anim...@gmail.com wrote:   Thanks Tim,   I have tried it in my code but it doesn't work yet!   The lift version is:  1.1-M7

[Lift] How to configure two database connection in Lift?

2009-12-05 Thread Neil.Lv
Hi all, I want to use two databases, but i don't know how to configure it. Does anybody know that how to configure two database connection in Lift? 1: I add two ConnectionIdentifier in the Boot.class ### object OneDB extends ConnectionIdentifier { def jndiName = one } object TwoDB

[Lift] Re: How to configure two database connection in Lift?

2009-12-05 Thread Neil.Lv
Btw, there is the error message when the server is started. ### scala.MatchError: ConnectionIdentifier(lift) ### On Dec 6, 1:47 pm, Neil.Lv anim...@gmail.com wrote: Hi all,   I want to use two databases, but i don't know how to configure it.   Does anybody know that how to configure two

[Lift] Re: How to configure two database connection in Lift?

2009-12-05 Thread Neil.Lv
The two databases that have different structure of the tables, such as two applications databases. Cheers, Neil On Dec 6, 2:38 pm, Neil.Lv anim...@gmail.com wrote:    Btw, there is the error message when the server is started. ### scala.MatchError: ConnectionIdentifier(lift

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-12-03 Thread Neil.Lv
...@gmail.com wrote: On Sun, Nov 29, 2009 at 12:17 AM, Neil.Lv anim...@gmail.com wrote: Hi all,   I want to redirecto to a specify URL like this /all_users when logged in successfully via the default link, http://localhost:8080/user_mgt/login  Is there a help method (i dont't find

[Lift] (Maybe it's a bug ?) About the Schedule's execute counts in the ActorComet

2009-12-03 Thread Neil.Lv
Hi all, Here is an example code that about the ActorComet. ### package com.liftcode.comet import net.liftweb._ import http._ import js._ import JsCmds._ import net.liftweb.common._ import net.liftweb.util._ import Helpers._ import net.liftweb.http._ import _root_.scala.xml._ import

[Lift] How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ?

2009-12-02 Thread Neil.Lv
Hi all, How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ? The document object created in Firefox when the mime type is application/xhtml+xml does not have the write() method. I have a script that need to use the document.write method in the lift

[Lift] Re: How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ?

2009-12-02 Thread Neil.Lv
for well-formedness of the xml. You should be able to use things like appendChild(). Regards Arthur On 2 Dez., 13:42, Neil.Lv anim...@gmail.com wrote: Hi all,    How to fix the bug in firefox that application/xhtml+xml doesn't have the write() method ?    The document object created

[Lift] How to use the ActorPing schedule ? in the lift .

2009-12-02 Thread Neil.Lv
Hi all, I want to query the records of the RMDBS every several minutes. Does use the ActorPing or something else to achieve this purpose ? Is there an example that about the ActorPing ? Thanks for any suggestion ! Cheers, Neil -- You received this message because you are

[Lift] Re: How to use the ActorPing schedule ? in the lift .

2009-12-02 Thread Neil.Lv
behaviour, just put a call to actor ping at the end of the Z method to reschedule it. That should be all you need. Cheers, Tim On 2 Dec 2009, at 16:39, Neil.Lv wrote: Hi all, I want to query the records of the RMDBS every several minutes. Does use the ActorPing or something else

[Lift] How to redirect to a specify url when logged in successfully?

2009-11-29 Thread Neil.Lv
Hi all, I want to redirecto to a specify URL like this /all_users when logged in successfully via the default link, http://localhost:8080/user_mgt/login Is there a help method (i dont't find it) to configure it? When i logged in successfully via /user_mgt/login link and redirect to the

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-11-29 Thread Neil.Lv
you can call S.redirectTo(/all_users) from your submit function. Br's, Marius On Nov 29, 10:17 am, Neil.Lv anim...@gmail.com wrote: Hi all,    I want to redirecto to a specify URL like this /all_users when logged in successfully via the default link,http://localhost:8080/user_mgt

[Lift] Re: How to redirect to a specify url when logged in successfully?

2009-11-29 Thread Neil.Lv
am, Neil.Lv anim...@gmail.com wrote: The /user_mgt/login link is supported by the Lift's User Module. Maybe can i override some method to change the param of the redirectTo method .? What's the DispatchPF that how to use it ? I haven't use the DispathPF yet!~ Thanks very

[Lift] Re: Building war for production mode.

2009-11-28 Thread Neil.Lv
it can find the jdbc:mysql driver) I don't know what's the problem with it . Thanks for any help! Cheers, Neil On Nov 28, 3:48 pm, Neil.Lv anim...@gmail.com wrote: I have the same issue, is add this statement into /home/jetty6/bin/ jetty.sh ###   echo JAVA_OPTIONS=-Drun.mode

[Lift] Re: Building war for production mode.

2009-11-28 Thread Neil.Lv
it can find the jdbc:mysql driver) I don't know what's the problem with it . Thanks for any help! Cheers, Neil On Nov 28, 3:48 pm, Neil.Lv anim...@gmail.com wrote: I have the same issue, is add this statement into /home/jetty6/bin/ jetty.sh ###   echo JAVA_OPTIONS=-Drun.mode

[Lift] Can't find the jdbc:mysql driver in Production Mode ?

2009-11-28 Thread Neil.Lv
Hi all, I have a silly question about the lift app that deployed on the Jetty server. Can't find the jdbc:mysql driver in Production Mode ? It will use the derby to instead of the mysql. But it works fine in the Development Mode. I will craete the derby file in the jetty folder.

Re: [Lift] Re: Can't find the jdbc:mysql driver in Production Mode ?

2009-11-28 Thread Neil.Lv
/ And the mode will be listed (or blank for development mode) On Sat, Nov 28, 2009 at 6:23 AM, Neil.Lv anim...@gmail.com wrote: I missing the production.default.props file in the /src/main/ resources/props folder I create a file named production.default.props(copy from default.props

[Lift] Re: Building war for production mode.

2009-11-28 Thread Neil.Lv
. On the production server I user Tomcat with -Drun.mode=production. I hope you get some ideas about my configuration. Leo On Nov 28, 11:02 am, Neil.Lv anim...@gmail.com wrote:   Now the lift app runs in the production mode, ###   put the JAVA_OPTIONS=-Drun.mode=production on the top, and it can

[Lift] Re: Building war for production mode.

2009-11-27 Thread Neil.Lv
I have the same issue, is add this statement into /home/jetty6/bin/ jetty.sh ### echo JAVA_OPTIONS=-Drun.mode=production /home/jetty6/bin/ jetty.sh ### then restart the jetty server, but it alwasy show the Development Mode information The requested page was not defined in your SiteMap, so

[Lift] Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-19 Thread Neil.Lv
Hi all, I have a silly question about the deploy. Which web container is recommended to use to deploy the Lift app ? Jetty or Tomcat ? I want to use the Comet to push the data in the app. * Apache + Tomcat ? * Apache + what ? * Nginx + what ? Thanks for any suggestion !

[Lift] Re: Jetty or Tomcat, Which web container is recommended to use to deploy the Lift app ?

2009-11-19 Thread Neil.Lv
If i use LVS + Nginx + Haproxy + Tomcat to deploy the app, Can it work with Apache at simultaneously ? Cheers, Neil On Nov 20, 9:35 am, Neil.Lv anim...@gmail.com wrote: Hi all,   I have a silly question about the deploy.   Which web container is recommended to use to deploy the Lift

[Lift] RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
Hi all, The RequestVar doesn't work in the Lift1.1-SNAPSHOT, The error message is: ### object creation impossible, since method testWasSet in trait AnyVarTrait of type (String)Boolean is not defined object currentItemVar extends RequestVar[Item]({ ### The code is : ### object

[Lift] Re: RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
... ? I use the RequestVar to save the item that will be edited in the edit page. Cheers, Neil On Nov 18, 12:42 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Nov 17, 2009 at 8:23 AM, Neil.Lv anim...@gmail.com wrote: Hi all, The RequestVar doesn't work in the Lift1.1-SNAPSHOT

[Lift] Re: RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
are missing. for artifact: demo.helloworld:helloworld:war:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2), scala-tools.org (http://scala-tools.org/repo-releases) ## Cheers, Neil On Nov 18, 9:34 am, Neil.Lv anim...@gmail.com wrote

[Lift] Re: RequestVar doesn't work in the Lift1.1-SNAPSHOT ?

2009-11-17 Thread Neil.Lv
idscala-tools.org.snapshots/id nameScala-Tools Maven2 Repository for Snapshots/name urlhttp://scala-tools.org/repo-snapshots/url snapshots/ /repository On Nov 17, 2009, at 9:32 PM, Neil.Lv wrote: When i delete all the repository file, then use mvn

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-15 Thread Neil.Lv
. This has been discussed a fair few times on the list if i remember rightly, so best off searching the archives if your not sure where to start. Cheers, Tim On 15 Nov 2009, at 04:16, Neil.Lv wrote:  I want to save the images to a directory, because this images will be used in the flash

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-15 Thread Neil.Lv
/ The war of the demo path: D:\tomcat_5.5.25\webapps\demo-1.0 So that how can i resolve this problem ? Cheers, Neil On Nov 15, 9:57 pm, Neil.Lv anim...@gmail.com wrote: Tim,   I'm not clear that how to do use the caching proxy and maps a URL to the dispatcher.   I didn't find the archive

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-15 Thread Neil.Lv
very much! Cheers, Neil On Nov 15, 11:10 pm, Neil.Lv anim...@gmail.com wrote: It try to deploy the war to the tomcat5.5.25, and the path is different. Use LiftRules.getResource(/images/) to get this information: In the dev box: -- Path:Full(file:/G:/project/demo/src/main/webapp

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
as an input stream - manipulate this code to take it however you need. Cheers, Tim On Nov 14, 7:55 am, Neil.Lv anim...@gmail.com wrote:   Here is some code , but it's wrong!   --  java.io.FileNotFoundException: \images\1.jpeg  if mime.startsWith(image/) = {   try{     var file: File

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
, Timothy Perrett timo...@getintheloop.eu wrote: Hmm, I guess you must be new to the JVM - you cant write a file inside a WAR file; it does not work like that. You'll need to write to a fully qualified path (as per my example). Cheers, tim On 14 Nov 2009, at 17:34, Neil.Lv wrote

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
).receiptMime(mime) // ( Array[Byte] that saved into database ) ### :) Thanks very much ! Cheers, Neil On Nov 15, 5:43 am, David Pollak feeder.of.the.be...@gmail.com wrote: On Sat, Nov 14, 2009 at 10:25 AM, Neil.Lv anim...@gmail.com wrote: Tim,  haha, yeah.  I use this code

[Lift] Re: How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-14 Thread Neil.Lv
I want to save the images to a directory, because this images will be used in the flash params. This file path will be used in the javascript code . ### var imag=new Array(); imag[3]=/images/01.jpg; ### Cheers, Neil On Nov 15, 12:05 pm, Neil.Lv anim...@gmail.com wrote: Hi all

[Lift] Is there a paginate plug in the lift ?

2009-11-13 Thread Neil.Lv
Hi all, Is there a paginate plug in the lift ? Just like the WillPaginate in the Rails. Thanks for any suggestion ! Cheers, Neil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this

[Lift] Re: How to specify the SELECT statement in the Mapper ?

2009-11-13 Thread Neil.Lv
, Nov 8, 2009 at 11:44 PM, Neil.Lv anim...@gmail.com wrote: Hi all,  There is some example code: ### SELECT id,  name, sex, created_at,  DAYOFWEEK(created_at,) as week, (CURRENT_DATE) as t FROM users WHERE created_at (CURRENT_DATE ) AND created_at (CURRENT_DATE + interval 2 day

[Lift] Re: How to specify the SELECT statement in the Mapper ?

2009-11-13 Thread Neil.Lv
of thing), instead of having the database do it for you. Use the database to store and retrieve data, not to perform calculations. -harryh On Nov 9, 1:44 am, Neil.Lv anim...@gmail.com wrote: Hi all,   There is some example code: ### SELECT id,  name, sex, created_at,  DAYOFWEEK

[Lift] How to save the uploaded image into the folder via fileUpload in Lift?

2009-11-13 Thread Neil.Lv
Hi all, How to save the uploaded image into the folder via fileUpload in Lift? I don't want to save it in the database, the example code in the Pocketchangeapp ### val receiptOk = fileHolder match { case Full(FileParamHolder(_, null, _, _)) = true case

[Lift] How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv
Hi all, How to Embed the flash dynamic in Snippet in the Lift? I use the swfobject to embed my flash and want to specify the flashVar dynamic, but this is doesn't work! Here is the code in the Snippet: The flashSrc can shown correctly in the index page, but the falshvar doesn't work!

[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv
,     object - Script(Run(script))   ) That should give you enough to work out what it is you need to do. Cheers, Tim On 12 Nov 2009, at 09:04, Neil.Lv wrote: Hi all,  How to Embed the flash dynamic in Snippet in the Lift?  I use the swfobject to embed my flash and want to specify

[Lift] Re: How to Embed the flash dynamic in Snippet in the Lift ?

2009-11-12 Thread Neil.Lv
, thus you need to escape them properly. Cheers, Tim On 12 Nov 2009, at 12:02, Neil.Lv wrote:  Why the flashSrc is a string in the Script ? Maybe it should be / flash/test.swf ? --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: About the localization with lift:loc !

2009-11-10 Thread Neil.Lv
, Nov 10, 2009 at 3:10 PM, Neil.Lv anim...@gmail.com wrote: yk, About the setLocale method in the demo ( http://219.94.110.243 ) 1:) First, I open the Firefox and type this link, i see the menu label is English. 2:) Second, I open the IE or other browser to view this page

[Lift] Re: About the localization with lift:loc !

2009-11-10 Thread Neil.Lv
are in the format en_US, not en_us... Lift is leveraging some base java localization and you have to stick to the rules :-) I'll try to reply in more detail later. Cheers, Tim Sent from my iPhone On 10 Nov 2009, at 08:19, Neil.Lv anim...@gmail.com wrote: Maybe the Locale.setDefault(iLocale

  1   2   >