[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-06-30 Thread fbettag

On Safari i get Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
This seems to be a safari 4 specific problem due to content-type text/
html+xml. See 
http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8adf9c0ffb7

On Jun 30, 7:39 am, fbettag fr...@bett.ag wrote:
 Hey guys, i've been having troubles with jQuery and Firefox/Safari due
 to the missing Doctype all night long:

 Uncaught exception: [Exception... Component returned failure code:
 0x80004003 (NS_ERROR_INVALID_POINTER)
 [nsIDOMNSHTMLElement.innerHTML]  nsresult: 0×80004003
 (NS_ERROR_INVALID_POINTER)  location: JS frame 
 ::http://yourserver/include/jquery.js
 :: anonymous :: line 11″  data: no]

 The issue is described here, altho it kinda is somehow faulty xml on
 my 
 part:http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_poi...

 Is there any way to prepend a DocType? Searching the group didn't turn
 anything useful up.

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



[Lift] Re: can a Snippet call a Snippet?

2009-06-30 Thread marius d.

Can you paste some code?

Essentially we support nested snippets so your snippet can simply
return a markup containing another snippet and it will be invoked. If
you really want to manually invoke a snippet from another snippet and
if you are not using StatefulSnippets you can just instantiate the
class and call your function and pass it the right NodeSeq.

Br's,
Marius

On Jun 30, 5:36 am, g-man gregor...@gmail.com wrote:
 I am enhancing the Todo app by adding tags.

 I have retained the TD.scala snippet to manage the Todos on my page,
 and added a TG.scala snippet to handle tags on the same page, which
 works well for creating new and listing in both cases.

 Now I want to filter my Todos list by a Tag instance I select from my
 list, and therefore need to pass the id of the selected tag over from
 the TG snippet to the TD snippet, where it can be used as a filter
 argument for a find method.

 The problem is that scala says it cannot find snippet TD, whose method
 I am calling as TD.list from the TG.scala snippet. I have tried all
 kinds of explicit importing, but no luck.

 So,  can a snippet call a snippet, or is that controlled only from the
 web page?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: can a Snippet call a Snippet?

2009-06-30 Thread marius d.

Or you can use S.locateMappedSnippet ... but first try to see if
nested snippet won't do the trick for you ...

On Jun 30, 10:17 am, marius d. marius.dan...@gmail.com wrote:
 Can you paste some code?

 Essentially we support nested snippets so your snippet can simply
 return a markup containing another snippet and it will be invoked. If
 you really want to manually invoke a snippet from another snippet and
 if you are not using StatefulSnippets you can just instantiate the
 class and call your function and pass it the right NodeSeq.

 Br's,
 Marius

 On Jun 30, 5:36 am, g-man gregor...@gmail.com wrote:

  I am enhancing the Todo app by adding tags.

  I have retained the TD.scala snippet to manage the Todos on my page,
  and added a TG.scala snippet to handle tags on the same page, which
  works well for creating new and listing in both cases.

  Now I want to filter my Todos list by a Tag instance I select from my
  list, and therefore need to pass the id of the selected tag over from
  the TG snippet to the TD snippet, where it can be used as a filter
  argument for a find method.

  The problem is that scala says it cannot find snippet TD, whose method
  I am calling as TD.list from the TG.scala snippet. I have tried all
  kinds of explicit importing, but no luck.

  So,  can a snippet call a snippet, or is that controlled only from the
  web page?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Java alternatives?

2009-06-30 Thread David Bernard
Wicket works with scala (some blog/article over the net).

/davidB

On Tue, Jun 30, 2009 at 00:29, Naftoli Gugenhem naftoli...@gmail.comwrote:


 But if your team already has a bit of scala knowledge and is planning to
 transition gradually, I wonder if you could write the lift-specific parts in
 scala and delegate the logic to java code.

 -
 David Pollakfeeder.of.the.be...@gmail.com wrote:

 Sam,

 On Mon, Jun 29, 2009 at 1:49 PM, samreid samrr...@gmail.com wrote:

 
  My group may not be able to commit to Scala within the next year or
  so, so I have 2 related questions:


 Bummer...


 
 
  (1) What's the best non-Lift framework?  We are leaning toward
  something on the JVM and I've heard David speak fondly of Wicket.
 

 Depends on what you want to do.  For stateful web sites, I think Wicket's
 the best choice.  I'm not sure about REST frameworks.


 
  (2) Is there any possibility of writing Java source to run under
  lift?  I'm finding it difficult to even create a NodeSeq from Java,
  and we may have to write Scala adapters to reach some of the Lift
  functionality.  I know this seems like an awkward approach (and
  probably some level of competence with Scala would probably be
  necessary in order to read docs, etc.), but this might be a way we
  could get the benefits of Lift platform without the costs associated
  with Scala.  Or would this be significantly worse than just picking
  another framework?


 I would recommend picking another framework.  I'm not sure what you think
 the benefits of Lift are (I have my list, but yours may differ), but I
 think
 a lot of the value of Lift is based on Scala's Function and PartialFunction
 classes.  It'd be hellish to replicate this functionality by hand in Java.

 Thanks,

 David


 
 
  Thanks,
  Sam Reid
 
  
 


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



 


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



[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-06-30 Thread Timothy Perrett

Can you be a bit more specific? Is the whole page missing a doctype?
or just your ajax stuff?

If you could post both the html output code and the calling scala code
in question that would help a lot.

Cheers, Tim

On Jun 30, 6:39 am, fbettag fr...@bett.ag wrote:
 Hey guys, i've been having troubles with jQuery and Firefox/Safari due
 to the missing Doctype all night long:

 Uncaught exception: [Exception... Component returned failure code:
 0x80004003 (NS_ERROR_INVALID_POINTER)
 [nsIDOMNSHTMLElement.innerHTML]  nsresult: 0×80004003
 (NS_ERROR_INVALID_POINTER)  location: JS frame 
 ::http://yourserver/include/jquery.js
 :: anonymous :: line 11″  data: no]

 The issue is described here, altho it kinda is somehow faulty xml on
 my 
 part:http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_poi...

 Is there any way to prepend a DocType? Searching the group didn't turn
 anything useful up.

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



[Lift] Re: grabbing rss or other type of feeds within lift

2009-06-30 Thread Timothy Perrett

mark,

take a look at: http://is.gd/1iUJN

That should provide you some guidance. I notice from your example your
trying to parse the twitter feed? Perhaps if you want to do something
with twitter you should consider a proper twitter api lib:
http://code.google.com/p/java-twitter/

Cheers, Tim

On Jun 30, 3:33 am, Mark Essel mes...@gmail.com wrote:
 trying to conjure up a similar functioning piece of code in scala to
 grab my status from twitter.

 (php)
 $username = victusfate;
 $feed = http://search.twitter.com/search.atom?q=from:; . $username .
 rpp=1;
 //echo $feed;
 function parse_feed($feed) {
     $stepOne = explode(content type=\html\, $feed);
     $stepTwo = explode(/content,$stepOne[1]);
     $tweet = $stepTwo[0];
     $tweet = str_replace(lt;, , $tweet);
     $tweet = str_replace(gt;, , $tweet);
     return $tweet;}

 $twitterFeed = file_get_contents($feed);
 echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes
 ($suffix);

 (.scala file)
       var username = victusfate
       var feed = http://search.twitter.com/search.atom?q=from:; +
 username + rpp=1
       span{ feed }/span

 stuck here tried Rome, and various other feed fetching libraries
 without much luck (very new to the language and setup)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] JS compression with the Alchim maven plugin?

2009-06-30 Thread dflemstr

Hello all,
has anyone managed to use the Alchim/YUI JS compressor (referenced in
the basic lift archetype) in a project?
When I create a blank Lift project and add any kind of JS file in the
src/main/webapp (or similar) folder, the compilation (or rather,
resource compression goal) fails with the following stack trace:
http://pastebin.com/m8de90c4

I have not been able to find any specific LOC in my JS files that
could cause this exception, and haven't been able to debug the plugin
since I lack the source code (the repository is broken).

Has anyone had the same problems, or could someone point me to a
project where the plugin works? I would really like to get this
working.

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



[Lift] Re: JTA Transaction Monad - Early Access Program

2009-06-30 Thread Timothy Perrett

Jonas,

Did you roll this into master? What's its status?

Cheers, Tim

On Jun 10, 4:46 pm, James Strachan james.strac...@gmail.com wrote:
 2009/6/9 Jonas Bonér jbo...@gmail.com:



  2009/6/9 David Pollak feeder.of.the.be...@gmail.com:
  Jonas,
  We always use Maven to load dependencies.  We never use GPL dependencies.
   If you have a question about the license of a dependency and its use in
  Lift, please ping me privately.

  I am using Maven. But as I said I could not find the Atomikos in any
  public library, putting them in lib will let the user easily install
  them in their local repo.
  Do you know if they are in any public repo?

 If its any help I added them here a while back for an integration test
 in ActiveMQhttp://repo.fusesource.com/maven2-all/com/atomikos/

 the repo is:http://repo.fusesource.com/maven2-all/

 you might wanna put more recent jars up on some public repo though.

 --
 James
 ---http://macstrac.blogspot.com/

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



[Lift] Re: Hudson issue

2009-06-30 Thread Derek Chen-Becker
I edited /etc/security/limits.conf to raise the default ulimit nofiles to
4096. If that's not enough I'll bump it again.

Derek

On Mon, Jun 29, 2009 at 3:37 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 ulimit -n


 http://stackoverflow.com/questions/114914/how-do-you-fix-too-many-open-files-problem-in-hudson




 On Mon, Jun 29, 2009 at 11:15 PM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 Hudson barfed just now complaining about too many open files:

 Caused by: java.io.IOException: Cannot run program git (in directory
 /home/scalatools/hudson/.hud
 son/jobs/Lift/workspace): java.io.IOException: error=24, Too many open
 files

 I've restarted Hudson and it appears to be working now. I'm going to
 research this to see if it's a Hudson bug or possibly and issue with our
 machine config, so I was wondering if anyone has seen something like this
 before?

 Thanks,

 Derek





 --
 Viktor Klang
 Scala Loudmouth


 


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



[Lift] Re: grabbing rss or other type of feeds within lift

2009-06-30 Thread Mark Essel

Thanks Tim. will definitely check out the lib (not sure of licensing
issues, plan on developing a product with it)

On Jun 30, 4:16 am, Timothy Perrett timo...@getintheloop.eu wrote:
 mark,

 take a look at:http://is.gd/1iUJN

 That should provide you some guidance. I notice from your example your
 trying to parse the twitter feed? Perhaps if you want to do something
 with twitter you should consider a proper twitter api 
 lib:http://code.google.com/p/java-twitter/

 Cheers, Tim

 On Jun 30, 3:33 am, Mark Essel mes...@gmail.com wrote:



  trying to conjure up a similar functioning piece of code in scala to
  grab my status from twitter.

  (php)
  $username = victusfate;
  $feed = http://search.twitter.com/search.atom?q=from:; . $username .
  rpp=1;
  //echo $feed;
  function parse_feed($feed) {
      $stepOne = explode(content type=\html\, $feed);
      $stepTwo = explode(/content,$stepOne[1]);
      $tweet = $stepTwo[0];
      $tweet = str_replace(lt;, , $tweet);
      $tweet = str_replace(gt;, , $tweet);
      return $tweet;}

  $twitterFeed = file_get_contents($feed);
  echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes
  ($suffix);

  (.scala file)
        var username = victusfate
        var feed = http://search.twitter.com/search.atom?q=from:; +
  username + rpp=1
        span{ feed }/span

  stuck here tried Rome, and various other feed fetching libraries
  without much luck (very new to the language and setup)

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



[Lift] Re: grabbing rss or other type of feeds within lift

2009-06-30 Thread David Pollak
Personally, I'd use Scala's XML parsing to parse the feed... skip the
external library.
You may also want to look at the ESME code
http://incubator.apache.org/esme/ There's an RSS reader and a Twitter
poller in there.  The code is Apache
2.0 license, so you can use it without any license-related concerns.

On Tue, Jun 30, 2009 at 6:37 AM, Mark Essel mes...@gmail.com wrote:


 Thanks Tim. will definitely check out the lib (not sure of licensing
 issues, plan on developing a product with it)

 On Jun 30, 4:16 am, Timothy Perrett timo...@getintheloop.eu wrote:
  mark,
 
  take a look at:http://is.gd/1iUJN
 
  That should provide you some guidance. I notice from your example your
  trying to parse the twitter feed? Perhaps if you want to do something
  with twitter you should consider a proper twitter api lib:
 http://code.google.com/p/java-twitter/
 
  Cheers, Tim
 
  On Jun 30, 3:33 am, Mark Essel mes...@gmail.com wrote:
 
 
 
   trying to conjure up a similar functioning piece of code in scala to
   grab my status from twitter.
 
   (php)
   $username = victusfate;
   $feed = http://search.twitter.com/search.atom?q=from:; . $username .
   rpp=1;
   //echo $feed;
   function parse_feed($feed) {
   $stepOne = explode(content type=\html\, $feed);
   $stepTwo = explode(/content,$stepOne[1]);
   $tweet = $stepTwo[0];
   $tweet = str_replace(lt;, , $tweet);
   $tweet = str_replace(gt;, , $tweet);
   return $tweet;}
 
   $twitterFeed = file_get_contents($feed);
   echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes
   ($suffix);
 
   (.scala file)
 var username = victusfate
 var feed = http://search.twitter.com/search.atom?q=from:; +
   username + rpp=1
 span{ feed }/span
 
   stuck here tried Rome, and various other feed fetching libraries
   without much luck (very new to the language and setup)

 



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

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



[Lift] Re: grabbing rss or other type of feeds within lift

2009-06-30 Thread TylerWeir

I remembered this came up a long time ago as well:

http://groups.google.com/group/liftweb/browse_frm/thread/e58ba45f7c0a111d/20344ff205393ec7?lnk=gstq=twitter+front#20344ff205393ec7




On Jun 30, 10:09 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Personally, I'd use Scala's XML parsing to parse the feed... skip the
 external library.
 You may also want to look at the ESME 
 codehttp://incubator.apache.org/esme/There's an RSS reader and a Twitter
 poller in there.  The code is Apache
 2.0 license, so you can use it without any license-related concerns.



 On Tue, Jun 30, 2009 at 6:37 AM, Mark Essel mes...@gmail.com wrote:

  Thanks Tim. will definitely check out the lib (not sure of licensing
  issues, plan on developing a product with it)

  On Jun 30, 4:16 am, Timothy Perrett timo...@getintheloop.eu wrote:
   mark,

   take a look at:http://is.gd/1iUJN

   That should provide you some guidance. I notice from your example your
   trying to parse the twitter feed? Perhaps if you want to do something
   with twitter you should consider a proper twitter api lib:
 http://code.google.com/p/java-twitter/

   Cheers, Tim

   On Jun 30, 3:33 am, Mark Essel mes...@gmail.com wrote:

trying to conjure up a similar functioning piece of code in scala to
grab my status from twitter.

(php)
$username = victusfate;
$feed = http://search.twitter.com/search.atom?q=from:; . $username .
rpp=1;
//echo $feed;
function parse_feed($feed) {
    $stepOne = explode(content type=\html\, $feed);
    $stepTwo = explode(/content,$stepOne[1]);
    $tweet = $stepTwo[0];
    $tweet = str_replace(lt;, , $tweet);
    $tweet = str_replace(gt;, , $tweet);
    return $tweet;}

$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) . stripslashes
($suffix);

(.scala file)
      var username = victusfate
      var feed = http://search.twitter.com/search.atom?q=from:; +
username + rpp=1
      span{ feed }/span

stuck here tried Rome, and various other feed fetching libraries
without much luck (very new to the language and setup)

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



[Lift] Re: YA menu question: separate menus

2009-06-30 Thread glenn

Derek,

I was out of town all last week and just tried to rebuild and run with
your
new changes, but got the following error:

ERROR - Failed to Boot
java.lang.NoSuchMethodError: net.liftweb.sitemap.SiteMap.init(Lscala/
Seq;)V
at bootstrap.liftweb.Boot.boot(Boot.scala:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
(ClassHelpers.scala:408)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
(ClassHelpers.scala:406)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
(LiftRules.scala:1049)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
(LiftRules.scala:1049)
at net.liftweb.util.Full.map(Box.scala:330)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1049)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:561)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:529)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:
97)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize
(ServletHandler.java:653)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1239)
at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
466)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart
(Jetty6PluginWebAppContext.java:124)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart
(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart
(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart
(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:50)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start
(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty
(AbstractJettyMojo.java:441)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute
(AbstractJettyMojo.java:383)
at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute
(AbstractJettyRunMojo.java:210)
at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:
184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:579)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:498)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject
(DefaultLifecycleExecutor.java:265)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0
(DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice
(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2
(MavenEmbedder.java:904)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice
(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:
1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch
(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode

[Lift] Examples of ajaxForm(...)

2009-06-30 Thread Kris Nuttycombe

Hi, all,

I'm looking for some examples of uses of ajaxForm in cases where
multiple form elements are included and processed on submit. Can
someone point me in the right direction? The only examples I found in
the example apps on github were related to Comet.

Thanks,

Kris

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



[Lift] Re: Rendering a View from a Snippet

2009-06-30 Thread David Pollak
On Mon, Jun 29, 2009 at 9:05 PM, fbettag fr...@bett.ag wrote:


 Hey guys,

 i was wondering how one would go about rendering a View from a
 Snippet. I guess i could Load the XML, but i am not sure if this is
 the best way. Also if it is, what would be the best way to get the
 path to the view?


Snippets are just things that take XML in and modify the XML (or replace
it), so, yes, you can return part or all of an XHTML page via a snippet.
What's your use case?



 best regards
 



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

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



[Lift] Re: Examples of ajaxForm(...)

2009-06-30 Thread marius d.

Imagine that your snippet has a bunch of form elements ... such as:


lift:Ajax.form

 f:inputFirstName/
 f:inputLastName/

/lift:Ajax.form

and your snippet function:

def form(xml: NodeSeq): NodeSeq = {

  ajxForm(bind(
   f, xml,
   inputFirstName -SHtml.text(, (s) = {//do something here})
   inputLastName -SHtml.text(, (s) = {//do something here})
  ) ++ SHtml.hidden(() = {
  // Do processing
}))
}

So to the snippet child nodes we append a hidden element where we have
our processing function. Note that Lift automatically serializes the
form elements as key/value pairs forming a HTTP query string. Hence in
your anonymous function fir the hidden element you can just do
whatever action you want. I actually added the hidden so that when
it's called all functions bound to you form lements were executed.


The other way of working with ajax forms is to actually use jsonForm.

Br's,
Marius

On Jun 30, 8:39 pm, Kris Nuttycombe kris.nuttyco...@gmail.com wrote:
 Hi, all,

 I'm looking for some examples of uses of ajaxForm in cases where
 multiple form elements are included and processed on submit. Can
 someone point me in the right direction? The only examples I found in
 the example apps on github were related to Comet.

 Thanks,

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



[Lift] Re: Error attempting to persist Mapper

2009-06-30 Thread David Pollak
On Mon, Jun 29, 2009 at 5:53 PM, Jonathan A Ferguson j...@spiralarm.comwrote:

 It would be nice,  is it a lot of effort to backport to 1.0.1 ?


The bigger issue is what is 1.0.1 and who/when will it come out?

Will any of the Lift committers sign up to spin a 1.0.1 build and release?



 What is the state of 1.1 - If we stick with 1.0 functionality should APIs
 be fixed?
 I'll become an endangered species if I move us otherwise.

 Jono


 On 30/06/2009, at 9:50 AM, David Pollak wrote:

 Fixed in 1.1-SNAPSHOT

 THere's an ill-fated 1.0.1 that's kinda going nowhere.  Is it important to
 backport it to 1.0.1?

 On Mon, Jun 29, 2009 at 3:18 PM, Jonathan A Ferguson 
 j...@spiralarm.comwrote:

 I knew there would be at least one thing I would forget.
 version 1.0.



 On 30/06/2009, at 3:51 AM, David Pollak wrote:

 What version of Lift are you using?

 On Thu, Jun 25, 2009 at 7:33 PM, Jonathan Ferguson j...@spiralarm.comwrote:


 Hi all,
  I'm attempting to persist a Mapper used to join two tables.

 java.lang.NullPointerException: Trying to open an empty Box
at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370)
at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366)
at
 net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:
 583)
at
 net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:
 578)
at net.liftweb.mapper.DB$.use(DB.scala:305)
at net.liftweb.mapper.MetaMapper$class.save(MetaMapper.scala:577)

 The empty box is in the update statement, which confuses me as I
 should be performing an insert.( from MetaMapper )

val ret: Boolean = DB.prepareStatement(UPDATE
 +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! +
 = ?, conn)

 I am assuming it is something to do with my understand of how to use a
 non-keyed Mapper.
 The exception is thrown when save is called in the join function.

 class AB extends Mapper[AB] {

def getSingleton = AB

object A  extends MappedLongForeignKey(this, A) { override def
 dbColumnName = a_Bs_id }
object B  extends MappedLongForeignKey(this, B) { override def
 dbColumnName = B_id }
object index  extends MappedInt(this) { override def dbColumnName
 =
 Bs_idx }

 }
 object AB extends AB with MetaMapper[AB]
 {
   override def dbTableName = A_B

  def join (a : A, b : B):Boolean = {
val list = AB.findAll(By(AB.a,a))
val i = list.isEmpty match {
  case true = 0
  case false = list.size
}
this.create.A(a).B(b).index(i).save
}

 }


 Any pointers would be appreciated, I can't change the data structure
 as the table is used by other applications.

 Jono






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









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





 



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

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



[Lift] Re: Examples of ajaxForm(...)

2009-06-30 Thread Kris Nuttycombe

Thanks, Marius, you answered my unspoken question as to whether the
callbacks registered with regular old form elements from SHtml are
called in the AJAX processing lifecycle. The hidden field piece
(instead of / in addition to a submit button) is what I was missing.

Kris

On Tue, Jun 30, 2009 at 2:09 PM, marius d.marius.dan...@gmail.com wrote:

 Imagine that your snippet has a bunch of form elements ... such as:


 lift:Ajax.form

  f:inputFirstName/
  f:inputLastName/

 /lift:Ajax.form

 and your snippet function:

 def form(xml: NodeSeq): NodeSeq = {

  ajxForm(bind(
   f, xml,
   inputFirstName -SHtml.text(, (s) = {//do something here})
   inputLastName -SHtml.text(, (s) = {//do something here})
  ) ++ SHtml.hidden(() = {
  // Do processing
 }))
 }

 So to the snippet child nodes we append a hidden element where we have
 our processing function. Note that Lift automatically serializes the
 form elements as key/value pairs forming a HTTP query string. Hence in
 your anonymous function fir the hidden element you can just do
 whatever action you want. I actually added the hidden so that when
 it's called all functions bound to you form lements were executed.


 The other way of working with ajax forms is to actually use jsonForm.

 Br's,
 Marius

 On Jun 30, 8:39 pm, Kris Nuttycombe kris.nuttyco...@gmail.com wrote:
 Hi, all,

 I'm looking for some examples of uses of ajaxForm in cases where
 multiple form elements are included and processed on submit. Can
 someone point me in the right direction? The only examples I found in
 the example apps on github were related to Comet.

 Thanks,

 Kris
 


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



[Lift] Re: YA menu question: separate menus

2009-06-30 Thread Derek Chen-Becker
Yes. The error you're getting looks like a version mismatch or some other
dependency issue. Can you wipe ~/.m2 and try th build again?

Derek

On Tue, Jun 30, 2009 at 10:44 AM, glenn gl...@exmbly.com wrote:


 Derek,

 I was out of town all last week and just tried to rebuild and run with
 your
 new changes, but got the following error:

 ERROR - Failed to Boot
 java.lang.NoSuchMethodError: net.liftweb.sitemap.SiteMap.init(Lscala/
 Seq;)V
at bootstrap.liftweb.Boot.boot(Boot.scala:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
 (ClassHelpers.scala:408)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
 (ClassHelpers.scala:406)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
 (LiftRules.scala:1049)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
 (LiftRules.scala:1049)
at net.liftweb.util.Full.map(Box.scala:330)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1049)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:561)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:529)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:
 97)
at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize
 (ServletHandler.java:653)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext
 (WebAppContext.java:1239)
at org.mortbay.jetty.handler.ContextHandler.doStart
 (ContextHandler.java:517)
at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
 466)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart
 (Jetty6PluginWebAppContext.java:124)
at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart
 (HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart
 (ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart
 (HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
 (HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start
 (AbstractLifeCycle.java:50)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start
 (Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty
 (AbstractJettyMojo.java:441)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute
 (AbstractJettyMojo.java:383)
at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute
 (AbstractJettyRunMojo.java:210)
at
 org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:
 184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo
 (DefaultPluginManager.java:579)
at

 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
 (DefaultLifecycleExecutor.java:498)
at

 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject
 (DefaultLifecycleExecutor.java:265)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
 (DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
 (DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0
 (DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice
 (DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2
 (MavenEmbedder.java:904)
at
 org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice
 (MavenEmbedder.java:304)
at
 org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:
 1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

[Lift] Thoughts on file streaming

2009-06-30 Thread Derek Chen-Becker
Well, as usual something that seemed simple at first glance is now looking
somewhat complex. I'm thinking of reworking the fileUpload handling to allow
a user to register either a (String, String, Array[Byte]) ⇒ Any or (String,
String, InputStream) ⇒ Any function, which would then be executed during
request processing. The issue is that form field processing (ParamHolders)
takes place in Req, before LiftSession has been set up, and the act of
parsing the request for form data, particularly for large upload streams
(the target of these changes) precludes holding on to any data for later
processing (the servlet container cannot be expected to hold the entire
request in memory). On the other hand, users should reasonably expect that
their form handling functions are stateful, so I'm trying to think of some
way to meet in the middle on form processing. Ideas?

Derek

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Viktor Klang
Create a tmp-file, store the localpath in S.param and register a delete on
request done

will be more streamlined than potentially monkeypatching it in
  Thoughts?
-- Viktor

On Jun 30, 2009 11:08 PM, Derek Chen-Becker dchenbec...@gmail.com wrote:

Well, as usual something that seemed simple at first glance is now looking
somewhat complex. I'm thinking of reworking the fileUpload handling to allow
a user to register either a (String, String, Array[Byte]) = Any or (String,
String, InputStream) = Any function, which would then be executed during
request processing. The issue is that form field processing (ParamHolders)
takes place in Req, before LiftSession has been set up, and the act of
parsing the request for form data, particularly for large upload streams
(the target of these changes) precludes holding on to any data for later
processing (the servlet container cannot be expected to hold the entire
request in memory). On the other hand, users should reasonably expect that
their form handling functions are stateful, so I'm trying to think of some
way to meet in the middle on form processing. Ideas?

Derek


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



[Lift] Re: Error With CRUDify's Select Field for MappedLongForeignKey

2009-06-30 Thread David Pollak
Can you send the entire stack trace?

On Mon, Jun 29, 2009 at 5:37 PM, Peter Robinett pe...@bubblefoundry.comwrote:


 In my app I have Datacenters which can have many Nodes. Accordingly, I
 added a foreign key in the Node model to link to its Datacenter.
 However, when I would go to the create or edit pages it would say
 Can't change for the field. Based upon an old mailing list post
 (http://groups.google.com/group/liftweb/msg/63523ca1432e7bd7) I added
 the following :
 object datacenter extends MappedLongForeignKey(this, Datacenter) {
override def validSelectValues: Box[List[(Long, String)]] = Full
 (Datacenter.findAll.map(d = (d.id.is, d.name.is)))
 }

 I now have a select box with the correct values. Great. However, when
 I select a value and hit edit I get an error:
 Message: java.lang.Exception: Do not have permissions to set this
 field
net.liftweb.mapper.MappedField$class.set(MappedField.scala:425)
net.liftweb.mapper.MappedString.set(MappedString.scala:38)

 Any idea what's wrong here? The database tables are correctly
 configured (I'm using MySQL) and I'm running 1.1-SNAPSHOT. Thanks in
 advance for your help.

 Peter Robinett

 



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

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread David Pollak
On Tue, Jun 30, 2009 at 2:22 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 Create a tmp-file, store the localpath in S.param and register a delete on
 request done

 will be more streamlined than potentially monkeypatching it in
   Thoughts?


Huge hack



 -- Viktor

 On Jun 30, 2009 11:08 PM, Derek Chen-Becker dchenbec...@gmail.com
 wrote:

 Well, as usual something that seemed simple at first glance is now looking
 somewhat complex. I'm thinking of reworking the fileUpload handling to allow
 a user to register either a (String, String, Array[Byte]) = Any or (String,
 String, InputStream) = Any function, which would then be executed during
 request processing. The issue is that form field processing (ParamHolders)
 takes place in Req, before LiftSession has been set up, and the act of
 parsing the request for form data, particularly for large upload streams
 (the target of these changes) precludes holding on to any data for later
 processing (the servlet container cannot be expected to hold the entire
 request in memory). On the other hand, users should reasonably expect that
 their form handling functions are stateful, so I'm trying to think of some
 way to meet in the middle on form processing. Ideas?

 Derek



 



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

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread David Pollak
What kind of priority is this issue?  I think I can abstract things in such
a way that it works correctly, but it'll take a couple of days.

On Tue, Jun 30, 2009 at 2:08 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Well, as usual something that seemed simple at first glance is now looking
 somewhat complex. I'm thinking of reworking the fileUpload handling to allow
 a user to register either a (String, String, Array[Byte]) = Any or (String,
 String, InputStream) = Any function, which would then be executed during
 request processing. The issue is that form field processing (ParamHolders)
 takes place in Req, before LiftSession has been set up, and the act of
 parsing the request for form data, particularly for large upload streams
 (the target of these changes) precludes holding on to any data for later
 processing (the servlet container cannot be expected to hold the entire
 request in memory). On the other hand, users should reasonably expect that
 their form handling functions are stateful, so I'm trying to think of some
 way to meet in the middle on form processing. Ideas?

 Derek

 



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

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Derek Chen-Becker
It's just an open item, and one that I had hoped I could contribute on. If
you have some ideas on restructuring the param handling I can take it from
there. No rush.

Derek

On Tue, Jun 30, 2009 at 3:33 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 What kind of priority is this issue?  I think I can abstract things in such
 a way that it works correctly, but it'll take a couple of days.

 On Tue, Jun 30, 2009 at 2:08 PM, Derek Chen-Becker 
 dchenbec...@gmail.comwrote:

 Well, as usual something that seemed simple at first glance is now looking
 somewhat complex. I'm thinking of reworking the fileUpload handling to allow
 a user to register either a (String, String, Array[Byte]) ⇒ Any or (String,
 String, InputStream) ⇒ Any function, which would then be executed during
 request processing. The issue is that form field processing (ParamHolders)
 takes place in Req, before LiftSession has been set up, and the act of
 parsing the request for form data, particularly for large upload streams
 (the target of these changes) precludes holding on to any data for later
 processing (the servlet container cannot be expected to hold the entire
 request in memory). On the other hand, users should reasonably expect that
 their form handling functions are stateful, so I'm trying to think of some
 way to meet in the middle on form processing. Ideas?

 Derek





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

 


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



[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-06-30 Thread David Pollak
What missing doctype?

2009/6/29 fbettag fr...@bett.ag


 On Safari i get Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
 This seems to be a safari 4 specific problem due to content-type text/
 html+xml. See
 http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8adf9c0ffb7

 On Jun 30, 7:39 am, fbettag fr...@bett.ag wrote:
  Hey guys, i've been having troubles with jQuery and Firefox/Safari due
  to the missing Doctype all night long:
 
  Uncaught exception: [Exception... Component returned failure code:
  0x80004003 (NS_ERROR_INVALID_POINTER)
  [nsIDOMNSHTMLElement.innerHTML]  nsresult: 0×80004003
  (NS_ERROR_INVALID_POINTER)  location: JS frame ::
 http://yourserver/include/jquery.js
  :: anonymous :: line 11″  data: no]
 
  The issue is described here, altho it kinda is somehow faulty xml on
  my part:
 http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_poi...
 
  Is there any way to prepend a DocType? Searching the group didn't turn
  anything useful up.
 
  Best regards
 



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

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Timothy Perrett
This has been hurting me for quite a while now (raised it on list  
about 2 months ago) and could really do with getting it fixed.

As derek points out, it's not a small change which is why I've done  
nothing about it to date - a little too much core hacking to feel happy

If you think your able to do something about it that would be  
absolutly brilliant!

Cheers

Tim

Sent from my iPhone

On 30 Jun 2009, at 22:33, David Pollak feeder.of.the.be...@gmail.com  
wrote:

 What kind of priority is this issue?  I think I can abstract things  
 in such a way that it works correctly, but it'll take a couple of  
 days.

 On Tue, Jun 30, 2009 at 2:08 PM, Derek Chen-Becker dchenbec...@gmail.com 
  wrote:
 Well, as usual something that seemed simple at first glance is now  
 looking somewhat complex. I'm thinking of reworking the fileUpload  
 handling to allow a user to register either a (String, String, Array 
 [Byte]) ⇒ Any or (String, String, InputStream) ⇒ Any function,  
 which would then be executed during request processing. The issue is 
  that form field processing (ParamHolders) takes place in Req, befor 
 e LiftSession has been set up, and the act of parsing the request fo 
 r form data, particularly for large upload streams (the target of th 
 ese changes) precludes holding on to any data for later processing ( 
 the servlet container cannot be expected to hold the entire request  
 in memory). On the other hand, users should reasonably expect that t 
 heir form handling functions are stateful, so I'm trying to think of 
  some way to meet in the middle on form processing. Ideas?

 Derek





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

 

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



[Lift] Re: [scala] Re: higher-kinded types

2009-06-30 Thread Meredith Gregory
Adriaan,

i believe the examples below indicate that Scala's type-checker agrees with
me that your proposed correction for my encoding allows for potential
loosening of A-ness. See the example below.

In English, in a monad C over A we don't want to encounter some other type
besides A's. We see the problem when we insist that A's have some property,
like being at least Option'ed.

Best wishes,

--greg

// smallest expression of monad i can find
trait MBrace[C[X] : MBrace[C,X],A] {
  def nest( a : A ) : C[A]
  def flatten[T : C[C[A]]]( bsq : T ) : C[A]
}

// a monad that is a Seq
trait MBraceSeq[C[X] : MBrace[C,X] with Seq[X],A] extends MBrace[C,A]

// This is fine
abstract class MLink[A]( a : Option[A], na : Option[MLink[A]] ) extends
Seq[A] with MBrace[MLink,A]

// But this is not
//abstract class MLink[A : Option[_]]( a : Option[A], na : Option[MLink[A]]
) extends Seq[A] with MBrace[MLink,A]

The complaint is exactly in line with my concern:

scala console:6: error: the kinds of the type arguments (MLink,A) do not
conform to the expected kinds of the type parameters (type C,type A) in
trait MBrace.
MLink's type parameters do not match type C's expected parameters: type A's
bounds : Nothing : Option[_] are stricter than type X's declared bounds :
Nothing : Any
   abstract class MLink[A : Option[_]]( a : Option[A], na :
Option[MLink[A]] ) extends Seq[A] with MBrace[MLink,A]


On Fri, Jun 26, 2009 at 10:24 AM, Meredith Gregory lgreg.mered...@gmail.com
 wrote:

 Adriaan,

 First of all, thanks for the time and thought you put into this. i'm not
 happy with your interpretation. i cannot convince myself that refinements
 might not relax the A-ness (apologies for the awful sfunctor of a pun
 hiding here ;-) of the contained element. More importantly, the bug is a bug
 regardless of whether my encoding has the semantics i want. The compiler is
 complaining that type bounds are not met that to my eyes plainly are --
 unless you can convince me otherwise. For example, if you can give me the
 interpretation into the appropriate type calculus of the situation i
 reported, i will do the calculation myself.

 Best wishes,

 --greg


 On Fri, Jun 26, 2009 at 2:35 AM, Adriaan Moors 
 adriaan.mo...@cs.kuleuven.be wrote:

 Hi,
 I think you meant to write

 trait MBrace[C[X] : MBrace[C,X], A]

 instead of

 trait MBrace[C[_] : MBrace[C,A], A]

 (see also ticket 2096 http://lampsvn.epfl.ch/trac/scala/ticket/2096)

 We only used type members in our (OOPSLA) paper
 to hide some of the higher-kinded types away for backward compatibility.

 I would not advocate encoding type constructors using something like your
 TypeCtor1 trait, as the encoding makes typekind checking less precise, and
 you'll lose type inference (type constructor inference should be coming to
 2.8.x, btw).

 cheers
 adriaan

 On Thu, Jun 25, 2009 at 8:47 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 All,

 The following code works without going through the M-P-O construction. It
 enjoys approximately the same brevity as a Haskell type class.

 // smallest expression of monad i can find
 trait MBrace[C[_] : MBrace[C,A],A] {
   def nest( a : A ) : C[A]
   def flatten[T : C[C[A]]]( bsq : T ) : C[A]
 }

 // one of the simplest witnesses of monad i can find
 class MBraceSeq[A]( a_ : A* ) extends Seq[A] with MBrace[MBraceSeq,A] {
   override def nest( a : A ) = new MBraceSeq[A]( a )
   override def flatten[T : MBraceSeq[MBraceSeq[A]]]( bsq : T ) :
 MBraceSeq[A] = {
 (new MBraceSeq[A]( ) /: bsq)( {
   ( acc : MBraceSeq[A], e : MBraceSeq[A] ) = ( acc ++ e
 ).asInstanceOf[MBraceSeq[A]]
 } )
   }
   override def length = a_.length
   override def elements = a_.elements
   override def apply( n : Int ) = a_.apply( n )
 }

 Best wishes,

 --greg


 On Wed, Jun 24, 2009 at 3:49 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 All,

 Am i correct in concluding that the solution in The
 Moors-Piessens-Odersky paper only works with collections that have been
 clever enough to have used type members rather that type parameters? Or, is
 there a trick to making the vast majority of the collections types that are
 parametrically typed look as if they have type members? (See example 
 below.)

 Best wishes,

 --greg

 // Paraphrasing the basic Moors-Piessens-Odersky construction
 trait TypeCtor1 { type E }
 trait Brace[A] extends TypeCtor1 {
   type C : TypeCtor1
   def nest( a : A ) : C{type E = A}
   def flatten( bsq : C{type E=C{type E=A}} ) : C{type E=A}
 }

 // Now, how to make a version of BraceList since List is parametrically
 typed?


 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

 http://biosimilarity.blogspot.com

 Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more
 information.





 --
 L.G. Meredith
 

[Lift] Re: YA menu question: separate menus

2009-06-30 Thread george

This feature will be very useful for me also. Thanks.

However, I would like to be able to show a separate menu for the
MegaProtoUser menu items.

So it would be great if the MegaProtoUser built in menu items had some
default LocGroup set. Or if there was a way to change the LocGroup of
a Loc at runtime.

Maybe this is possible but I have missed it?

George

On Jun 30, 9:37 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
 Yes. The error you're getting looks like a version mismatch or some other
 dependency issue. Can you wipe ~/.m2 and try th build again?

 Derek



 On Tue, Jun 30, 2009 at 10:44 AM, glenn gl...@exmbly.com wrote:

  Derek,

  I was out of town all last week and just tried to rebuild and run with
  your
  new changes, but got the following error:

  ERROR - Failed to Boot
  java.lang.NoSuchMethodError: net.liftweb.sitemap.SiteMap.init(Lscala/
  Seq;)V
         at bootstrap.liftweb.Boot.boot(Boot.scala:41)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
  (ClassHelpers.scala:408)
         at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
  (ClassHelpers.scala:406)
         at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
  (LiftRules.scala:1049)
         at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
  (LiftRules.scala:1049)
         at net.liftweb.util.Full.map(Box.scala:330)
         at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:1049)
         at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:561)
         at net.liftweb.http.LiftFilter.init(LiftServlet.scala:529)
         at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:
  97)
         at org.mortbay.component.AbstractLifeCycle.start
  (AbstractLifeCycle.java:50)
         at org.mortbay.jetty.servlet.ServletHandler.initialize
  (ServletHandler.java:653)
         at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
         at org.mortbay.jetty.webapp.WebAppContext.startContext
  (WebAppContext.java:1239)
         at org.mortbay.jetty.handler.ContextHandler.doStart
  (ContextHandler.java:517)
         at
  org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
  466)
         at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart
  (Jetty6PluginWebAppContext.java:124)
         at org.mortbay.component.AbstractLifeCycle.start
  (AbstractLifeCycle.java:50)
         at org.mortbay.jetty.handler.HandlerCollection.doStart
  (HandlerCollection.java:152)
         at org.mortbay.jetty.handler.ContextHandlerCollection.doStart
  (ContextHandlerCollection.java:156)
         at org.mortbay.component.AbstractLifeCycle.start
  (AbstractLifeCycle.java:50)
         at org.mortbay.jetty.handler.HandlerCollection.doStart
  (HandlerCollection.java:152)
         at org.mortbay.component.AbstractLifeCycle.start
  (AbstractLifeCycle.java:50)
         at org.mortbay.jetty.handler.HandlerWrapper.doStart
  (HandlerWrapper.java:130)
         at org.mortbay.jetty.Server.doStart(Server.java:222)
         at org.mortbay.component.AbstractLifeCycle.start
  (AbstractLifeCycle.java:50)
         at org.mortbay.jetty.plugin.Jetty6PluginServer.start
  (Jetty6PluginServer.java:132)
         at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty
  (AbstractJettyMojo.java:441)
         at org.mortbay.jetty.plugin.AbstractJettyMojo.execute
  (AbstractJettyMojo.java:383)
         at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute
  (AbstractJettyRunMojo.java:210)
         at
  org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:
  184)
         at org.apache.maven.plugin.DefaultPluginManager.executeMojo
  (DefaultPluginManager.java:579)
         at

  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFai 
  lures
  (DefaultLifecycleExecutor.java:498)
         at

  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForPr 
  oject
  (DefaultLifecycleExecutor.java:265)
         at
  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
  (DefaultLifecycleExecutor.java:191)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
  (DefaultLifecycleExecutor.java:149)
         at org.apache.maven.DefaultMaven.execute_aroundBody0
  (DefaultMaven.java:223)
         at org.apache.maven.DefaultMaven.execute_aroundBody1$advice
  (DefaultMaven.java:304)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
         at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2
  (MavenEmbedder.java:904)
         at
  org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice
  (MavenEmbedder.java:304)
         

[Lift] Re: Error attempting to persist Mapper

2009-06-30 Thread Jonathan A Ferguson

On 01/07/2009, at 6:10 AM, David Pollak wrote:



 On Mon, Jun 29, 2009 at 5:53 PM, Jonathan A Ferguson j...@spiralarm.com 
  wrote:
 It would be nice,  is it a lot of effort to backport to 1.0.1 ?

 The bigger issue is what is 1.0.1 and who/when will it come out?

 Will any of the Lift committers sign up to spin a 1.0.1 build and  
 release?


If folks are busy on 1.1, that is cool. We'll take a look at 1.1  
snapshot and
I can live on the endangered list for a little while :)


Thanks for uber quick responses.


Cheers

Jono






 What is the state of 1.1 - If we stick with 1.0 functionality should  
 APIs be fixed?
 I'll become an endangered species if I move us otherwise.

 Jono


 On 30/06/2009, at 9:50 AM, David Pollak wrote:

 Fixed in 1.1-SNAPSHOT

 THere's an ill-fated 1.0.1 that's kinda going nowhere.  Is it  
 important to backport it to 1.0.1?

 On Mon, Jun 29, 2009 at 3:18 PM, Jonathan A Ferguson j...@spiralarm.com 
  wrote:
 I knew there would be at least one thing I would forget.

 version 1.0.



 On 30/06/2009, at 3:51 AM, David Pollak wrote:

 What version of Lift are you using?

 On Thu, Jun 25, 2009 at 7:33 PM, Jonathan Ferguson j...@spiralarm.com 
  wrote:

 Hi all,
  I'm attempting to persist a Mapper used to join two tables.

 java.lang.NullPointerException: Trying to open an empty Box
at net.liftweb.util.EmptyBox.open_$bang(Box.scala:370)
at net.liftweb.util.EmptyBox.open_$bang(Box.scala:366)
at net.liftweb.mapper.MetaMapper$$anonfun 
 $12.apply(MetaMapper.scala:
 583)
at net.liftweb.mapper.MetaMapper$$anonfun 
 $12.apply(MetaMapper.scala:
 578)
at net.liftweb.mapper.DB$.use(DB.scala:305)
at net.liftweb.mapper.MetaMapper 
 $class.save(MetaMapper.scala:577)

 The empty box is in the update statement, which confuses me as I
 should be performing an insert.( from MetaMapper )

val ret: Boolean = DB.prepareStatement(UPDATE
 +dbTableName+ SET +whatToSet(toSave)+ WHERE +indexMap.open_! +
 = ?, conn)

 I am assuming it is something to do with my understand of how to  
 use a
 non-keyed Mapper.
 The exception is thrown when save is called in the join function.

 class AB extends Mapper[AB] {

def getSingleton = AB

object A  extends MappedLongForeignKey(this, A)  
 { override def
 dbColumnName = a_Bs_id }
object B  extends MappedLongForeignKey(this, B)  
 { override def
 dbColumnName = B_id }
object index  extends MappedInt(this) { override def  
 dbColumnName =
 Bs_idx }

 }
 object AB extends AB with MetaMapper[AB]
 {
   override def dbTableName = A_B

  def join (a : A, b : B):Boolean = {
val list = AB.findAll(By(AB.a,a))
val i = list.isEmpty match {
  case true = 0
  case false = list.size
}
this.create.A(a).B(b).index(i).save
}

 }


 Any pointers would be appreciated, I can't change the data structure
 as the table is used by other applications.

 Jono






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









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









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

 


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



[Lift] Re: Rendering a View from a Snippet

2009-06-30 Thread fbettag

The use case is the following, i am writing a CMS with lift where the
Admin-Interface is just a JavaScript-jQuery-Overlay. The idea behind
it is, that you don't need a special admin-website, but instead you
can just pop open this overlay and manage everything from there.

Since i wouldn't want to let lift's amazing capabilities of creating
forms go to waste, i wanted to create subforms which i can render on
startup and place in the divs.

The idea behind the JS-Admin is, that i don't want people to have to
get off the actual website to change content. Like they should see the
live-changes they do while typing textile in the JS-overlay in the
background behind the JS-Window. I have this as proof of concept as
a merb (ruby) application, the customers love everything except the
performance which isn't really for high-traffic sites ;)

Also this concept is thought as a workaround for my other thread
(http://groups.google.com/group/liftweb/browse_thread/thread/
5b09578bf4203618). Because then i wouldn't have to get  $('#admin-
foo').load('/api/contents') to work, which fails for different reasons
on different browsers with lift.

On Jun 30, 10:09 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Jun 29, 2009 at 9:05 PM, fbettag fr...@bett.ag wrote:

  Hey guys,

  i was wondering how one would go about rendering a View from a
  Snippet. I guess i could Load the XML, but i am not sure if this is
  the best way. Also if it is, what would be the best way to get the
  path to the view?

 Snippets are just things that take XML in and modify the XML (or replace
 it), so, yes, you can return part or all of an XHTML page via a snippet.
 What's your use case?



  best regards

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



[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-06-30 Thread fbettag

To describe it a little cleaner:

in Safari 4, whenever i try to $('#foo').load('/some.html'), it fails
with Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 since the
content-type is text/html+xml.
described here: 
http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8adf9c0ffb7

in Firefox there is a similar problem (error up at the first post)
which happens because FF kinda sees an error on the lift-generated
XHTML/XML which is caused because the doctype seems to be strict by
default (i guess).
described here: 
http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_pointer/

I put up some really simple stuff in 'some.html' with 4 html tags, and
it fails on Safari and on Firefox.

When i try to set the Doctype to transitional, the Browser seems to
ignore it somehow, i guess it's because of the ?xml? tag that occurs
before the doctype.

Is anyone else here using $(..).load('url') on a lift'ed project?


On Jun 30, 11:48 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 What missing doctype?

 2009/6/29 fbettag fr...@bett.ag







  On Safari i get Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
  This seems to be a safari 4 specific problem due to content-type text/
  html+xml. See
 http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8a...

  On Jun 30, 7:39 am, fbettag fr...@bett.ag wrote:
   Hey guys, i've been having troubles with jQuery and Firefox/Safari due
   to the missing Doctype all night long:

   Uncaught exception: [Exception... Component returned failure code:
   0x80004003 (NS_ERROR_INVALID_POINTER)
   [nsIDOMNSHTMLElement.innerHTML]  nsresult: 0×80004003
   (NS_ERROR_INVALID_POINTER)  location: JS frame ::
 http://yourserver/include/jquery.js
   :: anonymous :: line 11″  data: no]

   The issue is described here, altho it kinda is somehow faulty xml on
   my part:
 http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_poi...

   Is there any way to prepend a DocType? Searching the group didn't turn
   anything useful up.

   Best regards

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



[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-06-30 Thread David Pollak
Please fork this project http://github.com/dpp/lift_1_1_sample/tree/master and
provide
an example of the failure.  I'll knock something together than
overcomes the problem.

2009/6/30 fbettag fr...@bett.ag


 To describe it a little cleaner:

 in Safari 4, whenever i try to $('#foo').load('/some.html'), it fails
 with Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 since the
 content-type is text/html+xml.
 described here:
 http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8adf9c0ffb7

 in Firefox there is a similar problem (error up at the first post)
 which happens because FF kinda sees an error on the lift-generated
 XHTML/XML which is caused because the doctype seems to be strict by
 default (i guess).
 described here:
 http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_pointer/

 I put up some really simple stuff in 'some.html' with 4 html tags, and
 it fails on Safari and on Firefox.

 When i try to set the Doctype to transitional, the Browser seems to
 ignore it somehow, i guess it's because of the ?xml? tag that occurs
 before the doctype.

 Is anyone else here using $(..).load('url') on a lift'ed project?


 On Jun 30, 11:48 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  What missing doctype?
 
  2009/6/29 fbettag fr...@bett.ag
 
 
 
 
 
 
 
   On Safari i get Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
   This seems to be a safari 4 specific problem due to content-type text/
   html+xml. See
  http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8a.
 ..
 
   On Jun 30, 7:39 am, fbettag fr...@bett.ag wrote:
Hey guys, i've been having troubles with jQuery and Firefox/Safari
 due
to the missing Doctype all night long:
 
Uncaught exception: [Exception... Component returned failure code:
0x80004003 (NS_ERROR_INVALID_POINTER)
[nsIDOMNSHTMLElement.innerHTML]  nsresult: 0×80004003
(NS_ERROR_INVALID_POINTER)  location: JS frame ::
  http://yourserver/include/jquery.js
:: anonymous :: line 11″  data: no]
 
The issue is described here, altho it kinda is somehow faulty xml
 on
my part:
  http://fitzsimmons.ca/jquery-xhtml-11-strict-and-ns_error_invalid_poi.
 ..
 
Is there any way to prepend a DocType? Searching the group didn't
 turn
anything useful up.
 
Best regards
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp
 



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

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Vlad Seryakov

I am also contemplating to use Lift but lack of big file upload is the
showstopper. We need to upload images, and big video files and
currently there i snot way to do it in Lift, i need something else to
handle that which makes the whole stuff more complex than needed.

Spooling into temp file and doing async upload of multiple files at
the same time is what needed. Nowadays media uploads is normal and
those files are getting bigger and bigger.

On Jun 30, 5:58 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 This has been hurting me for quite a while now (raised it on list  
 about 2 months ago) and could really do with getting it fixed.

 As derek points out, it's not a small change which is why I've done  
 nothing about it to date - a little too much core hacking to feel happy

 If you think your able to do something about it that would be  
 absolutly brilliant!

 Cheers

 Tim

 Sent from my iPhone

 On 30 Jun 2009, at 22:33, David Pollak feeder.of.the.be...@gmail.com  
 wrote:

  What kind of priority is this issue?  I think I can abstract things  
  in such a way that it works correctly, but it'll take a couple of  
  days.

  On Tue, Jun 30, 2009 at 2:08 PM, Derek Chen-Becker dchenbec...@gmail.com
   wrote:
  Well, as usual something that seemed simple at first glance is now  
  looking somewhat complex. I'm thinking of reworking the fileUpload  
  handling to allow a user to register either a (String, String, Array
  [Byte]) = Any or (String, String, InputStream) = Any function,  
  which would then be executed during request processing. The issue is
   that form field processing (ParamHolders) takes place in Req, befor
  e LiftSession has been set up, and the act of parsing the request fo
  r form data, particularly for large upload streams (the target of th
  ese changes) precludes holding on to any data for later processing (
  the servlet container cannot be expected to hold the entire request  
  in memory). On the other hand, users should reasonably expect that t
  heir form handling functions are stateful, so I'm trying to think of
   some way to meet in the middle on form processing. Ideas?

  Derek

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Naftoli Gugenhem

I'm not too familiar with the topic but instead of dropping lift, as a 
temporary workaround can't you have the upload be handled by another servlet 
which will save it and then redirect?

-
Vlad Seryakovvserya...@gmail.com wrote:


I am also contemplating to use Lift but lack of big file upload is the
showstopper. We need to upload images, and big video files and
currently there i snot way to do it in Lift, i need something else to
handle that which makes the whole stuff more complex than needed.

Spooling into temp file and doing async upload of multiple files at
the same time is what needed. Nowadays media uploads is normal and
those files are getting bigger and bigger.

On Jun 30, 5:58 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 This has been hurting me for quite a while now (raised it on list  
 about 2 months ago) and could really do with getting it fixed.

 As derek points out, it's not a small change which is why I've done  
 nothing about it to date - a little too much core hacking to feel happy

 If you think your able to do something about it that would be  
 absolutly brilliant!

 Cheers

 Tim

 Sent from my iPhone

 On 30 Jun 2009, at 22:33, David Pollak feeder.of.the.be...@gmail.com  
 wrote:

  What kind of priority is this issue?  I think I can abstract things  
  in such a way that it works correctly, but it'll take a couple of  
  days.

  On Tue, Jun 30, 2009 at 2:08 PM, Derek Chen-Becker dchenbec...@gmail.com
   wrote:
  Well, as usual something that seemed simple at first glance is now  
  looking somewhat complex. I'm thinking of reworking the fileUpload  
  handling to allow a user to register either a (String, String, Array
  [Byte]) = Any or (String, String, InputStream) = Any function,  
  which would then be executed during request processing. The issue is
   that form field processing (ParamHolders) takes place in Req, befor
  e LiftSession has been set up, and the act of parsing the request fo
  r form data, particularly for large upload streams (the target of th
  ese changes) precludes holding on to any data for later processing (
  the servlet container cannot be expected to hold the entire request  
  in memory). On the other hand, users should reasonably expect that t
  heir form handling functions are stateful, so I'm trying to think of
   some way to meet in the middle on form processing. Ideas?

  Derek

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp



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



[Lift] Re: Thoughts on file streaming

2009-06-30 Thread Jeppe Nejsum Madsen

Derek Chen-Becker dchenbec...@gmail.com writes:

 Well, as usual something that seemed simple at first glance is now looking
 somewhat complex. I'm thinking of reworking the fileUpload handling to allow
 a user to register either a (String, String, Array[Byte]) ⇒ Any or (String,
 String, InputStream) ⇒ Any function, which would then be executed during
 request processing. The issue is that form field processing (ParamHolders)
 takes place in Req, before LiftSession has been set up, and the act of
 parsing the request for form data, particularly for large upload streams
 (the target of these changes) precludes holding on to any data for later
 processing (the servlet container cannot be expected to hold the entire
 request in memory). On the other hand, users should reasonably expect that
 their form handling functions are stateful, so I'm trying to think of some
 way to meet in the middle on form processing. Ideas?

Sounds nice. Will this in some way be able to display any progress of
the upload (which, imho, is needed for large uploads). E.g. something
like this http://wiki.nginx.org//NginxHttpUploadProgressModule

/Jeppe

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