[Lift] Creating a path from a Loc

2010-01-26 Thread Adam Warski
Hello,

I'm having some trouble generating a link basing on a Loc.
My original use-case is to redirect the user to a  login page if the user is 
not logged in. I found a wiki on this and it says there to simply redirect to 
/user_mgt/login, however I think it would be much nicer if I could generate 
the link basing on looking up the right Loc.

However having the Loc I can only generate a NodeSeq, not a plain String.

So the solution would be to add a method into the Loc trait parallel to this 
one:

def createDefaultLink: Option[NodeSeq] = currentValue.flatMap(p = 
link.createLink(p)).toOption

which would be:

def createDefaultPath: Option[String] = currentValue.flatMap(p = 
link.createPath(p)).toOption

(btw., why is it Option here, not Box?)

Then generating a link to the login page would simply be:

SiteMap.findLoc(Login).open_!.createDefaultPath

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




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



[Lift] Optgroup in select ?

2010-01-26 Thread Francois

Hello,

I'm wondering if it is possible to use optgroup tag with SHtml.select ?

If not, what would be the best way to use them ?


--
Francois ARMAND
http://fanf42.blogspot.com

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



[Lift] Re: Lift 2.0 on Scala 2.8 update

2010-01-26 Thread XiaomingZheng
i download the 280_port_refresh version code, and excuted mvn
install got a sucess.
but when i tried to run the examples/hellolift using jetty:run, i
visited the localhost:8080 and got a 404 error. can somebody tell me
how can make 280_port_refresh version work correct?

On Jan 25, 7:17 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Jan 24, 2010 at 2:18 PM, Heiko Seeberger 

 heiko.seeber...@googlemail.com wrote:
  Awesome!

 Super Ultra Mega Awesome! :-)





  Heiko

  On Sunday, January 24, 2010, Indrajit Raychaudhuri indraj...@gmail.com
  wrote:
   Folks,

   A quick update on Lift 2.0 build on Scala 2.8.

   Scala 2.8 port of Lift is available on the branch 280_port_refresh. This
  is a 'refresh'ed version of 280_port which is fully aligned and sync'ed with
  the master.

   To ensure minimal delta between the master and 280_port_refresh, the
  codebase in master has been adjusted considerably to improve Scala 2.8
  compatibility. Thus, the master branch continues to be on Scala 2.7.7 but is
  lot more Scala 2.8 friendly now. In fact, most of the modules (and all the
  examples) build cleanly on both 2.7 and 2.8 without any change.

   Few additional points:

   1. Those interested in playing with this branch can checkout from the
  280_port_refresh and build locally.

   2. A Hudson job for lift_280_refresh has been setup at
 http://hudson.scala-tools.org/view/Lift/job/lift-scala280/. For now, it
  just does internal build. In course of the week, Hudson would be setup to
  deploy the snapshots as well.

   3. Scala 2.8 is binary incompatible with Scala 2.7. This means the
  additional scala libraries on which Lift depends also need to provide a
  Scala 2.8 build. Hopefully, there would be scalajpa and scalamodules-core
  build available in near term. For now, modules specifically dependent on
  them have been disabled.

   4. Parts of the code which don't work on Scala 2.8 (broken, incompatible
  etc.) have been marked with FIXME: 280.

   Cheers, Indrajit

   --
   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.comliftweb%2bunsubscr...@googlegroups.com
  .
   For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

  --
  Heiko Seeberger

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

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

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

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



[Lift] Re: HTML table links

2010-01-26 Thread Lukasz Kuczera
This does exactly what I wanted. Thank you, and AttrBindParam is even
not mentioned in the Lift book. I found this post usefull:
http://www.mail-archive.com/liftweb@googlegroups.com/msg14476.html

On Jan 25, 10:30 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 If you want to put a url bound to a function in a custom place like the
 javascript handler, one option is something like this.
 def func() { ... }
 val pageurl = ...  // the detail url
 val url =
   fmapFunc(
     (a: List[String]) = {func(); true}
   )(key =
     pageurl + ? + key + =_
   )

 To get the url into the html, use an AttrBindParam IIRC (not sure exact
 usage offhand).
 Then in func load the item into a RequestVar, which will be used by the
 detail page.



 On Mon, Jan 25, 2010 at 2:20 PM, Lukasz Kuczera kuk...@gmail.com wrote:
  Could you please point me, I can't find it.
  Also im using onclick attribute, can i fit link there ?
  I'm thinking of using some css hacking to get a over whole row but
  can't remember if it is possible.

  On Jan 25, 5:04 pm, Adam Warski a...@warski.org wrote:
   Hello,

           table cellpadding=7px title=User summary
                   thFirst Name/th
                   thLast Name/th
                   thHours Summary/th
                   thWage/th
                   lift:Users.list
                           tr onmouseover=this.bgColor='#ee';
onmouseout=this.bgColor='#FF';
                                   onclick=window.location
  ='URL_TO_USER_DETAILS';
                                   tdu:fname //td
                                   tdu:lname //td
                                   tdu:hours //td
                                   tdu:money //td
                           /tr
                   /lift:Users.list
           /table

What I want to achieve is that users clicks on table row and gets
redirected to details about selected row (user in this case). I would
like to implement this in View First pattern so i thought about
replacing 'onclick' attribute inside Users.list method but I don't
know the easy way to do this. The naive way would be using regular
expressions, but i've got feeling that i'm reinventing wheel here.
Please help.

   There are several ways to do it.

   I think the easiest one is to bind the view link to a SHtml.link,
  something like:

   users.flatMap { user =
   bind(..., ..., view - link(view.html, () = SelectedUser(user),
  Text(View user)) }

   where view.html is a template where you can view the user, SelectedUser
  is a RequestVar that holds the selection after you've clicked.
   You will also need to add the view.html to your sitemap.

   If you want a persistent URL for viewing users, you can add a rewrite
  rule.

   The use-case you are writing about is quite well described in the lift
  book (available in pdf for free), so I would also recommend looking there.

   --
   Adam

  --
  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.comliftweb%2bunsubscr...@googlegroups.com 
  
  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

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



[Lift] Re: FIXME comet type Full(xxx) name Full(yyy) timeout

2010-01-26 Thread aw
My code is a variation of the Chat sample code.  To me, the material
change is the fact that I am running this on Tomcat (6.0.20).  I have
never seen this behavior using Jetty (mvn jetty:run) and it isn't
really load related because I am the only user (possibly with two
browser windows).

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



[Lift] Re: User Presence Heartbeat

2010-01-26 Thread Daniel Spiewak
 We can make fixes to the 1.0.x branch for you, but I am reluctant to make
 changes to the 1.0 version.

Very understandable.  We'll just bump up to the 1.0.2 release.  That
jump has been on the back burner for a while, so it's good to get an
excuse to push it through.  :-)

 You might look into having your session management system let Lift know that
 the session is going down.  Lift *should* be tied to the container's session
 and if it's not working, please get us a repro case and we'll fix it.

Looking into it now.  It's also possible that Spring Security isn't
killing off the session properly, in which case Lift is more than
justified in hanging onto whatever information it has left.  If it
turns out that the session is dying but Lift still isn't firing
Unlisten on its own, then I'll do what I can to get you a reproducible
test case.  Time is a little tight right now though, so I may not be
able to do much more than report the bug in a case-less state.

 Is this an issue that needs to be solved this week?  If not, I'll have more
 time next week and can putter around with Jetty and see what I can learn
 about what it does with comet, NIO, etc. and see if there's a better way to
 give you what you need.

The sooner the better, but we understand that you have other things to
do.  We're going to forge ahead with the Listen/Unlisten trick coupled
with some extra hooks in Spring Security working under the assumption
that we'll be able to make it solid enough for now.  If and when you
find a better way to do this, we'll switch to that technique moving
forward.

So in other words, feel free to putter as soon as you get the chance!
We would certainly appreciate anything you can come up with.

Daniel

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



Re: [Lift] Re: FIXME comet type Full(xxx) name Full(yyy) timeout

2010-01-26 Thread David Pollak
On Tue, Jan 26, 2010 at 7:20 AM, aw anth...@whitford.com wrote:

 My code is a variation of the Chat sample code.  To me, the material
 change is the fact that I am running this on Tomcat (6.0.20).  I have
 never seen this behavior using Jetty (mvn jetty:run) and it isn't
 really load related because I am the only user (possibly with two
 browser windows).


This error means that it took  25 seconds to render the component.  The
amount of time it takes to render the component is based on the logic that
you wrote and has nothing to do with Lift or the container you're running
in.



 --
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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



Re: [Lift] Re: Lift 2.0 on Scala 2.8 update

2010-01-26 Thread David Pollak
On Tue, Jan 26, 2010 at 4:53 AM, XiaomingZheng xiaomingzhen...@gmail.comwrote:

 i download the 280_port_refresh version code, and excuted mvn
 install got a sucess.
 but when i tried to run the examples/hellolift using jetty:run, i
 visited the localhost:8080 and got a 404 error. can somebody tell me
 how can make 280_port_refresh version work correct?


Until the Scala 2.8 Beta comes out and until Lift is actually building in
Maven and Lift/Scala 2.8 JARs are available in the scala-tools.org Maven
repository, we're not providing support.



 On Jan 25, 7:17 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  On Sun, Jan 24, 2010 at 2:18 PM, Heiko Seeberger 
 
  heiko.seeber...@googlemail.com wrote:
   Awesome!
 
  Super Ultra Mega Awesome! :-)
 
 
 
 
 
   Heiko
 
   On Sunday, January 24, 2010, Indrajit Raychaudhuri 
 indraj...@gmail.com
   wrote:
Folks,
 
A quick update on Lift 2.0 build on Scala 2.8.
 
Scala 2.8 port of Lift is available on the branch 280_port_refresh.
 This
   is a 'refresh'ed version of 280_port which is fully aligned and sync'ed
 with
   the master.
 
To ensure minimal delta between the master and 280_port_refresh, the
   codebase in master has been adjusted considerably to improve Scala 2.8
   compatibility. Thus, the master branch continues to be on Scala 2.7.7
 but is
   lot more Scala 2.8 friendly now. In fact, most of the modules (and all
 the
   examples) build cleanly on both 2.7 and 2.8 without any change.
 
Few additional points:
 
1. Those interested in playing with this branch can checkout from the
   280_port_refresh and build locally.
 
2. A Hudson job for lift_280_refresh has been setup at
  http://hudson.scala-tools.org/view/Lift/job/lift-scala280/. For now, it
   just does internal build. In course of the week, Hudson would be setup
 to
   deploy the snapshots as well.
 
3. Scala 2.8 is binary incompatible with Scala 2.7. This means the
   additional scala libraries on which Lift depends also need to provide a
   Scala 2.8 build. Hopefully, there would be scalajpa and
 scalamodules-core
   build available in near term. For now, modules specifically dependent
 on
   them have been disabled.
 
4. Parts of the code which don't work on Scala 2.8 (broken,
 incompatible
   etc.) have been marked with FIXME: 280.
 
Cheers, Indrajit
 
--
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.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
   --
   Heiko Seeberger
 
   Work: weiglewilczek.com
   Blog: heikoseeberger.name
   Follow me: twitter.com/hseeberger
   OSGi on Scala: scalamodules.org
   Lift, the simply functional web framework: liftweb.net
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Lift group.
   To post to this group, send email to lift...@googlegroups.com.
   To unsubscribe from this group, send email to
   liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

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




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

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



Re: [Lift] Re: Tomcat tips

2010-01-26 Thread David Pollak
On Mon, Jan 25, 2010 at 11:29 PM, aw anth...@whitford.com wrote:

  Can you define freeze?  Is that the Java process stops for a short
 period
  of time (~1 second)?  A long period of time (many minutes)?  Until you
  restart the Java process?  What does the CPU utilization look like?  Is
 the
  freezing for a single client/browser or all of them?

 Freeze in terms of minutes.  But sorry, I haven't timed it yet.

 I just posted a symptom here:
 http://groups.google.com/group/liftweb/browse_thread/thread/1d91ce365ed22216#

 I decided to drill into my issue in more detail to try and find an
 error message, stack trace, memory issue, CPU consumption -- anything
 that might give me a hint.  Alas, the closest thing I have is the
 FIXME comet timeout message.

 I'd like to add that the code works some of the time (so I know that I
 don't have a syntax error).  When it doesn't work, it is seemingly
 random.  Not necessarily failing due to high load.  And actually, I am
 the only one hitting the server (with perhaps two browser windows at
 the most) right now.  So, it isn't like I have hundreds of users...


 Is anybody actually using Tomcat and Comet together with Lift?  Or is
 this oil and water?


http://much4.us is Tomcat and Lift and has been running flawlessly for
nearly 2 years.

Based on the other thread, you have a logic error in your Comet render
method.  The application server is not freezing, the page is taking a long
time to render and it's taking a long time to render because it's waiting
for the comet component to render itself.  If the behavior differs between
Jetty and Tomcat, it's likely that you have some sort of deadlock in your
code that's triggered based on the timing that you get out of Tomcat.  It's
not a Lift thing.



 Note that I am not using APR.  I don't think I am using NIO.  And I do
 have compression turned on.  But that shouldn't matter, right?

 --
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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



Re: [Lift] Re: Lift 2.0 on Scala 2.8 update

2010-01-26 Thread Naftoli Gugenheim
Did you see any error in the console?

-
XiaomingZhengxiaomingzhen...@gmail.com wrote:

i download the 280_port_refresh version code, and excuted mvn
install got a sucess.
but when i tried to run the examples/hellolift using jetty:run, i
visited the localhost:8080 and got a 404 error. can somebody tell me
how can make 280_port_refresh version work correct?

On Jan 25, 7:17 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Sun, Jan 24, 2010 at 2:18 PM, Heiko Seeberger 

 heiko.seeber...@googlemail.com wrote:
  Awesome!

 Super Ultra Mega Awesome! :-)





  Heiko

  On Sunday, January 24, 2010, Indrajit Raychaudhuri indraj...@gmail.com
  wrote:
   Folks,

   A quick update on Lift 2.0 build on Scala 2.8.

   Scala 2.8 port of Lift is available on the branch 280_port_refresh. This
  is a 'refresh'ed version of 280_port which is fully aligned and sync'ed with
  the master.

   To ensure minimal delta between the master and 280_port_refresh, the
  codebase in master has been adjusted considerably to improve Scala 2.8
  compatibility. Thus, the master branch continues to be on Scala 2.7.7 but is
  lot more Scala 2.8 friendly now. In fact, most of the modules (and all the
  examples) build cleanly on both 2.7 and 2.8 without any change.

   Few additional points:

   1. Those interested in playing with this branch can checkout from the
  280_port_refresh and build locally.

   2. A Hudson job for lift_280_refresh has been setup at
 http://hudson.scala-tools.org/view/Lift/job/lift-scala280/. For now, it
  just does internal build. In course of the week, Hudson would be setup to
  deploy the snapshots as well.

   3. Scala 2.8 is binary incompatible with Scala 2.7. This means the
  additional scala libraries on which Lift depends also need to provide a
  Scala 2.8 build. Hopefully, there would be scalajpa and scalamodules-core
  build available in near term. For now, modules specifically dependent on
  them have been disabled.

   4. Parts of the code which don't work on Scala 2.8 (broken, incompatible
  etc.) have been marked with FIXME: 280.

   Cheers, Indrajit

   --
   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.comliftweb%2bunsubscr...@googlegroups.com
  .
   For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

  --
  Heiko Seeberger

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

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

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

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

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



Re: [Lift] Optgroup in select ?

2010-01-26 Thread David Pollak
On Tue, Jan 26, 2010 at 3:40 AM, Francois fan...@gmail.com wrote:

 Hello,

 I'm wondering if it is possible to use optgroup tag with SHtml.select ?


It's not possible today.  Do you have an idea of what the API should look
like?



 If not, what would be the best way to use them ?


 --
 Francois ARMAND
 http://fanf42.blogspot.com

 --
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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



Re: [Lift] Creating a path from a Loc

2010-01-26 Thread David Pollak
a href={myLoc.createDefaultLink}Foo/a

In Scala, if the attribute is an Option[NodeSeq] and it is None, the
attribute will not be included where if it's Some(Text(/foo/bar)) it will
be included.  Thus the choice of Option rather than Box and the choice of
NodeSeq rather than String.

In terms of your code:

(for {
  loc - SiteMap.findLoc(Login)
  path - loc.createDefaultPath
 } yield a href={path}Login/a) openOr NodeSeq.Empty



On Tue, Jan 26, 2010 at 2:29 AM, Adam Warski a...@warski.org wrote:

 Hello,

 I'm having some trouble generating a link basing on a Loc.
 My original use-case is to redirect the user to a  login page if the user
 is not logged in. I found a wiki on this and it says there to simply
 redirect to /user_mgt/login, however I think it would be much nicer if I
 could generate the link basing on looking up the right Loc.

 However having the Loc I can only generate a NodeSeq, not a plain String.

 So the solution would be to add a method into the Loc trait parallel to
 this one:

 def createDefaultLink: Option[NodeSeq] = currentValue.flatMap(p =
 link.createLink(p)).toOption

 which would be:

 def createDefaultPath: Option[String] = currentValue.flatMap(p =
 link.createPath(p)).toOption

 (btw., why is it Option here, not Box?)

 Then generating a link to the login page would simply be:

 SiteMap.findLoc(Login).open_!.createDefaultPath

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




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




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

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



[Lift] New ticketing system

2010-01-26 Thread David Pollak
Folks,

We switched to GitHub's ticketing system a bunch of months ago and, well,
it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
no attachments, weak discussion capaibilities).  It doesn't allow easy
planning/prioritization.

I'd like to switch to something more powerful.  Derek was working on
LiftTicket.  I'd like to use that, but don't know the state of the project.
Alternatively, we could use Assembla's ticketing system.

Does anyone have thoughts/input on the issue?

Thanks,

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.



Re: [Lift] buildr?

2010-01-26 Thread Alex Boisvert
Forgot to send this to the list earlier, I published a template project,

http://github.com/aboisvert/lift-template

which I use as basis for building Lift projects.  (Haven't updated to
2.0-SNAPSHOT yet but should only be a matter of changing a few version
numbers).

alex


On Fri, Jan 22, 2010 at 9:38 AM, Timothy Perrett timo...@getintheloop.euwrote:

 Alex,

 Can I suggest you distill your own learning onto the wiki?

 Cheers, Tim

 On 22 Jan 2010, at 01:51, Alex Boisvert wrote:

  On Thu, Jan 21, 2010 at 5:17 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:
 
 
  On Thu, Jan 21, 2010 at 5:03 PM, Raoul Duke rao...@gmail.com wrote:
  hi,
 
   whatever came of buildr for lift? i haven't stumbled across the answer
   googling yet, but i'm still checking...
  
   We're not going to support Buildr for Lift.  Adding Ruby into the mix
 is a
   non-starter from my perspective.  There is increasing sbt support for
   Lift-based projects.
 
  thanks for the info. i will go read up on sbt now!
 
  [i saw your older response about disliking the ruby runtime -- i was
  wondering if anybody else had done a buildr branch nevertheless :-)
  e.g. http://github.com/aboisvert/liftweb# (and i wonder if jruby
  mitigates your ruby runtime concerns at all).]
 
  Jruby is yet another download, install, configuration.  Making Lift as
 easy as possible to get started with and keep going with is the priority.
  Maven gives us this.  Yes, the one line you have to copy/paste is a bear,
 but once you've typed that, things work remarkably well with Maven.  Having
 to install Jruby, is yet another barrier, yet another thing to support, etc.
 
  disclaimer i'm not arguing for use of buildr with lift, just providing
 information /disclaimer
 
  buildr now has an all-in-one distribution (which uses jruby on the
 inside) and requires no more install/configuration steps than maven.
  granted, if you already use maven, it's an extra step.
 
  there's also an all-in-one-jar in the works which will make buildr even
 easier to install and use.  this should be available soon after jruby 1.5.0
 is out.
 
  i use buildr + lift on a regular basis and find it a pleasant alternative
 to maven.  if other people want to use buildr with lift, i'm happy to share
 and help them out.
 
  cheers,
  alex
 
  --
  You received this message because you are subscribed to the Google Groups
 Lift group.
  To post to this group, send email to lift...@googlegroups.com.
  To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.



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



[Lift] Re: Tomcat tips

2010-01-26 Thread aw
  Freeze in terms of minutes.  But sorry, I haven't timed it yet.

I stumbled across my issue again and checked the logs and the freeze
is apparently 522 seconds:

09:31:41.124 INFO  [http-8080-exec-8] lift [Slf4jLogger.scala:110] -
Service req
uest (GET) /mobile/mypage/ took 522397 Milliseconds

I can also confirm that CPU is 99% idle.

  Is anybody actually using Tomcat and Comet together with Lift?  Or is
  this oil and water?

 http://much4.usis Tomcat and Lift and has been running flawlessly for
 nearly 2 years.

Excellent news...  I enabled NIO on Tomcat thinking that it will help,
but still experiencing symptoms.  Since I never saw symptoms with
Jetty, I wondered if there were tips on configuring Tomcat for Lift.
Alas, doesn't sound like that would be the problem.

 Based on the other thread, you have a logic error in your Comet render
 method.  The application server is not freezing, the page is taking a long
 time to render and it's taking a long time to render because it's waiting
 for the comet component to render itself.  If the behavior differs between
 Jetty and Tomcat, it's likely that you have some sort of deadlock in your
 code that's triggered based on the timing that you get out of Tomcat.  It's
 not a Lift thing.

BTW...  I'm actually not 100% convinced my freeze problem is related
to Comet.  I actually am experiencing the freeze pulling up a non-
comet page.  I can confirm that the freeze is not related to the
database because each database query is coming pack in less than 10
ms.


Can I also assume that Browser choice is irrelevent?  Most of my
development testing was with Chrome, but now I am using IE (6 and 8)
in my testing.  That shouldn't matter, right?

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



Re: [Lift] Creating a path from a Loc

2010-01-26 Thread Kris Nuttycombe
For this you can use loc.link.createPath. I use something similar in
my codebase. This has a little cruft you may not be precisely
interested in, but if you look at the link and flink methods, you
should be able to get an idea of how to use the Loc.Link:

class Path(val elems: List[String])

object Path {
def apply(str: String) = new Path(str.split(/).toList)
def apply(elems: List[String]) = new Path(elems)
}

case class UULink[T : UUEntity](path: Path) extends
Loc.Link[T](path.elems, false) {
override def pathList(entity: T) = path.elems :::
entity.getUuid.toString :: Nil
}

class UULoc[T : UUEntity](override val params:
List[LocParam[T]])(implicit manifest: Manifest[T]) extends Loc[T] {
private val log = Logging.logger(UULoc)
private val typeName = manifest.erasure.getSimpleName
private val path = Path(typeName.toLowerCase + s :: show :: Nil)

override val name = typeName +   Details
override val link: UULink[T] = new UULink[T](path)
override val text = LinkText((t: T) = Text(typeName +   + t.getUuid))
override val defaultValue = Empty

private def isLegalPath(root: String, uuid: String): Boolean = {
//log.info(checking path root  + root +  against  +
typeName.toLowerCase +  and uuid  + uuid)
root == (typeName.toLowerCase + s) 
EM.findByUuid[T](uuid).isDefined
}

def link(entity: T, linkText: Box[NodeSeq], attrs: (String,
String)*): NodeSeq = {
a 
href={link.createPath(entity)}{linkText.openOr(title(entity))}/a
//% attrs
}

def flink(entity: T, linkText: Box[NodeSeq], attrs: (String,
String)*)(f: () = Any): NodeSeq = {
SHtml.link(link.createPath(entity), f,
linkText.openOr(text.text(entity)), attrs: _*)
}

override def rewrite = {
Full({
case RewriteRequest(ParsePath(root :: show ::
uuid :: Nil,_,_,_),_,_)
if isLegalPath(root, uuid) =
(RewriteResponse(path.elems,
Map(typeName.toLowerCase + Uuid - uuid)),
EM.findByUuid[T](uuid).get)
})
}
}

object UULoc {
def apply[T : UUEntity](params: LocParam[T]*)(implicit
manifest: Manifest[T]) : UULoc[T] = new UULoc[T](params.toList)
}

On Tue, Jan 26, 2010 at 3:29 AM, Adam Warski a...@warski.org wrote:
 Hello,

 I'm having some trouble generating a link basing on a Loc.
 My original use-case is to redirect the user to a  login page if the user is 
 not logged in. I found a wiki on this and it says there to simply redirect to 
 /user_mgt/login, however I think it would be much nicer if I could generate 
 the link basing on looking up the right Loc.

 However having the Loc I can only generate a NodeSeq, not a plain String.

 So the solution would be to add a method into the Loc trait parallel to this 
 one:

 def createDefaultLink: Option[NodeSeq] = currentValue.flatMap(p = 
 link.createLink(p)).toOption

 which would be:

 def createDefaultPath: Option[String] = currentValue.flatMap(p = 
 link.createPath(p)).toOption

 (btw., why is it Option here, not Box?)

 Then generating a link to the login page would simply be:

 SiteMap.findLoc(Login).open_!.createDefaultPath

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




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



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



[Lift] Re: New ticketing system

2010-01-26 Thread Marius
I wholeheartedly agree. I'd also wish we could use Derek's stuff but I
heaven't heard of it in a while and I know Derek currently has some
other stuff to do. I'm not sure if someone else took it over but no
news yet.

So unless someone has really good news about Derek's stuff Asssmbla
sounds pretty good. So you got my vote.

Br's,
Marius

On Jan 26, 7:46 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,

 We switched to GitHub's ticketing system a bunch of months ago and, well,
 it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
 no attachments, weak discussion capaibilities).  It doesn't allow easy
 planning/prioritization.

 I'd like to switch to something more powerful.  Derek was working on
 LiftTicket.  I'd like to use that, but don't know the state of the project.
 Alternatively, we could use Assembla's ticketing system.

 Does anyone have thoughts/input on the issue?

 Thanks,

 David

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

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



Re: [Lift] New ticketing system

2010-01-26 Thread Jeppe Nejsum Madsen
David Pollak feeder.of.the.be...@gmail.com writes:

 Folks,

 We switched to GitHub's ticketing system a bunch of months ago and, well,
 it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
 no attachments, weak discussion capaibilities).  It doesn't allow easy
 planning/prioritization.

 I'd like to switch to something more powerful.  Derek was working on
 LiftTicket.  I'd like to use that, but don't know the state of the project.
 Alternatively, we could use Assembla's ticketing system.

 Does anyone have thoughts/input on the issue?

We're using Assembla.  Seems to work fine for our small shop. It has a
lot of features that we don't use but which I think could be handy for
Lift.

Have a look at the clojure space to see how it may look for an OSS
project.

Also, it seems (haven't tried) that it's possible to import tickets:

http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/

/Jeppe

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



[Lift] jQuery 1.4

2010-01-26 Thread Jonathan Hoffman
Hi,

Has anyone done extensive lift testing with jQuery 1.4.1?  My very brief test 
seems to indicate that things still work as expected, but I'm not doing 
anything with comet. 

http://jquery14.com/day-01/jquery-14

Should lift 2.0 upgrade?

- Jon

-- 
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] Mapper CamelCase vs snake_case

2010-01-26 Thread Jeppe Nejsum Madsen
Hi,

I'm looking at http://github.com/dpp/liftweb/issues#issue/155 and have a
few ideas that I thought I would run by the list

Here's how I think naming is currently handled (I've only looked at
fields, my guess is tables are/should be similar):

- name: always the object name lowercased. Cannot be changed by user
- dbColumnName: by default same as name, unless it's reserved, in which
  case _c is appended. Can be overridden by user
- _dbColumnNameLC: internal name used by mapper. Lower cases
  dbColumnName unless the db connection supports mixed case identifiers

I suggest the following changes:

In MapperRules add
  var columnName: String = String = s = s.toLowerCase

(and perhaps tableName, indexName etc. if we want full flexibility)

- name: object name unchanged (ie not lower cased)
- dbColumnName: default is MapperRules.columnName(name) unless this is
  reserved, in which case _c is appended.
- _dbColumnNameLC: No change

I like that name is not changed (ie widgetsHit doesn't become widgetshit
:-) but not sure if this breaks anything.

If people want snake_case they can add: 

MapperRules.columnName = ClassHelpers.unCamelCase 

(this strikes me as a rather odd place for this function, but never mind
:-)

Thoughts?

/Jeppe

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



Re: [Lift] New ticketing system

2010-01-26 Thread Naftoli Gugenheim
I think it would be a *major* wasted opportunity not to invest in LiftTicket. 
It would be an excellent real life showcase of Lift. And of course it wouldn't 
make sense to switch to Assembla only temporarily.
In addition, after all the work Derek put into it, it would be sad not to use 
it.
Derek said that it's pretty near functional. G-d willing I will try to download 
it today and see where it's holding, and see if I can move it forward. David, 
what features does Assembla have that you would like to see in LiftTicket (or 
even if Assembla doesn't)?
In any case once it's basically usable we can start using it, and add features 
along the way. Also, importing tickets from GitHub should be a matter of a 
trivial scala script.


-
Jeppe Nejsum Madsenje...@ingolfs.dk wrote:

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

 Folks,

 We switched to GitHub's ticketing system a bunch of months ago and, well,
 it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
 no attachments, weak discussion capaibilities).  It doesn't allow easy
 planning/prioritization.

 I'd like to switch to something more powerful.  Derek was working on
 LiftTicket.  I'd like to use that, but don't know the state of the project.
 Alternatively, we could use Assembla's ticketing system.

 Does anyone have thoughts/input on the issue?

We're using Assembla.  Seems to work fine for our small shop. It has a
lot of features that we don't use but which I think could be handy for
Lift.

Have a look at the clojure space to see how it may look for an OSS
project.

Also, it seems (haven't tried) that it's possible to import tickets:

http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/

/Jeppe

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

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



Re: [Lift] New ticketing system

2010-01-26 Thread Daniel Truemper
Hi,

so far I have been a passive reader of this group. Lift is just a (very)
smal time project, but I like it a lot! Anyways:

 We switched to GitHub's ticketing system a bunch of months ago and, well,
 it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
 no attachments, weak discussion capaibilities).  It doesn't allow easy
 planning/prioritization.

 I'd like to switch to something more powerful.  Derek was working on
 LiftTicket.  I'd like to use that, but don't know the state of the project.
 Alternatively, we could use Assembla's ticketing system.

 Does anyone have thoughts/input on the issue?
I see many projects on GitHub using Lighthouse:

http://lighthouseapp.com/

And if I remember correctly, the github's service hook for lighthouse
will enable the 'closes #123' type of commit messages...

Best
Daniel

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



Re: [Lift] Optgroup in select ?

2010-01-26 Thread Francois

Le 26/01/2010 18:25, David Pollak a écrit :


It's not possible today.  Do you have an idea of what the API should
look like?


I believe that a simple select with a Seq[(String, Seq[(T,String)])] 
could be sufficient.


On the other hand, there is already a lot of selectbox related methods 
in SHtml, and I think that they miss some possibilities (for example, 
adding attributes, especially class, to option).


So, I was thinking to something more general, like what is at the 
bottom, with a full feature option model, group model, and select 
options.


Or perhaps it would be even nicer to have less select methods, with some 
implicits for common use case ( Seq[String,String)] as option, in 
particular)



Thanks for you time,

(the formating in the mail is bad, so I also join the source in a file)

8 Code proposition for select model --
/**
 * A full featured option tag
 */
case class OptionModel[T](value:T, label:String, disabled:Boolean, 
attrs:(String,String)*)


/**
 * Option Group
 */
case class OptionGroupModel[T](label:String, 
options:Seq[OptionModel[T]], disabled:Boolean, attrs:(String,String)*) {

  def values = options map( _.value )
}

/**
 *  Options : list of ungrouped options
 *  OptionGroups : the list of groups of options.
 */
case class 
SelectOptions[T](options:Seq[OptionModel[T]],groups:Seq[OptionGroupModel[T]]) 
{

  def values = (options map( _.value)) ++ (groups map( _.values))
}



object SHtml {

  // 
  private def selected(in: Boolean) = if (in) new 
UnprefixedAttribute(selected, selected, Null) else Null

  // 

  private def disabled(in: Boolean) = if (in) new 
UnprefixedAttribute(disabled, true, Null) else Null


  def select_*(opts: SelectOptions[String], deflt: Box[String], func: 
AFuncHolder, attrs: (String, String)*): Elem = {

//build an option from an option model
def buildOption(option:OptionModel[String]) = {
  option.attrs.foldLeft(
option value={option.value}{option.label}/option % 
disabled(option.disabled) % selected(deflt.exists(_ == option.value))

  )(_ % _)
}

val testFunc = LFuncHolder(in = in.filter(v = 
opts.values.contains(v)) match {case Nil = false case xs = func(xs)}, 
func.owner)


attrs.foldLeft(fmapFunc(testFunc)(fn = select name={fn}{
  //start with groups
  opts.groups.flatMap { group =
group.attrs.foldLeft(optgroup label={group.label}{
  //each option in a groups, with its attributes
  group.options.flatMap { buildOption(_) }
}/optgroup % disabled(group.disabled) )(_ % _)
  } ++
  //now, option that are not in a group
  opts.options.flatMap { buildOption(_) }
}/select))(_ % _)
  }

}
8- end code proposition for select model -

--
Francois ARMAND
http://fanf42.blogspot.com

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

package net.liftweb.demo

import net.liftweb.http.S._
import scala.xml._
import net.liftweb.common._
import net.liftweb.util.Helpers._

/**
 * A full featured option tag
 */
case class OptionModel[T](value:T, label:String, disabled:Boolean, attrs:(String,String)*)

/**
 * Option Group
 */ 
case class OptionGroupModel[T](label:String, options:Seq[OptionModel[T]], disabled:Boolean, attrs:(String,String)*) {
  def values = options map( _.value )
}

/**
 *  Options : list of ungrouped options
 *  OptionGroups : the list of groups of options.
 */
case class SelectOptions[T](options:Seq[OptionModel[T]],groups:Seq[OptionGroupModel[T]]) {
  def values = (options map( _.value)) ++ (groups map( _.values))
}



object SHtml {
  
  // 
  private def selected(in: Boolean) = if (in) new UnprefixedAttribute(selected, selected, Null) else Null
  // 

  private def disabled(in: Boolean) = if (in) new UnprefixedAttribute(disabled, true, Null) else Null
  
  def select_*(opts: SelectOptions[String], deflt: Box[String], func: AFuncHolder, attrs: (String, String)*): Elem = {
//build an option from an option model
def buildOption(option:OptionModel[String]) = {
  option.attrs.foldLeft(
option value={option.value}{option.label}/option % disabled(option.disabled) % selected(deflt.exists(_ == option.value))
  )(_ % _)
}

val testFunc = LFuncHolder(in = in.filter(v = opts.values.contains(v)) match {case Nil = false case xs = func(xs)}, func.owner)
  
attrs.foldLeft(fmapFunc(testFunc)(fn = select name={fn}{
  //start with groups
  opts.groups.flatMap { group =
group.attrs.foldLeft(optgroup label={group.label}{
  //each option in a groups, with its attributes
  group.options.flatMap { buildOption(_) }
}/optgroup % disabled(group.disabled) )(_ % _)

Re: [Lift] Optgroup in select ?

2010-01-26 Thread Naftoli Gugenheim
Which method doesn't let you pass attributes?

-
Francoisfan...@gmail.com wrote:

Le 26/01/2010 18:25, David Pollak a écrit :

 It's not possible today.  Do you have an idea of what the API should
 look like?

I believe that a simple select with a Seq[(String, Seq[(T,String)])] 
could be sufficient.

On the other hand, there is already a lot of selectbox related methods 
in SHtml, and I think that they miss some possibilities (for example, 
adding attributes, especially class, to option).

So, I was thinking to something more general, like what is at the 
bottom, with a full feature option model, group model, and select 
options.

Or perhaps it would be even nicer to have less select methods, with some 
implicits for common use case ( Seq[String,String)] as option, in 
particular)


Thanks for you time,

(the formating in the mail is bad, so I also join the source in a file)

8 Code proposition for select model --
/**
  * A full featured option tag
  */
case class OptionModel[T](value:T, label:String, disabled:Boolean, 
attrs:(String,String)*)

/**
  * Option Group
  */
case class OptionGroupModel[T](label:String, 
options:Seq[OptionModel[T]], disabled:Boolean, attrs:(String,String)*) {
   def values = options map( _.value )
}

/**
  *  Options : list of ungrouped options
  *  OptionGroups : the list of groups of options.
  */
case class 
SelectOptions[T](options:Seq[OptionModel[T]],groups:Seq[OptionGroupModel[T]]) 
{
   def values = (options map( _.value)) ++ (groups map( _.values))
}



object SHtml {

   // 
   private def selected(in: Boolean) = if (in) new 
UnprefixedAttribute(selected, selected, Null) else Null
   // 

   private def disabled(in: Boolean) = if (in) new 
UnprefixedAttribute(disabled, true, Null) else Null

   def select_*(opts: SelectOptions[String], deflt: Box[String], func: 
AFuncHolder, attrs: (String, String)*): Elem = {
 //build an option from an option model
 def buildOption(option:OptionModel[String]) = {
   option.attrs.foldLeft(
 option value={option.value}{option.label}/option % 
disabled(option.disabled) % selected(deflt.exists(_ == option.value))
   )(_ % _)
 }

 val testFunc = LFuncHolder(in = in.filter(v = 
opts.values.contains(v)) match {case Nil = false case xs = func(xs)}, 
func.owner)

 attrs.foldLeft(fmapFunc(testFunc)(fn = select name={fn}{
   //start with groups
   opts.groups.flatMap { group =
 group.attrs.foldLeft(optgroup label={group.label}{
   //each option in a groups, with its attributes
   group.options.flatMap { buildOption(_) }
 }/optgroup % disabled(group.disabled) )(_ % _)
   } ++
   //now, option that are not in a group
   opts.options.flatMap { buildOption(_) }
 }/select))(_ % _)
   }

}
8- end code proposition for select model -

-- 
Francois ARMAND
http://fanf42.blogspot.com

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

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



Re: [Lift] New ticketing system

2010-01-26 Thread David Pollak
On Tue, Jan 26, 2010 at 11:12 AM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 I think it would be a *major* wasted opportunity not to invest in
 LiftTicket.


I agree.


 It would be an excellent real life showcase of Lift. And of course it
 wouldn't make sense to switch to Assembla only temporarily.
 In addition, after all the work Derek put into it, it would be sad not to
 use it.


I agree.


 Derek said that it's pretty near functional. G-d willing I will try to
 download it today and see where it's holding, and see if I can move it
 forward. David, what features does Assembla have that you would like to see
 in LiftTicket (or even if Assembla doesn't)?


This is pretty compelling:

http://www.assembla.com/spaces/clojure/tickets?batch=falsetickets_report_id=1ticket_id=

As is:

http://www.assembla.com/spaces/tickets/metrics/b4-TTcvBSr3RAZeJe5aVNr

Being able to plan and in other ways communicate among the committers as
well as with the community is very powerful.


 In any case once it's basically usable we can start using it, and add
 features along the way.


I'm all for that!


 Also, importing tickets from GitHub should be a matter of a trivial scala
 script.


 -
 Jeppe Nejsum Madsenje...@ingolfs.dk wrote:

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

  Folks,
 
  We switched to GitHub's ticketing system a bunch of months ago and, well,
  it's not making the grade.  It's slow.  It's limited (no unclosing
 tickets,
  no attachments, weak discussion capaibilities).  It doesn't allow easy
  planning/prioritization.
 
  I'd like to switch to something more powerful.  Derek was working on
  LiftTicket.  I'd like to use that, but don't know the state of the
 project.
  Alternatively, we could use Assembla's ticketing system.
 
  Does anyone have thoughts/input on the issue?

 We're using Assembla.  Seems to work fine for our small shop. It has a
 lot of features that we don't use but which I think could be handy for
 Lift.

 Have a look at the clojure space to see how it may look for an OSS
 project.

 Also, it seems (haven't tried) that it's possible to import tickets:

 http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/

 /Jeppe

 --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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



Re: [Lift] New ticketing system

2010-01-26 Thread Daniel Truemper

 We used Lighthouse briefly and it was a seriously suboptimal user experience 
 for me and others... thus the switch to GitHub.
:)

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



Re: [Lift] jQuery 1.4

2010-01-26 Thread David Pollak
I'm all for making the change.  Now is a good time... it will give us a
week+ of testing before M2.

On Tue, Jan 26, 2010 at 11:03 AM, Jonathan Hoffman jonhoff...@gmail.comwrote:

 Hi,

 Has anyone done extensive lift testing with jQuery 1.4.1?  My very brief
 test seems to indicate that things still work as expected, but I'm not doing
 anything with comet.

 http://jquery14.com/day-01/jquery-14

 Should lift 2.0 upgrade?

 - Jon

 --
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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



[Lift] Heartbeat notes [feel free to ignore]

2010-01-26 Thread David Pollak
Folks,

I'm rooting around in Lift/Jetty code to try to create a heartbeat system.
I'm going to post random notes as I learn things... kinda stream of
consciousness.

We're not the only ones that care:
http://markmail.org/message/22segyhko3csr5sy#query:jetty%20detecting%20browser%20disconnect+page:1+mid:mel7wohcvsfd76cy+state:results

It's likely that there are a ton of factors (keep-alive, proxy, etc.) but
perhaps an approximation will do.

More as I find it.

Thanks,

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.



Re: [Lift] Creating a path from a Loc

2010-01-26 Thread Adam Warski
Hello,

 For this you can use loc.link.createPath. I use something similar in
 my codebase. This has a little cruft you may not be precisely
 interested in, but if you look at the link and flink methods, you
 should be able to get an idea of how to use the Loc.Link:


I'm using Link in a similar way to, but here I can't use createPath, as 
SiteMap.findLoc(...) returns a Loc[_], so the type parameter is unknown, so 
without some casts I won't be able to pass the parameter.

I tried:

val loc = SiteMap.findLoc(Login).open_!
val link = loc.link.createPath(loc.currentValue.open_!)

but unfortunately the compiler doesn't seem to recognize the fact that the type 
parameter for loc is the same as the one returned for loc.currentValue.

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




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



Re: [Lift] Creating a path from a Loc

2010-01-26 Thread David Pollak
On Tue, Jan 26, 2010 at 12:17 PM, Adam Warski a...@warski.org wrote:

 Hello,

  For this you can use loc.link.createPath. I use something similar in
  my codebase. This has a little cruft you may not be precisely
  interested in, but if you look at the link and flink methods, you
  should be able to get an idea of how to use the Loc.Link:


 I'm using Link in a similar way to, but here I can't use createPath, as
 SiteMap.findLoc(...) returns a Loc[_], so the type parameter is unknown, so
 without some casts I won't be able to pass the parameter.

 I tried:

 val loc = SiteMap.findLoc(Login).open_!
 val link = loc.link.createPath(loc.currentValue.open_!)


First, stop using open_!

If you find yourself using open_!, ask the very important question, Why am
I doing this... anything with an ! in the method name means danger... In
this case, the danger is that that the Box is not Full.

If you need a String:

(for {
  loc - SiteMap.findLoc(Login)
  path - loc.createDefaultPath
 } yield path.text) openOr /





 but unfortunately the compiler doesn't seem to recognize the fact that the
 type parameter for loc is the same as the one returned for loc.currentValue.

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




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




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

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



[Lift] Re: Heartbeat notes [feel free to ignore]

2010-01-26 Thread David Pollak
Okay... I've done this checkin:

http://github.com/dpp/liftweb/commit/be575ea2ceb6510c17b905e12b2d9b22db892d37

It adds a heartbeat function to LiftRules for Comet-enabled containers (read
Jetty).  There's a modification to the examples code to demonstrate it.

On my local box, it worked fine.

Looking for feedback on (1) if it gets the job done for Daniel  Co. and (2)
how we can make it more general so that we can bring it forward to Lift 2.0.

On Tue, Jan 26, 2010 at 11:50 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Folks,

 I'm rooting around in Lift/Jetty code to try to create a heartbeat system.
 I'm going to post random notes as I learn things... kinda stream of
 consciousness.

 We're not the only ones that care:

 http://markmail.org/message/22segyhko3csr5sy#query:jetty%20detecting%20browser%20disconnect+page:1+mid:mel7wohcvsfd76cy+state:results

 It's likely that there are a ton of factors (keep-alive, proxy, etc.) but
 perhaps an approximation will do.

 More as I find it.

 Thanks,

 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




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

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



Re: [Lift] Optgroup in select ?

2010-01-26 Thread Francois Armand

Le 26/01/2010 20:40, Naftoli Gugenheim a écrit :

Which method doesn't let you pass attributes?



All select methods do have an attrs:(String,String)* parameter, but as 
far as I understand, attributes are applied to the select, not to 
option tag, and sometime I really would like to be able to pass attr 
to them (disabled or class for example)


--
Francois Armand
http://fanf42.blogspot.com

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



Re: [Lift] New ticketing system

2010-01-26 Thread Naftoli Gugenheim
For anyone who wants to give LiftTicket a spin:
Download it from www.github.com/dchenbecker/LiftTicket
Extract it into a directory and open a command prompt or shell there
mvn -Dorg.liftticket.config.masterpass=xxx jetty:run
Open a browser to http://localhost:8080/config/initial and enter your password 
(what you wrote for xxx above).
Navigate to User Administration and create a user with full permisions.
Terminate jetty
mvn jetty:run
Login as that user and set up all your settings

There doesn't seem to be a way to configure default permissions.


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

On Tue, Jan 26, 2010 at 11:12 AM, Naftoli Gugenheim naftoli...@gmail.comwrote:

 I think it would be a *major* wasted opportunity not to invest in
 LiftTicket.


I agree.


 It would be an excellent real life showcase of Lift. And of course it
 wouldn't make sense to switch to Assembla only temporarily.
 In addition, after all the work Derek put into it, it would be sad not to
 use it.


I agree.


 Derek said that it's pretty near functional. G-d willing I will try to
 download it today and see where it's holding, and see if I can move it
 forward. David, what features does Assembla have that you would like to see
 in LiftTicket (or even if Assembla doesn't)?


This is pretty compelling:

http://www.assembla.com/spaces/clojure/tickets?batch=falsetickets_report_id=1ticket_id=

As is:

http://www.assembla.com/spaces/tickets/metrics/b4-TTcvBSr3RAZeJe5aVNr

Being able to plan and in other ways communicate among the committers as
well as with the community is very powerful.


 In any case once it's basically usable we can start using it, and add
 features along the way.


I'm all for that!


 Also, importing tickets from GitHub should be a matter of a trivial scala
 script.


 -
 Jeppe Nejsum Madsenje...@ingolfs.dk wrote:

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

  Folks,
 
  We switched to GitHub's ticketing system a bunch of months ago and, well,
  it's not making the grade.  It's slow.  It's limited (no unclosing
 tickets,
  no attachments, weak discussion capaibilities).  It doesn't allow easy
  planning/prioritization.
 
  I'd like to switch to something more powerful.  Derek was working on
  LiftTicket.  I'd like to use that, but don't know the state of the
 project.
  Alternatively, we could use Assembla's ticketing system.
 
  Does anyone have thoughts/input on the issue?

 We're using Assembla.  Seems to work fine for our small shop. It has a
 lot of features that we don't use but which I think could be handy for
 Lift.

 Have a look at the clojure space to see how it may look for an OSS
 project.

 Also, it seems (haven't tried) that it's possible to import tickets:

 http://i1t2b3.com/2009/08/26/how-to-import-tickets-assembla/

 /Jeppe

 --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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

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



[Lift] Re: New ticketing system

2010-01-26 Thread Thad
Why not a proven workhorse in this arena, such as JIRA by Atlassian ?
It's FREE for Open Source Projects, and as a bonus you'd probably get
more widespread appeal from Java / Scala development camps.

2cents,
Thad

On Jan 26, 11:46 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,

 We switched to GitHub's ticketing system a bunch of months ago and, well,
 it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
 no attachments, weak discussion capaibilities).  It doesn't allow easy
 planning/prioritization.

 I'd like to switch to something more powerful.  Derek was working on
 LiftTicket.  I'd like to use that, but don't know the state of the project.
 Alternatively, we could use Assembla's ticketing system.

 Does anyone have thoughts/input on the issue?

 Thanks,

 David

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

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



Re: [Lift] Re: New ticketing system

2010-01-26 Thread David Pollak
On Tue, Jan 26, 2010 at 1:17 PM, Thad thadgui...@gmail.com wrote:

 Why not a proven workhorse in this arena, such as JIRA by Atlassian ?
 It's FREE for Open Source Projects, and as a bonus you'd probably get
 more widespread appeal from Java / Scala development camps.


Personally, I think Jira's UI and performance is awful.  I'd rather start
with GitHub than go to Jira.  But that's just me.


 2cents,
 Thad

 On Jan 26, 11:46 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
 
  We switched to GitHub's ticketing system a bunch of months ago and, well,
  it's not making the grade.  It's slow.  It's limited (no unclosing
 tickets,
  no attachments, weak discussion capaibilities).  It doesn't allow easy
  planning/prioritization.
 
  I'd like to switch to something more powerful.  Derek was working on
  LiftTicket.  I'd like to use that, but don't know the state of the
 project.
  Alternatively, we could use Assembla's ticketing system.
 
  Does anyone have thoughts/input on the issue?
 
  Thanks,
 
  David
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

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




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

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



[Lift] Save Mapper's mapped field

2010-01-26 Thread Gang
Hi all,

Somebody please help on this..

Before I save the Mapper object back to database, I need to check if
one of the mapped field changed; if changed, I need trigger another
database call(create a new entry in a history table).  What is the
best way doing it?  Do I have to override MetaMapper's beforeSave() to
query database for changes before save?

I'm using CRUDifier and its provided edit page to submit user
input.  Could somebody explain to me what is the life cycle of the
Mapper object after user click on Edit button?

Thanks in advance!

Gang

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



Re: [Lift] Save Mapper's mapped field

2010-01-26 Thread David Pollak
MappedField.dirty_? -- was the field changed?

MappedField.is -- the current value

MappedField.was -- the value pulled from the DB

On Tue, Jan 26, 2010 at 1:37 PM, Gang wangga...@gmail.com wrote:

 Hi all,

 Somebody please help on this..

 Before I save the Mapper object back to database, I need to check if
 one of the mapped field changed; if changed, I need trigger another
 database call(create a new entry in a history table).  What is the
 best way doing it?  Do I have to override MetaMapper's beforeSave() to
 query database for changes before save?

 I'm using CRUDifier and its provided edit page to submit user
 input.  Could somebody explain to me what is the life cycle of the
 Mapper object after user click on Edit button?

 Thanks in advance!

 Gang

 --
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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



Re: [Lift] Re: New ticketing system

2010-01-26 Thread David Bernard
accunote have got (IMHO) one of the best web GUI to manage tickets, I saw.
http://www.acunote.com/promo

(also provide full access for OSS)

But to the job with a LiftTicket should be a better match (for current
and futur need).
Sorry no time to work on.

/davidB

On Tue, Jan 26, 2010 at 22:30, David Pollak
feeder.of.the.be...@gmail.com wrote:


 On Tue, Jan 26, 2010 at 1:17 PM, Thad thadgui...@gmail.com wrote:

 Why not a proven workhorse in this arena, such as JIRA by Atlassian ?
 It's FREE for Open Source Projects, and as a bonus you'd probably get
 more widespread appeal from Java / Scala development camps.


 Personally, I think Jira's UI and performance is awful.  I'd rather start
 with GitHub than go to Jira.  But that's just me.


 2cents,
 Thad

 On Jan 26, 11:46 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
 
  We switched to GitHub's ticketing system a bunch of months ago and,
  well,
  it's not making the grade.  It's slow.  It's limited (no unclosing
  tickets,
  no attachments, weak discussion capaibilities).  It doesn't allow easy
  planning/prioritization.
 
  I'd like to switch to something more powerful.  Derek was working on
  LiftTicket.  I'd like to use that, but don't know the state of the
  project.
  Alternatively, we could use Assembla's ticketing system.
 
  Does anyone have thoughts/input on the issue?
 
  Thanks,
 
  David
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics

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




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

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


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



Re: [Lift] Save Mapper's mapped field

2010-01-26 Thread Naftoli Gugenheim
You can mix in LifecycleCallbacks to the field and override beforeSave there, 
if you prefer. Someone correct me if I'm wrong, but I think beforeSave is 
called before it is known if save will fail. And in afterSave I don't know what 
'dirty_?' and 'was' are set to. So you may possibly want to create generic 
trait that uses beforeSave and afterSave together, so beforeSave temporarily 
stores the relevant history data but only afterSave saves the history. But 
again, I'm making a bunch of assumptions.


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

MappedField.dirty_? -- was the field changed?

MappedField.is -- the current value

MappedField.was -- the value pulled from the DB

On Tue, Jan 26, 2010 at 1:37 PM, Gang wangga...@gmail.com wrote:

 Hi all,

 Somebody please help on this..

 Before I save the Mapper object back to database, I need to check if
 one of the mapped field changed; if changed, I need trigger another
 database call(create a new entry in a history table).  What is the
 best way doing it?  Do I have to override MetaMapper's beforeSave() to
 query database for changes before save?

 I'm using CRUDifier and its provided edit page to submit user
 input.  Could somebody explain to me what is the life cycle of the
 Mapper object after user click on Edit button?

 Thanks in advance!

 Gang

 --
 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.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




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

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

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



Re: [Lift] Creating a path from a Loc

2010-01-26 Thread Kris Nuttycombe
On Tue, Jan 26, 2010 at 1:17 PM, Adam Warski a...@warski.org wrote:
 Hello,

 For this you can use loc.link.createPath. I use something similar in
 my codebase. This has a little cruft you may not be precisely
 interested in, but if you look at the link and flink methods, you
 should be able to get an idea of how to use the Loc.Link:


 I'm using Link in a similar way to, but here I can't use createPath, as 
 SiteMap.findLoc(...) returns a Loc[_], so the type parameter is unknown, so 
 without some casts I won't be able to pass the parameter.

 I tried:

 val loc = SiteMap.findLoc(Login).open_!
 val link = loc.link.createPath(loc.currentValue.open_!)

Instead of building your Loc inline in the SiteMap declaration and
using findLoc, simply declare the loc as a val (with the appropriate
type parameter) in Boot or a similar object of your choosing.

I have an object I call Site which I use to separate out the Loc stuff
from the SiteMap and Menu. Here's what it looks like:

object Site {
var locs: List[Loc[_]] = Nil

def loc(name: String, link: Link[Unit], text: LinkText[Unit],
params: AnyLocParam*): Loc[Unit] = {
val newLoc = Loc(name, link, text, params: _*)
locs = newLoc :: locs
newLoc
}

def uuloc[T : UUEntity](params: LocParam[T]*)(implicit
manifest: Manifest[T]) : UULoc[T] = {
val newLoc = new UULoc[T](params.toList)
locs = newLoc :: locs
newLoc
}

// Visible locs
val home =  loc(Home, index :: Nil , ?(Home))
val userSearch =loc(User Search, users :: search ::
Nil, ?(User Search))
val orderSearch =   loc(Order Search, orders :: search
:: Nil, ?(Order Search))
val orderForm = loc(New Order, orders :: new :: Nil,
?(New Order))
//...

// REST gettable object locs
val userDetail =uuloc[User](Hidden)
val orderDetail =   uuloc[Order](Hidden)
//...
}

Then, in Boot.scala I simply have this:

LiftRules.setSiteMap(SiteMap(Site.locs.reverse.map(Menu(_)): _*))

Don't throw away type information when you don't have to!

Kris


 but unfortunately the compiler doesn't seem to recognize the fact that the 
 type parameter for loc is the same as the one returned for loc.currentValue.

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




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



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



Re: [Lift] jQuery 1.4

2010-01-26 Thread Jonathan Hoffman
I just pushed out the change.  

Those of you getting jquery from /classpath.jquery.js will get the upgrade 
going forward, but I suspect a lot of you are using the google CDN, so you 
should bump up your version and verify that things still work.

- Jon

On Jan 26, 2010, at 2:47 PM, David Pollak wrote:

 I'm all for making the change.  Now is a good time... it will give us a week+ 
 of testing before M2.
 
 On Tue, Jan 26, 2010 at 11:03 AM, Jonathan Hoffman jonhoff...@gmail.com 
 wrote:
 Hi,
 
 Has anyone done extensive lift testing with jQuery 1.4.1?  My very brief test 
 seems to indicate that things still work as expected, but I'm not doing 
 anything with comet.
 
 http://jquery14.com/day-01/jquery-14
 
 Should lift 2.0 upgrade?
 
 - Jon
 
 --
 You received this message because you are subscribed to the Google Groups 
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to 
 liftweb+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/liftweb?hl=en.
 
 
 
 
 -- 
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Surf the harmonics
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to 
 liftweb+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/liftweb?hl=en.

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



[Lift] What is purpose of RequestVar/StatefulSnipplet for forms?

2010-01-26 Thread tommycli
Hi,

I'm reading the lift book about forms, and in reference to this code:

def add (xhtml : NodeSeq) : NodeSeq = {
var desc = 
var amount = 0

def processEntryAdd () { ... }

bind(entry, xhtml,
description - SHtml.text(desc, desc = _),
amount - SHtml.text(amount, amount = _),
submit - SHtml.submit(Add, processEntryAdd))
}

am coming across:

That means that if you want to retain values between submission and
re-rendering of the form, you’ll want to
use RequestVars (Section 3.16) or a StatefulSnippet (Section 3.11.2)
instead .

What's the purpose of RequestVars and StatefulSnippet? I thought the
values were retained anyway through POST. That is, on submit, the
functions desc = _ and amount = _ were executed and the so the
state was kept...

Are those functions only executed after the bind is complete? There
must be something I'm missing here.

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



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

2010-01-26 Thread Neil.Lv
 Hi,

   I have a silly question about the http package.

  What's the package should be imported when using the dispatch?

  I try this code of the wiki, and get this error.
  error: not found: value http

###  I have import the dispatch package, and where is the http ?
import dispatch._
###

  Thanks,

Cheers,
  Neil

On Jan 26, 12:14 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Mon, Jan 25, 2010 at 7:53 PM, Strom strommo...@gmail.com wrote:
  Wiki article for how to POST to an external XML API.

 Thank you for your contribution!





 http://wiki.github.com/dpp/liftweb/how-to-post-xml-to-an-external-url...

  On Jan 25, 1:47 pm, Strom strommo...@gmail.com wrote:
   Ok thanks!

   For those of you looking to do add Databinder's dispatch to your Lift
   project, you should add these to your pom.xml:

   within repositories...
   repository
 idnet.databinder/id
 urlhttp://databinder.net/repo/url
 snapshots /
   /repository

   within dependencies...
   dependency
 groupIdnet.databinder/groupId
 artifactIddispatch-http_2.7.7/artifactId
 version0.6.6/version
   /dependency

   Of course, please replace 2.7.7 in the dependency above with your
   version of scala, and 0.6.6 with whatever version of Dispatch you
   plan to use. You can browse their repository online (http://
   databinder.net/repo/) and see what's most up to date if you're into
   that.

   Strom

   On Jan 25, 12:28 pm, Strom strommo...@gmail.com wrote:

One more simple question. How do I go about incorporating Quartz or
Dispatch into my current lift project? Is it as simple as adding
dependencies to my pom.xml, or do I have to download the files and put
them in my netbeans project? n00b...

Thanks,
Strom

On Jan 25, 11:30 am, Strom strommo...@gmail.com wrote:

 Thank you David and Ewan. Very helpful!

 Strom

 On Jan 25, 10:51 am, Ewan ehar...@gmail.com wrote:

  I used apache camel (6 months ago or so) to send/receive the
  requests
  then parsed the xml response.  Works fine.

  -- Ewan

  On Jan 25, 8:41 am, Strom strommo...@gmail.com wrote:

   Hey all,
   I'm planning on using solr for a web project that I'm doing, and
  I was
   wondering if anyone had experience with using Solr or
  communicating
   with another external xml api? I've got a few questions.

   1. What is the most straightforward way to POST to an external
  url?
   I'm going to be sending Solr server XML commands to index and
  commit
   data for search within my app, and I've seen people discuss
  Scala's
   Dispatch library, but I'm not exactly sure what its strengths are
  or
   if I should use it over apache http library or curl.

   2. Would it be safe to say that this use case (sending POSTs to
  an
   external URL asynchronously) is a good thing for Lift's actors to
   handle? I'm very green to the concept of actors, so I'm trying to
  find
   when it's best to use them.

   3. I'm planning on doing a monthly rebuild of the index (or
  possibly
   some other timespan tbd), and I've read that Quartz is good for
   scheduling. Is there documentation I can read for information on
  how
   to integrate this Java library (or any java library for that
  matter)
   into my lift app and use it?

   Thanks!
   Strom

  --
  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.comliftweb%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.

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

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



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

2010-01-26 Thread Neil.Lv

  Thanks, I have found it here, 
http://dispatch.databinder.net/Stdout_Walkthrough

  I have imported the Http package and it works now,
###
import Http._
###

   Thanks again, this article is very helpful.

Cheers,
  Neil

On Jan 27, 9:57 am, Neil.Lv anim...@gmail.com wrote:
  Hi,

I have a silly question about the http package.

   What's the package should be imported when using the dispatch?

   I try this code of the wiki, and get this error.
   error: not found: value http

 ###  I have import the dispatch package, and where is the http ?
 import dispatch._
 ###

   Thanks,

 Cheers,
   Neil

 On Jan 26, 12:14 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:

  On Mon, Jan 25, 2010 at 7:53 PM, Strom strommo...@gmail.com wrote:
   Wiki article for how to POST to an external XML API.

  Thank you for your contribution!

  http://wiki.github.com/dpp/liftweb/how-to-post-xml-to-an-external-url...

   On Jan 25, 1:47 pm, Strom strommo...@gmail.com wrote:
Ok thanks!

For those of you looking to do add Databinder's dispatch to your Lift
project, you should add these to your pom.xml:

within repositories...
repository
  idnet.databinder/id
  urlhttp://databinder.net/repo/url
  snapshots /
/repository

within dependencies...
dependency
  groupIdnet.databinder/groupId
  artifactIddispatch-http_2.7.7/artifactId
  version0.6.6/version
/dependency

Of course, please replace 2.7.7 in the dependency above with your
version of scala, and 0.6.6 with whatever version of Dispatch you
plan to use. You can browse their repository online (http://
databinder.net/repo/) and see what's most up to date if you're into
that.

Strom

On Jan 25, 12:28 pm, Strom strommo...@gmail.com wrote:

 One more simple question. How do I go about incorporating Quartz or
 Dispatch into my current lift project? Is it as simple as adding
 dependencies to my pom.xml, or do I have to download the files and put
 them in my netbeans project? n00b...

 Thanks,
 Strom

 On Jan 25, 11:30 am, Strom strommo...@gmail.com wrote:

  Thank you David and Ewan. Very helpful!

  Strom

  On Jan 25, 10:51 am, Ewan ehar...@gmail.com wrote:

   I used apache camel (6 months ago or so) to send/receive the
   requests
   then parsed the xml response.  Works fine.

   -- Ewan

   On Jan 25, 8:41 am, Strom strommo...@gmail.com wrote:

Hey all,
I'm planning on using solr for a web project that I'm doing, and
   I was
wondering if anyone had experience with using Solr or
   communicating
with another external xml api? I've got a few questions.

1. What is the most straightforward way to POST to an external
   url?
I'm going to be sending Solr server XML commands to index and
   commit
data for search within my app, and I've seen people discuss
   Scala's
Dispatch library, but I'm not exactly sure what its strengths 
are
   or
if I should use it over apache http library or curl.

2. Would it be safe to say that this use case (sending POSTs to
   an
external URL asynchronously) is a good thing for Lift's actors 
to
handle? I'm very green to the concept of actors, so I'm trying 
to
   find
when it's best to use them.

3. I'm planning on doing a monthly rebuild of the index (or
   possibly
some other timespan tbd), and I've read that Quartz is good for
scheduling. Is there documentation I can read for information on
   how
to integrate this Java library (or any java library for that
   matter)
into my lift app and use it?

Thanks!
Strom

   --
   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.comliftweb%2bunsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/liftweb?hl=en.

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

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



[Lift] Form submit redirect with query string

2010-01-26 Thread Strom
I'm having a hard time getting this working. I want to create a search
box with a submit button that redirects to the page /search?q=
{query}. The code I have does not do anything when I click the submit
button. Any help would be appreciated.  Thanks!

**html**
lift:Search
  Search: search:input/ search:go/
/lift:Search

**snippet**
class Search {
  def render(in: NodeSeq): NodeSeq = {
var query = S.param(q) openOr 
bind(search, in,
 input - SHtml.text(query, query = _),
 go - SHtml.submit(Search, () = performSearch(query))
)
  }

  def performSearch(query: String): Unit = {
if(!query.isEmpty) {
  S.redirectTo(/search?q=+query)
} else {
  S.notice(Please tell us what you're looking for)
}
  }
}

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



Re: [Lift] Form submit redirect with query string

2010-01-26 Thread Ross Mellgren
Looks like you forgot to add form=POST as an attribute to your snippet call. 
Without this, the form tag does not get generated.

That is, change lift:Search to lift:Search form=POST and I think it 
should start working.

-Ross

On Jan 27, 2010, at 1:24 AM, Strom wrote:

 I'm having a hard time getting this working. I want to create a search
 box with a submit button that redirects to the page /search?q=
 {query}. The code I have does not do anything when I click the submit
 button. Any help would be appreciated.  Thanks!
 
 **html**
 lift:Search
  Search: search:input/ search:go/
 /lift:Search
 
 **snippet**
 class Search {
  def render(in: NodeSeq): NodeSeq = {
var query = S.param(q) openOr 
bind(search, in,
 input - SHtml.text(query, query = _),
 go - SHtml.submit(Search, () = performSearch(query))
)
  }
 
  def performSearch(query: String): Unit = {
if(!query.isEmpty) {
  S.redirectTo(/search?q=+query)
} else {
  S.notice(Please tell us what you're looking for)
}
  }
 }
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to 
 liftweb+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/liftweb?hl=en.
 

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



Re: [Lift] New ticketing system

2010-01-26 Thread Naftoli Gugenheim
What worst case scenario are you afraid of happening using LiftTicket?


-
Heiko Seebergerheiko.seeber...@googlemail.com wrote:

2010/1/26 David Pollak feeder.of.the.be...@gmail.com

 Folks,

 We switched to GitHub's ticketing system a bunch of months ago and, well,
 it's not making the grade.  It's slow.  It's limited (no unclosing tickets,
 no attachments, weak discussion capaibilities).  It doesn't allow easy
 planning/prioritization.

 I'd like to switch to something more powerful.  Derek was working on
 LiftTicket.  I'd like to use that, but don't know the state of the project.
 Alternatively, we could use Assembla's ticketing system.

 Does anyone have thoughts/input on the issue?


Let's go for Assembla. A ticketing system is ways too important (it just has
to work) than we could rely on something under development like LiftTicket.
Sorry!

Heiko

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

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

-- 
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] MetaMapper and existing schema with primary keys

2010-01-26 Thread Craig Christophel
Hi,
  I've seen a couple of posts in the past which are somewhat relevant
to my question but have not found an answer.


 I'm trying to use Mapper (in 2.0) with a previously existing database
schema on oracle and I'm having a problem with how MetaMapper expects
the long primary key to be setup.

In the save function I see that WHERE +indexMap.open_! + = ? is
used  to specify the PK column in the update statement.
In the function which sets indexMap if (mf.dbPrimaryKey_? 
mf.dbAutogenerated_?) is required.
This causes an exception when Empty.open_! is called on indexMap in
the UPDATE line.


I am not able to use the method of auto generation for the primary key
as the sequence has already been defined and placing a trigger on this
table is not possible, so In order to make the insert work, I was
forced to set dbAutogenerated_? to false.

Any Ideas?

thanks,

Craig.

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