Re: [Lift] Happy 3rd Anniversary to Lift

2010-02-27 Thread Tim Perrett

Wow, three years already! Man, what an adventure its been!!

David I think you also need a big thank you from both the rest of  
the team and the community - thanks for fostering a community where  
newbies are welcome and production support is a primary concern.


Its been a hell of a ride so far - cant wait to see what 2010 and 2011  
bring for us.


Cheers, Tim

On 27 Feb 2010, at 01:26, David Pollak wrote:


Folks,

Today is Lift's 3rd Anniversary/Birthday!

Before I go offline for the weekend, I wanted to give a hearty  
thanks for the Scala team, the Scala community, the Lift committers,  
and most importantly the Lift community members new and old for  
making Lift possible, fun, and challenging.


Thank you all very, very much for everything each and everyone one  
of you has done.


David

--
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] lift-amqp, RabbitMQ and Subscriptions?

2009-04-22 Thread Tim Perrett

Guys,

Im just starting to look at RabbitMQ and lift-amqp. I have a situation
where by I have a central pot of information and a bunch of different
consumers that want to keep up to date with changes to things they are
interested in (specifically, we'll call the things they are interested
in jobs).

Im thinking that the central application will probably use some kind
of actor schedule to constantly update its information about all jobs
(as it in turn will be getting it through some SOAP services),
however, what I would then like it to do is notify any other consumers
(which will  be other applications) that have opted to subscribe to
information / updates about that job via AMQP. Consumers will also be
able to hand messages to the central service and effectively say deal
with this job and notify me about any changes.

Now then, excuse my complete ignorance as im new to AMQP but its
possible to build such a workflow, right? Any pro's / con's in doing
this?

Just looking for a bit of a sounding board right now so any
information / feedback would be greatly appreciated

Cheers, Tim


--~--~-~--~~~---~--~~
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] Moving to streaming upload API

2009-04-21 Thread Tim Perrett

Guys,

I've been taking a close look at the way lift handles uploads. Right
now were putting the entire thing (upload) into memory. This, IMO, is
not a good look. I managed to crash my whole laptop as Jetty scrabbled
for memory to store a massive upload I was trying.

Looking at the commons upload API it appears it has pretty good
support for streaming:

http://commons.apache.org/fileupload/streaming.html

Can we not rework the upload support in Req.scala to use a streaming
methodology instead? A sweet by-product will be easily able to do
CometActor based upload progress bars ;-)

Thoughts?

Cheers, Tim
--~--~-~--~~~---~--~~
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] Blog post about lifts binding system

2009-04-13 Thread Tim Perrett

Hey guys,

There has been a bunch of questions lately about bind(..) and how to
use it etc, so i thought id just write a blog post about it discussing
ways to use it and cover some of the other funky stuff it can do.

Check it out here: http://is.gd/sfyT

Cheers, Tim
--~--~-~--~~~---~--~~
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] Thread safe configuration without abusing the session?

2009-04-06 Thread Tim Perrett

Guys,

Im working on a system where by there is a bunch of configuration
options that should exist for a given application, and are application
wide... Im handling this right now in a similar way to LiftRules.

However, I also have some configuration that can be done on a per
user / per session basis - what is the recommended strategy for
handling this without simply abusing the crap out of SessionVar?

Cheers, Tim



--~--~-~--~~~---~--~~
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] Who did the hungarian translation?

2009-04-04 Thread Tim Perrett

Hey guys,

Who did the hungarian translations of lift core? I want to make an
addition that needs adding to lift core properties files but I don't
speak hungarian!

Cheers, Tim
--~--~-~--~~~---~--~~
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] Proposed URL Shortening widget

2009-04-02 Thread Tim Perrett

Guys,

I've been contemplating doing this for a while and am now finding
myself with a bunch of free time tomorrow and a need to write some
code.

So, I want to make a widget that shortens URL's in an extendable
way... Im thinking of having something like:

trait URLReductionProvider { ... }

object TinyURL extends URLReductionProvider
object IsGd extends URLReductionProvider
object BitLy extends URLReductionProvider

You get the general idea...

So, im thinking of implementing the actual URL fetching stuff as a
partial function so that users could do:

def reductionResult = {
  case Full(result) = // result is the URL, insert into database etc
  case _ = // something went wrong
}

My question is however, if i make this actor based, could someone
implement it so rather than writing there URL to database in a
separate thread to the main one, would it be possible for them to say,
use a JsCmd and return that to update the browser? Im guessing not
unless it was a CometActor right.

This then got me thinking, do you guys thing this is worth doing actor
based, or is it just ok to make a blocking call to the provider?
(tinyurl or is.gd etc)

Cheers, Tim
--~--~-~--~~~---~--~~
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] Need for lightweight JPA archetype

2009-04-01 Thread Tim Perrett

Guys,

Do people see room for a blank JPA archetype just like we have blank
and basic of normal lift archetypes?

IMO, whilst its great having the basic one for learning and examples,
having something thats a workable starting point without having to
remove code etc would be helpful.

I appreciate this is a bit lazy - but i don't think it would take much
work and would provide a neat solution

Thoughts?

Tim
--~--~-~--~~~---~--~~
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] Form action URI's

2009-03-26 Thread Tim Perrett

Guys,

I have a catalogue of products that essentially have a bunch of meta-
data attached to them and the user can dynamically drill down into to
get a relevant list of products. Because of this query type operation,
im using the query string like so:

/catalogue?filter=marin

I know some people don't agree with this, but IMO, its the most REST
approach with the rest of the ROA I have in this application (i.e.
there is no meaningful relationship between the filter options so it
makes no sense to use resource paths) - anyway... to the problem at
hand.

I have a function def that calculates links etc taking into account
all the various filters and things, and i want a simple results on a
page type drop-down select. Now, this is fairly simple as i already
have the function defined to calculate the url and yes, i know i could
calculate the new URL in javascript, but i dont really want to do that
as its two lot of code to maintain. When I write a form with lift and
bind(...) the action=catalogue with a post so my server side
function bones because the S.params call cant find anything (there are
no longer any params).

Any ideas on how one could work around this?

Cheers, Tim
--~--~-~--~~~---~--~~
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] Portable components of logic?

2009-03-23 Thread Tim Perrett

Guys,

Has anyone got a good strategy for packaging up components of logic
within lift?

At our company we have a particular application that im writing some
really nice logic for inside lift and im wondering how I can package
that up and re-use it (short of copy and paste snippet files and the
various css / js files)?

I know we have a snippet search path, and thats cool as we can just
bundle a bunch of logic into seperate JARs, but what about view / UI
content? Perhaps some specially formated JAR layout with some kind of
extension to LiftRules that says also look here for stuff?

Thanks

Tim
--~--~-~--~~~---~--~~
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] Decoupling Lifts Template System

2009-03-19 Thread Tim Perrett

Guys,

What would it take to decouple Lifts template system? Specifically, im
interested in reusing a bunch of the localization and view
componentry.

I know that wa back there was talk of doing this. For instance,
lets say that you wanted filesystem view storage, rather than views
being held in the WAR... right now, you have to rebuild the wheel to
keep the lift functionality (like selecting templates based on locale
ISO code) as lift currently only looks for resources based on the
context root.

Anyway... what are people's thoughts? I appreciate this is a fairly
big task, but anyone want to bang it out for 1.1?

Cheers, Tim
--~--~-~--~~~---~--~~
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] Explicitly shutting down comet actor in a single session

2009-03-18 Thread Tim Perrett

Guys,

I have a situation where by im using comet actors to watch something
on a 3rd party system. Now, when the monitoring needs to stop, I want
to explicitly shutdown that comet actor and redirect some to place
else. However, when I pass the comet actor the ShutDown message, the
page redirects to /

So, my question: is it possible to do something in localShutdown to
redirect the user? Or in some other-way stop the redirecting to / ?
I want to do this because by keeping it to a single comet actor
lifecycle, jobs are submitted on the 3rd party system only once even
if they refresh the page etc.

Thoughts?

Cheers, Tim
--~--~-~--~~~---~--~~
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] Bug in LiftRules defaultLocaleCalculator

2009-03-10 Thread Tim Perrett

Guys,

I think i might have just found a bug in the
defaultLocaleCalculator... By simply adding S.?(mykey) to a comet
actor, it bombs in spectacular style.

I worked the bug back as it was originally getting an NPE from my
code, so I shoved everything into boxes - that appears to have now
moved the issue down into LiftRules...

The default calculator looks like:

request.flatMap(_.getLocale() match {case null = Empty case l: Locale
= Full(l)}).openOr(Locale.getDefault())

where request is Box[HttpServletRequest]. So then, flatMap is a method
on Box, thats fine, but then:

_.getLocale() match {...}

The issue im seeing suggests that _ is actually null in this context
and then throwing an NPE. This is easily solvable but involves shoving
the placeholder into a box:


request.flatMap(r = {
  Box.!!(r.getLocale()) match {
case l: java.util.Locale = Full(loc)
case _ = Empty
  }
}).openOr(Locale.getDefault())


Thoughts?

Cheers, Tim
--~--~-~--~~~---~--~~
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] SQL Server Errors

2009-03-09 Thread Tim Perrett

Guys,

Just logged a couple of bugs for SQL Server drivers:

http://liftweb.lighthouseapp.com/projects/26102/tickets/18-sql-server-error-with-timestamp-col-type#ticket-18-1

http://liftweb.lighthouseapp.com/projects/26102/tickets/17-mappedtext-sql-server-clob#ticket-17-1

Can someone take a look? This really is not my speciality.

Cheers, Tim
--~--~-~--~~~---~--~~
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] Proposed localization change to S

2009-03-06 Thread Tim Perrett

Guys,

I have a situation where I want to localize a bunch of dynamic texts,
however the current behavior of S.? is to return the input text if its
found in a resource bundle. Whilst I see the rational for this, I have
another situation where I want to pass a key, and if it doesn't find
it, display something else (the english version). Id rather not use
the english text as the translation key, as if the english text
changes, my database translations will break (not good!)

I can achieve the functionality needed right by doing something like:

S.loc(item.localization_key.toString + .name) match {
  case Full(t) = t
  case _ = Text(doc.name.toString)
}

But it would be nice if we could have a utility method in S which
allowed you do do:

?(my.localization.key, defaultText.toString)

Thoughts?

Cheers, Tim
--~--~-~--~~~---~--~~
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] Proposed addition to LRU

2009-03-05 Thread Tim Perrett

Guys,

I have a situation where I need to retrive all the keys in my
KeyedCache - however, KeyedCache extends LRU, which it turn uses
apache commons LRUMap internally.

The LRU class has a private val map: LRUMap

Is there any objections to me adding a method to LRU to return all the
keys from that map?:

// off the top of my head...
def keys: Array[KeyType] = map.keySet().asInstanceOf[Set
[KeyType]].toArray

Thoughts?

Cheers, Tim
--~--~-~--~~~---~--~~
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: Locale and languages

2009-03-02 Thread Tim Perrett

Hi Jon,

I have a working implementation of this now :-)

To give you some background, we have a locale calculator in lift and
its default behavior looks at the incoming request headers to asses
what locale should be set. Whilst in normal operation this has no
affect on your application, it becomes extremely useful when you want
to localize based on a whole bunch of parameters. Check out the scala
docs for S here:

http://scala-tools.org/mvnsites/liftweb/lift-webkit/scaladocs/net/liftweb/http/S$object.html

Because java.util.Locale has really neat features for presenting
localized country names etc, i just use a something like:

S.locale.getDisplayName(S.locale) // = Might return italiano for
instance

As for the database content - I have a database backed resource bundle
subclass that feeds into an LRU cache when lift boots up. The bundle
then talks with the LRU cache to return the correct string.

Sorry if that doesnt make much sense! If anything is not clear, then
just post back and i'll try to me more succinct.

Thanks

Tim

On Mar 2, 4:43 pm, Jon Hancock shellsha...@gmail.com wrote:
 I am also interested in locale strategies.
 I would like to build a website which will be in Mandarin and
 English.  The English is mostly for my use as most users will see
 mandarin.  I expect it will be easiest to have most of my decorative
 info (link names, static info) in the views themselves.  The DB
 content will be what it is (mostly mandarin), no need for multiple
 copies.
 I guess I first want to sniff the request (or maybe do a geo query on
 the IP) and decide if I should serve up EN or CN views and
 subsequently allow the user to click a preference (English or Chinese
 link) to override my guesswork and set a cookie for the preference. I
 do see how I would set the cookie.  How to manage two sets of views I
 do not see.
 How have others done this with lift?

 thanks, Jon

 On Mar 2, 7:59 am, Derek Chen-Becker dchenbec...@gmail.com wrote:

  That seems reasonable, although IIRC it means that you need two queries to
  the database to fetch a translation using mapper strictly. Of course, you
  could use the raw SQL queries on DB to fetch things with one join.

  Derek

  On Sun, Mar 1, 2009 at 2:54 PM, Tim Perrett timo...@getintheloop.eu wrote:

   Guys,

   Just working something through and would like a bit of input from
   lifted :-)

   Im debating how im going to store my locale data and present that
   information to the user in a sensible way. Right now, im thinking of
   using MappedLocale to hold locale type information in my database, and
   then have a one-to-many (locale - translation). This seems fairly
   reasonable, but i've changed my mind several times now so would be
   ever so grateful for some other input :-)

   Cheers, Tim
--~--~-~--~~~---~--~~
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] Configurable JQuery Version?

2009-02-28 Thread Tim Perrett

Guys,

I have a lift app that since our 1.3.2 update has broken a bunch of
stuff. Id imagine im not the only person in this pickle and wonder if
there is a way we could possibly make JQuery a configurable version?

Perhaps LiftRules.jqueryVersion ?

Thoughts?

Cheers, Tim
--~--~-~--~~~---~--~~
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: Issue with http://liftweb.net site design (IE7 / Opera 9.63)

2009-02-27 Thread Tim Perrett

Jean-Luc, thanks for pointing these out - the site is brand brand new,
so were still working out the bugs.

Cheers, Tim

On Feb 27, 4:15 pm, Jean-Luc jlcane...@gmail.com wrote:
 Sorry if I sent the message to the wrong list (in this case would you please
 reply with the right list or email address in order to forward the issue to
 the right person ?).

 For your information, there is an issue with thehttp://liftweb.netwebsite
 design with IE7 and Opera 9.63 on Windows platform (Vista). Firefox 3 is ok.
 I joined the screen capture.
 Jean-Luc

 2009/2/27 RK theperfectb...@gmail.com



  Derek  Tyler...

  I made the changes to a small rasterized version before i joined the Google
  group and saw the large svg. I will update the large svg next time I have
  free time to put into this.

  Greg...

  The cloudy thing was taken straight from the liftweb site. I did not make
  that. I just put the tweaked logo into it so that whomever is in charge of
  the site can switch them easily.

  I'm not trying to redesign the logo. I think the current logo is fine. I
  just 'fixed it' a bit.

  David was most interested in me putting some design time into the Lift css
  templates... which is something I am interested in doing eventually, but
  will not have too much time to get into in the immediate future.

  - r

  --- 
  
  R o n K u r t i                             -- In SF

  --- 
  
 http://ron.kurti.com                   -- blah, blah, blah
  --- 
  

  On Thu, Feb 26, 2009 at 2:19 PM, Derek Chen-Becker 
  dchenbec...@gmail.comwrote:

  For that matter, are you doing the modifications to the original SVG, or
  to a rasterized version?

  On Thu, Feb 26, 2009 at 3:50 PM, TylerWeir tyler.w...@gmail.com wrote:

  I like the changes.  Do you have a bigger version?

  On Feb 26, 4:21 pm, Ron Kurti theperfectb...@gmail.com wrote:
   This is my first post.

   I expressed interest to David about helping out with
   the look  feel of LIFT so that the design gets as
   much attention to detail as the code.

   As a starting point...
   I'd like to contribute a more refined version of the logo.
   The differences are subtle... but the level of
   quality and detail is higher, IMO.

   logo on transparent background (32bit png) »
 http://ron.kurti.com/lift/logo2+alpha.png

   header image for the lift website (8bit png) »
 http://ron.kurti.com/lift/home-top-2.png

   I'm 100% open to comments and suggestions.
   I don't have much time to contribute, but I will try to
   add as much as I can wherever I can.

   I look forward to doing more in the future.

   Congrats on 1.0
   - ron

 --
 Jean-Luc Canela
 jlcane...@gmail.com

  liftweb_ie-7.0.6001.18000.jpg
 149KViewDownload

  liftweb_opera-9.63.jpg
 176KViewDownload
--~--~-~--~~~---~--~~
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: Adding bundle factory to LiftRules

2009-02-27 Thread Tim Perrett

Ok, excellent. I know have a working implementation! Rock.

Any objections to submitting this into master? Im guessing the code
freeze is now off.

Cheers, Tim
--~--~-~--~~~---~--~~
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: Adding bundle factory to LiftRules

2009-02-27 Thread Tim Perrett

Marius and I have just chatted this over on IM - I've altered the code
to use NamedPF...

The code now reads:

  /**
   * Get the resource bundle for the current locale
   */
   def resourceBundles: List[ResourceBundle] = {
 _resBundle.value match {
   case Nil = {
 _resBundle.set(LiftRules.resourceNames.flatMap(name = tryo(
   List(ResourceBundle.getBundle(name, locale))
 ).openOr(
   //LiftRules.resourceBundleFactories.toList.find
(_.isDefinedAt(locale)).toList.map(_.apply(locale))
   NamedPF.applyBox((name, locale),
LiftRules.resourceBundleFactories.toList).map(List(_)) openOr Nil
 )))
 _resBundle.value
   }
   case bundles = bundles
 }
   }

Everyone happy with this?

Cheers, Tim

On Feb 27, 6:10 pm, marius d. marius.dan...@gmail.com wrote:
 Well yeah but I only havethis code from you:

 def resourceBundles : List[ResourceBundle] =
 ...
 case Nil = _resBundle.set(LiftRules.resourceNames.flatMap(name =
 tryo {
  List(ResourceBundle.getBundle(name, locale))

 } openOr {

  // I think this is right...
  LiftRules.resourceBundleFactories.toList.find(_.isDefinedAt
 (locale)).map(_.apply(locale))
 openOr Nil

 }))

 ... and you are looking intothe factories if not found in the
 traditional bundles. WHich I guess is fine ... but I don't see the
 name from resurceNames passed to the factory.

 SO the name has a meaning in the curent approach but not anymore when
 using the new factories?

 On Feb 27, 8:00 pm, Timothy Perrett timo...@getintheloop.eu wrote:

  Don't they achieve different things? resourceNames just defines the base
  name for which the default java system starts looking for localizations
  right?

  Cheers, Tim

  On 27/02/2009 17:54, marius d. marius.dan...@gmail.com wrote:

   How would LiftRule.resourceNames work with

   type ResourceBundleFactoryPF = PartialFunction[Locale,Box
   [ResourceBundle]]
   var resourceBundleFactories : RulesSeq[ResourceBundleFactory]

   ... from usability perspective ?
--~--~-~--~~~---~--~~
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: Adding bundle factory to LiftRules

2009-02-27 Thread Tim Perrett

Its now committed into 1.1-SNAPSHOT

Cheers, Tim

On Feb 27, 6:56 pm, marius d. marius.dan...@gmail.com wrote:
 I am :) ... nice work !

 On Feb 27, 8:38 pm, Tim Perrett timo...@getintheloop.eu wrote:

  Marius and I have just chatted this over on IM - I've altered the code
  to use NamedPF...

  The code now reads:

    /**
     * Get the resource bundle for the current locale
     */
     def resourceBundles: List[ResourceBundle] = {
       _resBundle.value match {
         case Nil = {
           _resBundle.set(LiftRules.resourceNames.flatMap(name = tryo(
             List(ResourceBundle.getBundle(name, locale))
           ).openOr(
             //LiftRules.resourceBundleFactories.toList.find
  (_.isDefinedAt(locale)).toList.map(_.apply(locale))
             NamedPF.applyBox((name, locale),
  LiftRules.resourceBundleFactories.toList).map(List(_)) openOr Nil
           )))
           _resBundle.value
         }
         case bundles = bundles
       }
     }

  Everyone happy with this?

  Cheers, Tim

  On Feb 27, 6:10 pm, marius d. marius.dan...@gmail.com wrote:

   Well yeah but I only havethis code from you:

   def resourceBundles : List[ResourceBundle] =
   ...
   case Nil = _resBundle.set(LiftRules.resourceNames.flatMap(name =
   tryo {
    List(ResourceBundle.getBundle(name, locale))

   } openOr {

    // I think this is right...
    LiftRules.resourceBundleFactories.toList.find(_.isDefinedAt
   (locale)).map(_.apply(locale))
   openOr Nil

   }))

   ... and you are looking intothe factories if not found in the
   traditional bundles. WHich I guess is fine ... but I don't see the
   name from resurceNames passed to the factory.

   SO the name has a meaning in the curent approach but not anymore when
   using the new factories?

   On Feb 27, 8:00 pm, Timothy Perrett timo...@getintheloop.eu wrote:

Don't they achieve different things? resourceNames just defines the base
name for which the default java system starts looking for localizations
right?

Cheers, Tim

On 27/02/2009 17:54, marius d. marius.dan...@gmail.com wrote:

 How would LiftRule.resourceNames work with

 type ResourceBundleFactoryPF = PartialFunction[Locale,Box
 [ResourceBundle]]
 var resourceBundleFactories : RulesSeq[ResourceBundleFactory]

 ... from usability perspective ?
--~--~-~--~~~---~--~~
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: Sanity Check...

2009-02-25 Thread Tim Perrett

Thanks for your reply Marius - I made a trial class, but I'm unable to
get lift to use it as a resource bundle? I have a basic bundle with
some strings (definded in a class), from here, how would one tell lift
about it's existance?

Cheers

Tim

On Feb 25, 4:01 pm, marius d. marius.dan...@gmail.com wrote:
 On Feb 24, 10:16 pm, Tim Perrett he...@timperrett.com wrote:

  Guys,

  Just looking for a sanity check. Im planning out some database
  localization stuff that I need to implement to localize a system... Im
  not concerned with currency or other such fun localization problems,
  simply localizing text in my database.

  Right now, im thinking of just creating a custom ResourceBundle and
  having it populated by / accessing content that i'll hold in an in-
  memory LRU cache (something like net.liftweb.util.KeyedCache). As I
  wont need to worry about other issues like currency, im guessing that
  if I add this LiftRules.resourceNames then lift will look at it for
  localized content?

 LiftRules.resourceNames is just a list of strings and if you abstract
 the ResourceBundle it can have a slightly different semantic then
 right now where we use the ResourceBundle in the traditional way. It
 the DB context those names can act as a namespace.



  Is their any hope of such a simplistic scheme working or have I just
  been awake too long today?!

  Cheers

  Tim
--~--~-~--~~~---~--~~
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] Sanity Check...

2009-02-24 Thread Tim Perrett

Guys,

Just looking for a sanity check. Im planning out some database
localization stuff that I need to implement to localize a system... Im
not concerned with currency or other such fun localization problems,
simply localizing text in my database.

Right now, im thinking of just creating a custom ResourceBundle and
having it populated by / accessing content that i'll hold in an in-
memory LRU cache (something like net.liftweb.util.KeyedCache). As I
wont need to worry about other issues like currency, im guessing that
if I add this LiftRules.resourceNames then lift will look at it for
localized content?

Is their any hope of such a simplistic scheme working or have I just
been awake too long today?!

Cheers

Tim



--~--~-~--~~~---~--~~
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: Windows installer

2009-02-19 Thread Tim Perrett

WOW no link, I must have left my brain someplace else

http://scala-tools.org/liftweb_windows_0_11.exe



On Feb 19, 5:34 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
 Where is it?

 On Fri, Feb 13, 2009 at 11:38 AM, Tim Perrett he...@timperrett.com wrote:

  Guys,

  Just uploaded a new windows installer - Id appreciate some feedback -
  as Im a mac head I have little access to test this stuff on the dows'

  If their are problems with it - please let me know as im keen to fix
  any issues before 1.0 release

  Cheers

  Tim
--~--~-~--~~~---~--~~
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: Build problems...

2009-02-18 Thread Tim Perrett

Hey Marc,

This is very curious, as I too have the exact same OSX install with
the same versions of maven and java. I just ran:

mvn clean package install scala:doc

and it processed the build no problem at all. I also tried:

mvn -U clean install

and that too worked. Have you got your maven opts set?

export M2_HOME=/usr/local/apache-maven-2.0.9
export M2=$M2_HOME/bin
export MAVEN_OPTS=-Xmx1024m -noverify

Cheers, Tim

On Feb 18, 12:05 am, Marc Boschma marc+lift...@boschma.cx wrote:
 On 18/02/2009, at 10:23 AM, Josh Suereth wrote:

  A workaround currently is to use the maven-scala-plugin 2.10-
  SNAPSHOT and add forkfalse/fork to the configuration of it.    
  Since your integration tests are passing, I know this is working  
  correctly for you (see src/it/testLotsOfJava/pom.xml for an example  
  of using this).

  In the future, scalac is supposed to provide a workaround for  
  command-line parameter length limits.   Until that day, I've  
  provided the above workaround.

  -Josh

 Just tried it with the forkfalse/fork

 Mac:liftweb marc$ mvn -U clean install
 [INFO] Scanning for projects...
 [INFO] Reactor build order:
 [INFO]   Lift
 [INFO]   Lift Utils
 [INFO]   Lift WebKit
 [INFO]   Lift Mapper
 [INFO]   Lift Machine
 [INFO]   Lift Record
 [INFO]   Lift Textile
 [INFO]   Lift Facebook
 [INFO]   Lift AMQP
 [INFO]   Lift XMPP
 [INFO]   Lift Widgets
 [INFO]   Lift OpenID
 [INFO]   Lift OAuth
 [INFO]   Lift PayPal
 [INFO]   Lift TestKit
 [INFO]   Lift Core (full lift)
 [INFO]   Lift Sites
 [INFO]   Lift Example
 [INFO]   Skittr Example
 [INFO]   HelloLift example application
 [INFO]   HelloDarwin tutorial application
 [INFO]   JPA Demo Master
 [INFO]   JPADemo-spa
 [INFO]   JPADemo-web
 [INFO]   HTTP Authentication example
 [INFO]   lift-archetype-blank
 [INFO]   lift-archetype-basic
 WAGON_VERSION: 1.0-beta-2
 [INFO]  
 
 [INFO] Building Lift
 [INFO]    task-segment: [clean, install]
 [INFO]  
 
 [INFO] artifact org.scala-tools:maven-scala-plugin: checking for  
 updates from scala-tools.org
 [INFO] artifact org.scala-tools:maven-scala-plugin: checking for  
 updates from central
 [INFO] snapshot org.scala-tools:maven-scala-plugin:2.10-SNAPSHOT:  
 checking for updates from scala-tools.org
 [INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin:  
 checking for updates from scala-tools.org
 [INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin:  
 checking for updates from central
 [INFO] [clean:clean]
 [INFO] [scala:compile {execution: default}]
 [WARNING] you don't define org.scala-lang:scala-library as a  
 dependency of the project
 [INFO] Checking for multiple versions of scala
 [WARNING] No source files found.
 [INFO] [scala:testCompile {execution: default}]
 [WARNING] you don't define org.scala-lang:scala-library as a  
 dependency of the project
 [INFO] Checking for multiple versions of scala
 [WARNING] No source files found.
 [INFO] [site:attach-descriptor]
 [INFO] Preparing source:jar
 [WARNING] Removing: jar from forked lifecycle, to prevent recursive  
 invocation.
 [INFO] No goals needed for project - skipping
 [INFO] [source:jar {execution: attach-sources}]
 [INFO] [install:install]
 [INFO] Installing /Users/marc/src/lift/liftweb/pom.xml to /Users/
 marc/.m2/repository/net/liftweb/lift/0.11-SNAPSHOT/lift-0.11-
 SNAPSHOT.pom
 [INFO]  
 
 [INFO] Building Lift Utils
 [INFO]    task-segment: [clean, install]
 [INFO]  
 
 [INFO] artifact net.sf.alchim:yuicompressor-maven-plugin: checking for  
 updates from scala-tools.org
 [INFO] artifact net.sf.alchim:yuicompressor-maven-plugin: checking for  
 updates from central
 [INFO] [clean:clean]
 [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [yuicompressor:compress {execution: default}]
 [INFO] nb warnings: 0, nb errors: 0
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from  
 scala-tools.org
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from  
 scala-tools.org.snapshots
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from  
 central
 [INFO] [compiler:compile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [scala:compile {execution: default}]
 [INFO] suggestion: remove the scalaVersion from pom.xml
 [INFO] Checking for multiple versions of scala
 [INFO] Checking:org.scala-lang:scala-library:jar:2.7.3:compile to see  
 if it's a mutliple of the scala-lib
 [INFO] org.scala-lang:scala-library:jar:2.7.3:compile has 0 transitive  
 dependencies
 [INFO] Checking:org.slf4j:slf4j-api:jar:1.5.6:compile to see if it's a  
 mutliple of the scala-lib
 [INFO] org.slf4j:slf4j-api:jar:1.5.6:compile has 0 transitive  
 dependencies
 [INFO] 

[Lift] Re: Getting the file out of a Put Request..

2009-02-18 Thread Tim Perrett



Out of interest, can you elaborate on the bug?

Cheers, tim


--~--~-~--~~~---~--~~
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: uh, oh... can't find classes

2009-02-18 Thread Tim Perrett

Agreed, that sounds pukka – I guess its dpp or marius who needs to
make this call as we have a code freeze on for new features

On Feb 18, 2:39 pm, Viktor Klang viktor.kl...@gmail.com wrote:
 We could add another method that takes a Package and then deprecate the one
 that takes a String?



 On Wed, Feb 18, 2009 at 1:13 PM, Tim Perrett he...@timperrett.com wrote:

  This appears to be a trade off between marginal code verbosity and
  compile time checking... Viktor's solution could be the way to go
  however - this would be a massive breaking change though, as this
  would screw every lift app in existence!

  Cheers, Tim

  On Feb 18, 10:38 am, Viktor Klang viktor.kl...@gmail.com wrote:
   Ok, what about this:

   Why not have addToPackages take an actual Package?

   usage:

   addToPackages(com.my.stuff.SomeClass.getPackage) ?

   This would prevent stuff from breaking if you refactor/move some classes.

   Worth thinking about?

   Cheers,
   Viktor

   On Wed, Feb 18, 2009 at 10:58 AM, Charles F. Munat c...@munat.com
  wrote:

Ah! That was it. Forgot I changed the name of the app, and didn't
  change
it there. Thanks very much! That saved me a lot of trouble.

Chas.

Jean-Luc wrote:
 Is your LiftRules defined according to your snippet package ?

 Exemple of addToPackages rule for snippets in
  org.ansoft.myapp.snippet
 package :
 LiftRules.addToPackages(org.ansoft.myapp)

 Jean-Luc

 2009/2/18 Charles F. Munat c...@munat.com mailto:c...@munat.com

     Everything starts fine, but when I try to go to the home page of
  the
     app, I get this:

     XML Parsing Error: prefix not bound to a namespace
     Location:http://localhost:9988/
     Line Number 81, Column 5:  choose:logged_out
     ---^

     And this:

     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(LoginOps.login),Class Not
Found)
     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(Misc.logo),Class Not
  Found)
     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(Menu.navbar),Stateful
Snippet:
     Dispatch Not Matched)
     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(Messages),Class Not
  Found)
     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(error_class),Class Not
  Found)
     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(warning_class),Class Not
Found)
     WARN - Snippet Failure: SnippetFailure(/ -
     ParsePath(List(index),,true,false),Full(notice_class),Class Not
Found)

     Did I screw something up or did I miss an update? Any ideas?

     Chas.

 --
 Jean-Luc Canela
 jlcane...@gmail.com mailto:jlcane...@gmail.com

   --
   Viktor Klang
   Senior Systems Analyst

 --
 Viktor Klang
 Senior Systems Analyst
--~--~-~--~~~---~--~~
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: Getting the file out of a Put Request..

2009-02-18 Thread Tim Perrett

Thanks for the explanation David.

On Feb 18, 3:14 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Wed, Feb 18, 2009 at 1:44 AM, Tim Perrett he...@timperrett.com wrote:

  Out of interest, can you elaborate on the bug?

 Req lazily builds a bunch of stuff

 the lazy parameter building is used during toString

 toString was being called after the request had been satisfied

 the underlying request.getContentType was being called

 Because the response had been sent, the request's content type was null.

 I strictly calculated the content type, but continue to lazily calculate the
 parameters.

--~--~-~--~~~---~--~~
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] Truncate?

2009-02-18 Thread Tim Perrett

Guys,

Just a quick one... looking for a similar method to:
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001711

I know i could knock one up, but just wanted to check nothing like
this exists already as it seems like a fairly util type task. I had a
look but couldn't see anything in master.

Cheers, Tim
--~--~-~--~~~---~--~~
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: repo for mysql jars for jpa?

2009-02-18 Thread Tim Perrett

Errmm, the drivers for mysql are the same if your using JPA or mapper.
Can you elaborate on what your after?

Do you need to know what goes in persistance.xml or such?

Cheers

Tim

On Feb 19, 12:34 am, Meredith Gregory lgreg.mered...@gmail.com
wrote:
 Lifted,

 Does anyone know the mvn mojo for mysql backend to jpa? i've got local
 copies i can run with, but thought i'd rather point at the blessed versions.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.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: Build problems...

2009-02-17 Thread Tim Perrett

I'm not at my mac right now, but as of last night it was compilling
fine on mac with the very latest master.

What version of maven are you using? Might be a stupid question, but
you have done a git pull to check your fully up to date?

Cheers, Tim

On Feb 17, 8:34 am, David Bernard david.bernard...@gmail.com wrote:
 Hi,

 I don't know Mac, there is a command line length limitation (as windows) and
 is it possible that the shell block the execution and return exit code = 139
 (without message) ?

 which version of java do you have ?

 Sorry to not be able to help you more :(

 /davidB



  On 17/02/2009, at 3:35 PM, Josh Suereth wrote:

   Hm All the integration tests pass, perhaps you should try
   using the new maven-scala plugin (run mvn install on the maven-scala-
   plugin directory).  You do *not* want to clear your .m2 directory
   after doing so.  Then see if the new plugin fixes whatever issue is
   causing lift to break.  The other thing is try the scala command-
   line directly and see if you get a useful error meessage.

   Once again, sorry I could not be more help!

  Same result with the built plugin... hmmm. Not a problem on the help
  side of things! lift applications build rather nicely. Just can't
  build lift itself :(

  Marc
--~--~-~--~~~---~--~~
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: JSON stack overflow issue

2009-02-16 Thread Tim Perrett


In wireshark you'll be looking to use a normal HTTP rule as the JSON
will just be passed as entity body in the request. Doing a filter for
HTTP port 80 should be sufficient.

Cheers

Tim


--~--~-~--~~~---~--~~
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: Fwd: [jquery-dev] Re: Namespace failure

2009-02-16 Thread Tim Perrett

What's the impact overall? Is this a result of upgrade to JQuery
1.3.1?

Thanks, Tim

On Feb 16, 4:51 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,
 It turns out that there are issues with jQuery's methods that insert/replace
 HTML and using XHTML on Firefox.  Sigh.

 We should be aware of this.  using $(...).html(stuff) will likely fail if
 any of the elements in stuff have namespaces.

 Sorry.

 David

 -- Forwarded message --
 From: John Resig jere...@gmail.com
 Date: Sun, Feb 15, 2009 at 8:31 PM
 Subject: [jquery-dev] Re: Namespace failure
 To: jquery-...@googlegroups.com

 Anko -

 You're welcome to file a bug on XHTML support - let me know when you
 do. I have it penciled in the Roadmap for jQuery 1.4 - but it's going
 to require a lot of work (basic things like innerHTML aren't
 guaranteed to work, for example) - not to mention that things like
 attributes and expandos are handled very differently.

 I took some very basic steps of converting our test suite to run under
 the proper mimetype and wasn't terribly pleased with the result (lots
 of failures). I'll definitely revisit it at some point, though. Right
 now the only component guaranteed I'm sure that passes is the selector
 engine. I'd like to have 100% passing in all components for 1.4.

 http://dev.jquery.com/browser/trunk/jquery/test/xhtml.php

 --John

 On Sun, Feb 15, 2009 at 9:24 PM, Anko Painting anko@gmail.com wrote:

  Is there a ticket associated with this bug? I'm dealing with the same
  issue myself.

  It's frustrating because i need to serve as application/xhtml+xml so
  that I can put svg on the page.

  On Feb 14, 12:52 am, John Resig jere...@gmail.com wrote:
  Correct - you have to do it with the mimetype - which forces it in to
  the XML mode where everything becomes 'fun'.

  --John

  On Fri, Feb 13, 2009 at 9:37 AM, David Zhou da...@nodnod.net wrote:

  http://media.nodnod.net/test.htmlworksfor me.  Is it because I'm not
   serving the page as application/xhtml+xml?

   -- dz

   On Fri, Feb 13, 2009 at 9:31 AM, Dave Methvin dave.meth...@gmail.com
 wrote:

   Me too.

   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/
   2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)

 --
 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: Getting the file out of a Put Request..

2009-02-16 Thread Tim Perrett

Would it not be because of:

ServletFileUpload.isMultipartContent(request) // Req.scala line 79

If you then reference the commons lib, the source of that method looks
like:

public static final boolean isMultipartContent(
HttpServletRequest request) {
if (!post.equals(request.getMethod().toLowerCase())) {
return false;
}
String contentType = request.getContentType();
if (contentType == null) {
return false;
}
if (contentType.toLowerCase().startsWith(MULTIPART)) {
return true;
}
return false;
}

As DPP says, it looks as though you will *need* to make it a POST
request, and also set the content type to multi-part.

Alternatively, if, like me, you dont want to use overloaded post as
its not very ROA, you can pass your entity body and just access the
req.body property... you wouldnt get any of the useful lift helpers,
but of course it depends on your use case :-)

Cheers

Tim

On Feb 16, 10:05 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Feb 16, 2009 at 1:53 PM, Alan M alan.morten...@gmail.com wrote:

  I'm still working away on my web service project (mentioned many
  months ago when I first lobbied to get Scala used) and we rely heavily
  on Put requests to create new resources.  My first attempt involving
  Put and I've been stumped.

  I've been able to run the server (using mvn/jetty) and my webapp gets
  a PUT request (says so in the log produced by Jetty) and it does
  everything it's supposed to in my code, except it never gets the put
  file.  I used curl to make the call and it shows the bar saying it's
  uploading the file and finishing.  In the server code, the Reqs body
  is an Empty Box and it's uploadedFiles is an empty List.

 If you do a POST with the same data, does it work correctly (uploadedFiles
 gets populated)?



  So my question is, where do I get that data from?  or is there
  something else I need to do to turn that feature on? (enable file
  upload or something?)

  Alan

  P.S. Something that might be relevant, since it's a webservice I'm
  using the stateless dispatcher.. does that effect how/when the
  paramCalculator works and therefore messes this up somehow?

 --
 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: lift for cloud computing

2009-02-16 Thread Tim Perrett

What kind of deployment scripts did you have in mind?

Also, I run lift in EC2 with no problems and its actually really
really great :-)

Cheers, Tim

 * Deployment: perhaps lift should release deployment scripts, or even
 EC2 VM instances?

 Food for thought.
--~--~-~--~~~---~--~~
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: Getting the file out of a Put Request..

2009-02-16 Thread Tim Perrett

Sorry Alan,

I assumed too much - my fault not yours.

Generally, handling web services is done via dispatching. for
instance:

// Boot.scala
LiftRules.dispatch.prepend {
  case r @ Req(some :: path :: Nil, , PutRequest) = () =
myHandlerFunction(r)
}

def myHandlerFunction(req: Req): Box[LiftResponse] = {
  println(Entity Body is: + req.body.toString)
  ...
}

In this instance, you could pass the r property to the function and
then do r.body to get the entire entity body. Make sense?

If you wish to use lifts built in file uploading functions, you
catogically cannot use PUT at this present time, you can only use POST
with the accompanying content type set to multipart.

Does that clear things up at all?

Cheers, Tim


On Feb 16, 10:58 pm, Alan M alan.morten...@gmail.com wrote:
 OK I think I follow up to a point.. so Lift needs to know that it's
 multipart to work correctly with a put, and it doesn't.  That much I
 get, seems like Put is just broken. What I don't understand is that
 last bit though..  When you say: you can pass your entity body and just 
 access the
  req.body property

 Where could you do that?  I don't build the requests myself, so would
 I have to modify the Lift code to do this?  Is there an extension
 point to make that happen?  (like set request builder here or
 something and a class I can extend)

 Alan
 On Feb 16, 2:25 pm, Tim Perrett he...@timperrett.com wrote:

  Would it not be because of:

  ServletFileUpload.isMultipartContent(request) // Req.scala line 79

  If you then reference the commons lib, the source of that method looks
  like:

      public static final boolean isMultipartContent(
              HttpServletRequest request) {
          if (!post.equals(request.getMethod().toLowerCase())) {
              return false;
          }
          String contentType = request.getContentType();
          if (contentType == null) {
              return false;
          }
          if (contentType.toLowerCase().startsWith(MULTIPART)) {
              return true;
          }
          return false;
      }

  As DPP says, it looks as though you will *need* to make it a POST
  request, and also set the content type to multi-part.

  Alternatively, if, like me, you dont want to use overloaded post as
  its not very ROA, you can pass your entity body and just access the
  req.body property... you wouldnt get any of the useful lift helpers,
  but of course it depends on your use case :-)

  Cheers

  Tim

  On Feb 16, 10:05 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:

   On Mon, Feb 16, 2009 at 1:53 PM, Alan M alan.morten...@gmail.com wrote:

I'm still working away on my web service project (mentioned many
months ago when I first lobbied to get Scala used) and we rely heavily
on Put requests to create new resources.  My first attempt involving
Put and I've been stumped.

I've been able to run the server (using mvn/jetty) and my webapp gets
a PUT request (says so in the log produced by Jetty) and it does
everything it's supposed to in my code, except it never gets the put
file.  I used curl to make the call and it shows the bar saying it's
uploading the file and finishing.  In the server code, the Reqs body
is an Empty Box and it's uploadedFiles is an empty List.

   If you do a POST with the same data, does it work correctly (uploadedFiles
   gets populated)?

So my question is, where do I get that data from?  or is there
something else I need to do to turn that feature on? (enable file
upload or something?)

Alan

P.S. Something that might be relevant, since it's a webservice I'm
using the stateless dispatcher.. does that effect how/when the
paramCalculator works and therefore messes this up somehow?

   --
   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: Getting the file out of a Put Request..

2009-02-16 Thread Tim Perrett

I can understand why he wants to use PUT - its more resource
orientated.

I think we should stop talking about file uploads in the traditional
sense, as the current lift design is doing the right thing for
normal form based uploads.. However, lets talk about passing large
entity bodies with web services and what *exactly* you are transfering
and why.

When im passing large bodies around in my web services, the binary
content is usually passed as element content (base64 encoded) inside
my XML body message  as I might be passing some other meta-data such
as name or whatever (in the case of an image). For example, my request
body might look like:

image
  namesome image/name
  data/data
/image

Where data include a base64 encoded image or whatever. This is of
course an example, but you see how it can work?

Thanks

Tim



On Feb 16, 11:10 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Feb 16, 2009 at 2:58 PM, Alan M alan.morten...@gmail.com wrote:

  OK I think I follow up to a point.. so Lift needs to know that it's
  multipart to work correctly with a put, and it doesn't.  That much I
  get, seems like Put is just broken.

 We are relying on the Apache multipart library to handle multipart uploads.
  The library conforms to RFC 1867 which only defines multipart file uploads
 for POSTs (not PUT, etc.)

 http://www.ietf.org/rfc/rfc1867.txt

 Are you writing your Lift app to a particular spec and if so, can you point
 us to that spec?

 Thanks,

 David

 What I don't understand is that



  last bit though..  When you say:
   you can pass your entity body and just access the
   req.body property
  Where could you do that?  I don't build the requests myself, so would
  I have to modify the Lift code to do this?  Is there an extension
  point to make that happen?  (like set request builder here or
  something and a class I can extend)

  Alan
  On Feb 16, 2:25 pm, Tim Perrett he...@timperrett.com wrote:
   Would it not be because of:

   ServletFileUpload.isMultipartContent(request) // Req.scala line 79

   If you then reference the commons lib, the source of that method looks
   like:

       public static final boolean isMultipartContent(
               HttpServletRequest request) {
           if (!post.equals(request.getMethod().toLowerCase())) {
               return false;
           }
           String contentType = request.getContentType();
           if (contentType == null) {
               return false;
           }
           if (contentType.toLowerCase().startsWith(MULTIPART)) {
               return true;
           }
           return false;
       }

   As DPP says, it looks as though you will *need* to make it a POST
   request, and also set the content type to multi-part.

   Alternatively, if, like me, you dont want to use overloaded post as
   its not very ROA, you can pass your entity body and just access the
   req.body property... you wouldnt get any of the useful lift helpers,
   but of course it depends on your use case :-)

   Cheers

   Tim

   On Feb 16, 10:05 pm, David Pollak feeder.of.the.be...@gmail.com
   wrote:

On Mon, Feb 16, 2009 at 1:53 PM, Alan M alan.morten...@gmail.com
  wrote:

 I'm still working away on my web service project (mentioned many
 months ago when I first lobbied to get Scala used) and we rely
  heavily
 on Put requests to create new resources.  My first attempt involving
 Put and I've been stumped.

 I've been able to run the server (using mvn/jetty) and my webapp gets
 a PUT request (says so in the log produced by Jetty) and it does
 everything it's supposed to in my code, except it never gets the put
 file.  I used curl to make the call and it shows the bar saying it's
 uploading the file and finishing.  In the server code, the Reqs body
 is an Empty Box and it's uploadedFiles is an empty List.

If you do a POST with the same data, does it work correctly
  (uploadedFiles
gets populated)?

 So my question is, where do I get that data from?  or is there
 something else I need to do to turn that feature on? (enable file
 upload or something?)

 Alan

 P.S. Something that might be relevant, since it's a webservice I'm
 using the stateless dispatcher.. does that effect how/when the
 paramCalculator works and therefore messes this up somehow?

--
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 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

[Lift] Re: Getting the file out of a Put Request..

2009-02-16 Thread Tim Perrett

It appears that DPP is solving your issue now :-)

However, for the record, I do exactly what you describe in terms of
PUT / POST - this is a fairly normal ROA (but with objective-c
clients, not javascript). FYI... if you have xml messages, you can
access the xml automagically in your dispatching:

req.xml_? // = boolean to check if its an xml body
req.xml // = the actual xml passed (do whatever parsing)

Not sure if im adding any value to this conversation - so please say
if im just confusing you! REST services in lift is something I care
about a lot and ensuring its correct is of great importance to me :-)

Cheers, Tim
--~--~-~--~~~---~--~~
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: use of deprecated functions

2009-02-15 Thread Tim Perrett


Good point - were also using xbind(...) quite a bit too which is
deprecated.

Cheers, Tim

On Feb 15, 12:34 pm, Marius marius.dan...@gmail.com wrote:
 Hi,

 Building latest code I'm getting

 [WARNING] /media/WORK/marius/repository/github/liftweb/lift/src/main/
 scala/net/liftweb/http/LiftSession.scala:951: warning: method
 processBind in trait BindHelpers is deprecated
 [WARNING]     findTemplate(name).map(s = processBind(s, atWhat)).
 [WARNING]                                 ^

 Is there a reson why we are not using bind and use processBind
 instead ?

 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 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: Lift SalesForce?

2009-02-15 Thread Tim Perrett

Hey Pete,

I did not realise that the enterprise WSDL is org specific - can you
elaborate in which ways it is specific? Ideally, the enterprise one is
most useful for me (and I would imagine other users). Can you explain
how plugins such as http://activesfdc.rubyforge.org/ achieve
organization agnostic tooling in light of the bespoke / dynamic WSDL?

Are we mainly talking about versioning differences in the API and what
an organization is signed up to? I note that my companies force.com
account does visually look different to my developer account... is
this at all related or am I totally on the wrong track?!

I must be mistaken about the licensing then, my bad - either that or I
read something on the net somewhere!

Cheers

Tim

On Feb 15, 8:40 pm, pmorelli pmore...@gmail.com wrote:
 Salesforce has 2 wsdls, the Enterprise and the Partner. The enterprise is
 strongly typed, and customized to the org you're generating it from. The
 partner is probably what you want to start.

 There are also a variety of other wsdls, from apex to metadata to customized
 apex ws endpoints, but I'm assuming you're talking about the bread and
 butter APIs for integration.

 I work at salesforce.com (the api dev manager), I'm not sure what you mean
 that our wsdl is cddl licensed? Do you mean one of our toolkits?

 --pete



 timperrett wrote:

  Guys,

  Just thinking about making a lift-salesforce module... this would be
  pretty useful for me and im sure others, however im not sure where we
  would stand from a licensing point of view?

  It appears the force.com WSDL is out on a CDDL (http://www.sun.com/cddl/
  ) license - is that compatible with what lift uses? Im not much of a
  legal bod, so please excuse my ignorance :-)

  Cheers

  Tim

 --
 View this message in 
 context:http://www.nabble.com/Lift---SalesForce--tp21993269p22027294.html
 Sent from the liftweb mailing list archive at Nabble.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: [ANN] some jar on maven central repository

2009-02-13 Thread Tim Perrett

David this is simply brilliant - kudos.

On Feb 13, 9:04 am, Josh Suereth joshua.suer...@gmail.com wrote:
 Great News! and Great work getting this all set up!

 On Fri, Feb 13, 2009 at 3:30 AM, David Bernard
 david.bernard...@gmail.comwrote:

  Hi,

  just to inform you that the following groupId are sync (24H delay) from
 http://scala-tools.org/repo-releasesto maven central repository :
  * org.scala-lang
  * org.scala-tools
  * net.liftweb

  So you no more need to include the following code into your pom.xml (except
  if you use lib from other groupId like specs, scalachecks, scalaz)

    repositories
      repository
        idscala-tools.org/id
        nameScala-Tools Maven2 Repository/name
        urlhttp://scala-tools.org/repo-releases/url
        snapshots
          enabledfalse/enabled
        /snapshots
      /repository
    /repositories

    pluginRepositories
      pluginRepository
        idscala-tools.org/id
        nameScala-Tools Maven2 Repository/name
        urlhttp://scala-tools.org/repo-releases/url
      /pluginRepository
    /pluginRepositories

  The archetypes will be updated later.

  /davidB
--~--~-~--~~~---~--~~
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] Lift SalesForce?

2009-02-13 Thread Tim Perrett

Guys,

Just thinking about making a lift-salesforce module... this would be
pretty useful for me and im sure others, however im not sure where we
would stand from a licensing point of view?

It appears the force.com WSDL is out on a CDDL ( http://www.sun.com/cddl/
) license - is that compatible with what lift uses? Im not much of a
legal bod, so please excuse my ignorance :-)

Cheers

Tim



--~--~-~--~~~---~--~~
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] Complex Localization (6 months later)

2009-02-13 Thread Tim Perrett

Hey all,

Some of you may remember than 6 months ago or so, we had the longest
thread in lift list history:
http://groups.google.com/group/liftweb/browse_thread/thread/77d5a7dcb96ad2ab

The community has nearly doubled in size since that conversation and I
wonder if there is now any more appetite for extending the
localization stuff with localizer partial functions etc which would
let us localize database content? Im also technically able to actually
implement this now, which always helps ;-)

Obviously in the run up to 1.0 there is lots to be done elsewhere, but
I'll be working on this whatever (in a branch, for 1.1 perhaps) as I
need it for work, so if their are people out there who would find this
useful, or want to collaborate on it then by all means let me know :-)

Cheers

Tim
--~--~-~--~~~---~--~~
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] Windows installer

2009-02-13 Thread Tim Perrett

Guys,

Just uploaded a new windows installer - Id appreciate some feedback -
as Im a mac head I have little access to test this stuff on the dows'

If their are problems with it - please let me know as im keen to fix
any issues before 1.0 release

Cheers

Tim



--~--~-~--~~~---~--~~
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: new JDBC support in lift-mapper

2009-02-12 Thread Tim Perrett

Just found a bug with the MSSQL drivers... Looks like its all working
fine, but on boot I see this with the schemifier:

Like I say, it works (the app that is) but having this stack trace on
boot is not nice. Any ideas?

INFO - CREATE TABLE modifiers (name VARCHAR(100) , id BIGINT IDENTITY
NOT NULL , description VARCHAR(200) , weighting BIGINT)
ERROR - Failed to Boot
java.sql.SQLException: There is already an object named 'modifiers' in
the database.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic
(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken
(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:
2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults
(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults
(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL
(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl
(JtdsStatement.java:723)
at net.sourceforge.jtds.jdbc.JtdsStatement.execute
(JtdsStatement.java:1157)
at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier
$$maybeWrite(Schemifier.scala:150)
at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier
$$ensureTable(Schemifier.scala:160)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun
$1.apply(Schemifier.scala:60)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun
$1.apply(Schemifier.scala:60)
at scala.List.foldLeft(List.scala:1059)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply
(Schemifier.scala:60)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply
(Schemifier.scala:54)
at net.liftweb.mapper.DB$.use(DB.scala:305)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:
53)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:
36)
at bootstrap.liftweb.Boot.boot(Boot.scala:21)
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:585)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
(ClassHelpers.scala:393)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
(ClassHelpers.scala:391)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
(LiftRules.scala:905)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
(LiftRules.scala:905)
at net.liftweb.util.Full.map(Box.scala:284)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:
905)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:569)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:544)
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:620)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:
140)
at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1233)
at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart
(WebAppContext.java:460)
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:379)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute
(AbstractJettyMojo.java:321)
at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute
(AbstractJettyRunMojo.java:205)
at org.mortbay.jetty.plugin.Jetty6RunMojo.execute
(Jetty6RunMojo.java:184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo

[Lift] Re: confusion about lift-archetype-version versus lift version

2009-02-12 Thread Tim Perrett

Sorry my bad - I should have pointed that out.

On Feb 12, 12:31 pm, David Bernard david.bernard...@gmail.com wrote:
 0.11 isn't released the correct version number is 0.11-SNAPSHOT

--~--~-~--~~~---~--~~
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: lift jetty configuration question

2009-02-12 Thread Tim Perrett


This might be a stupid suggestion, but cant you just use two different
browsers to be logged in with two users at the same time?
Im guessing you want to demo some kind of comet behavior or similar
between two users?

Tim

On Feb 12, 5:25 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
 David,

 This is merely demoware -- nothing deployable. i simply need the following
 behavior

    - gethttp://localhost:8080provides a login page (always)
    - login sets up the session so that subsequent req's of the form
    http://localhost:8080/mumble-with-session-infoprovide access to that
    session's state

 This allows me to simulate two users using the system simultaneously without
 having to switch between logins.

 Best wishes,

 --greg

 On Thu, Feb 12, 2009 at 9:20 AM, David Pollak feeder.of.the.be...@gmail.com



  wrote:
  Greg,

  If each HTTP request to localhost had a new session, what would happen when
  you log in?

  If you can tell me a little more about your use case, I'll work on a
  solution.

  Thanks,

  David

  On Thu, Feb 12, 2009 at 9:09 AM, Meredith Gregory 
  lgreg.mered...@gmail.com wrote:

  Tim,

  Essentially, i want every request forhttp://localhost:8080to start up a
  new session. This should force login each time.

  Best wishes,

  --greg

  On Thu, Feb 12, 2009 at 3:30 AM, Tim Perrett he...@timperrett.comwrote:

  Can you clarify what you mean by instance? You mean run jetty on
  another TCP port other than 8080?

  And by other browser do you mean two seperate apps (like firefox and
  safari) or just two seperate windows in the same app?

  Cheers

  Tim

  On Feb 12, 2:27 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
   Lifted,

   Suppose i generate an instance of the basic lift archetype and then
  start up
   jetty. If i point two different browsers at localhost:8080 they both go
  to
   the same instance state. So, if i

      - start up a browser, point it at localhost:8080, then login in
      - then start up another browser, point it at localhost:8080, i get
  to the
      logged in page

   What do i need to do to configure jetty to start up another instance?

   Best wishes,

   --greg

   --
   L.G. Meredith
   Managing Partner
   Biosimilarity LLC
   806 55th St NE
   Seattle, WA 98105

   +1 206.650.3740

  http://biosimilarity.blogspot.com

  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105

  +1 206.650.3740

 http://biosimilarity.blogspot.com

  --
  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

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.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: IMPORTANT: Library Upgrades

2009-02-12 Thread Tim Perrett


Jesus! You have been busy Jorge! Kudos my good man :-)


--~--~-~--~~~---~--~~
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: IMPORTANT: Library Upgrades

2009-02-12 Thread Tim Perrett

Oh by the way, the Jquery update bring speed improvements im guessing
- has anyone tested / tried the comet stuff with 1.31? Just wondering
if we'll see any noticeable speed improvement?

Cheers

Tim
--~--~-~--~~~---~--~~
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: IMPORTANT: Library Upgrades

2009-02-12 Thread Tim Perrett

I thought their had been a cull of all IE5 users? ;-)

On Feb 12, 7:58 pm, Jorge Ortiz jorge.or...@gmail.com wrote:
 Although it seems like the latest version of Blueprint still has issues with
 Opera, IE 6, and IE 5.5 (!!!). 
 See:http://wiki.github.com/joshuaclayton/blueprint-css/browser-compatibil...

--~--~-~--~~~---~--~~
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: new JDBC support in lift-mapper

2009-02-11 Thread Tim Perrett

Al,

It would be usefull if you could just post an example of the needed
connection object that people will need to put in boot.scala

Cheers

Tim

On Feb 11, 8:59 pm, alm4x1...@gmail.com alm4x1...@gmail.com wrote:
 Hi All:

 I've added support for Microsoft SQL Server and Oracle 10g JDBC driver
 to lift-mapper.
 Please test out support for these databases if you can.
 Please post about bugs and experiences to this group.

 Also, it is useful for us to know if there are other databases you are
 seeking support for.

 Thanks,
 Al
--~--~-~--~~~---~--~~
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: lift with MS Sequel

2009-02-10 Thread Tim Perrett

Awesome - I use both of these and get defo test the MSSQL drivers  
2moro (GMT)...

On 10 Feb 2009, at 18:51, David Pollak wrote:

 Folks,

 Al Thompson just checked in support for SQL Server and Oracle.   
 Please test these configurations.

 Thanks,

 David

 On Mon, Feb 9, 2009 at 9:12 AM, David Pollak feeder.of.the.be...@gmail.com 
  wrote:


 On Sun, Feb 8, 2009 at 10:16 PM, Amit Kumar Verma  
 cdac.a...@gmail.com wrote:

 Hi,

 do lift support MSSQL db ?

 Lift's mapper currently supports PostgreSQL, MySQL, Derby, H2, etc.

 I'm expecting MS SQL and Oracle support by end of week.

 You can use JPA for other DB support.




 Thanks
 Amit Kumar Verma





 -- 
 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

 

Tim Perrett
print application architect

t: +44 (0) 78144 34 791
e: he...@timperrett.com
w: timperrett.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: lift with MS Sequel

2009-02-09 Thread Tim Perrett


There are mixed reports about that driver - personally I didn't get on very
well with and would go for JTDS :-)

On 09/02/2009 16:52, Derek Chen-Becker dchenbec...@gmail.com wrote:

 The MS provided JDBC driver is actually pretty high quality in my experience.
 In particular, make sure you get the 2005 version of the driver:
 
 http://msdn.microsoft.com/en-us/data/aa937724.aspx
 
 Derek
 
 On 2/9/09, Amarjeet Singh amarjeet.aur...@gmail.com wrote:
 Lift should technically work with any standard RDBMS, as long as it has a
 supported JDBC driver. MSSQL does have both commercial as well as Microsoft
 supplied JDBC drivers. Though I have never tested it myself, it should work.
 
 Regards
 
 On Mon, Feb 9, 2009 at 11:46 AM, Amit Kumar Verma cdac.a...@gmail.com
 wrote:
 
 Hi,
 
 do lift support MSSQL db ?
 
 
 Thanks
 Amit Kumar Verma
 
 
 
 



--~--~-~--~~~---~--~~
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: Serving text/html to IE

2009-02-07 Thread Tim Perrett


Agreed - there is no issue using XHTML strict with lift and IE (outside of
IE's usual crapness!)

Cheers, Tim

On 07/02/2009 08:53, Marius marius.dan...@gmail.com wrote:

 You can change the docType by calling S.setDocType... but I wouldn't
 trade XHTML for HTML. So far I did not have any problems with xhtml on
 IE ... but this doesn't mean that IE doesn't have more surprises.
 
 Can you send out your static page so I can take a look on it?



--~--~-~--~~~---~--~~
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: Changing scope of RulesSeq[T] toList

2009-02-04 Thread Tim Perrett


 Yes... this mutates the state of the underlying object, thus needs to be
 done privately and correctly.

private[http] def toList = rules

How does this mutate state? Its just returning the list isn't it (as
its def not val/var)? It appears to me that the prepend and append
methods mutate the state of the internal rules var... or am i
missing the point? [ quite possible - I usually do ;-) ]

 Why do you need the resulting List?

Im creating something specialized for my environment and I just want
to then do processing on the supplied list, in exactly the same way
that all the other List[ThePF] style functions do in net.liftweb.http.
For example:

// LiftSession.scala
val role = NamedPF.applyBox(req.path,
LiftRules.httpAuthProtectedResource.toList)

I more want RuleSeq to create the nice looking DSL, as i'll hook into
lifts processing pipeline using LiftSession.onBeginServicing or
something similar...

 If you're using RuleSeq in your code, why not just copy the class over to
 your code and morph it how you want?

Sure, I could do this, but it seems a little pointless as I dont want
to change any functionality, I purley want to be able to use RulesSeq
outside of the http package - my understanding of scala scoping is
that private[http] means that method is usable for members of that
package, as opposed to being just available in that object/class like
normal java scoping.




--~--~-~--~~~---~--~~
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: submit and redirect

2009-02-02 Thread Tim Perrett


Lift will still indeed notify you of an error invoking a snippet.

On 02/02/2009 15:01, Derek Chen-Becker dchenbec...@gmail.com wrote:

 Also, if the class for the snippet couldn't be found, Lift should have output
 a message to that effect on the console. If it didn't, then that's a bug.
 
 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: migration tools?

2009-02-02 Thread Tim Perrett


Hey Greg,

I have taken great pleasure in porting several leaking like a rusty bucket
rails applications... Whilst there is no direct migration, once you
understand exactly how lift works, it becomes simple.

When you say db stuff squirted out from ActiveRecord? - what exactly do
you mean? Queries? To_xml stuff?

Cheers

Tim

On 02/02/2009 20:53, Meredith Gregory lgreg.mered...@gmail.com wrote:

 Lifted,
 
 Suppose one were to engage in porting a RoR app to a Lift app. Are there any
 tools in the Scala+Lift arsenal that ease that migration? For example, is
 there a nice path that allows to preserve the db stuff squirted out from
 ActiveRecord? Is the are way to auto-generate some basic Model code from that
 starting point?
 
 More generally, have you guys been thinking about this direction? What about
 migration from other sites?
 
 Best wishes,
 
 --greg



--~--~-~--~~~---~--~~
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: Suggested breaking changes for XMLApiHelper

2009-02-01 Thread Tim Perrett

Chas,

What your talking about is object serilization - the helpers we both  
currently have, and the ones I plan to rebuild do not care about the  
output XML - it's more abstract than that (collections of implicit  
conversions etc)

IMO - what your talking about is object serilization. There are a  
bunch of frameworks out which do this very effectivly (for better or  
worse, soap is an example of this), and personally, I'm not a fan of  
it: for me, REST services should be a lightweight DSL -if you then  
want automated tooling, just use WADL.

Cheers, Tim

Sent from my iPhone

On 1 Feb 2009, at 05:47, Charles F. Munat c...@munat.com wrote:


 Tim,

 I don't know much about the XMLApiHelper, but if you're headed down  
 this
 route, there is an alternative syntax that you might want to consider.

 One of the things I might want to do with XML output from a REST  
 server,
 for example, is create an interface to it using HTML. The easiest way
 would be by using XSLT (or Scala) to convert the XML to XHTML, e.g. to
 convert a collection of Users into a table.

 If each object/class has it's own element name, that makes things
 difficult. In that instance, I would program my REST server to output
 users thus:

 collection className=User
   object className=User
 attribute name=id format=integer666/attribute
 attribute name=nameFirst format=nameLou/attribute
 attribute name=nameLast format=surnameCypher/attribute
 collection className=PhoneNumber
   object className=PhoneNumber
attribute name=regionUS/attribute
 attribute name=phoneTypemobile/attribute
 attribute name=areaCode format=areaCode666/attribute
 attribute name=exchange format=exchange666/attribute
 attribute name=number format=phone/attribute
 attribute name=extension format=ext/attribute
   /object
   object className=PhoneNumber/
 /collection
   /object
   object className=User/
   object className=User/
 /collection

 This allows me to write one script that converts all collections to
 tables, or alternatively to nested lists. It's more verbose (though  
 some
 duplication could be eliminated), but it provides me with the
 information I need to do the conversion and format the results.

 Just a thought...

 Chas.

 Tim Perrett wrote:
 Guys,

 Just doing some work with the XMLApiHelper and im finding some things
 that can be improved. For instance, the trait provides createTag  
 which
 you then have to override like so:

 def createTag(in: NodeSeq) = api{in}/api

 IMO, it seems that this isnt ideal as if you were returning a list of
 users, your xml would be:

 api
  user/user
  user/user
 /api

 It would be better to have a configurable root node, so its a more
 logical semantic:

 users
  user/user
  user/user
 /users

 I've been playing around with the best way to do it and by changing
 the implicits and the xml build methods I now have it so that you can
 do:

 def listAllUsers = {
  ...
  (users, listOfUsers)
 }

 This appears to be the best way to do it, otherwise things start
 getting messy?

 Whilst I can make these changes code wise, im very aware that ESME
 uses this helper a lot and this would mean some significant breaking
 changes in the api construction, both for ESME, and no doubt other
 projects. IMHO, the change is worth the hassle as it will make
 services up of more logically formed xml.

 What are people's thoughts?

 Cheers

 Tim


 


--~--~-~--~~~---~--~~
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: Suggested breaking changes for XMLApiHelper

2009-02-01 Thread Tim Perrett


 Hmmm. Looks like I'll have to learn more about this WADL.

Both WADL and WSDL2 can describe REST services. The latter is some time
away, and WADL, whilst young, is here right now:

https://wadl.dev.java.net/

 I was 
 approaching it from the XSLT side. Should've thought about the web
 service side.

Sure - to a certain degree I still think if you want object serialization,
using a standardized framework is better... But now im rambling ;-)

If you have any questions about doing REST in lift, just post up and I'll do
my best to answer :-)

Cheers

Tim



--~--~-~--~~~---~--~~
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: [SOLVED] Req lazy val xml not working

2009-01-31 Thread Tim Perrett

 XML request processing should not work perfectly

 Is this
 a philosophical stance
 a warning, or
 a typo?

 typo... XML request processing should now work perfectly.

LOL! I'm sorry for the confusion - it was a pure typo - it was about  
1:30am GMT so my brain was starting to fail me :-)





 Best wishes,

 --greg


 On Fri, Jan 30, 2009 at 3:14 PM, Tim Perrett he...@timperrett.com  
 wrote:

 Ok, found the problem. Req.scala needed a patch, which I have applied
 and committed into master.

 XML request processing should not work perfectly

 Cheers, Tim

 On Jan 30, 10:48 pm, Tim Perrett he...@timperrett.com wrote:
  Attached is an example application that shows the problem
 
  Cheers, Tim
 
   problem_example.zip
  16KViewDownload




 -- 
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com






 -- 
 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: Suggested breaking changes for XMLApiHelper

2009-01-31 Thread Tim Perrett


Hey David,

Ok splendid - another alternative it is.

FYI - I added a few more HTTP code representations to HttpResponse.scala
last night... Nothing crazy, but just some other ones I needed. I also need
to add some extra parameters to some of them so they directly represent the
RFC spec, but they are OK for the moment :-)

Cheers

Tim

On 31/01/2009 15:48, David Pollak feeder.of.the.be...@gmail.com wrote:

 Tim,
 
 Please don't change the existing XMLApiHelpers, but feel free to create an
 alternative.  I expect different people are going to have different styles and
 providing them with lots of alternatives will be important.
 
 I'm planning another alternative that will returns failures as different HTTP
 codes to make things more RESTful.
 
 Thanks,
 
 David
 
 On Sat, Jan 31, 2009 at 3:07 AM, Tim Perrett he...@timperrett.com wrote:
 
 Guys,
 
 Just doing some work with the XMLApiHelper and im finding some things
 that can be improved. For instance, the trait provides createTag which
 you then have to override like so:
 
 def createTag(in: NodeSeq) = api{in}/api
 
 IMO, it seems that this isnt ideal as if you were returning a list of
 users, your xml would be:
 
 api
   user/user
   user/user
 /api
 
 It would be better to have a configurable root node, so its a more
 logical semantic:
 
 users
   user/user
   user/user
 /users
 
 I've been playing around with the best way to do it and by changing
 the implicits and the xml build methods I now have it so that you can
 do:
 
 def listAllUsers = {
   ...
   (users, listOfUsers)
 }
 
 This appears to be the best way to do it, otherwise things start
 getting messy?
 
 Whilst I can make these changes code wise, im very aware that ESME
 uses this helper a lot and this would mean some significant breaking
 changes in the api construction, both for ESME, and no doubt other
 projects. IMHO, the change is worth the hassle as it will make
 services up of more logically formed xml.
 
 What are people's thoughts?
 
 Cheers
 
 Tim
 
 
 



--~--~-~--~~~---~--~~
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: Jorge's birthday ...

2009-01-30 Thread Tim Perrett

Happy birthday Jorge!!

On Jan 30, 8:34 am, Viktor Klang viktor.kl...@gmail.com wrote:
 Grattis på födelsedagen!

 On Fri, Jan 30, 2009 at 9:30 AM, David Bernard
 david.bernard...@gmail.comwrote:



  Bon Anniversaire

  On Fri, Jan 30, 2009 at 08:48, Marius marius.dan...@gmail.com wrote:

  If Skype is right it must be Jorge's birthday !

  HAPPY BIRTHDAY MAN !

  Br's,
  Marius

 --
 Viktor Klang
 Senior Systems Analyst
--~--~-~--~~~---~--~~
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] Added HTTP Auth example to sites directory

2009-01-30 Thread Tim Perrett

Guys,

Its been ages, and im sorry its taken so long, but please now find an
example of how to use the HTTP Auth stuff in the sites directory.

Respect to Marius who's been chipping away on this keeping it up-to-
date with the RulesSeq stuff etc as the lift API has moved forward.
For an example of how to use it, just check the sites/http-
authentication lift project, or github.com:

http://github.com/dpp/liftweb/tree/master/sites/http-authentication

Cheers

Tim



--~--~-~--~~~---~--~~
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: Jorge's birthday ...

2009-01-30 Thread Tim Perrett

lol! This is like the most global happy birthday greeting ever! ;-)

On Jan 30, 4:04 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
 ¡Feliz cumpleaños, señor!

--~--~-~--~~~---~--~~
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] Req lazy val xml not working

2009-01-30 Thread Tim Perrett

Guys,

Just writing a little rest service, and I want to process the incoming
XML... The Req class has the following methods:

xml_? : Boolean
xml: Box[Elem]

Now then, xml_? is returning true, and the content-length header is
the correct length, but req.xml always, always returns Empty.

FYI, even trying to do:

req.body // = Empty

Any ideas why this might be happening?

Cheers

Tim
--~--~-~--~~~---~--~~
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: Req lazy val xml not working

2009-01-30 Thread Tim Perrett

 
 Try:
 user
   emailsdfsdfsdf/email
 /user
 

I'd already tried before, that and still no luck. I've also tried just
getting it to print something out that was passed. Even param1=badger type
post requests, but no luck.

Thoughts?

Cheers, Tim



--~--~-~--~~~---~--~~
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: Pulling in http data from a web service

2009-01-29 Thread Tim Perrett

Hey Chas,

You might also be interested to see how the pay-pal stuff handles it's
remote HTTP calls for transaction verification and validation:

http://github.com/dpp/liftweb/blob/01473f94b1cb7beafb7ed41a860c2144e153b7d7/lift-paypal/src/main/scala/net/liftweb/paypal/Paypal.scala#L446

Cheers

Tim



--~--~-~--~~~---~--~~
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: Potential LiftRules dispatch issue.

2009-01-28 Thread Tim Perrett
Oh I really wasn't aware of that... I'll take a look at it - I use  
ehcache for a lot in general, so in that sense it's less if a waste  
for me :-)

Sent from my iPhone

On 28 Jan 2009, at 19:35, David Pollak feeder.of.the.be...@gmail.com  
wrote:

 IMHO, a third party cache is a huge waste.

 Lift has net.liftweb.util.LRU for this purpose.


 On Wed, Jan 28, 2009 at 11:33 AM, Joachim A. wallaby.po...@googlemail.com 
  wrote:

 Hi,
 I'd be interested to have  a look at the code :)
 I was about to do the same. I'd planned to use a simple cache (by  
 uuid) in a
 concurrent, weak map but EHCache might be the better solution, I  
 guess.

 Thanks a lot,
 Joachim

  On this note, I wrote an image cache for use in conjunction with
  MappedBinary - if anyone is interested I'm happy to post the code.  
 It
  uses EHCache and first checks the cache for the right image, and  
 grabs
  it if it's there, otherwise it does the database read. If your  
 needing
  to store images in the database, using an object cache can vastly  
 cut
  the amount of DB access and reduce server load
 
  Cheers
 
  Tim
 
  On Jan 28, 12:00 am, Alli allilis...@gmail.com wrote:
   Thanks, will definitely order a PDF or your book when it's out.
  
   Cheers,
   Alli
  
   On Jan 27, 11:56 pm, David Pollak feeder.of.the.be...@gmail.com
  
   wrote:
On Tue, Jan 27, 2009 at 3:53 PM, Alli allilis...@gmail.com  
 wrote:
 Is it possible to make the extension a wild card somehow, e.g.
 if i want jpg,png,gif,bmp ?
   
LiftRules.dispatch.append {
 case r @ Req(picture :: fileName :: Nil, extension,  
 GetRequest) if
List(jpg, png, gif).contains(extension) = () =
...
   
}
   
Note that this is not a speed-optimal solution (you'd pre- 
 populate set
with the valid extensions).  But it demonstrates using  
 extractors and
guards... the stuff I'm writing about this very day in  
 *Beginning
Scala*.
   
Thanks,
David
   
 On Jan 27, 11:50 pm, Alli allilis...@gmail.com wrote:
  Thanks chaps, can't believe i didn't spot it :).
 
  Cheers,
  Alfred
 
  On Jan 27, 11:48 pm, Tim Perrett he...@timperrett.com  
 wrote:
   Change the req to this:
  
   Req(picture :: fileName :: Nil, jpg, GetRequest)
  
   That should then work for you
  
   Cheers, Tim
  
   On Jan 27, 11:39 pm, Alli allilis...@gmail.com wrote:
LiftRules.dispatch.append {
  case r @ Req(picture :: fileName :: Nil, ,  
 GetRequest) =
() = ...
   
}






 -- 
 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: Potential LiftRules dispatch issue.

2009-01-27 Thread Tim Perrett

Change the req to this:

Req(picture :: fileName :: Nil, jpg, GetRequest)

That should then work for you

Cheers, Tim

On Jan 27, 11:39 pm, Alli allilis...@gmail.com wrote:
 LiftRules.dispatch.append {
   case r @ Req(picture :: fileName :: Nil, , GetRequest) = () =
      ...

 }

--~--~-~--~~~---~--~~
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] Passing list URL parameters to snippets

2009-01-25 Thread Tim Perrett

Hey guys,

I have a situation where I want to do something like:

LiftRules.rewrite.prepend(NamedPF(catalougeBind) {
  case RewriteRequest(path @ ParsePath(catalouge :: groups, _,
_,_), _, _) =
   RewriteResponse(catalouge :: Nil, Map(groups -
groups))
  }

However, this is obviously invalid, so how else could I pass the list
of groups which could be any number of parameters to my snippet?
RequestVar perhaps? I've looked at the wiki example with its
zipWithIndex solution mapping x parameters onto param1, param2 etc but
this is not really workable for what I need.

Id appreciate any thoughts you guys might have

Cheers

Tim
--~--~-~--~~~---~--~~
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: Still confused about redirects

2009-01-24 Thread Tim Perrett

Chas,

As it happens, I need to do this also. For me, im porting a rails app,
so dont have the .html issues and im doing case by case redirects. So,
I have something like:

LiftRules.dispatch.prepend {
  case r @ Req(about :: Nil, , _) = () = Full
(PermRedirectResponse(/about-us,r))
}

However, if you want to redirect all your html pages back to the
index, you'd need something like:

LiftRules.dispatch.prepend {
  case r @ Req(page, html, _) = () = Full(PermRedirectResponse
(/,r))
}

Does that make sense?

Cheers, Tim

On Jan 24, 3:30 am, Charles F. Munat c...@munat.com wrote:
 Thanks! That helps. I'll try to figure it out.

 Chas.

 Marius wrote:
  LiftRules.prepend.dispatch is the right way.

  You pattern-match for *.html and return a PermRedirectResponse.

  Br's,
  Marius

  On Jan 23, 3:05 am, Charles F. Munat c...@munat.com wrote:
  I'm trying to do something dead simple, so it's impossible, of course.

  I have some legacy pages that don't exist anymore, and I want to send
  permanent (301) redirects to the browser. For example:

  Redirect permanent /thebook.htmlhttp://mysite.com/the_book/

  The above should work in my vhosts.d conf file, but, of course, it
  doesn't. Have tried it 50 ways.

  Searched for information about how to do redirects in Jetty: no joy.

  David gave me a hint some time ago using LiftRules.prepend.dispatch, but
  I'm too stupid to understand it.

  What I *really* want is for any request to any *.html page NOT
  index.html to go to the home page. Or, I'd be happy to just provide a
  list of from and to paths and have some code that does the redirects.
  This seems like a useful feature since my Lift sites will often replace
  legacy sites and it would be nice to be able to set up a list of old
  page - new page and just have the redirects go out (maybe with the
  option of permanent or temporary).

  Anyone know how to do this that can explain it in kindergarten terms? My
  brain is really fried today.

  Thanks!
  Chas.
--~--~-~--~~~---~--~~
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: Still confused about redirects

2009-01-24 Thread Tim Perrett

When you say all your pages are index.html, how do you mean? if your
file is index.html, in lift the URI would be /index right?


 Anyway, this helps a lot. So if I want to redirect thebook.html to
 /the_book/ I would do this:

 LiftRules.dispatch.prepend {
    case r @ Req(thebook :: Nil, html, _) = () = Full(
      PermRedirectResponse(/the_book, r))


Correct :-)



--~--~-~--~~~---~--~~
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: Reading BLOB (images) from database with Mapper

2009-01-22 Thread Tim Perrett


Hey David,

Interesting, thanks ­ excuse my ignorance, but will I need anything else to
output those images from the database col?

Cheers, Tim 

On 22/01/2009 19:15, David Pollak feeder.of.the.be...@gmail.com wrote:

 Tim,
 
 Make it a MappedBinary field.  That corresponds to MySQL Blob.
 
 Thanks,
 
 David
 
 On Thu, Jan 22, 2009 at 11:08 AM, Tim Perrett he...@timperrett.com wrote:
 
 Hey guys,
 
 I usually use JPA for my persistence, but have a small project that I just
 need to bang out, so I thought id give Mapper a go. Before I get started,
 does anyone know how one would go about reading a BLOB from mysql that holds
 an image?
 
 Cheers
 
 Tim
 
 
 
 
 
 



--~--~-~--~~~---~--~~
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] Bug in with-param ?

2009-01-22 Thread Tim Perrett

Guys,

I think I might have just found a bug in the with-param use in layouts...

If I do:

  lift:with-param name=topimage
img src=/images/generic_top.jpg alt=Some image /
  /lift:with-param

The bind doesn't actually work, and the img tag gets inserted just above the
main content bind point. However, if I do:

lift:with-param name=topimageimg src=/images/generic_top.jpg alt=
//lift:with-param

(in case google groups breaks it, it should all be on one, single line)

Is anyone else seeing this? Im using the 0.10 release

Cheers

Tim



--~--~-~--~~~---~--~~
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: Bug in with-param ?

2009-01-22 Thread Tim Perrett

 
 The lift:with-param/ tag has to be a child of the lift:surround/ tag.
 
 I'm in the process of checking in a change to relax this constraint, but it
 will have a negative impact on the ability to do nested lift:surround/ tags.

It being a child of lift:surround is not directly the problem. IMO, its just
not obvious that if you want to insert:

psomdfd/p
pdfsf/p

At an arbitrarty bind point, you'd need to make it:

div
psomdfd/p
pdfsf/p
/div

I think there would also be a number of HTML geeks out there who would not
agree with this type of markup.

What do you think?

Cheers

Tim



--~--~-~--~~~---~--~~
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: jQuery 1.3

2009-01-19 Thread Tim Perrett
Awesome Viktor,

What is the impact on the lift API if we upgraded?

Cheers, Tim

Sent from my iPhone

On 19 Jan 2009, at 10:19, Viktor Klang viktor.kl...@gmail.com wrote:

 Hey guys!

 After upgrading from 1.2.3 to jQuery 1.3 on the company system, I  
 can really recommend lift to upgrade.

 Here's some meaty reading: http://docs.jquery.com/Release:jQuery_1.3

 The performance-gains are from my observations huge, but that's all  
 depending on usage. (of course)

 Is this something we want to upgrade for the 1.0 release or do we  
 want to wait until 1.1?

 cheers,

 -- 
 Viktor Klang
 Senior Systems Analyst

 

--~--~-~--~~~---~--~~
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: Lift Installers

2009-01-18 Thread Tim Perrett

Matt,

Well spotted - this must be something to do with what's hosted on
scala-tools. I'll drop David B a note about this...

Tim

On Jan 18, 6:02 pm, Matt Harrington mbh.li...@gmail.com wrote:
 Update: mvn archetype:generate gets you Lift 0.8, but mvn
 archetype:generate -DarchetypeCatalog=http://scala-tools.org/; gets
 you 0.9.

 Matt

 On Sun, Jan 18, 2009 at 9:50 AM, Matt Harrington mbh.li...@gmail.com wrote:
  An updated catalog would certainly be helpful.  I believe it still has
  Lift 0.8, and it's broken.

  Matt

  On Fri, Jan 16, 2009 at 3:37 PM, Tim Perrett he...@timperrett.com wrote:

  Possibly - but this is what I mean about using the auto-generated, one
  liner with maven rather than the -D hell we have...

  I'll tap up David B and see if he knows how far that system can be
  extended (i.e. to add another stage to say if you want snapshot, or
  release version of lift)

  Thoughts?

  Cheers

  Tim

  On Jan 16, 9:46 pm, Matt Harrington mbh.li...@gmail.com wrote:
  I like the idea of sticking with plain maven.  What do you think about
  lifting, no pun intended, the maven syntax generator from Wicket's
  quickstart page?

 http://wicket.apache.org/quickstart.html

  Matt

  On Fri, Jan 16, 2009 at 10:54 AM, Tim Perrett he...@timperrett.com 
  wrote:

   People,

   I'm going to finish the lift installers this weekend and I just got to
   thinking about writing some shell scripts to include as well. However,
   I then got to think about previous conversations had on this list and
   im wondering if we even need shell scripts to wrap the maven
   commands?

   I mean, as lift nears 1.0, the API is solidifying, and the need for
   users to track the snapshots will become less and less unless someone
   has a direct need to (or want to), or they are a committer. In this
   way, I see:

   mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org/

   becomming the main way to get started with lift? The installers would
   then just need to provide a well setup environment etc (which I have
   covered off already). It just strikes me that I don't want to start re-
   inventing the wheel by creating generation scripts etc etc when maven
   can handle stuff like project templates.

   Thoughts?

   Tim
--~--~-~--~~~---~--~~
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: Workflow web-app on Lift

2009-01-16 Thread Tim Perrett


 Right now, Machine is tied to Mapper.  Perhaps I'll relax things when we
 migrate Mapper - Record/Field code.

 If Machine is a priority for a publicly deployable project, let's talk about
 making things a little higher priority.

Thought as much :-)

Its less a priority, and more of general interest. Right now I have no
beef with it being tightly coupled to mapper - was just wondering more
than anything.

By the way, whats going on with the Record / Field stuff at the
moment? I see changes being made to Mapper, but nothing much to
Record?

Cheers

Tim
--~--~-~--~~~---~--~~
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] Lift Installers

2009-01-16 Thread Tim Perrett

People,

I'm going to finish the lift installers this weekend and I just got to
thinking about writing some shell scripts to include as well. However,
I then got to think about previous conversations had on this list and
im wondering if we even need shell scripts to wrap the maven
commands?

I mean, as lift nears 1.0, the API is solidifying, and the need for
users to track the snapshots will become less and less unless someone
has a direct need to (or want to), or they are a committer. In this
way, I see:

mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org/

becomming the main way to get started with lift? The installers would
then just need to provide a well setup environment etc (which I have
covered off already). It just strikes me that I don't want to start re-
inventing the wheel by creating generation scripts etc etc when maven
can handle stuff like project templates.

Thoughts?

Tim
--~--~-~--~~~---~--~~
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: Workflow web-app on Lift

2009-01-16 Thread Tim Perrett


 Mapper is going to be deprecated as of Lift 1.1 (but fully supported for a
 very long time).

Of course - that makes perfect sense.

 We're in a crunch to get 1.0 out the door.  Once 1.0 is out, we'll turn our
 efforts to 1.1 and Record/Field stuff.

Sure, everyone is working like mad :-) I didn't know that we were not
going to be including (well, pushing, that is) Record in lift 1.0.

Anyway, sorry for the slight thread hi-jack ;-)

Cheers, Tim
--~--~-~--~~~---~--~~
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: Lift Installers

2009-01-16 Thread Tim Perrett

Possibly - but this is what I mean about using the auto-generated, one
liner with maven rather than the -D hell we have...

I'll tap up David B and see if he knows how far that system can be
extended (i.e. to add another stage to say if you want snapshot, or
release version of lift)

Thoughts?

Cheers

Tim

On Jan 16, 9:46 pm, Matt Harrington mbh.li...@gmail.com wrote:
 I like the idea of sticking with plain maven.  What do you think about
 lifting, no pun intended, the maven syntax generator from Wicket's
 quickstart page?

 http://wicket.apache.org/quickstart.html

 Matt

 On Fri, Jan 16, 2009 at 10:54 AM, Tim Perrett he...@timperrett.com wrote:

  People,

  I'm going to finish the lift installers this weekend and I just got to
  thinking about writing some shell scripts to include as well. However,
  I then got to think about previous conversations had on this list and
  im wondering if we even need shell scripts to wrap the maven
  commands?

  I mean, as lift nears 1.0, the API is solidifying, and the need for
  users to track the snapshots will become less and less unless someone
  has a direct need to (or want to), or they are a committer. In this
  way, I see:

  mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org/

  becomming the main way to get started with lift? The installers would
  then just need to provide a well setup environment etc (which I have
  covered off already). It just strikes me that I don't want to start re-
  inventing the wheel by creating generation scripts etc etc when maven
  can handle stuff like project templates.

  Thoughts?

  Tim
--~--~-~--~~~---~--~~
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: was there a breaking change to lift?

2009-01-14 Thread Tim Perrett
To be fair there was a much larger gap than usual between master and  
release... We missed a couple of release cycles for 0.10.

So in theory, 0.9 was the latest bonified release - it that sense, it  
wasn't wrong, just miles out of date ;-)

Sent from my iPhone

On 14 Jan 2009, at 23:51, Meredith Gregory  
lgreg.mered...@gmail.com wrote:

 David,

 Well, i just nabbed that code from the liftweb site a day or two ago  
 and stuffed it into a shell script. i stared at the version number  
 and wondered whether that referred to the archetype version or the  
 version of lift. Since it was up on the site i reasoned it was the  
 archetype version and was vetted and blessed. ;-)

 Best wishes,

 --greg

 On Wed, Jan 14, 2009 at 3:36 PM, David Pollak feeder.of.the.be...@gmail.com 
  wrote:
 Yeah, it should be 0.10, not 0.9

 My god... you're still on 0.9?

 On Wed, Jan 14, 2009 at 3:32 PM, Meredith Gregory lgreg.mered...@gmail.com 
  wrote:
 David,

 Currently, i have the following code stuffed in a shell script.  
 Should i be modifying the archetype version?

 Best wishes,

 --greg

 #! /bin/sh
 mvn archetype:generate -U  \
  -DarchetypeGroupId=net.liftweb \
  -DarchetypeArtifactId=lift-archetype-basic \
  -DarchetypeVersion=0.9\
  -DremoteRepositories=http://scala-tools.org/repo-releases  \
  -DgroupId=$1 -DartifactId=$2


 On Wed, Jan 14, 2009 at 3:30 PM, Meredith Gregory lgreg.mered...@gmail.com 
  wrote:
 David,

 Progress... now the breakage is in a new place. The code generated  
 from the mvn lift archetype no longer compiles. What's the best way  
 to address this? i can attempt to fix the generated code in place or  
 i can regenerate from the archetype.

 Best wishes,

 --greg

 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/com/biosimilarity/naturalselection/model/User.scala:9: error:  
 wrong number of type arguments for net.liftweb.mapper.MetaMegaProtoUser 
 , should be 1
 [WARNING] object User extends User with MetaMegaProtoUser[User, User  
 with KeyedMetaMapper[Long, User]] {
 [WARNING]   ^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/com/biosimilarity/naturalselection/model/User.scala:26: error:  
 type mismatch;
 [WARNING]  found   :  
 com.biosimilarity.naturalselection.model.User.type (with underlying  
 type object com.biosimilarity.naturalselection.model.User)
 [WARNING]  required:  
 net. 
 liftweb. 
 mapper. 
 KeyedMetaMapper[Long,com.biosimilarity.naturalselection.model.User]
 [WARNING]   def getSingleton = User // what's the meta server
 [WARNING]  ^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/bootstrap/liftweb/Boot.scala:21: error: overloaded method  
 value schemify with alternatives (Boolean,(= AnyRef) =  
 Unit,net.liftweb.mapper.ConnectionIdentifier,net.liftweb.mapper.BaseMetaMapper
  
 *)List[String] and (Boolean,(= AnyRef) = 
 Unit,net.liftweb.mapper.BaseMetaMapper 
 *)List[String] cannot be applied to (Boolean,(= AnyRef) =  
 Unit,com.biosimilarity.naturalselection.model.User.type)
 [WARNING] Schemifier.schemify(true, Log.infoF _, User)
 [WARNING]^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/bootstrap/liftweb/Boot.scala:23: error: value  
 addTemplateBefore is not a member of object net.liftweb.http.LiftRules
 [WARNING] LiftRules.addTemplateBefore(User.templates)
 [WARNING]   ^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/bootstrap/liftweb/Boot.scala:27: error: type mismatch;
 [WARNING]  found   : java.lang.String(/)
 [WARNING]  required: 
 net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams 
 ]
 [WARNING]   (Menu(Loc(Home, /, Home))
 [WARNING] ^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/bootstrap/liftweb/Boot.scala:28: error: value loggedIn_? is  
 not a member of object com.biosimilarity.naturalselection.model.User
 [WARNING]:: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P- 
 L, If(User.loggedIn_? _, x)))
 [WARNING] 
 
^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/bootstrap/liftweb/Boot.scala:33: error: value requestLoans is  
 not a member of object com.biosimilarity.naturalselection.model.User
 [WARNING] S.addAround(User.requestLoans)
 [WARNING]  ^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 scala/bootstrap/liftweb/Boot.scala:39: error: not found: type Can
 [WARNING]   def newConnection(name: ConnectionIdentifier):  
 Can[Connection] = {
 [WARNING]  ^
 [WARNING] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/ 
 

[Lift] Re: 2.7.3-RC2 looks good to me

2009-01-13 Thread Tim Perrett

I belive the IDE plugins to be 3rd party... they are not maintained by
scala-core, nore should they be. IDE's dont make the language, the
features do.

Docs... hmm, thats a tricky one - what docs are you referring to? I
think you probably mean how-to type documentation right (as opposed
to this api does this under the hood type docs)?

Cheers

Tim

On Jan 13, 5:45 pm, Warren Henning warren.henn...@gmail.com wrote:
 Hooray. Bugs that essentially cripple Lift are bad.

 Um. Slightly OT: when is the Scala release cycle so slow? They need to
 stop working on the core language and focus on the stuff they've been
 neglecting: standard library docs and IDE plugins. Scala is lightyears
 ahead of just about every other programming language except other
 space-age languages like Haskell. I'm sick of Netbeans freezing up and
 not finding any examples in documentation.

 On Tue, Jan 13, 2009 at 9:28 AM, David Pollak

 feeder.of.the.be...@gmail.com wrote:
  Folks,
  I did a 20 hour stress test of Lift compiled against 2.7.3-RC2.  There are
  no apparent reference retention (memory leak) issues.  I say, Ship it!
  Thanks,
  David

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Collaborative Task Managementhttp://much4.us
  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: Writing data to the HttpServletResponse

2009-01-11 Thread Tim Perrett

Alli,

Mark is correct - I'd create a LiftResponse sublass and handle that
request with a DispatchPF. If your not familiar, check out
prependDispatch in Boot.scala of the demo site.

If you can supply a bit more information about what exacty you want to
do (I'm guessing you want to force downlod a PDF or something?) then
we can give you a more specific answer.

Cheers

Tim

On Jan 11, 12:41 am, Marc Boschma marc+lift...@boschma.cx wrote:
 I'm not an expert but I would model a Response class in much the same  
 way as:

    package net.liftweb.http

    object PlainTextResponse {
      def apply(text: String): PlainTextResponse =  
 PlainTextResponse(text, Nil, 200)
      def apply(text: String, code: Int): PlainTextResponse =  
 PlainTextResponse(text, Nil, code)
    }

    case class PlainTextResponse(text: String, headers: List[(String,  
 String)], code: Int) extends LiftResponse {
      def toResponse = {
        val bytes = text.getBytes(UTF-8)
        InMemoryResponse(bytes, (Content-Length,  
 bytes.length.toString) :: (Content-Type, text/plain) :: headers,  
 Nil, code)
      }
    }

 from TextResponse.scala. Look at InMemoryResponse or possibly  
 StreamingResponse in Response.scala.

 Marc

 On 11/01/2009, at 4:27 AM, Alli wrote:



  Hey, I have been searching the list and also the liftweb.net wiki and
  haven't found a way to do this:

  I have a form to upload a file that I want to manipulate and send back
  to the client. When sending it back I am using S.setHeader to set the
  content type, disposition etc but I haven't found a way to write the
  file back to the response. What I think I need is access to the
  response's printwriter (response.getWriter()) instance. Any help would
  be greatly appreciated.

  Cheers,
  Alli
--~--~-~--~~~---~--~~
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: Redirects/new site

2009-01-11 Thread Tim Perrett

You do gain portability I agree - it just depends on your setup as to
whats best for you, if that means doing the rewrites in lift, then go
for it :-)

FYI, rewrites with jetty are done like so:

http://docs.codehaus.org/display/JETTY/RewriteHandler

Cheers, Tim

On Jan 11, 7:00 pm, Charles F. Munat c...@munat.com wrote:
 Yeah, I was thinking about this, but I have no idea how to do that in
 Jetty. And then if I move to another servlet container, I have to figure
 it out all over again. The more I work in Lift, the easier and more
 portable it is.

--~--~-~--~~~---~--~~
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: Writing data to the HttpServletResponse

2009-01-11 Thread Tim Perrett

If you decide to make a component, check out lift-widgets for other
examples of UI widgets (components in lift terminology)

http://github.com/dpp/liftweb/tree/master/lift-widgets

Cheers, Tim

On Jan 11, 11:57 pm, Alli allilis...@gmail.com wrote:
 I will show it to you once it's ready. I'm having some problems with
 swfupload (not due to lift),
 it's my inexperience with flash and javascript. I'll let you know once
 I get this all sorted out. Once I get this sorted it's tempting to
 make some kind of plugin (component) as I'm gonna be using swfupload
 for multiple projects of mine. Will look into that later though.

--~--~-~--~~~---~--~~
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] Missing from Lift textile parser

2009-01-01 Thread Tim Perrett

Hey guys,

From a few small trials i've ran, lifts textile parser does not honour
notextile tags within the markup? It also doesnt appear to let you
intermingle HTML and Textile?

Can / should these be changed?  Or am i better off just using a java
textile parsing lib?

Cheers

Tim
--~--~-~--~~~---~--~~
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: *** Minor breaking change *** - Lift HTTP authentication

2008-12-29 Thread Tim Perrett

Excellent stuff Marius - I hope to add an example from the http-auth
branch to master this week so will certainly include this

Cheers, Tim

On Dec 29, 1:33 pm, Marius marius.dan...@gmail.com wrote:
 Hi,

 If you use so far the HTTP authentication support in Lift, you code
 would likely break. So far we could assign a single role to user by
 using userRoleRequestVar. This has been changed from:

 object userRole extends RequestVar[Box[Role]](Empty)

 to

 object userRoles extends RequestVar[Box[List[Role]]](Empty)

 In your authentication function you can say:

 userRoles(Full(AuthRole(useradmin, siteadmin))) or
 userRoles(Full(AuthRole(useradmin)))

 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 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] unsecured form post from flash

2008-12-28 Thread Tim Perrett

Guys,

seeing as lift binds the html form elements to server side functions,
how can one post a flash based form (or any other non-lift powered
form) to a lift back-end and, process the response in the normal
manner?

Would it be some hacky S.param stuff?

Thoughts / ideas on how to handle this would be great!

Cheers,

Tim
--~--~-~--~~~---~--~~
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 or Box or something else

2008-12-28 Thread Tim Perrett

I think this debate could go on for some time ;-)

Being pragmatic, we have to look at the impact on the lift code base
and its users. Would a change to Box[MyClass] really improve user
understanding and lower the learning curve to a point where making
such a fundamental change in the lift API would be justified?

This is really the question we should now be asking now.

personal_opinion

Being english, the semantic of Box seems more logical, however, right
now im sitting on the fence on weather or not the change is justified.
Lets look at the dictionary:

== Can

1 be able to
2 be permitted to
3 used to indicate that something is typically the case

== Box

noun
1 a container with a flat base and sides, typically square or
rectangular and having a lid : a cereal box | a hat box.
3 a small structure or building for a specific purpose, in particular
• a separate section or enclosed area within a larger building, esp.
one reserved for a group of people in a theater or sports ground or
for witnesses or the jury in a law court : a box at the opera | the
jury was now in the box.
4 a protective casing for a piece of a mechanism.

The fact that Box only really has a single meaning, is very attractive
from a cognitive point of view IMO

/personal_opinion

Realistically, what would the damage be API wise if we moved to box?
Have we any way of understanding the impact in real terms?

Cheers, Tim




--~--~-~--~~~---~--~~
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: unsecured form post from flash

2008-12-28 Thread Tim Perrett

Thanks Marius + David,

I hadn't thought of using a for comprehension - thats nice Dave, I
think id rather go with a solution such as that :-)

Using JSON / Javascript flash bridge with lift seems like overkill for
such a simple operation - If i had a client side / 3rd party
application that was more sophisticated and required a decent amount
of data interchange, then sure, using JSON would be ideal :-) However
for a simple one time form post I think its not needed.

I'll give that a whirl and we'll see where we get to!

Thanks guys

Tim
--~--~-~--~~~---~--~~
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 or Box or something else

2008-12-28 Thread Tim Perrett


lol - am I missing something josh? How does the Box has x semantic differ?
(if its a joke, my apologies! Its been a long day!!)

On 28/12/2008 15:46, Josh Suereth joshua.suer...@gmail.com wrote:

 And all my hopes for Can has x are gone...
 
 Perhaps I'll make my own change in my lift app. :
 
 import {Box = Bukkit}



--~--~-~--~~~---~--~~
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: versions out of whack?

2008-12-26 Thread Tim Perrett

Chas,

Do you have the scala-tools.org snapshot repo defined in your pom.xml?

If not, you'll need to add it. then maven will grab it automatically  
for you. The other alternative is to build locally from src. If your  
not working on the lift codebase, IMO, use the maven snapshots as it's  
the most straight forward route.

Does that make sense?

Cheers, Tim

Sent from my iPhone

On 27 Dec 2008, at 00:25, Charles F. Munat c...@munat.com wrote:


 What does it mean when I get this error:

 1) net.liftweb:lift-webkit:jar:0.10-SNAPSHOT

   Try downloading the file manually from the project website.

   Then, install it using the command:
   mvn install:install-file -DgroupId=net.liftweb
 -DartifactId=lift-webkit -Dversion=0.10-SNAPSHOT -Dpackaging=jar
 -Dfile=/path/to/file

   Alternatively, if you host your own repository you can deploy the
 file there:
   mvn deploy:deploy-file -DgroupId=net.liftweb
 -DartifactId=lift-webkit -Dversion=0.10-SNAPSHOT -Dpackaging=jar
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

   Path to dependency:
 1) com.xxx:yyy-app:war:0.10-SNAPSHOT
 2) net.liftweb:lift-webkit:jar:0.10-SNAPSHOT

 I got this before and got around it by using git and then building and
 installing Lift manually, but shouldn't it be possible to just run  
 Maven
 and have it work? Am I doing something wrong?

 Chas.

 David Pollak wrote:
 Charles,

 I did an update to the XML rendering stuff.  It looks like half your
 Lift jars are old and half are new.  I'd suggest blowing away your  
 Maven
 repository and doing a clean build.

 Thanks,

 David

 On Fri, Dec 26, 2008 at 3:15 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


Here's a new one I haven't seen before. Are my versions out of  
 whack?
Should I be moving up to Scala 2.7.3? What's wrong here?

Any ideas?

Chas.

HTTP ERROR: 500

net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/ 
 NamespaceBinding;Lscala/StringBuilder;ZZ)V

RequestURI=/
Caused by:

java.lang.NoSuchMethodError:
net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/ 
 NamespaceBinding;Lscala/StringBuilder;ZZ)V
   at
net.liftweb.http.NodeResponse$class.toResponse(XmlResponse.scala: 
 40)
   at
net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
   at
net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
   at  
 net.liftweb.http.LiftServlet.doService(LiftServlet.scala:176)
   at
net.liftweb.http.LiftServlet$$anonfun$doIt 
 $1$1.apply(LiftServlet.scala:97)
   at
net.liftweb.http.LiftServlet$$anonfun$doIt 
 $1$1.apply(LiftServlet.scala:97)
   at
net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:242)
   at net.liftweb.util.Helpers$.calcTime(Helpers.scala:29)
   at
net.liftweb.util.TimeHelpers$class.logTime(TimeHelpers.scala:251)
   at net.liftweb.util.Helpers$.logTime(Helpers.scala:29)
   at net.liftweb.http.LiftServlet.doIt$1(LiftServlet.scala: 
 96)
   at net.liftweb.http.LiftServlet.service(LiftServlet.scala: 
 105)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun 
 $apply$18.apply(LiftServlet.scala:483)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun 
 $apply$18.apply(LiftServlet.scala:483)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at net.liftweb.http.URLRewriter$.doWith(Req.scala:370)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter 
 $1.apply(LiftServlet.scala:482)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter 
 $1.apply(LiftServlet.scala:476)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun 
 $apply$4$$anonfun$apply$5.apply(Vars.scala:150)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun 
 $apply$4.apply(Vars.scala:149)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply 
 $3.apply(Vars.scala:148)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at net.liftweb.http.RequestVarHandler$.apply(Vars.scala: 
 147)
   at
net.liftweb.http.LiftFilterTrait 
 $class.doFilter(LiftServlet.scala:475)
   at net.liftweb.http.LiftFilter.doFilter(LiftServlet.scala: 
 496)
   at
org.mortbay.jetty.servlet.ServletHandler 
 $CachedChain.doFilter(ServletHandler.java:1115)
   at
 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
 361)
   at
 
 org. 
 mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 
 216)
   at
 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 
 181)
   at
 
 

[Lift] Re: error message tag

2008-12-23 Thread Tim Perrett

Wow, thats pretty impressive! To not even work in the worst-bit-of- 
software-enginering-know-to-man (aka IE 6) is a serious feat in  
itself! Kudos! lol

On 23 Dec 2008, at 15:39, Derek Chen-Becker wrote:

 There's nothing else out there like IE for job security. We still  
 have an app in-house that requires IE 5.5. It won't even work in 6  
 or above...


--~--~-~--~~~---~--~~
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 message tag

2008-12-23 Thread Tim Perrett

Ha! Well I remember IE on mac, that truly was awful... I also remember  
dialing up to the internet from a 14.4k modem with windows 3.1, and  
browsing on some ancient version of netscape!

As for my age, I was born in 86' :-D

Cheers, Tim


On 23 Dec 2008, at 20:41, Charles F. Munat wrote:

 You must be too young to remember Netscape 4. And IE on the Mac?


--~--~-~--~~~---~--~~
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: url handling

2008-12-20 Thread Tim Perrett

Oliver,

Lift will only create these types of URL when you pass params when  
creating a link.

There is a very sophisticated rewriting engine in lift, so a better  
question would be what do you want your URL to look like?

Thanks, Tim

Sent from my iPhone

On 20 Dec 2008, at 03:26, Oliver Lambert ola...@gmail.com wrote:


 Hi

 I notice lift sometimes lift rewrites the url a little
e.g. -  http://localhost:9090/enter becomes 
 http://localhost:9090/enter?fnVT32KHAJRTHI5RNQ2XBY=_

 What are the rules for when this happens?
 Is there anyway to write a lift application where it doesn't happen?

 cheers
 Oliver

 


--~--~-~--~~~---~--~~
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 or Box or something else

2008-12-20 Thread Tim Perrett
Speaking from personal experience, what I didn't realize to begin with  
was that the can was what we in England call a tin, and the  
connotation of you can do something is conceptually very different  
to a can (tin) contains x if you follow my meaning...

I think the problem can be solved by better docs, and a paper that  
explains the rational of can as a container - this would fix the curve  
of understanding IMO. What usually happens when noobies ask about can,  
is that people are pointed in the direction of Option, but if your new  
to scala, that is fairly meaningless also as those comming from java  
et al are using to checking for null so don't see why you need a  
container.

Just my two pence

Cheers, Tim

Sent from my iPhone

On 20 Dec 2008, at 14:43, David Pollak  
feeder.of.the.be...@gmail.com wrote:

 Folks,

 Over the year that Lift has had Can[T] as a replacement for Scala's  
 Option[T], the name Can has required a lot of explaining.

 As we make the final push into freezing Lift's APIs, do we want to  
 change the name of Can to something else or should we leave it as  
 Can.  Alternatives are:
 Cup
 Box
 Both of which can be Full/Empty.

 Thanks,

 David

 PS -- The Scala collections classes are getting a redo for 2.8.   
 I've been gently pestering Martin to expand Option to have a Failure  
 case.  If this happens (it's not really likely for a couple of  
 reasons), Can will be orphaned.

 -- 
 Lift, the simply functional web framework http://liftweb.net
 Collaborative Task Management http://much4.us
 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: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-15 Thread Tim Perrett

I'm not at my computer right now, but can't you either use github to  
show you the diff? or just do a diff using your local git repo?

Cheers, Tim

Sent from my iPhone

On 15 Dec 2008, at 08:08, Marius marius.dan...@gmail.com wrote:


 Sorry Dan ... There were too many changes  in LiftRules. You should be
 able to determine real quick what changed in LiftRules since the
 variables naming is more or less the same.

 If you can not fix your code can you please copy-paste it here ? ...
 in this way I may be able to help.

 Br's,
 Marius

 On Dec 15, 1:55 am, Dano dan_ole...@yahoo.com wrote:
 Marius,

 Is there someway you can communicate what the 'from' and 'to' changes
 are so that I can have a chance at being able to fix my now broken
 code?

 Dan

 On Dec 13, 12:31 pm, Marius marius.dan...@gmail.com wrote:

 All,

 I committed a bunch of changes inLiftRules. In a previous thread
 Jorge suggested the abstraction ofLiftRulesvariables. Lists of
 functions are now abstracted by RulesSeq trait, which contains  
 prepend
 and append functions. Note that if you're calling prepend/append
 functions after boot they will throw an exception. If there are
 compelling reasons not to do this please let us know. This is just a
 mechanism to enforce the use of these functions on startup.

 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 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: Fwd: [scala-user] Is there a memory leak in 2.7.2 Actors?

2008-12-12 Thread Tim Perrett

Do you know why they decided to go for another 2.7.xx release - I
thought they were going to 2.8 next...?

Cheers, Tim

On Dec 12, 6:26 pm, jorge.or...@gmail.com wrote:
 Can do

 On 12/12/08, David Pollak feeder.of.the.be...@gmail.com wrote:

  Folks,

  Who has time to do testing, etc. with 2.7.3?

  Thanks,

  David

  -- Forwarded message --
  From: Philipp Haller philipp.hal...@epfl.ch
  Date: Fri, Dec 12, 2008 at 6:42 AM
  Subject: Re: [scala-user] Is there a memory leak in 2.7.2 Actors?
  To: David Pollak feeder.of.the.be...@gmail.com
  Cc: scala-user scala-u...@listes.epfl.ch

  Hi again,

  FYI, I committed a fix in r16750 (2.7.x branch) and r16751 (trunk). It
  looks like we are probably releasing 2.7.3 including this fix some time
  next week (or shortly after).

  Cheers,
  Philipp

  philipp.hal...@epfl.ch wrote:
  Hi,

  I found the memory leak. A fix should be ready shortly.

  Cheers,
  Philipp

  Quoting David Pollak feeder.of.the.be...@gmail.com:

  Folks,

  I've been noticing that Lift apps run out of memory after a certain
  period of time.  This is a relatively new thing.  I think I've
  traced the problem back to a memory leak in the Actors library.  The
   enclosed program terminates with an out of memory error.

  Am I failing to release the Actors in some way or is there a memory leak?

  Thanks,

  David

  import scala.actors._
  import Actor._

  object ActorWatcher extends Actor {
    def act = loop {
      react {
        case Exit(actor: Actor, why: Throwable) =
          failureFuncs.foreach(f = f(actor, why))
        case x = println(x)
      }
    }

    private def startAgain(a: Actor, ignore: Throwable) {a.start}

    private def logActorFailure(actor: Actor, why: Throwable) {
      println(The ActorWatcher restarted +actor+ because +why)
    }

    /**
     * If there's something to do in addition to starting the actor
  up, pre-pend the
     * actor to this List
     */
    var failureFuncs: List[(Actor, Throwable) = Unit] = logActorFailure _
  ::
    startAgain _ :: Nil

    this.start
    this.trapExit = true
  }

  case object Start
  case object EndMe

  class A extends Actor {
  def act = loop {
  react {
  case Start =
  link(ActorWatcher)
  case EndMe =
  unlink(ActorWatcher)
  exit()
  }
  }
  }

  object Sloth {
  def z(in: Long) = if (in / 1024L == 0L) in
  else if (in / (1024L * 1024L) == 0L) (in / 1024L).toString + K
  else (in / (1024L * 1024L)).toString + M
  def main(args: Array[String]) {
  val rt = Runtime.getRuntime()
  for (o - 1 to 100) {
  println(Outer +o)
  //var a: List[Actor] = Nil
       for (i - 1 to 1) {
  val t = new A
  //a = t :: a
  t.start
  t ! Start
  t ! EndMe
  }
  println(Done creating)
  // for (act - a) act ! EndMe
  ActorGC.gc()
  rt.gc()
  println(Free +z(rt.freeMemory())+ total +z(rt.totalMemory()))
  }
  }
  }

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Collaborative Task Managementhttp://much4.us
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Collaborative Task Managementhttp://much4.us
  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
-~--~~~~--~~--~--~---



  1   2   3   >