Re: [Lift] Javascript Dependencies

2010-02-24 Thread Mads Hartmann Jensen
I think it looks good - There also ticket 281 
(https://www.assembla.com/spaces/liftweb/tickets/281-feature-request---dynamic-sorting-of-javascript-(tags-and-files)-dependencies)
 which requests sorting of javascript dependencies. Maybe this could get worked 
into this solution too?

On 25/02/2010, at 00.57, Peter Robinett wrote:

> Hi all,
> 
> Following up on a previous thread about upgrading to Flot 0.6[1], I'd
> like to discuss how (or even whether) we handle Javascript
> dependencies within Lift. It'd be great to get this in as part of
> #322[2] for M3 next week but I acknowledge I've been slow pushing
> forward the discussion and that it may be a little tricky to get
> right. Hopefully with this discussion we can chart a good course.
> 
> The issue of Javascript plugins comes up because the Lift side may
> need to know about the additional Javascript files you're using. If
> nothing else, ResourceServe.allow needs to be called if you want to
> serve the Javascript file from within the Lift app. However, if you're
> setting up Javascript calls from Lift (such as with some Ajax or Comet
> functionality) you need to do a little more.
> 
> The current situation is the simplest: it is up to users to add the
> files to the ResourceServer in boot.scala and to add a script tag to
> their HTML output, whether in the document head or body. However,
> there are various parts of Lift, particularly in lift-widgets, that
> make use of additional Javascript files so it would be nice to have a
> common, perhaps more abstracted way of doing this.
> 
> Here's what I'm thinking:
> 
> // at net.liftweb.http.js or something similar
> class JsScript(path: List[String]) {
>   def baseUrl = ""
>   def allowResource = {
>   case path => true
>   }
>   def toHTML =  src={ path.mkString(baseUrl, "/", "") }>
> }
> 
> trait JsScriptDependency {
>   abstract def scripts: List[JsScript];
>   override lazy val fixedRender: Box[NodeSeq] =
> Some(super.fixedRender.getOrElse(scala.xml.Text("")) ++
> scripts.map(_.toHTML))
> }
> 
> // Usage in boot.scala
> val myJsScript = new JsScript("flot" :: "jquery.flot.selectable.js" ::
> Nil)
> ResourceServer.allow(myJsScript.allowResource)
> 
> // Usage in a normal snippet
> def mySnippet = {
>   
>   { myJsScript.toHTML }
>   
>   
>   The rest of the snippet...
>   
> }
> 
> // Usage in a CometActor
> class myActor extends CometActor with JsScriptDependency {
>   override def scripts = List(new JsScript("flot" ::
> "jquery.flot.selectable.js" :: Nil));
> }
> 
> What do you think? It's a really quite basic but I think such an
> approach could work well for things like as lift-flot.
> 
> Peter
> 
> [1]: 
> http://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55c181475/0d91f4aee1af8977
> [2]: 
> https://www.assembla.com/spaces/liftweb/tickets/322-upgrade-the-flot-lift-widget-to-0-6
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: This is the style of SQL persistence that I like ...

2010-02-24 Thread aw

On Feb 24, 12:47 pm, Jeppe Nejsum Madsen  wrote:
> We're currently using Rails migrations and I've been thinking if
> putting migrations into the app is really the right approach? What
> happens if migrations fail? It's not easy for the app itself to
> rollback to the previous version :-)

There is obviously a strong relationship between the code and the
database, especially when you are adding columns/fields to tables/
classes, so I like managing the code and database together.  But as
much as I like the DSL approach of Scala-Migrations, I'm sticking with
the richness of Liquibase:  http://liquibase.org/

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Problem with mapper exceptions and logging

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 1:01 PM, Jeppe Nejsum Madsen wrote:

> Hi,
>
> It seems that when a mapper exception is thrown and logging is enabled
> (with DB.addLogFunc) the logging proxy itself throws an error:
>
> This is unfortunate since it can lead to different code paths if
> logging is enabled or not.is this unfixable or should I file a
> ticket?
>

It's fixable.  Please file a ticket... ideally with a repro case or even a
test.


>
> java.lang.reflect.UndeclaredThrowableException: null
>at $Proxy0.executeQuery(Unknown Source)
>at
> net.liftweb.mapper.PostgreSqlDriver$$anonfun$performInsertWithGenKeys$2.apply(Driver.scala:267)
>at
> net.liftweb.mapper.PostgreSqlDriver$$anonfun$performInsertWithGenKeys$2.apply(Driver.scala:265)
>at
> net.liftweb.mapper.DB$$anonfun$runPreparedStatement$2.apply(DB.scala:548)
>at
> net.liftweb.mapper.DB$$anonfun$runPreparedStatement$2.apply(DB.scala:547)
>at net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:247)
>at net.liftweb.util.Helpers$.calcTime(Helpers.scala:34)
>at net.liftweb.mapper.DB$.runPreparedStatement(DB.scala:546)
>at net.liftweb.mapper.DB$.prepareStatement(DB.scala:489)
>at
> net.liftweb.mapper.PostgreSqlDriver$.performInsertWithGenKeys(Driver.scala:264)
>at net.liftweb.mapper.DriverType.performInsert(Driver.scala:81)
>at net.liftweb.mapper.MetaMapper$$anonfun$15.apply(MetaMapper.scala:743)
>at net.liftweb.mapper.MetaMapper$$anonfun$15.apply(MetaMapper.scala:688)
>at net.liftweb.mapper.DB$$anonfun$use$1.apply(DB.scala:570)
>at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:95)
>at net.liftweb.mapper.DB$currentConn$.run(DB.scala:557)
>at net.liftweb.mapper.DB$.use(DB.scala:567)
>at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:687)
>
> Caused by: java.lang.reflect.InvocationTargetException: null
>at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
>at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>at
> net.liftweb.mapper.DBLog$LoggedStatementHandler.chain(LoggingStatementWrappers.scala:330)
>at
> net.liftweb.mapper.DBLog$LoggedPreparedStatementHandler$$anonfun$invoke$68.apply(LoggingStatementWrappers.scala:394)
>at net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:247)
>at net.liftweb.util.Helpers$.calcTime(Helpers.scala:34)
>at
> net.liftweb.mapper.DBLog$class.logStatement(LoggingStatementWrappers.scala:53)
>at
> net.liftweb.mapper.DBLog$LoggedStatementHandler.logStatement(LoggingStatementWrappers.scala:110)
>at
> net.liftweb.mapper.DBLog$LoggedPreparedStatementHandler.invoke(LoggingStatementWrappers.scala:393)
>... 269 common frames omitted
> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key
> value violates unique constraint "contracts_unique"
>at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
>at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
>at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
>... 279 common frames omitted
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] RPC from Javascript/JQuery?

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 3:38 PM, Rick R  wrote:

> That works beautifully, thanks.
>
> With regards to using custom javascript functions,  I have a function
> processKeyPress. It's role is to filter key presses, only send events
> to the server upon certain key presses.
>
> I guess the easiest way to handle this would be to pass the function
> created by:
>  {jsonCall("pressed", JsRaw("event.which")).toJsCmd}
>

How about:

onkeypress={"processKeyPress(function(a) {"+jsonCall("pressed",
JsRaw("a")).toJsCmd+"})"}

This will pass a function to the processKeyPress method.  If you want to
send the message, you call the function with the value to send to the
server.


>
> into processKeyPress so that it can invoke it if the event.which is
> the correct type.
>
> Unfortunately, I can't come up with a way to describe this in inline XML.
>
> 
>
> leaving out the " causes a parse error.. adding the " cause it to be
> evaulated as a string.
>
> Any ideas?
>
>
>
> On Wed, Feb 24, 2010 at 2:57 PM, David Pollak
>  wrote:
> > Rick,
> >
> > Here's a simple example:
> >
> > import net.liftweb._
> > import util._
> > import http._
> > import js._
> > import JsCmds._
> > import JE._
> > import scala.xml.NodeSeq
> >
> > class Evently extends CometActor {
> >
> >   // handle an incoming JSON event
> >   override def handleJson(in: Any): JsCmd = in match {
> > case JsonCmd("pressed", _, key, _) => SetHtml("info", You pressed
> > {key})
> > case _ => Noop
> >   }
> >
> >   def render =
> >   
> >
> >   {
> > Script(jsonInCode) // include the JSON callback
> >   }
> > > JsRaw("event.which")).toJsCmd}/>
> >   
> > }
> >
> > So, the handleJson message gets called on the server whenever a key is
> > pressed on the client (this example works in non-IE browsers, but that's
> > just 'cause I'm using event.which rather than event.keyCode).
> >
> > Hope this helps.
> >
> > Thanks,
> >
> > David
> >
> >
> > On Wed, Feb 24, 2010 at 8:23 AM, Rick R 
> wrote:
> >>
> >> I have a textarea in which I process onKeyUp and onKeyDown commands.
> >> The handlers for such things are custom javascript.
> >> I would like to invoke functions in a Comet LiftActor /
> >> ListenerManager via these custom javascript functions. Is there
> >> documentation on the recommended way to do so?
> >>
> >> It looks like I will have to define the functions within a render call
> >> and use the SHtml.ajaxCall function, since the destination url is
> >> randomized.  I am just wondering what would be the idiomatic way to do
> >> this.
> >>
> >> This is for a chat style app which processes/distributes data by the
> >> keystroke rather than by a  line/post command.
> >>
> >>
> >> I'm open to any ideas / alternate suggestions.
> >>
> >> Thanks,
> >> Rick
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Lift" group.
> >> To post to this group, send email to lift...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> liftweb+unsubscr...@googlegroups.com
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/liftweb?hl=en.
> >>
> >
> >
> >
> > --
> > Lift, the simply functional web framework http://liftweb.net
> > Beginning Scala http://www.apress.com/book/view/1430219890
> > Follow me: http://twitter.com/dpp
> > Surf the harmonics
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> > http://groups.google.com/group/liftweb?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Liftweb and XHTML Strict 1.0

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 2:35 PM, Cliff Zhao  wrote:

> One of my project requirements is to be complaint with XHTML Strict 1.0.
>
> I have set the Lift to use XHTML Strict 1.0 and the Lift generates the
> page:
>  http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://liftweb.net/"; xmlns="http://www.w3.org/1999/xhtml
> ">
> 
> Cliff's Test
> 
> 
> 
> Hello world!
> 
> 
> http://liftweb.net/"; xmlns="http://www.w3.org/1999/xhtml";>
> 
> Comments
>  id="comments">ABC
> 
> 
> 
>  src="/survey/ajax_request/liftAjax.js">
> 
> //  jQuery(document).ready(function() {liftAjax.lift_successRegisterGC();});
> var lift_page = "F63599693221SZP";
> // ]]>
> 
> 
> It seems to be OK, but when I put them into W3C validator, it points out 1
> error:
>
> [image: Error] *Line 13, Column 43*: Attribute "xmlns" is not a valid
> attribute. Did you mean "onmouseup" or "onmouseover"?
>
> http://liftweb.net/"; xmlns=*"*http://www.w3.org/1999/xhtml";>
>
>  ✉ 
>
> You have used the attribute named above in your document, but the document
> type you are using does not support that attribute for this element. This
> error is often caused by incorrect use of the "Strict" document type with a
> document that uses frames (e.g. you must use the "Transitional" document
> type to get the "target" attribute), or by using vendor proprietary
> extensions such as "marginheight" (this is usually fixed by using CSS to
> achieve the desired effect instead).
>
> This error may also result if the element itself is not supported in the
> document type you are using, as an undefined element will have no supported
> attributes; in this case, see the element-undefined error message for
> further information.
>
> How to fix: check the spelling and case of the element and attribute,
> (Remember XHTML is all lower-case) and/or check that they are both allowed
> in the chosen document type, and/or use CSS instead of this attribute. If
> you received this error when using the  element to incorporate flash
> media in a Web page, see the FAQ item on valid 
> flash
> .
>
>
> My original code is:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml"; xmlns:lift="http://liftweb.net/
> ">
> 
> Cliff's Test
> 
> 
> Hello world!
> 
> 
> 
> Comments
> 
> 
> 
> 
> 
> 
> 
>
>
> Could anybody explain why one of the p tag added with namespace attributes?
>

What version of Lift are you using?


>
> Thank you very much.
>
> Best Regards,
> Cliff Zhao
>
>
>
>
>
>
>
>
>
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: Liftweb and javascript

2010-02-24 Thread Cliff Zhao
Thank you very much. I will try it tomorrow.

On Wed, Feb 24, 2010 at 7:00 PM, Naftoli Gugenheim wrote:

> LiftRules.enableLiftGC = false
> LiftRules.autoIncludeAjax = _ => false
>
> -
> Peter Robinett wrote:
>
> I believe you just need to turn off a garbage collection setting in
> boot.scala but if it's there I assume it's an app-wide setting...
>
> Peter
>
> On Feb 24, 1:46 pm, Cliff Zhao  wrote:
> > I am new to the Lift framework and currently trying to evaluate it.
> Canada
> > Government web sites need to comply with Government of Canada's Common
> Look
> > and Feel 2.0 standard. One of the requirments ia that the web site needs
> to
> > work with and WITHOUT javascript enabled.
> >
> > I tried with one simple form, I didn't use any javascript, while the view
> > page source showed that Lift generated some javascript code.
> >
> > My question is: Can I turn it off to make the generated page javascript
> > free?
> >
> > Thanks.
> >
> > Best Regards,
> > Cliff Zhao
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Is there any way to set default source encoding in Lift2.0-scala280 ?

2010-02-24 Thread Atsuhiko Yamanaka
Hi,

On Wed, Feb 3, 2010 at 11:00 AM, pomu0325  wrote:
> Hi, I'm quite a newbie to Lift. I'm now trying to port my first Lift
> application from Lift1.0.2 to latest Lift2.0-scala280, and faced a
> problem relating to source encoding.
...
>  My problem here, is I'm using utf-8 for write *.html templates, but
> my Codec.default is "MS932"(Japanese characterset in Windows), so
> failing to decode my template files. I looked through Scala lib
> source, and found out Codec.default it is actually an alias to
> java.lang.Charset.getDefault(), so I just set -Djava.encoding=utf-8 to
> MVN_OPTS and solved the problem, but considering deployment, I don't
> think it's a smart way.

FYI, the reported problem was fixed at last night, thanks to hseeberger,
as follows,
  http://www.assembla.com/spaces/liftweb/tickets/364
  http://github.com/dpp/liftweb/commit/4bfe8579c5283642c9c059b55f98236155f2d423


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
+1-415-578-3454
Skype callto://jcraft/
Twitter: @ymnk

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Hooking up custom login logic with ProtoUser's logUserIn and actionsAfterSignup

2010-02-24 Thread dave
On Feb 24, 11:09 am, dave  wrote:
> On Feb 24, 10:33 am, Jeppe Nejsum Madsen  wrote:
>
>
>
>
>
> > On Wed, Feb 24, 2010 at 7:21 PM, dave  wrote:
> > > Further investigation leads me to believe that each pathway is either
> > > working in a different session or that Lift just doesn't know about my
> > > application's session.
>
> > > S.inStatefulScope_? returns true from the Lift pathway and false from
> > > my own.
>
> > > I'll keep following this path, but, being a Lift newbie, any pointers
> > > or tips to speed me along would be appreciated.
>
> > What is "your own" path way? Is it a browser request or a request from
> > another servlet? If the latter, make sure you provide any session
> > cookies/url parameters needed to correctly propagate the container
> > session to lift.
>
> > This of course is also needed if it's a browser request, but if it's a
> > request within the same web app, this should be handled
> > automatically
>
> > /Jeppe
>
> Thanks Jeppe,
>
> The pathway that doesn't work is when trying to call logUserIn from my
> own non-Lift servlet.  We have the web.xml LiftFilter pointing to a
> subfolder that doesn't contain that servlet so it is not in the Lift
> session.
>
> I've just tried moving the LiftFilter to the full /* url-pattern
> (instead of the previous /subfolder/*) and setting
> LiftRules.passNotFoundToChain = true, but this is causing "Client did
> not send n bytes as expected" errors on the regular servlet.
>
> Prior to calling logUserIn from my servlet, is it possible to manually
> initialize Lift's S.session?  I see S.initIfUninitted, but where/how
> would I get a LiftSession?

Progress, but still having some trouble.

I've managed to sync up the Lift session with my Servlet session using
SessionMaster.getSession to load the existing LiftSession, but this
only works if I visit my http://domain.com/subfolder/user_mgt first,
causing Lift to automatically create the initial LiftSession.

If that session does not exist, I'm using LiftRules.sessionCreator to
create a new LiftSession with my Servlet session (as shown below).  In
theory I think this should work--when I visit /subfolder/user_mgt/* it
has the same session ID, but I think it may be creating a new
LiftSession instead of using the existing one because the curUserId is
Empty.

Any thoughts/tips?  Thanks!!


   val ls = SessionMaster.getSession(Request.session.getId, Empty)
   S.initIfUninitted(ls.openOr(LiftRules.sessionCreator(
  new provider.servlet.HTTPServletSession(Request.session), "")))
{
 User.logUserIn(user)
  }

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Liftweb and XHTML Strict 1.0

2010-02-24 Thread Cliff Zhao
One of my project requirements is to be complaint with XHTML Strict 1.0.

I have set the Lift to use XHTML Strict 1.0 and the Lift generates the page:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://liftweb.net/"; xmlns="http://www.w3.org/1999/xhtml";>

Cliff's Test



Hello world!


http://liftweb.net/"; xmlns="http://www.w3.org/1999/xhtml";>

Comments
ABC





// 


It seems to be OK, but when I put them into W3C validator, it points out 1
error:

[image: Error] *Line 13, Column 43*: Attribute "xmlns" is not a valid
attribute. Did you mean "onmouseup" or "onmouseover"?

http://liftweb.net/"; xmlns=*"*http://www.w3.org/1999/xhtml";>

✉ 

You have used the attribute named above in your document, but the document
type you are using does not support that attribute for this element. This
error is often caused by incorrect use of the "Strict" document type with a
document that uses frames (e.g. you must use the "Transitional" document
type to get the "target" attribute), or by using vendor proprietary
extensions such as "marginheight" (this is usually fixed by using CSS to
achieve the desired effect instead).

This error may also result if the element itself is not supported in the
document type you are using, as an undefined element will have no supported
attributes; in this case, see the element-undefined error message for
further information.

How to fix: check the spelling and case of the element and attribute,
(Remember XHTML is all lower-case) and/or check that they are both allowed
in the chosen document type, and/or use CSS instead of this attribute. If
you received this error when using the  element to incorporate flash
media in a Web page, see the FAQ item on valid
flash
.


My original code is:






































http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; xmlns:lift="http://liftweb.net/";>

Cliff's Test


Hello world!



Comments









Could anybody explain why one of the p tag added with namespace attributes?

Thank you very much.

Best Regards,
Cliff Zhao

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] RPC from Javascript/JQuery?

2010-02-24 Thread Rick R
That compiles, which is a great step. However, the resulting javascript is
onkeypress="processKeyPress(event.which, F379516302547JMS({'command':
"pressed", 'params':event.which});)"

so it's attempting to execute the F37...
also, I don't know if the semicolon is allowed inside the parens.

Is there a way I can pass the function pointer separate from its params?



On Wed, Feb 24, 2010 at 6:41 PM, Ross Mellgren  wrote:
>  jsonCall("pressed", JsRaw("event.which")).toJsCmd + ")" } />
>
> -Ross
>
> On Feb 24, 2010, at 6:38 PM, Rick R wrote:
>
>> That works beautifully, thanks.
>>
>> With regards to using custom javascript functions,  I have a function
>> processKeyPress. It's role is to filter key presses, only send events
>> to the server upon certain key presses.
>>
>> I guess the easiest way to handle this would be to pass the function created 
>> by:
>> {jsonCall("pressed", JsRaw("event.which")).toJsCmd}
>>
>> into processKeyPress so that it can invoke it if the event.which is
>> the correct type.
>>
>> Unfortunately, I can't come up with a way to describe this in inline XML.
>>
>> 
>>
>> leaving out the " causes a parse error.. adding the " cause it to be
>> evaulated as a string.
>>
>> Any ideas?
>>
>>
>>
>> On Wed, Feb 24, 2010 at 2:57 PM, David Pollak
>>  wrote:
>>> Rick,
>>>
>>> Here's a simple example:
>>>
>>> import net.liftweb._
>>> import util._
>>> import http._
>>> import js._
>>> import JsCmds._
>>> import JE._
>>> import scala.xml.NodeSeq
>>>
>>> class Evently extends CometActor {
>>>
>>>   // handle an incoming JSON event
>>>   override def handleJson(in: Any): JsCmd = in match {
>>>     case JsonCmd("pressed", _, key, _) => SetHtml("info", You pressed
>>> {key})
>>>     case _ => Noop
>>>   }
>>>
>>>   def render =
>>>   
>>>    
>>>   {
>>>     Script(jsonInCode) // include the JSON callback
>>>   }
>>>    >> JsRaw("event.which")).toJsCmd}/>
>>>   
>>> }
>>>
>>> So, the handleJson message gets called on the server whenever a key is
>>> pressed on the client (this example works in non-IE browsers, but that's
>>> just 'cause I'm using event.which rather than event.keyCode).
>>>
>>> Hope this helps.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>> On Wed, Feb 24, 2010 at 8:23 AM, Rick R  wrote:

 I have a textarea in which I process onKeyUp and onKeyDown commands.
 The handlers for such things are custom javascript.
 I would like to invoke functions in a Comet LiftActor /
 ListenerManager via these custom javascript functions. Is there
 documentation on the recommended way to do so?

 It looks like I will have to define the functions within a render call
 and use the SHtml.ajaxCall function, since the destination url is
 randomized.  I am just wondering what would be the idiomatic way to do
 this.

 This is for a chat style app which processes/distributes data by the
 keystroke rather than by a  line/post command.


 I'm open to any ideas / alternate suggestions.

 Thanks,
 Rick

 --
 You received this message because you are subscribed to the Google Groups
 "Lift" group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

>>>
>>>
>>>
>>> --
>>> Lift, the simply functional web framework http://liftweb.net
>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>> Follow me: http://twitter.com/dpp
>>> Surf the harmonics
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> liftweb+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/liftweb?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/liftweb?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: Liftweb and javascript

2010-02-24 Thread Naftoli Gugenheim
LiftRules.enableLiftGC = false
LiftRules.autoIncludeAjax = _ => false

-
Peter Robinett wrote:

I believe you just need to turn off a garbage collection setting in
boot.scala but if it's there I assume it's an app-wide setting...

Peter

On Feb 24, 1:46 pm, Cliff Zhao  wrote:
> I am new to the Lift framework and currently trying to evaluate it. Canada
> Government web sites need to comply with Government of Canada's Common Look
> and Feel 2.0 standard. One of the requirments ia that the web site needs to
> work with and WITHOUT javascript enabled.
>
> I tried with one simple form, I didn't use any javascript, while the view
> page source showed that Lift generated some javascript code.
>
> My question is: Can I turn it off to make the generated page javascript
> free?
>
> Thanks.
>
> Best Regards,
> Cliff Zhao

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Javascript Dependencies

2010-02-24 Thread Peter Robinett
Hi all,

Following up on a previous thread about upgrading to Flot 0.6[1], I'd
like to discuss how (or even whether) we handle Javascript
dependencies within Lift. It'd be great to get this in as part of
#322[2] for M3 next week but I acknowledge I've been slow pushing
forward the discussion and that it may be a little tricky to get
right. Hopefully with this discussion we can chart a good course.

The issue of Javascript plugins comes up because the Lift side may
need to know about the additional Javascript files you're using. If
nothing else, ResourceServe.allow needs to be called if you want to
serve the Javascript file from within the Lift app. However, if you're
setting up Javascript calls from Lift (such as with some Ajax or Comet
functionality) you need to do a little more.

The current situation is the simplest: it is up to users to add the
files to the ResourceServer in boot.scala and to add a script tag to
their HTML output, whether in the document head or body. However,
there are various parts of Lift, particularly in lift-widgets, that
make use of additional Javascript files so it would be nice to have a
common, perhaps more abstracted way of doing this.

Here's what I'm thinking:

// at net.liftweb.http.js or something similar
class JsScript(path: List[String]) {
def baseUrl = ""
def allowResource = {
case path => true
}
def toHTML = 
}

trait JsScriptDependency {
abstract def scripts: List[JsScript];
override lazy val fixedRender: Box[NodeSeq] =
Some(super.fixedRender.getOrElse(scala.xml.Text("")) ++
scripts.map(_.toHTML))
}

// Usage in boot.scala
val myJsScript = new JsScript("flot" :: "jquery.flot.selectable.js" ::
Nil)
ResourceServer.allow(myJsScript.allowResource)

// Usage in a normal snippet
def mySnippet = {

{ myJsScript.toHTML }


The rest of the snippet...

}

// Usage in a CometActor
class myActor extends CometActor with JsScriptDependency {
override def scripts = List(new JsScript("flot" ::
"jquery.flot.selectable.js" :: Nil));
}

What do you think? It's a really quite basic but I think such an
approach could work well for things like as lift-flot.

Peter

[1]: 
http://groups.google.com/group/liftweb/browse_thread/thread/a25a93f55c181475/0d91f4aee1af8977
[2]: 
https://www.assembla.com/spaces/liftweb/tickets/322-upgrade-the-flot-lift-widget-to-0-6

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Liftweb and javascript

2010-02-24 Thread Peter Robinett
I believe you just need to turn off a garbage collection setting in
boot.scala but if it's there I assume it's an app-wide setting...

Peter

On Feb 24, 1:46 pm, Cliff Zhao  wrote:
> I am new to the Lift framework and currently trying to evaluate it. Canada
> Government web sites need to comply with Government of Canada's Common Look
> and Feel 2.0 standard. One of the requirments ia that the web site needs to
> work with and WITHOUT javascript enabled.
>
> I tried with one simple form, I didn't use any javascript, while the view
> page source showed that Lift generated some javascript code.
>
> My question is: Can I turn it off to make the generated page javascript
> free?
>
> Thanks.
>
> Best Regards,
> Cliff Zhao

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] RPC from Javascript/JQuery?

2010-02-24 Thread Ross Mellgren


-Ross

On Feb 24, 2010, at 6:38 PM, Rick R wrote:

> That works beautifully, thanks.
> 
> With regards to using custom javascript functions,  I have a function
> processKeyPress. It's role is to filter key presses, only send events
> to the server upon certain key presses.
> 
> I guess the easiest way to handle this would be to pass the function created 
> by:
> {jsonCall("pressed", JsRaw("event.which")).toJsCmd}
> 
> into processKeyPress so that it can invoke it if the event.which is
> the correct type.
> 
> Unfortunately, I can't come up with a way to describe this in inline XML.
> 
> 
> 
> leaving out the " causes a parse error.. adding the " cause it to be
> evaulated as a string.
> 
> Any ideas?
> 
> 
> 
> On Wed, Feb 24, 2010 at 2:57 PM, David Pollak
>  wrote:
>> Rick,
>> 
>> Here's a simple example:
>> 
>> import net.liftweb._
>> import util._
>> import http._
>> import js._
>> import JsCmds._
>> import JE._
>> import scala.xml.NodeSeq
>> 
>> class Evently extends CometActor {
>> 
>>   // handle an incoming JSON event
>>   override def handleJson(in: Any): JsCmd = in match {
>> case JsonCmd("pressed", _, key, _) => SetHtml("info", You pressed
>> {key})
>> case _ => Noop
>>   }
>> 
>>   def render =
>>   
>>
>>   {
>> Script(jsonInCode) // include the JSON callback
>>   }
>>> JsRaw("event.which")).toJsCmd}/>
>>   
>> }
>> 
>> So, the handleJson message gets called on the server whenever a key is
>> pressed on the client (this example works in non-IE browsers, but that's
>> just 'cause I'm using event.which rather than event.keyCode).
>> 
>> Hope this helps.
>> 
>> Thanks,
>> 
>> David
>> 
>> 
>> On Wed, Feb 24, 2010 at 8:23 AM, Rick R  wrote:
>>> 
>>> I have a textarea in which I process onKeyUp and onKeyDown commands.
>>> The handlers for such things are custom javascript.
>>> I would like to invoke functions in a Comet LiftActor /
>>> ListenerManager via these custom javascript functions. Is there
>>> documentation on the recommended way to do so?
>>> 
>>> It looks like I will have to define the functions within a render call
>>> and use the SHtml.ajaxCall function, since the destination url is
>>> randomized.  I am just wondering what would be the idiomatic way to do
>>> this.
>>> 
>>> This is for a chat style app which processes/distributes data by the
>>> keystroke rather than by a  line/post command.
>>> 
>>> 
>>> I'm open to any ideas / alternate suggestions.
>>> 
>>> Thanks,
>>> Rick
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> liftweb+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/liftweb?hl=en.
>>> 
>> 
>> 
>> 
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Surf the harmonics
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] RPC from Javascript/JQuery?

2010-02-24 Thread Rick R
That works beautifully, thanks.

With regards to using custom javascript functions,  I have a function
processKeyPress. It's role is to filter key presses, only send events
to the server upon certain key presses.

I guess the easiest way to handle this would be to pass the function created by:
 {jsonCall("pressed", JsRaw("event.which")).toJsCmd}

into processKeyPress so that it can invoke it if the event.which is
the correct type.

Unfortunately, I can't come up with a way to describe this in inline XML.



leaving out the " causes a parse error.. adding the " cause it to be
evaulated as a string.

Any ideas?



On Wed, Feb 24, 2010 at 2:57 PM, David Pollak
 wrote:
> Rick,
>
> Here's a simple example:
>
> import net.liftweb._
> import util._
> import http._
> import js._
> import JsCmds._
> import JE._
> import scala.xml.NodeSeq
>
> class Evently extends CometActor {
>
>   // handle an incoming JSON event
>   override def handleJson(in: Any): JsCmd = in match {
>     case JsonCmd("pressed", _, key, _) => SetHtml("info", You pressed
> {key})
>     case _ => Noop
>   }
>
>   def render =
>   
>    
>   {
>     Script(jsonInCode) // include the JSON callback
>   }
>     JsRaw("event.which")).toJsCmd}/>
>   
> }
>
> So, the handleJson message gets called on the server whenever a key is
> pressed on the client (this example works in non-IE browsers, but that's
> just 'cause I'm using event.which rather than event.keyCode).
>
> Hope this helps.
>
> Thanks,
>
> David
>
>
> On Wed, Feb 24, 2010 at 8:23 AM, Rick R  wrote:
>>
>> I have a textarea in which I process onKeyUp and onKeyDown commands.
>> The handlers for such things are custom javascript.
>> I would like to invoke functions in a Comet LiftActor /
>> ListenerManager via these custom javascript functions. Is there
>> documentation on the recommended way to do so?
>>
>> It looks like I will have to define the functions within a render call
>> and use the SHtml.ajaxCall function, since the destination url is
>> randomized.  I am just wondering what would be the idiomatic way to do
>> this.
>>
>> This is for a chat style app which processes/distributes data by the
>> keystroke rather than by a  line/post command.
>>
>>
>> I'm open to any ideas / alternate suggestions.
>>
>> Thanks,
>> Rick
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Ross, if the coding doesn't work out for you, turn to marketing... "The cone of 
process": that my friend, is genius. "Thou who broke master must where thy cone 
on ye head until master be corrected!"

Cheers, Tim

On 24 Feb 2010, at 22:32, Ross Mellgren wrote:

> Wow, that is amazing. Now we know what the cone of (process) shame looks like!
> 
> -Ross
> 
> On Feb 24, 2010, at 3:36 PM, David Pollak wrote:
> 
>> 
>> 
>> On Wed, Feb 24, 2010 at 12:29 PM, Timothy Perrett  
>> wrote:
>> 
>> The mental image of you wearing a traffic cone on your head is a pleasing 
>> one David :-D
>> 
>> 
>> http://twitter.com/dpp/status/9591471689
>>  
>> Cheers, Tim
>> 
>> On 24 Feb 2010, at 20:20, David Pollak wrote:
>> 
>> > and those that circumvent that process (including me) should wear the cone 
>> > of shame.
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/liftweb?hl=en.
>> 
>> 
>> 
>> 
>> -- 
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Surf the harmonics
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/liftweb?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Ross Mellgren
Wow, that is amazing. Now we know what the cone of (process) shame looks like!

-Ross

On Feb 24, 2010, at 3:36 PM, David Pollak wrote:

> 
> 
> On Wed, Feb 24, 2010 at 12:29 PM, Timothy Perrett  
> wrote:
> 
> The mental image of you wearing a traffic cone on your head is a pleasing one 
> David :-D
> 
> 
> http://twitter.com/dpp/status/9591471689
>  
> Cheers, Tim
> 
> On 24 Feb 2010, at 20:20, David Pollak wrote:
> 
> > and those that circumvent that process (including me) should wear the cone 
> > of shame.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Liftweb and javascript

2010-02-24 Thread Cliff Zhao
I am new to the Lift framework and currently trying to evaluate it. Canada
Government web sites need to comply with Government of Canada's Common Look
and Feel 2.0 standard. One of the requirments ia that the web site needs to
work with and WITHOUT javascript enabled.

I tried with one simple form, I didn't use any javascript, while the view
page source showed that Lift generated some javascript code.

My question is: Can I turn it off to make the generated page javascript
free?

Thanks.

Best Regards,
Cliff Zhao

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Usage patterns for Scala traits

2010-02-24 Thread Alex Boisvert
On Wed, Feb 24, 2010 at 11:53 AM, Malte Schwerhoff <
mun123456...@googlemail.com> wrote:

> I am currently working on a research project in the context of my
> Master's at the ETH Zürich. The project's (long-term) goal is to develop
> a contract language (pre-, postconditions, invariants, the usual stuff)
> to be able to verify certain aspects of Scala traits.
>
> For starters, I'd like to exemplify typical patterns (or use-cases) of
> Scala traits. So far I have the "stackable modifications" pattern, the
> "interface enrichment" pattern (both taken from the "Programming in
> Scala" book [1]) and the "functionality extension" "pattern" as
> exemplified in [2] (p. 14, German document).
>

A simple pattern that I see often is hand-coded proxies / direct delegation,
e.g.

trait Store {
  def read(key: String): Any
  def write(key: String, value: Any): Unit
}

trait ActsLikeStore extends Store {
  val store: Store
  def read(key: String) = store.read(key)
  def write(key: String, value: Any) { store.write(key, value) }
}

I'm curious to hear where in the pattern landscape you'd classify Scala
2.8's collection traits like SeqLike, MapLike and such.

alex

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: This is the style of SQL persistence that I like ...

2010-02-24 Thread Timothy Perrett
Whilst I totally take that argument, more often than not I find migrations can 
be a useful aid.

Cheers, Tim

On 24 Feb 2010, at 20:47, Jeppe Nejsum Madsen wrote:

> That's true.
> 
> We're currently using Rails migrations and I've been thinking if
> putting migrations into the app is really the right approach? What
> happens if migrations fail? It's not easy for the app itself to
> rollback to the previous version :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Problem with mapper exceptions and logging

2010-02-24 Thread Jeppe Nejsum Madsen
Hi,

It seems that when a mapper exception is thrown and logging is enabled
(with DB.addLogFunc) the logging proxy itself throws an error:

This is unfortunate since it can lead to different code paths if
logging is enabled or not.is this unfixable or should I file a
ticket?

java.lang.reflect.UndeclaredThrowableException: null
at $Proxy0.executeQuery(Unknown Source)
at 
net.liftweb.mapper.PostgreSqlDriver$$anonfun$performInsertWithGenKeys$2.apply(Driver.scala:267)
at 
net.liftweb.mapper.PostgreSqlDriver$$anonfun$performInsertWithGenKeys$2.apply(Driver.scala:265)
at net.liftweb.mapper.DB$$anonfun$runPreparedStatement$2.apply(DB.scala:548)
at net.liftweb.mapper.DB$$anonfun$runPreparedStatement$2.apply(DB.scala:547)
at net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:247)
at net.liftweb.util.Helpers$.calcTime(Helpers.scala:34)
at net.liftweb.mapper.DB$.runPreparedStatement(DB.scala:546)
at net.liftweb.mapper.DB$.prepareStatement(DB.scala:489)
at 
net.liftweb.mapper.PostgreSqlDriver$.performInsertWithGenKeys(Driver.scala:264)
at net.liftweb.mapper.DriverType.performInsert(Driver.scala:81)
at net.liftweb.mapper.MetaMapper$$anonfun$15.apply(MetaMapper.scala:743)
at net.liftweb.mapper.MetaMapper$$anonfun$15.apply(MetaMapper.scala:688)
at net.liftweb.mapper.DB$$anonfun$use$1.apply(DB.scala:570)
at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:95)
at net.liftweb.mapper.DB$currentConn$.run(DB.scala:557)
at net.liftweb.mapper.DB$.use(DB.scala:567)
at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:687)

Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
net.liftweb.mapper.DBLog$LoggedStatementHandler.chain(LoggingStatementWrappers.scala:330)
at 
net.liftweb.mapper.DBLog$LoggedPreparedStatementHandler$$anonfun$invoke$68.apply(LoggingStatementWrappers.scala:394)
at net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:247)
at net.liftweb.util.Helpers$.calcTime(Helpers.scala:34)
at 
net.liftweb.mapper.DBLog$class.logStatement(LoggingStatementWrappers.scala:53)
at 
net.liftweb.mapper.DBLog$LoggedStatementHandler.logStatement(LoggingStatementWrappers.scala:110)
at 
net.liftweb.mapper.DBLog$LoggedPreparedStatementHandler.invoke(LoggingStatementWrappers.scala:393)
... 269 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key
value violates unique constraint "contracts_unique"
at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
... 279 common frames omitted

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: This is the style of SQL persistence that I like ...

2010-02-24 Thread Jeppe Nejsum Madsen
On Wed, Feb 24, 2010 at 9:38 PM, David Pollak
 wrote:
> I've pinged Max and he's open to integration with Lift... do I have any
> takers?
>
> On Wed, Feb 24, 2010 at 12:34 PM, Timothy Perrett 
> wrote:
>>
>> Interesting - i've not explored that in 2.8...
>>
>> Personally, i've been wanting to get scala-migrations
>
> I'm not keen on the migrations view of the world.  It's something that's not
> type-safe (there's nothing that verifies that your model objects have the
> same schema as the migrations).

That's true.

We're currently using Rails migrations and I've been thinking if
putting migrations into the app is really the right approach? What
happens if migrations fail? It's not easy for the app itself to
rollback to the previous version :-)

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: This is the style of SQL persistence that I like ...

2010-02-24 Thread David Pollak
I've pinged Max and he's open to integration with Lift... do I have any
takers?

On Wed, Feb 24, 2010 at 12:34 PM, Timothy Perrett
wrote:

> Interesting - i've not explored that in 2.8...
>
> Personally, i've been wanting to get scala-migrations


I'm not keen on the migrations view of the world.  It's something that's not
type-safe (there's nothing that verifies that your model objects have the
same schema as the migrations).


> integrated into
> the lift dev process for ages... this SQL project might be a great bed-
> fellow for it.
>
> 2.8 is becoming more attractive by the day...
>
> Cheers, Tim
>
> On Feb 24, 8:29 pm, Jim Barrows  wrote:
> > On Wed, Feb 24, 2010 at 1:27 PM, Timothy Perrett <
> timo...@getintheloop.eu>wrote:
> >
> > > Agreed - its nice. The var's are a little unsettling though... shame
> there
> > > is not a way to make it more immutable.
> >
> > Wouldn't the new copy functionality of case classes in 2.8 take care of
> > that?  I've been drooling over this and the migrations project combined
> > since marius posted this.
> >
> > Very cool stuff.
> >
> >
> >
> >
> >
> >
> >
> > > Cheers, Tim
> >
> > > On 24 Feb 2010, at 17:35, David Pollak wrote:
> >
> > > Yeah.  It's good stuff.  Would love to see it integrated with
> Mapper/Record
> > > (so it's not looking at var fields, but looking at the more complex
> objects
> > > that represent fields).
> >
> > > On Wed, Feb 24, 2010 at 9:33 AM, Marius 
> wrote:
> >
> > >> Maybe most of you have seen it:
> >
> > >>http://max-l.github.com/Squeryl/
> >
> > >> Br's,
> > >> Marius
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Lift" group.
> > >> To post to this group, send email to lift...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> liftweb+unsubscr...@googlegroups.com
> >
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/liftweb?hl=en.
> >
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Lift" group.
> > > To post to this group, send email to lift...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > liftweb+unsubscr...@googlegroups.com
> .
> > > For more options, visit this group at
> > >http://groups.google.com/group/liftweb?hl=en.
> >
> > >  --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Lift" group.
> > > To post to this group, send email to lift...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > liftweb+unsubscr...@googlegroups.com
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/liftweb?hl=en.
> >
> > --
> > James A Barrows
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 12:29 PM, Timothy Perrett
wrote:

>
> The mental image of you wearing a traffic cone on your head is a pleasing
> one David :-D
>
>
http://twitter.com/dpp/status/9591471689


> Cheers, Tim
>
> On 24 Feb 2010, at 20:20, David Pollak wrote:
>
> > and those that circumvent that process (including me) should wear the
> cone of shame.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: This is the style of SQL persistence that I like ...

2010-02-24 Thread Timothy Perrett
Interesting - i've not explored that in 2.8...

Personally, i've been wanting to get scala-migrations integrated into
the lift dev process for ages... this SQL project might be a great bed-
fellow for it.

2.8 is becoming more attractive by the day...

Cheers, Tim

On Feb 24, 8:29 pm, Jim Barrows  wrote:
> On Wed, Feb 24, 2010 at 1:27 PM, Timothy Perrett 
> wrote:
>
> > Agreed - its nice. The var's are a little unsettling though... shame there
> > is not a way to make it more immutable.
>
> Wouldn't the new copy functionality of case classes in 2.8 take care of
> that?  I've been drooling over this and the migrations project combined
> since marius posted this.
>
> Very cool stuff.
>
>
>
>
>
>
>
> > Cheers, Tim
>
> > On 24 Feb 2010, at 17:35, David Pollak wrote:
>
> > Yeah.  It's good stuff.  Would love to see it integrated with Mapper/Record
> > (so it's not looking at var fields, but looking at the more complex objects
> > that represent fields).
>
> > On Wed, Feb 24, 2010 at 9:33 AM, Marius  wrote:
>
> >> Maybe most of you have seen it:
>
> >>http://max-l.github.com/Squeryl/
>
> >> Br's,
> >> Marius
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Lift" group.
> >> To post to this group, send email to lift...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> liftweb+unsubscr...@googlegroups.com >>  >
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/liftweb?hl=en.
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+unsubscr...@googlegroups.com > >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> James A Barrows

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Jeppe Nejsum Madsen
[...]

> But, this is the exception (both in terms of my behavior and in terms of the
> results.)  It is an event that indicates that our current process works and
> those that circumvent that process (including me) should wear the cone of
> shame.

Pictures??

:-)

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] This is the style of SQL persistence that I like ...

2010-02-24 Thread Jim Barrows
On Wed, Feb 24, 2010 at 1:27 PM, Timothy Perrett wrote:

> Agreed - its nice. The var's are a little unsettling though... shame there
> is not a way to make it more immutable.
>

Wouldn't the new copy functionality of case classes in 2.8 take care of
that?  I've been drooling over this and the migrations project combined
since marius posted this.

Very cool stuff.


>
> Cheers, Tim
>
> On 24 Feb 2010, at 17:35, David Pollak wrote:
>
> Yeah.  It's good stuff.  Would love to see it integrated with Mapper/Record
> (so it's not looking at var fields, but looking at the more complex objects
> that represent fields).
>
> On Wed, Feb 24, 2010 at 9:33 AM, Marius  wrote:
>
>> Maybe most of you have seen it:
>>
>>
>> http://max-l.github.com/Squeryl/
>>
>>
>> Br's,
>> Marius
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
James A Barrows

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett

The mental image of you wearing a traffic cone on your head is a pleasing one 
David :-D

Cheers, Tim

On 24 Feb 2010, at 20:20, David Pollak wrote:

> and those that circumvent that process (including me) should wear the cone of 
> shame.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] This is the style of SQL persistence that I like ...

2010-02-24 Thread Timothy Perrett
Agreed - its nice. The var's are a little unsettling though... shame there is 
not a way to make it more immutable. 

Cheers, Tim

On 24 Feb 2010, at 17:35, David Pollak wrote:

> Yeah.  It's good stuff.  Would love to see it integrated with Mapper/Record 
> (so it's not looking at var fields, but looking at the more complex objects 
> that represent fields).
> 
> On Wed, Feb 24, 2010 at 9:33 AM, Marius  wrote:
> Maybe most of you have seen it:
> 
> 
> http://max-l.github.com/Squeryl/
> 
> 
> Br's,
> Marius
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 12:12 PM, Timothy Perrett
wrote:

> Right - I just want to add to what David wrote below: To clarify, yes, I
> moaned and bitched


And rightfully so.  You had every reason to complain about an instability
that I introduced because I didn't think through the ramifications of my
changes, I didn't write tests, and I didn't go through review board.

But, this is the exception (both in terms of my behavior and in terms of the
results.)  It is an event that indicates that our current process works and
those that circumvent that process (including me) should wear the cone of
shame.


> about this today because it was causing me immediate hassle and heat from
> other people in my workplace. However, Lift on the whole is vastly more
> stable than any codebase i've ever worked with (commercial or otherwise) -
> for that very reason I deploy from master without issue. 98% of the time,
> having this issue fixed in under 12 hours would be more than perfect, it was
> just the case in this instance that I needed it done like yesterday ;-)
>
> In no way should people read this thread and think that Lift is unstable.
> Its not. Period.
>
> Lift has an awesome community and is a rockin' product.
>
> Cheers, Tim
>
>
> On 24 Feb 2010, at 18:51, David Pollak wrote:
>
> > Just to be clear, the Lift team has a particularly stellar record of
> keeping the master development branch stable.  In the instant case, the
> master branch was unstable for about 10 hours.  The last time the master
> branch was not stable was more than 60 days ago and the instability in that
> case also lasted for < 12 hours.  I deploy most of my projects against
> master... as apparently does Tim.  I have not participated in a project,
> commercial or open source, where the main development branch (call it
> master, head, edge, etc.) has been as stable as it is in Lift.
> >
> > So, I don't think we need additional QA.  I think the existing processes
> work just fine.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Right - I just want to add to what David wrote below: To clarify, yes, I moaned 
and bitched about this today because it was causing me immediate hassle and 
heat from other people in my workplace. However, Lift on the whole is vastly 
more stable than any codebase i've ever worked with (commercial or otherwise) - 
for that very reason I deploy from master without issue. 98% of the time, 
having this issue fixed in under 12 hours would be more than perfect, it was 
just the case in this instance that I needed it done like yesterday ;-) 

In no way should people read this thread and think that Lift is unstable. Its 
not. Period. 

Lift has an awesome community and is a rockin' product. 

Cheers, Tim


On 24 Feb 2010, at 18:51, David Pollak wrote:

> Just to be clear, the Lift team has a particularly stellar record of keeping 
> the master development branch stable.  In the instant case, the master branch 
> was unstable for about 10 hours.  The last time the master branch was not 
> stable was more than 60 days ago and the instability in that case also lasted 
> for < 12 hours.  I deploy most of my projects against master... as apparently 
> does Tim.  I have not participated in a project, commercial or open source, 
> where the main development branch (call it master, head, edge, etc.) has been 
> as stable as it is in Lift.
> 
> So, I don't think we need additional QA.  I think the existing processes work 
> just fine.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] RPC from Javascript/JQuery?

2010-02-24 Thread David Pollak
Rick,

Here's a simple example:

import net.liftweb._
import util._
import http._
import js._
import JsCmds._
import JE._
import scala.xml.NodeSeq

class Evently extends CometActor {

  // handle an incoming JSON event
  override def handleJson(in: Any): JsCmd = in match {
case JsonCmd("pressed", _, key, _) => SetHtml("info", You pressed
{key})
case _ => Noop
  }

  def render =
  
   
  {
Script(jsonInCode) // include the JSON callback
  }
   
  
}

So, the handleJson message gets called on the server whenever a key is
pressed on the client (this example works in non-IE browsers, but that's
just 'cause I'm using event.which rather than event.keyCode).

Hope this helps.

Thanks,

David


On Wed, Feb 24, 2010 at 8:23 AM, Rick R  wrote:

> I have a textarea in which I process onKeyUp and onKeyDown commands.
> The handlers for such things are custom javascript.
> I would like to invoke functions in a Comet LiftActor /
> ListenerManager via these custom javascript functions. Is there
> documentation on the recommended way to do so?
>
> It looks like I will have to define the functions within a render call
> and use the SHtml.ajaxCall function, since the destination url is
> randomized.  I am just wondering what would be the idiomatic way to do
> this.
>
> This is for a chat style app which processes/distributes data by the
> keystroke rather than by a  line/post command.
>
>
> I'm open to any ideas / alternate suggestions.
>
> Thanks,
> Rick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Usage patterns for Scala traits

2010-02-24 Thread Malte Schwerhoff
Hi everybody,

I am currently working on a research project in the context of my
Master's at the ETH Zürich. The project's (long-term) goal is to develop
a contract language (pre-, postconditions, invariants, the usual stuff)
to be able to verify certain aspects of Scala traits.

For starters, I'd like to exemplify typical patterns (or use-cases) of
Scala traits. So far I have the "stackable modifications" pattern, the
"interface enrichment" pattern (both taken from the "Programming in
Scala" book [1]) and the "functionality extension" "pattern" as
exemplified in [2] (p. 14, German document).

I already went through a lot of tutorials and small projects and I am
going to have a closer look at the Scala Compiler and at Lift.
However, I would be grateful for any hint where to look for typical
and/or interesting uses of traits. Of course, complete examples are more
than welcome :-)

Best regards
Malte

P.S. I cross-posted this mail to the Lift, Scala and Scala-Users mailing
list. I hope nobody takes offense at this.

[1] http://www.artima.com/shop/programming_in_scala
[2] pp.info.uni-karlsruhe.de/lehre/SS2009/foo/Kapitel14.pdf

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Advice for maintaining application state

2010-02-24 Thread tiro
not sure if I posted the link: 
http://groups.google.com/group/liftweb/browse_thread/thread/69898fb5191a074d

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Advice for maintaining application state

2010-02-24 Thread tiro
Hi,

I had a similar discussion on this list a while ago.

http://groups.google.com/group/liftweb/browse_thread/thread/69898fb5191a074d

I haven't found THE idiomatic answer in Lift. For now I'm using
StatefulSnippets for the more complex cases; they work quite well.
SessionVars are almost always a bad idea IMHO. For the simple cases I
pass URL parameters around.
The thing to remember is that the StatefulSnippet lifecycle is held
together only by hidden fields whose value is posted back (as
explained in the Lift book). So the user can easily work with
different state sets (StatefulSnippets) in parallel on different tabs.

Best wishes,

Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Lift security vulnerability

2010-02-24 Thread Dano
The recent scala days conference activity may have cause the updates
to this thread to escape notice.  Just wondering if there is concern
about the remaining binary character problems I noted in my prior
post.

Thanks in advance.


Dan

On Feb 22, 1:34 pm, Dano  wrote:
> More information on this in case anyone is interested.  If you go to
> the lift demo website, it appears the issue with characters is mostly
> addressed except for the "Misc code" section.   Specifically, the
> "Wizard", "Wizard Challenge" and "Arc Challenge #1" examples will
> generate XML parsing errors.
>
> For these problems, I am not sure if the issue if the example or the
> framework.  If the issue is with the example, it would be good to know
> what Lift apps need to do to avoid getting bitten by binary characters
> entered into form fields.
>
> Thanks in advance.
>
> Dan
>
> On Feb 17, 11:06 am, Dano  wrote:
>
>
>
> > Hello,
>
> > I was wondering if the fix for the control characters issue was
> > included in 2.0-M2.  I just did a test with our Lift application built
> > with 2.0-M2 and I am still seeing problems (i.e. javascript exceptions
> > - NS_ERROR_INVALID_POINTER).
>
> > Thanks in advance.
>
> > Dan
>
> > On Feb 3, 9:08 am, David Pollak  wrote:
>
> > > Thanks for pointing that out.  There are other problems as well... I'll 
> > > fix
> > > them (in both the Scala and Lift diffs)
>
> > > On Wed, Feb 3, 2010 at 7:39 AM, Feng Zhang  wrote:
> > > > I found that in the fix, \n is changed to \t, while \t to \n. Is this
> > > > desired behavior?
>
> > > > Thank you,
>
> > > > Feng
>
> > > > On Wed, Feb 3, 2010 at 9:20 AM, Indrajit Raychaudhuri 
> > > >  > > > > wrote:
>
> > > >> 1. Fix in head/master (2.0-SNAPSHOT) and prepone 2.0-M2.
>
> > > >> 2. Backport in 1.0.x branch and spin 1.0.4. We haven't marked 1.0.x
> > > >> 'unsupported' yet. Forcing apps to move to 2.0-M2 just for this
> > > >> vulnerability fix isn't fun.
>
> > > >> Cheers, Indrajit
>
> > > >> On 03/02/10 3:34 PM, Timothy Perrett wrote:
>
> > > >>> +1
>
> > > >>> Fix it in head, no need to back-port; M2 is only around the corner.
>
> > > >>> Cheers, Tim
>
> > > >>> On 3 Feb 2010, at 09:49, Jeppe Nejsum Madsen wrote:
>
> > > >>>  David Pollak  writes:
>
> > >   I'd like to get a sense of how important the community views this
> > > > defect.
> > > > Is it a "backport the fix to every milestone and release yesterday" 
> > > > or
> > > > is it
> > > > a "fix it in 2.0-M2" or someplace in between.
>
> > >  For me, it's fix it in 2.0-SNAPSHOT
>
> > >  /Jeppe
>
> > >  --
> > >  You received this message because you are subscribed to the Google
> > >  Groups "Lift" group.
> > >  To post to this group, send email to lift...@googlegroups.com.
> > >  To unsubscribe from this group, send email to
> > >  liftweb+unsubscr...@googlegroups.com > >   >
> > >  .
> > >  For more options, visit this group at
> > > http://groups.google.com/group/liftweb?hl=en.
>
> > > >> --
> > > >> You received this message because you are subscribed to the Google 
> > > >> Groups
> > > >> "Lift" group.
> > > >> To post to this group, send email to lift...@googlegroups.com.
> > > >> To unsubscribe from this group, send email to
> > > >> liftweb+unsubscr...@googlegroups.com > > >>  >
> > > >> .
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/liftweb?hl=en.
>
> > > >  --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups
> > > > "Lift" group.
> > > > To post to this group, send email to lift...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > liftweb+unsubscr...@googlegroups.com > > >  >
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/liftweb?hl=en.
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] *Minor breaking change* - issue #363

2010-02-24 Thread Naftoli Gugenheim
Lift-anounce? :)

-
Marius wrote:

Folks,

The ability to specify the JQuery version was changed from:


LiftRules.jQueryVersion = ...

to

LiftRules.jsArtifacts = JQuery14Artifacts // this points to JQuery
1.4.2.

By default this points to JQuery13Artifacts which points to jQuery
1.3.2

Br's,
Marius

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Hooking up custom login logic with ProtoUser's logUserIn and actionsAfterSignup

2010-02-24 Thread dave

On Feb 24, 10:33 am, Jeppe Nejsum Madsen  wrote:
> On Wed, Feb 24, 2010 at 7:21 PM, dave  wrote:
> > Further investigation leads me to believe that each pathway is either
> > working in a different session or that Lift just doesn't know about my
> > application's session.
>
> > S.inStatefulScope_? returns true from the Lift pathway and false from
> > my own.
>
> > I'll keep following this path, but, being a Lift newbie, any pointers
> > or tips to speed me along would be appreciated.
>
> What is "your own" path way? Is it a browser request or a request from
> another servlet? If the latter, make sure you provide any session
> cookies/url parameters needed to correctly propagate the container
> session to lift.
>
> This of course is also needed if it's a browser request, but if it's a
> request within the same web app, this should be handled
> automatically
>
> /Jeppe

Thanks Jeppe,

The pathway that doesn't work is when trying to call logUserIn from my
own non-Lift servlet.  We have the web.xml LiftFilter pointing to a
subfolder that doesn't contain that servlet so it is not in the Lift
session.

I've just tried moving the LiftFilter to the full /* url-pattern
(instead of the previous /subfolder/*) and setting
LiftRules.passNotFoundToChain = true, but this is causing "Client did
not send n bytes as expected" errors on the regular servlet.

Prior to calling logUserIn from my servlet, is it possible to manually
initialize Lift's S.session?  I see S.initIfUninitted, but where/how
would I get a LiftSession?

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Ross Mellgren
I personally think having some mostly uncomplicated web apps (PocketChange 
style) and some end-to-end tests using those in the repository would be 
extremely valuable -- shakes out bugs that nobody expected to occur (such as 
this one) and serves as a known-working example.

-Ross

On Feb 24, 2010, at 1:51 PM, David Pollak wrote:
> On Wed, Feb 24, 2010 at 10:42 AM, Raoul Duke  wrote:
> On Wed, Feb 24, 2010 at 10:42 AM, Raoul Duke  wrote:
> > imho a high-level test is way more useful for determining if the
> > system is basically working, because it is so end-to-end; no, it
> > doesn't tell you precisely what to fix like a unit test would, but the
> > code-written-to-code-covered ratio is much better for high-level
> > system tests than it is for unit tests.
> 
> in other words: are there any 'professional' Test/QA (note those are
> different roles!) people on the Lift team/list?
> 
> Just to be clear, the Lift team has a particularly stellar record of keeping 
> the master development branch stable.  In the instant case, the master branch 
> was unstable for about 10 hours.  The last time the master branch was not 
> stable was more than 60 days ago and the instability in that case also lasted 
> for < 12 hours.  I deploy most of my projects against master... as apparently 
> does Tim.  I have not participated in a project, commercial or open source, 
> where the main development branch (call it master, head, edge, etc.) has been 
> as stable as it is in Lift.
> 
> So, I don't think we need additional QA.  I think the existing processes work 
> just fine.
>  
> 
> sincerely.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Raoul Duke
On Wed, Feb 24, 2010 at 10:51 AM, David Pollak
 wrote:
>> in other words: are there any 'professional' Test/QA (note those are
>> different roles!) people on the Lift team/list?
> So, I don't think we need additional QA.  I think the existing processes
> work just fine.

very good to hear it is so stable!

sincerely.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] *Minor breaking change* - issue #363

2010-02-24 Thread Marius
Folks,

The ability to specify the JQuery version was changed from:


LiftRules.jQueryVersion = ...

to

LiftRules.jsArtifacts = JQuery14Artifacts // this points to JQuery
1.4.2.

By default this points to JQuery13Artifacts which points to jQuery
1.3.2

Br's,
Marius

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 10:42 AM, Raoul Duke  wrote:

> On Wed, Feb 24, 2010 at 10:42 AM, Raoul Duke  wrote:
> > imho a high-level test is way more useful for determining if the
> > system is basically working, because it is so end-to-end; no, it
> > doesn't tell you precisely what to fix like a unit test would, but the
> > code-written-to-code-covered ratio is much better for high-level
> > system tests than it is for unit tests.
>
> in other words: are there any 'professional' Test/QA (note those are
> different roles!) people on the Lift team/list?
>

Just to be clear, the Lift team has a particularly stellar record of keeping
the master development branch stable.  In the instant case, the master
branch was unstable for about 10 hours.  The last time the master branch was
not stable was more than 60 days ago and the instability in that case also
lasted for < 12 hours.  I deploy most of my projects against master... as
apparently does Tim.  I have not participated in a project, commercial or
open source, where the main development branch (call it master, head, edge,
etc.) has been as stable as it is in Lift.

So, I don't think we need additional QA.  I think the existing processes
work just fine.


>
> sincerely.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Heiko Seeberger
On 24 February 2010 18:40, David Pollak wrote:

>
> In the case of Heiko's issue, it's already been reported by a Japanese user
> of Lift 280_port_refresh.  The 2.8 libraries take an optional parameter for
> character set and default to the platform character set.  We need a ticket
> on this issue with a repro case so we can build a test and build a fix.
>

Fixed and on review board: http://reviewboard.liftweb.net/r/241/

Heiko

Company: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Raoul Duke
On Wed, Feb 24, 2010 at 10:42 AM, Raoul Duke  wrote:
> imho a high-level test is way more useful for determining if the
> system is basically working, because it is so end-to-end; no, it
> doesn't tell you precisely what to fix like a unit test would, but the
> code-written-to-code-covered ratio is much better for high-level
> system tests than it is for unit tests.

in other words: are there any 'professional' Test/QA (note those are
different roles!) people on the Lift team/list?

sincerely.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Raoul Duke
On Wed, Feb 24, 2010 at 10:38 AM, Jeppe Nejsum Madsen  wrote:
> This is no replacement for unit tests, but is more a lightweight
> integration test that exercises a big part of the Lift stack

imho a high-level test is way more useful for determining if the
system is basically working, because it is so end-to-end; no, it
doesn't tell you precisely what to fix like a unit test would, but the
code-written-to-code-covered ratio is much better for high-level
system tests than it is for unit tests.

sincerely.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Jeppe Nejsum Madsen
On Wed, Feb 24, 2010 at 6:34 PM, Timothy Perrett
 wrote:
> Thanks for the follow up David. Probably this highlights some issues with our 
> automated testing though... any ideas on how we could add something to the 
> build cycle to verify stuff like this? The parsers particularly probably 
> could do with some pretty rigours test cases as this is a classic example... 
> on a related note, Heiko just found a strange character encoding bug with 2.8 
> and XML; having more test cases will help us keep consistency during the 
> porting.
>
> Cheers, Tim

It could be nice if it was possible to simulate browser
request/response cycles. This would allow very high level tests to be
made without the need of a running container/browser etc.

This is no replacement for unit tests, but is more a lightweight
integration test that exercises a big part of the Lift stack

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Hooking up custom login logic with ProtoUser's logUserIn and actionsAfterSignup

2010-02-24 Thread Jeppe Nejsum Madsen
On Wed, Feb 24, 2010 at 7:21 PM, dave  wrote:
> Further investigation leads me to believe that each pathway is either
> working in a different session or that Lift just doesn't know about my
> application's session.
>
> S.inStatefulScope_? returns true from the Lift pathway and false from
> my own.
>
> I'll keep following this path, but, being a Lift newbie, any pointers
> or tips to speed me along would be appreciated.

What is "your own" path way? Is it a browser request or a request from
another servlet? If the latter, make sure you provide any session
cookies/url parameters needed to correctly propagate the container
session to lift.

This of course is also needed if it's a browser request, but if it's a
request within the same web app, this should be handled
automatically

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Hooking up custom login logic with ProtoUser's logUserIn and actionsAfterSignup

2010-02-24 Thread dave
Further investigation leads me to believe that each pathway is either
working in a different session or that Lift just doesn't know about my
application's session.

S.inStatefulScope_? returns true from the Lift pathway and false from
my own.

I'll keep following this path, but, being a Lift newbie, any pointers
or tips to speed me along would be appreciated.

Thanks!
dave


On Feb 23, 2:47 pm, dave  wrote:
> Hello,
>
> I'm working on an application that has until now primarily used Lift
> for the mapper framework (1.1-M8).  This includes us extending Meta/
> MegaProtoUser to get the basic user account functionality while
> rolling our own servlets and front-end client (not using Lift).
>
> Now we want to make use of the Lift ProtoUser views and functionality
> for reset password, lost password, etc.  I've tried including calls to
> User.actionsAfterSignup and User.logUserIn from our own signup/signin
> service methods so that those included forms will be in-sync with the
> login status of our application.
>
> The problem is that calls to logUserIn and actionsAfterSignup don't
> appear to do anything.  User.currentUserId is always Empty and
> navigating to the /user_mgt/login page does not redirect as if the
> user is logged in, unless I specifically login through those created
> pages.
>
> How can I hook our own signup/signin logic up to be in sync with the
> ProtoUser functionality?
>
> Thanks for any pointers!!
> dave
>
> For example, our signup/signin service methods went something like
> (simplified):
>
> def signUp(...) = {
>   val user = User.create.email(email).password(password)
>   user.validate match {
>     // ok to save/create
>     //user.save // old approach
>     User.finalizeSignup(user) //--> defers to
> User.actionsAfterSignup(user)
>   }
>
> }
>
> def signIn(...) = {
>   User.findByUsername(username) match {
>     case Full(user) if (user.password.match_?(password)) => {
>       // log user in
>       // ...
>       User.logUserIn(user)
>     }
>   }
>
>
>
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Signup validation

2010-02-24 Thread Jeppe Nejsum Madsen
On Wed, Feb 24, 2010 at 6:05 PM, Adam Warski  wrote:
> Hello,
>
>> Can't you just override actionAfterSignup and don't call super if
>> captcha check fails?
>
>
> But that already assumes that signup was successfull and in the end redirects 
> to the homepage instead of going back to the singup form.

Indeed. Missed the redirect.

You can probably workaround by overriding validate on User and looking
at the S.params to see if you should check for captchas. But agree
that your proposal is cleaner :-)

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 9:34 AM, Timothy Perrett wrote:

> Thanks for the follow up David. Probably this highlights some issues with
> our automated testing though... any ideas on how we could add something to
> the build cycle to verify stuff like this? The parsers particularly probably
> could do with some pretty rigours test cases as this is a classic example...
> on a related note, Heiko just found a strange character encoding bug with
> 2.8 and XML; having more test cases will help us keep consistency during the
> porting.
>

I'll try to figure out more test cases for making sure the XML round trips
the right way.

In the case of Heiko's issue, it's already been reported by a Japanese user
of Lift 280_port_refresh.  The 2.8 libraries take an optional parameter for
character set and default to the platform character set.  We need a ticket
on this issue with a repro case so we can build a test and build a fix.


>
> Cheers, Tim
>
> On 24 Feb 2010, at 17:05, David Pollak wrote:
>
> > Tim,
> >
> > Sorry.  I was chasing a use case where control characters can still make
> it into the XML output.  Turns out that the Scala compiler converts
> {expression} into an Atom, not into a Text() element.  Because of
> this, it was possible for control characters to sneak into output.
> >
> > I went around our review board rules after testing the fix on a simple
> app (one, it turns out that didn't include a script.)
> >
> > I will be more careful with stuff that could break all things in the
> future.
> >
> > Thanks,
> >
> > David
> >
> > PS -- Thanks Indrajit for reversing the commit.
> >
> > On Wed, Feb 24, 2010 at 3:14 AM, Timothy Perrett <
> timo...@getintheloop.eu> wrote:
> > Guys,
> >
> > I see DPP made a bunch of commits last night. Something in there has
> > fundamentally broken the markup parser. Yesterday I deploy an
> > application to production and today I go to update a small bit of copy
> > that marketing want changed and i'm finding that my application is
> > broken
> >
> > With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
> >
> > 
> > // <![CDATA[
> > jQuery(document).ready(function()
> > {liftAjax.lift_successRegisterGC();});
> > var lift_page = "F1075228527421HHA";
> > // ]]>
> > 
> >
> > This is obviously problematic and all my javascript in my application
> > is now doing this. Sorry to be grizzly about this, but its totally
> > untenable for me to be building apps that work one day and are broken
> > the next... I tried reverting to 2.0-M2, but that was giving me errors
> > about not being able to boot SessionMaster. If we are changing stuff
> > in the core of Lift, we need a good number of eyes (that is, people
> > who are ACTIVE committers) on the changes in review board otherwise
> > stuff like this happens (certainly, I don't remember getting review
> > requests for any of these changes that are now causing me
> > problems...)
> >
> > I have to get this fixed today otherwise im going to be seriously
> > flamed.
> >
> > A very unhappy Tim.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
> >
> >
> >
> >
> > --
> > Lift, the simply functional web framework http://liftweb.net
> > Beginning Scala http://www.apress.com/book/view/1430219890
> > Follow me: http://twitter.com/dpp
> > Surf the harmonics
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] This is the style of SQL persistence that I like ...

2010-02-24 Thread David Pollak
Yeah.  It's good stuff.  Would love to see it integrated with Mapper/Record
(so it's not looking at var fields, but looking at the more complex objects
that represent fields).

On Wed, Feb 24, 2010 at 9:33 AM, Marius  wrote:

> Maybe most of you have seen it:
>
>
> http://max-l.github.com/Squeryl/
>
>
> Br's,
> Marius
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Thanks for the follow up David. Probably this highlights some issues with our 
automated testing though... any ideas on how we could add something to the 
build cycle to verify stuff like this? The parsers particularly probably could 
do with some pretty rigours test cases as this is a classic example... on a 
related note, Heiko just found a strange character encoding bug with 2.8 and 
XML; having more test cases will help us keep consistency during the porting.

Cheers, Tim

On 24 Feb 2010, at 17:05, David Pollak wrote:

> Tim,
> 
> Sorry.  I was chasing a use case where control characters can still make it 
> into the XML output.  Turns out that the Scala compiler converts 
> {expression} into an Atom, not into a Text() element.  Because of 
> this, it was possible for control characters to sneak into output.
> 
> I went around our review board rules after testing the fix on a simple app 
> (one, it turns out that didn't include a script.)
> 
> I will be more careful with stuff that could break all things in the future.
> 
> Thanks,
> 
> David
> 
> PS -- Thanks Indrajit for reversing the commit.
> 
> On Wed, Feb 24, 2010 at 3:14 AM, Timothy Perrett  
> wrote:
> Guys,
> 
> I see DPP made a bunch of commits last night. Something in there has
> fundamentally broken the markup parser. Yesterday I deploy an
> application to production and today I go to update a small bit of copy
> that marketing want changed and i'm finding that my application is
> broken
> 
> With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
> 
> 
> // <![CDATA[
> jQuery(document).ready(function()
> {liftAjax.lift_successRegisterGC();});
> var lift_page = "F1075228527421HHA";
> // ]]>
> 
> 
> This is obviously problematic and all my javascript in my application
> is now doing this. Sorry to be grizzly about this, but its totally
> untenable for me to be building apps that work one day and are broken
> the next... I tried reverting to 2.0-M2, but that was giving me errors
> about not being able to boot SessionMaster. If we are changing stuff
> in the core of Lift, we need a good number of eyes (that is, people
> who are ACTIVE committers) on the changes in review board otherwise
> stuff like this happens (certainly, I don't remember getting review
> requests for any of these changes that are now causing me
> problems...)
> 
> I have to get this fixed today otherwise im going to be seriously
> flamed.
> 
> A very unhappy Tim.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] This is the style of SQL persistence that I like ...

2010-02-24 Thread Marius
Maybe most of you have seen it:


http://max-l.github.com/Squeryl/


Br's,
Marius

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Signup validation

2010-02-24 Thread David Pollak
On Wed, Feb 24, 2010 at 7:33 AM, Adam Warski  wrote:

> Hello,
>
> I'm integrating recaptcha into a Lift app that uses MegaProtoUser, and
> there's one small thing that I think can be improved.
>
> There is currently no good place to put the captcha-verifying code. After
> the signup form is submitted the user if validated using theUser.validate
> (ProtoUser.scala:386, testSignup method). However I can't put captcha
> validation into User.validate, as there won't be any captcha when e.g.
> editing a user.
>
> So I would propose adding a method to MetaMegaProtoUser, e.g.:
>
> protected def validateSignup(user: User) = user.validate
>
> which could be then overridden in concrete user classes.
>

Sounds like a great addition.  Please open a ticket on it.  I'll get to it
tomorrow (unless someone beats me to the punch.)


>
> --
> Adam Warski
> http://www.warski.org
> http://www.softwaremill.eu
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread David Pollak
Tim,

Sorry.  I was chasing a use case where control characters can still make it
into the XML output.  Turns out that the Scala compiler converts
{expression} into an Atom, not into a Text() element.  Because of
this, it was possible for control characters to sneak into output.

I went around our review board rules after testing the fix on a simple app
(one, it turns out that didn't include a script.)

I will be more careful with stuff that could break all things in the future.

Thanks,

David

PS -- Thanks Indrajit for reversing the commit.

On Wed, Feb 24, 2010 at 3:14 AM, Timothy Perrett wrote:

> Guys,
>
> I see DPP made a bunch of commits last night. Something in there has
> fundamentally broken the markup parser. Yesterday I deploy an
> application to production and today I go to update a small bit of copy
> that marketing want changed and i'm finding that my application is
> broken
>
> With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
>
> 
> // <![CDATA[
> jQuery(document).ready(function()
> {liftAjax.lift_successRegisterGC();});
> var lift_page = "F1075228527421HHA";
> // ]]>
> 
>
> This is obviously problematic and all my javascript in my application
> is now doing this. Sorry to be grizzly about this, but its totally
> untenable for me to be building apps that work one day and are broken
> the next... I tried reverting to 2.0-M2, but that was giving me errors
> about not being able to boot SessionMaster. If we are changing stuff
> in the core of Lift, we need a good number of eyes (that is, people
> who are ACTIVE committers) on the changes in review board otherwise
> stuff like this happens (certainly, I don't remember getting review
> requests for any of these changes that are now causing me
> problems...)
>
> I have to get this fixed today otherwise im going to be seriously
> flamed.
>
> A very unhappy Tim.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Signup validation

2010-02-24 Thread Adam Warski
Hello,

> Can't you just override actionAfterSignup and don't call super if
> captcha check fails?


But that already assumes that signup was successfull and in the end redirects 
to the homepage instead of going back to the singup form.

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu




-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Signup validation

2010-02-24 Thread Jeppe Nejsum Madsen
Adam Warski  writes:

> Hello,
>
> I'm integrating recaptcha into a Lift app that uses MegaProtoUser, and 
> there's one small thing that I think can be improved.
>
> There is currently no good place to put the captcha-verifying code. After the 
> signup form is submitted the user if validated using theUser.validate 
> (ProtoUser.scala:386, testSignup method). However I can't put captcha 
> validation into User.validate, as there won't be any captcha when e.g. 
> editing a user.
>
> So I would propose adding a method to MetaMegaProtoUser, e.g.:
>
> protected def validateSignup(user: User) = user.validate
>
> which could be then overridden in concrete user classes.

Can't you just override actionAfterSignup and don't call super if
captcha check fails?

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] RPC from Javascript/JQuery?

2010-02-24 Thread Rick R
I have a textarea in which I process onKeyUp and onKeyDown commands.
The handlers for such things are custom javascript.
I would like to invoke functions in a Comet LiftActor /
ListenerManager via these custom javascript functions. Is there
documentation on the recommended way to do so?

It looks like I will have to define the functions within a render call
and use the SHtml.ajaxCall function, since the destination url is
randomized.  I am just wondering what would be the idiomatic way to do
this.

This is for a chat style app which processes/distributes data by the
keystroke rather than by a  line/post command.


I'm open to any ideas / alternate suggestions.

Thanks,
Rick

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Good point Ross - I always forget about Nexus :-)

Im much less grumpy now everything is good again. Appreciate I spammed
the list a little earlier, so sorry about that. Hopefully a brief post-
mortem will help us identify any failings in our process if they are
present. Accidents happen, I know that, and review board isnt full-
proof by any means... rather, perhaps we can just review the processes
we have in place and make sure that we are all adhering to them in a
team effort to avoid these kinds of things happening in the future.

Cheers, Tim

On Feb 24, 3:07 pm, Ross Mellgren  wrote:
> Tim, you can also pin to certain snapshot dates I believe (-SNAPSHOT versions 
> are actually -MMDDHHMMSS), if something in the future breaks you.
>
> -Ross
>
> On Feb 24, 2010, at 6:14 AM, Timothy Perrett wrote:
>
>
>
> > Guys,
>
> > I see DPP made a bunch of commits last night. Something in there has
> > fundamentally broken the markup parser. Yesterday I deploy an
> > application to production and today I go to update a small bit of copy
> > that marketing want changed and i'm finding that my application is
> > broken
>
> > With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
>
> > 
> > // <![CDATA[
> > jQuery(document).ready(function()
> > {liftAjax.lift_successRegisterGC();});
> > var lift_page = "F1075228527421HHA";
> > // ]]>
> > 
>
> > This is obviously problematic and all my javascript in my application
> > is now doing this. Sorry to be grizzly about this, but its totally
> > untenable for me to be building apps that work one day and are broken
> > the next... I tried reverting to 2.0-M2, but that was giving me errors
> > about not being able to boot SessionMaster. If we are changing stuff
> > in the core of Lift, we need a good number of eyes (that is, people
> > who are ACTIVE committers) on the changes in review board otherwise
> > stuff like this happens (certainly, I don't remember getting review
> > requests for any of these changes that are now causing me
> > problems...)
>
> > I have to get this fixed today otherwise im going to be seriously
> > flamed.
>
> > A very unhappy Tim.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Signup validation

2010-02-24 Thread Adam Warski
Hello,

I'm integrating recaptcha into a Lift app that uses MegaProtoUser, and there's 
one small thing that I think can be improved.

There is currently no good place to put the captcha-verifying code. After the 
signup form is submitted the user if validated using theUser.validate 
(ProtoUser.scala:386, testSignup method). However I can't put captcha 
validation into User.validate, as there won't be any captcha when e.g. editing 
a user.

So I would propose adding a method to MetaMegaProtoUser, e.g.:

protected def validateSignup(user: User) = user.validate

which could be then overridden in concrete user classes.

-- 
Adam Warski
http://www.warski.org
http://www.softwaremill.eu




-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: php info not effect when edit value in php.ini on nginx webserver

2010-02-24 Thread TylerWeir
I think you're looking for a php or an nginx forum, not Lift.


On Feb 24, 10:02 am, khoanhd  wrote:
> I've already installed php, fcgi, nginx, the system running as no
> problem, but the problem happen when:
> 1. I update memory_limit in php.ini, then restart php-cgi, nginx, but
> when use phpinfo, theo memory_limit is not effected.
> 2. I install 2 new extensions: curl and memcache, add 2 lines:
> extension=curl.so and extension=memcache.so, restart php-cgi and
> nginx, phpinfo also not show up the value curl and memcache in
> phpinfo.
> So, how would i do?Please help me.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] php info not effect when edit value in php.ini on nginx webserver

2010-02-24 Thread khoanhd
I've already installed php, fcgi, nginx, the system running as no
problem, but the problem happen when:
1. I update memory_limit in php.ini, then restart php-cgi, nginx, but
when use phpinfo, theo memory_limit is not effected.
2. I install 2 new extensions: curl and memcache, add 2 lines:
extension=curl.so and extension=memcache.so, restart php-cgi and
nginx, phpinfo also not show up the value curl and memcache in
phpinfo.
So, how would i do?Please help me.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Ross Mellgren
Tim, you can also pin to certain snapshot dates I believe (-SNAPSHOT versions 
are actually -MMDDHHMMSS), if something in the future breaks you.

-Ross

On Feb 24, 2010, at 6:14 AM, Timothy Perrett wrote:

> Guys,
> 
> I see DPP made a bunch of commits last night. Something in there has
> fundamentally broken the markup parser. Yesterday I deploy an
> application to production and today I go to update a small bit of copy
> that marketing want changed and i'm finding that my application is
> broken
> 
> With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
> 
> 
> // <![CDATA[
> jQuery(document).ready(function()
> {liftAjax.lift_successRegisterGC();});
> var lift_page = "F1075228527421HHA";
> // ]]>
> 
> 
> This is obviously problematic and all my javascript in my application
> is now doing this. Sorry to be grizzly about this, but its totally
> untenable for me to be building apps that work one day and are broken
> the next... I tried reverting to 2.0-M2, but that was giving me errors
> about not being able to boot SessionMaster. If we are changing stuff
> in the core of Lift, we need a good number of eyes (that is, people
> who are ACTIVE committers) on the changes in review board otherwise
> stuff like this happens (certainly, I don't remember getting review
> requests for any of these changes that are now causing me
> problems...)
> 
> I have to get this fixed today otherwise im going to be seriously
> flamed.
> 
> A very unhappy Tim.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
To clarify, im wondering who reviewed this on RB and gave it a ship
it? A simple test would have shown it to be broken ;-)

Cheers, Tim

PS: thanks Indrajit for your concern :-)

On Feb 24, 1:57 pm, Timothy Perrett  wrote:
> Yeah I already fixed it locally to work around the issue; thanks for  
> pushing. Was going to do it anyway after lunch.
>
> Do you know who reviewed this? I can't find any reference to it
>
> Sent from my iPhone
>
> On 24 Feb 2010, at 13:51, Indrajit Raychaudhuri   
> wrote:
>
>
>
> > Done in master. Wait for Hudson to respin.
> > Committers, sorry for direct commit to master and breaking the rule  
> > but Tim's need was urgent.
>
> > Have done quick smoke test locally.
>
> > - Indrajit
>
> > On 24/02/10 6:56 PM, Timothy Perrett wrote:
> >> I can verify that the issue causing this is:
> >> 703a728af05fddda0f8c5e302cce21a9dc065b54
>
> >> Can we please back this change out as this is affecting ALL lift
> >> applications
>
> >> Cheers, Tim
>
> >> On Feb 24, 1:09 pm, Timothy Perrett  wrote:
> >>> Scratch that, it just does this all the time - irrelevant of the  
> >>> mime
> >>> type.
>
> >>> Reproduce this by making a blank lift app and looking at the source.
>
> >>> Cheers, Tim
>
> >>> On Feb 24, 11:14 am, Timothy Perrett  
> >>> wrote:
>
>  Guys,
>
>  I see DPP made a bunch of commits last night. Something in there  
>  has
>  fundamentally broken the markup parser. Yesterday I deploy an
>  application to production and today I go to update a small bit of  
>  copy
>  that marketing want changed and i'm finding that my application is
>  broken
>
>  With LiftRules.useXhtmlMimeType = false in Boot, I see the  
>  following:
>
>  
>  //<![CDATA[
>  jQuery(document).ready(function()
>  {liftAjax.lift_successRegisterGC();});
>  var lift_page ="F1075228527421HHA";
>  // ]]>
>  
>
>  This is obviously problematic and all my javascript in my  
>  application
>  is now doing this. Sorry to be grizzly about this, but its totally
>  untenable for me to be building apps that work one day and are  
>  broken
>  the next... I tried reverting to 2.0-M2, but that was giving me  
>  errors
>  about not being able to boot SessionMaster. If we are changing  
>  stuff
>  in the core of Lift, we need a good number of eyes (that is, people
>  who are ACTIVE committers) on the changes in review board otherwise
>  stuff like this happens (certainly, I don't remember getting review
>  requests for any of these changes that are now causing me
>  problems...)
>
>  I have to get this fixed today otherwise im going to be seriously
>  flamed.
>
>  A very unhappy Tim.
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > liftweb+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/liftweb?hl=en
> > .

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Yeah I already fixed it locally to work around the issue; thanks for  
pushing. Was going to do it anyway after lunch.


Do you know who reviewed this? I can't find any reference to it

Sent from my iPhone

On 24 Feb 2010, at 13:51, Indrajit Raychaudhuri   
wrote:



Done in master. Wait for Hudson to respin.
Committers, sorry for direct commit to master and breaking the rule  
but Tim's need was urgent.


Have done quick smoke test locally.

- Indrajit

On 24/02/10 6:56 PM, Timothy Perrett wrote:

I can verify that the issue causing this is:
703a728af05fddda0f8c5e302cce21a9dc065b54

Can we please back this change out as this is affecting ALL lift
applications

Cheers, Tim

On Feb 24, 1:09 pm, Timothy Perrett  wrote:
Scratch that, it just does this all the time - irrelevant of the  
mime

type.

Reproduce this by making a blank lift app and looking at the source.

Cheers, Tim

On Feb 24, 11:14 am, Timothy Perrett   
wrote:





Guys,


I see DPP made a bunch of commits last night. Something in there  
has

fundamentally broken the markup parser. Yesterday I deploy an
application to production and today I go to update a small bit of  
copy

that marketing want changed and i'm finding that my application is
broken


With LiftRules.useXhtmlMimeType = false in Boot, I see the  
following:




//<![CDATA[
jQuery(document).ready(function()
{liftAjax.lift_successRegisterGC();});
var lift_page ="F1075228527421HHA";
// ]]>



This is obviously problematic and all my javascript in my  
application

is now doing this. Sorry to be grizzly about this, but its totally
untenable for me to be building apps that work one day and are  
broken
the next... I tried reverting to 2.0-M2, but that was giving me  
errors
about not being able to boot SessionMaster. If we are changing  
stuff

in the core of Lift, we need a good number of eyes (that is, people
who are ACTIVE committers) on the changes in review board otherwise
stuff like this happens (certainly, I don't remember getting review
requests for any of these changes that are now causing me
problems...)



I have to get this fixed today otherwise im going to be seriously
flamed.



A very unhappy Tim.




--
You received this message because you are subscribed to the Google  
Groups "Lift" group.

To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en 
.





--
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Re: Master is fundamentally broken!!!!!!

2010-02-24 Thread Indrajit Raychaudhuri

Done in master. Wait for Hudson to respin.
Committers, sorry for direct commit to master and breaking the rule but 
Tim's need was urgent.


Have done quick smoke test locally.

- Indrajit

On 24/02/10 6:56 PM, Timothy Perrett wrote:

I can verify that the issue causing this is:
703a728af05fddda0f8c5e302cce21a9dc065b54

Can we please back this change out as this is affecting ALL lift
applications

Cheers, Tim

On Feb 24, 1:09 pm, Timothy Perrett  wrote:

Scratch that, it just does this all the time - irrelevant of the mime
type.

Reproduce this by making a blank lift app and looking at the source.

Cheers, Tim

On Feb 24, 11:14 am, Timothy Perrett  wrote:




Guys,



I see DPP made a bunch of commits last night. Something in there has
fundamentally broken the markup parser. Yesterday I deploy an
application to production and today I go to update a small bit of copy
that marketing want changed and i'm finding that my application is
broken



With LiftRules.useXhtmlMimeType = false in Boot, I see the following:




//<![CDATA[
jQuery(document).ready(function()
{liftAjax.lift_successRegisterGC();});
var lift_page ="F1075228527421HHA";
// ]]>




This is obviously problematic and all my javascript in my application
is now doing this. Sorry to be grizzly about this, but its totally
untenable for me to be building apps that work one day and are broken
the next... I tried reverting to 2.0-M2, but that was giving me errors
about not being able to boot SessionMaster. If we are changing stuff
in the core of Lift, we need a good number of eyes (that is, people
who are ACTIVE committers) on the changes in review board otherwise
stuff like this happens (certainly, I don't remember getting review
requests for any of these changes that are now causing me
problems...)



I have to get this fixed today otherwise im going to be seriously
flamed.



A very unhappy Tim.




--
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
I can verify that the issue causing this is:
703a728af05fddda0f8c5e302cce21a9dc065b54

Can we please back this change out as this is affecting ALL lift
applications

Cheers, Tim

On Feb 24, 1:09 pm, Timothy Perrett  wrote:
> Scratch that, it just does this all the time - irrelevant of the mime
> type.
>
> Reproduce this by making a blank lift app and looking at the source.
>
> Cheers, Tim
>
> On Feb 24, 11:14 am, Timothy Perrett  wrote:
>
>
>
> > Guys,
>
> > I see DPP made a bunch of commits last night. Something in there has
> > fundamentally broken the markup parser. Yesterday I deploy an
> > application to production and today I go to update a small bit of copy
> > that marketing want changed and i'm finding that my application is
> > broken
>
> > With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
>
> > 
> > // <![CDATA[
> > jQuery(document).ready(function()
> > {liftAjax.lift_successRegisterGC();});
> > var lift_page = "F1075228527421HHA";
> > // ]]>
> > 
>
> > This is obviously problematic and all my javascript in my application
> > is now doing this. Sorry to be grizzly about this, but its totally
> > untenable for me to be building apps that work one day and are broken
> > the next... I tried reverting to 2.0-M2, but that was giving me errors
> > about not being able to boot SessionMaster. If we are changing stuff
> > in the core of Lift, we need a good number of eyes (that is, people
> > who are ACTIVE committers) on the changes in review board otherwise
> > stuff like this happens (certainly, I don't remember getting review
> > requests for any of these changes that are now causing me
> > problems...)
>
> > I have to get this fixed today otherwise im going to be seriously
> > flamed.
>
> > A very unhappy Tim.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Scratch that, it just does this all the time - irrelevant of the mime
type.

Reproduce this by making a blank lift app and looking at the source.

Cheers, Tim

On Feb 24, 11:14 am, Timothy Perrett  wrote:
> Guys,
>
> I see DPP made a bunch of commits last night. Something in there has
> fundamentally broken the markup parser. Yesterday I deploy an
> application to production and today I go to update a small bit of copy
> that marketing want changed and i'm finding that my application is
> broken
>
> With LiftRules.useXhtmlMimeType = false in Boot, I see the following:
>
> 
> // <![CDATA[
> jQuery(document).ready(function()
> {liftAjax.lift_successRegisterGC();});
> var lift_page = "F1075228527421HHA";
> // ]]>
> 
>
> This is obviously problematic and all my javascript in my application
> is now doing this. Sorry to be grizzly about this, but its totally
> untenable for me to be building apps that work one day and are broken
> the next... I tried reverting to 2.0-M2, but that was giving me errors
> about not being able to boot SessionMaster. If we are changing stuff
> in the core of Lift, we need a good number of eyes (that is, people
> who are ACTIVE committers) on the changes in review board otherwise
> stuff like this happens (certainly, I don't remember getting review
> requests for any of these changes that are now causing me
> problems...)
>
> I have to get this fixed today otherwise im going to be seriously
> flamed.
>
> A very unhappy Tim.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] [urgent] Master is fundamentally broken!!!!!!

2010-02-24 Thread Timothy Perrett
Guys,

I see DPP made a bunch of commits last night. Something in there has
fundamentally broken the markup parser. Yesterday I deploy an
application to production and today I go to update a small bit of copy
that marketing want changed and i'm finding that my application is
broken

With LiftRules.useXhtmlMimeType = false in Boot, I see the following:


// <![CDATA[
jQuery(document).ready(function()
{liftAjax.lift_successRegisterGC();});
var lift_page = "F1075228527421HHA";
// ]]>


This is obviously problematic and all my javascript in my application
is now doing this. Sorry to be grizzly about this, but its totally
untenable for me to be building apps that work one day and are broken
the next... I tried reverting to 2.0-M2, but that was giving me errors
about not being able to boot SessionMaster. If we are changing stuff
in the core of Lift, we need a good number of eyes (that is, people
who are ACTIVE committers) on the changes in review board otherwise
stuff like this happens (certainly, I don't remember getting review
requests for any of these changes that are now causing me
problems...)

I have to get this fixed today otherwise im going to be seriously
flamed.

A very unhappy Tim.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.