[Lift] How to prevent OutOfMemory while compiling Lift project?

2009-06-09 Thread sailormoo...@gmail.com
Hi : When my project grows, it seems a mvn clean following a mvn test would generally causes OutOfMemoryException, even with a set MAVEN_OPTS=-Xms512M -Xmx1024M. I got this error : [WARNING] Exception in thread main java.lang.OutOfMemoryError: Java heap space [WARNING] at

[Lift] Re: How to prevent OutOfMemory while compiling Lift project?

2009-06-09 Thread sailormoo...@gmail.com
heap *-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC* enables the G1 garbage collector (this need the LATEST java update), which seems to be a bit faster. On Tue, Jun 9, 2009 at 4:14 PM, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Hi :   When my project grows, it seems

[Lift] Length too long for generated XML

2009-05-17 Thread sailormoo...@gmail.com
Hi: I would like to know if there is a way to insert a \n in the generated xml, for some NodeSeq seems too long to make Firefox error. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post

[Lift] What's the xms and xmx setting in Jetty?

2009-05-15 Thread sailormoo...@gmail.com
Hi : I would like to know what's the current setting of xms and xmx in mvn jetty:run ? And how to modify them? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send

[Lift] Re: What's the xms and xmx setting in Jetty?

2009-05-15 Thread sailormoo...@gmail.com
I checked it and it doesn't seem to mention any Java setting though. On 5月15日, 下午11時47分, Timothy Perrett timo...@getintheloop.eu wrote: Checkout the jetty plugin docs: http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin Cheers, Tim On 15/05/2009 16:32, sailormoo...@gmail.com

[Lift] Re: What's the xms and xmx setting in Jetty?

2009-05-15 Thread sailormoo...@gmail.com
can configure it as per normal jetty server. Cheers, Tim On 15/05/2009 16:54, sailormoo...@gmail.com sailormoo...@gmail.com wrote: I checked it and it doesn't seem to mention any Java setting though. On 5月15日, 下午11時47分, Timothy Perrett timo...@getintheloop.eu wrote: Checkout

[Lift] Jetty Session problem

2009-05-14 Thread sailormoo...@gmail.com
Hi : The Jetty server just happened a weird bug, some ppl seems to get into another ppl's session, as a logined user but it's another one's. I don't know why this would happen, anyone knows if there is a bug, or maybe some configuration should be made? Thanks.

[Lift] Re: Jetty Session problem

2009-05-14 Thread sailormoo...@gmail.com
Hi: It just happened once so I cannot tell exactly the reason. However from the logs it seems there is a wierd GET command with jsession id, while most of the commands aren't. Proxy Server? Is it in my configuration ? Or just they use the same proxy server?? And may I ask if I can

[Lift] Re: Constantly Ajax Request ?

2009-05-13 Thread sailormoo...@gmail.com
Hi Hi : Thanks for the answer but what's the LiftGC used for?? What's the difference between enabling it and disabling it ? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this

[Lift] Constantly Ajax Request ?

2009-05-12 Thread sailormoo...@gmail.com
Hi : I would like to know what's the constantly sending Ajax Request? Is it for the session keep alive?? Is there a way to disable it? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to

[Lift] Re: How to log exceptions?

2009-05-08 Thread sailormoo...@gmail.com
replace the RulesSeq[ExceptionHandlerPF] with your own or prepend a handler that will log exceptions. On Thu, May 7, 2009 at 7:44 AM, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Hi : Sometimes exceptions are shown in the pages, but at the same time, I wonder why they're

[Lift] Re: Mapping null field ?

2009-05-08 Thread sailormoo...@gmail.com
PM, sailormoo...@gmail.com sailormoo...@gmail.com wrote: Hello: I want to know how to check if a field is null. The code results in an error if (talk.actioner_id.is != null) {} I'm figuring talk.actioner_id is a MappedLongForeignKey... correct? If so, use

[Lift] Re: How to log exceptions?

2009-05-08 Thread sailormoo...@gmail.com
Thanks for the help. What I need might like this LiftRules.exceptionHandler.prepend { case (_, _, exception) = { Log.error(exception.getStackTrace.toString) RedirectResponse(/) } } --~--~-~--~~~---~--~~ You received this message

[Lift] How to log exceptions?

2009-05-07 Thread sailormoo...@gmail.com
Hi : Sometimes exceptions are shown in the pages, but at the same time, I wonder why they're not logged. May I ask how to make the exceptions auto-logged ?? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Lift] Mapping null field ?

2009-05-06 Thread sailormoo...@gmail.com
Hello: I want to know how to check if a field is null. The code results in an error if (talk.actioner_id.is != null) {} warning: comparing values of types Long and Null using `!=' will always yield true --~--~-~--~~~---~--~~ You received this message because

[Lift] Logging Exception

2009-05-03 Thread sailormoo...@gmail.com
Hello: I got an exception 2009-05-03 10:31:23.203::WARN: failed LiftFilter java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at net.liftweb.util.Slf4jLogBoot$.net$liftweb$util$Slf4jLogBoot $$_logger ByName(Slf4jLog.scala:59) while I added class Boot { def boot {

[Lift] Is there a bulk update function ?

2009-05-03 Thread sailormoo...@gmail.com
Hi : From the Lift Book, there is a bulk delete function. Expense.bulkDelete_!!(By_(Expense.dateOf, date)) However, I want a bulk update function, is there one or if I must to update it one by one? Thanks. --~--~-~--~~~---~--~~ You received this message

[Lift] Re: Customizing Javascript

2009-04-26 Thread sailormoo...@gmail.com
Here is the current solution. It's not clean, but I cannot think of better idea for the code. bind(entry, xhtml, js_realtimeoutput - script language=JavaScript{Unparsed (js_realtime_output(room_day, room))}/script) private def js_realtime_output(room_day: RoomDay, room: Room) : String =

[Lift] About Scala XML Manipulation

2009-04-26 Thread sailormoo...@gmail.com
Hi : I want to ask why the d/ won't appear in the following XML code. And if I want to make such effect ? the if is inside an outer tag following by a previous tag, how could I do ? Thanks scala brcs/{if(1==1) d/}/br res26: scala.xml.Elem = brcs/cs/br

[Lift] Re: Customizing Javascript

2009-04-26 Thread sailormoo...@gmail.com
Hi David : I think I need some really simple example, for example body onload=alert('%= alert_message %') Can you give me the detail how to make this ? It doesn't seem to work as body onload=alert('Lift:Alert.message / ') From the Liftbook, there are some advanced examples with Comet and

[Lift] Re: Binding Radio Button

2009-04-25 Thread sailormoo...@gmail.com
Oh...I think I found the reason...Thanks for the help The reason is in my code The binding to submit button is previous to binding to checkbox. if the order is changed...it would work correctly --~--~-~--~~~---~--~~ You received this message because you

[Lift] Re: **IMPORTANT** Lift 1.1-SNAPSHOT now compiled against Scala 2.7.4

2009-04-25 Thread sailormoo...@gmail.com
Hi : Can you detail what exactly needs to change ? --~--~-~--~~~---~--~~ 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

[Lift] Customizing Javascript

2009-04-25 Thread sailormoo...@gmail.com
Hello: I have a javascript that needs to get a parameter from a snippet, for example. starttime = new Date(entry:starttime /); This seems not to work, any idea how to make it? or if I should generate the entire javascript from the snippet to bind it into a single tag? Thanks

[Lift] Re: Binding Radio Button

2009-04-24 Thread sailormoo...@gmail.com
Thanks Timothy, but can you give an example of checkbox, because no matter what I try, the binding function of checkbox doesn't seem to be called when checkbox is set. I tried some trivious binding function, but it's no effect still. --~--~-~--~~~---~--~~ You

[Lift] Re: Binding Radio Button

2009-04-24 Thread sailormoo...@gmail.com
The example from the lift book doesn't work. Listing 4.4: A checkbox example SHtml.checkbox(false, if (_) frobnicate(), Full(snazzy), class - woohoo) and mine is bind(entry, xhtml, test_mode - SHtml.checkbox(false, if (_) option_list = option_list ::: List(FlagEnum.TEST_MODE),

[Lift] Re: Binding Radio Button

2009-04-24 Thread sailormoo...@gmail.com
I didn't get a compilation error, but the function in the checkbox (Boolean) = Any doesn't seem to be called bind(c,xhtml, checkbox - SHtml.checkbox(booleanThing, booleanThing = _) % (class - myCSSclass) ) As the example, booleanThing is always false no matter if I clicked the

[Lift] Re: Binding Radio Button

2009-04-22 Thread sailormoo...@gmail.com
Thanks for the help ^.^ And if I want the choices are dynamic, what should I do ? For example, there could be 3 radios, or maybe 5 radios. I still cannot understand the mechanism of lift, but may I make such binding? def example(xhtml: NodeSeq): NodeSeq = bind(entry, xhtml, radio - table{

[Lift] Re: Binding Radio Button

2009-04-22 Thread sailormoo...@gmail.com
Hello: And about the checkbox.. bind(entry, xhtml, test_mode - SHtml.checkbox(false, if (_) option_list = option_list ::: List(FlagEnum.TEST_MODE), id-test_mode)) I have a option_list of List[FlagEnum.Value] for saving the options (note : I have over 40 checkboxs), I am

[Lift] Binding Radio Button

2009-04-21 Thread sailormoo...@gmail.com
Hello: var sex = M val sex_map = Map(Male-M, Female-F) bind(entry, xhtml, sex - SHtml.radio(sex_map.keys.toList, Empty, sex = _), ) I don't know why I would get an exception like this: Thanks for the help [WARNING]

[Lift] Scala Exception

2009-04-20 Thread sailormoo...@gmail.com
Hi : need help for the following again. Thanks ^.^ [WARNING] Exception in thread main java.lang.RuntimeException: malformed Scala signature of Room at 12608; reference type _1 of none refers to nonexisting s ymbol. [WARNING] at scala.tools.nsc.symtab.classfile.UnPickler

[Lift] Re: Need Help with the RuntimeException

2009-04-14 Thread sailormoo...@gmail.com
And need help with this too... BufferUnderFlowException?? java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:398) at java.nio.HeapCharBuffer.get(HeapCharBuffer.java:117) at scala.io.BufferedSource$$anon$2.init(BufferedSource.scala:77) at

[Lift] Re: XML Creation

2009-04-13 Thread sailormoo...@gmail.com
I See...Thanks... and if I want 5 items a line does it work as follows? lift:MyTable.foo table tb:entries tr tdentry:name //td tdentry:name //td tdentry:name //td tdentry:name //td tdentry:name //td /tr /tb:entries /table /lift:MyTable.foo

[Lift] Re: XML Creation

2009-04-13 Thread sailormoo...@gmail.com
I wrote a zip function to group the list as follows: scala def zipListBySize[T](size: Int)(list: List[T]) : List[List[T]] = { | var (first, second) = list.splitAt(size) | if (second == Nil) | List(first) | else | List(first) ++ zipListBySize(size)(second)

[Lift] Re: Need Help with the RuntimeException

2009-04-13 Thread sailormoo...@gmail.com
Thanks but the mvn test still gives ambigulous exceptions. A filename and a line number would help more. java.util.NoSuchElementException at scala.RandomAccessSeq$$anon$13.next(RandomAccessSeq.scala:165) at scala.xml.parsing.MarkupParser$class.normalizeAttributeValue

[Lift] Need Help with the RuntimeException

2009-04-12 Thread sailormoo...@gmail.com
Hello: I've got this exception accessing one of the page, but I cannot find the reason ( and the runtime exception gives very ambigulous information). Can someone help to get the reason? Thanks. Message: java.lang.RuntimeException: FATAL scala.Predef$.error(Predef.scala:76)

[Lift] XML Creation

2009-04-12 Thread sailormoo...@gmail.com
Hello: Thanks for the previous answers of my questions. I would like to know how to make the following example work by Lift: ( I use the old style Java scriptlet for example ). table % for (int i = 0; i data.size(); i++) { % trtd%= data.name %/td/tr % } % /table I cannot find

[Lift] How to generate war file??

2009-04-06 Thread sailormoo...@gmail.com
Hi Hi : I am new to Lift and new to maven, I would just like to ask how to generate a war file to put it into the real server. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this