[Lift] error page

2008-10-02 Thread Oliver
I don't want to display the default error page to the user. How do I replace
it with my own?

cheers
Oliver

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



[Lift] Re: error page

2008-10-02 Thread Marius

Hi,

Please see LiftRules.browserResponseToException ... this is called
when an exception is thrown from the application. Here you can
intercept the Throwable and redirect to your own error page  using
RedirectResponse or RedirectWithState.

Br's,
Marius

On Oct 2, 10:48 am, Oliver [EMAIL PROTECTED] wrote:
 I don't want to display the default error page to the user. How do I replace
 it with my own?

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



[Lift] Re: error page

2008-10-02 Thread Marius

Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
browserResponseToException  is ultimately called by
logAndReturnExceptionToBrowser

On Oct 2, 10:59 am, Marius [EMAIL PROTECTED] wrote:
 Hi,

 Please see LiftRules.browserResponseToException ... this is called
 when an exception is thrown from the application. Here you can
 intercept the Throwable and redirect to your own error page  using
 RedirectResponse or RedirectWithState.

 Br's,
 Marius

 On Oct 2, 10:48 am, Oliver [EMAIL PROTECTED] wrote:

  I don't want to display the default error page to the user. How do I replace
  it with my own?

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



[Lift] Re: error page

2008-10-02 Thread Oliver Lambert

I tried

 LiftRules.logAndReturnExceptionToBrowser = {
   case (request, e) = println(what is going on);  
RedirectResponse(/)
   case _ = println(whatis going on 2); RedirectResponse(/)
 }

No change in behavior

On 02/10/2008, at 6:03 PM, Marius wrote:


 Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
 browserResponseToException  is ultimately called by
 logAndReturnExceptionToBrowser

 On Oct 2, 10:59 am, Marius [EMAIL PROTECTED] wrote:
 Hi,

 Please see LiftRules.browserResponseToException ... this is called
 when an exception is thrown from the application. Here you can
 intercept the Throwable and redirect to your own error page  using
 RedirectResponse or RedirectWithState.

 Br's,
 Marius

 On Oct 2, 10:48 am, Oliver [EMAIL PROTECTED] wrote:

 I don't want to display the default error page to the user. How do  
 I replace
 it with my own?

 cheers
 Oliver
 


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



[Lift] Re: error page

2008-10-02 Thread Tim Perrett

On this subject - I remember some time back we were discussing lift
run levels and potentially different errors / levels of logging for
different run levels. Did this ever come about?

Cheers, Tim

On Oct 2, 3:03 pm, TylerWeir [EMAIL PROTECTED] wrote:
 Hey Oliver,

 I dropped this in:
       LiftRules.logAndReturnExceptionToBrowser = {
         case (request, e) = println(what is going on);
 RedirectResponse(/);
      }

 and wrote some jank code to force an exception and it's working as
 expected.

 What output are you not getting?

 On Oct 2, 7:22 am, Oliver Lambert [EMAIL PROTECTED] wrote:

  I tried

       LiftRules.logAndReturnExceptionToBrowser = {
         case (request, e) = println(what is going on);  
  RedirectResponse(/)
         case _ = println(whatis going on 2); RedirectResponse(/)
       }

  No change in behavior

  On 02/10/2008, at 6:03 PM, Marius wrote:

   Or you can use LiftRules.logAndReturnExceptionToBrowser ...actually
   browserResponseToException  is ultimately called by
   logAndReturnExceptionToBrowser

   On Oct 2, 10:59 am, Marius [EMAIL PROTECTED] wrote:
   Hi,

   Please see LiftRules.browserResponseToException ... this is called
   when an exception is thrown from the application. Here you can
   intercept the Throwable and redirect to your own error page  using
   RedirectResponse or RedirectWithState.

   Br's,
   Marius

   On Oct 2, 10:48 am, Oliver [EMAIL PROTECTED] wrote:

   I don't want to display the default error page to the user. How do  
   I replace
   it with my own?

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



[Lift] Todays questions

2008-10-02 Thread Oliver
I'm writing a wizard-like process, where when they have finished the set of
forms and press submit I don't want the back button to take them back. Is
there any way I can clear out the history?

I guess a related question is, Lift is holding references to objects in its
history that I would like to be made available to garbage collection. For
instance, I have a table of html links - once one is selected, I can set the
holding collection to null, but lift is still holding a reference for its
history.

cheers
Oliver

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



[Lift] Please Welcome Al Thompson to the Lift committers

2008-10-02 Thread David Pollak
Folks,

I've know Al Thompson for longer than any of the other Lift committers.
Cast you mind back to '97... I was doing crazy things with browser-based,
multi-user spreadsheets.  Al was my technical liaison at Sun.  Now I'm doing
Lift.  Al is joining the Scala and Lift communities.  He's offered to help
out with the RDBMS drivers.

So, welcome Al and I'm looking forward to cool things from you.

Thanks,

David

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

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



[Lift] Re: Todays questions

2008-10-02 Thread David Pollak
On Thu, Oct 2, 2008 at 5:13 PM, Oliver [EMAIL PROTECTED] wrote:

 I'm writing a wizard-like process, where when they have finished the set of
 forms and press submit I don't want the back button to take them back. Is
 there any way I can clear out the history?


This is JavaScript magic and I'm not sure how to disable it.




 I guess a related question is, Lift is holding references to objects in its
 history that I would like to be made available to garbage collection. For
 instance, I have a table of html links - once one is selected, I can set the
 holding collection to null, but lift is still holding a reference for its
 history.


I have a number of GC methodologies that I'm working one.  Basically, Lift
will hold certain references for a period of time (right now that period is
the session, but it will get shorter).

Thanks,

David




 cheers
 Oliver

 



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

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



[Lift] Re: Please Welcome Al Thompson to the Lift committers

2008-10-02 Thread Jorge Ortiz
Awesome! Welcome, Al.

--j

On Thu, Oct 2, 2008 at 5:14 PM, David Pollak
[EMAIL PROTECTED]wrote:

 Folks,

 I've know Al Thompson for longer than any of the other Lift committers.
 Cast you mind back to '97... I was doing crazy things with browser-based,
 multi-user spreadsheets.  Al was my technical liaison at Sun.  Now I'm doing
 Lift.  Al is joining the Scala and Lift communities.  He's offered to help
 out with the RDBMS drivers.

 So, welcome Al and I'm looking forward to cool things from you.

 Thanks,

 David

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

 


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



[Lift] Re: Todays questions

2008-10-02 Thread Oliver
Thanks for the answers

Another related question - Is there any functionality in lift to prevent
multiple submits (e.g. the browser is slow for whatever reason and the user
presses the submit button multiple times)?

cheers
Oliver

On Fri, Oct 3, 2008 at 10:15 AM, David Pollak [EMAIL PROTECTED]
 wrote:



 On Thu, Oct 2, 2008 at 5:13 PM, Oliver [EMAIL PROTECTED] wrote:

 I'm writing a wizard-like process, where when they have finished the set
 of forms and press submit I don't want the back button to take them back. Is
 there any way I can clear out the history?


 This is JavaScript magic and I'm not sure how to disable it.




 I guess a related question is, Lift is holding references to objects in
 its history that I would like to be made available to garbage collection.
 For instance, I have a table of html links - once one is selected, I can set
 the holding collection to null, but lift is still holding a reference for
 its history.


 I have a number of GC methodologies that I'm working one.  Basically, Lift
 will hold certain references for a period of time (right now that period is
 the session, but it will get shorter).

 Thanks,

 David




 cheers
 Oliver





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

 


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



[Lift] Re: JPA and enumerations

2008-10-02 Thread Oliver
On Thu, Oct 2, 2008 at 11:07 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote:

 OK, I've run into problems again now that I'm trying to actually use the
 enumerations. In my book class I have the variable defined as:

   @Type{val `type` = com.foo.jpaweb.model.GenreType}
   var genre = Genre.unknown


Enumv.Value(name: String, desc: String) should be returning a type of Value
(Val is the implementation). I'll fix this, or you can.


 [WARNING]  found   : com.foo.jpaweb.model.Genre.Value
 [WARNING]  required: com.foo.jpaweb.model.Genre.Val

 I tried changing the variable definition to

 var genre : Genre.Value = Genre.unknown

 But then I get a runtime error when I run my unit tests:

 java.lang.NoSuchMethodError:
 com.foo.jpaweb.model.Book.genre_$eq(Lscala/Enumeration$Val;)V


I don't get this error, can you supply me the test code?



 It appears that setting genre to Genre.unknown makes its type Genre.Val
 instead of Genre.Value, but I have no idea how to fix it at this point.

 Thanks,

 Derek




 On Wed, Oct 1, 2008 at 11:38 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote:

 Doh. I missed where you had extended it. It works now that I'm using it
 correctly (imagine that!)

 Thanks much,

 Derek


 On Wed, Oct 1, 2008 at 5:08 PM, Oliver [EMAIL PROTECTED] wrote:

 You have to extend it - I did it at the top of the model, but it probably
 makes sense to create a separate file(s).
 So Gender would have a corresponding type
 class GenderType extends EnumvType(Gender) {}

 and then you can use
   @Type{val `type`=com.foo.jpaweb.model.GenderType}

 I hadn't coded a user type in Scala before either and I couldn't find a
 way to generically do all enumerations as one user type - Scala is just too
 strict.

 hope that helps

 Oliver

 On Thu, Oct 2, 2008 at 6:58 AM, Derek Chen-Becker [EMAIL PROTECTED]
  wrote:

 Hmmm. Oliver, I'm working on using the UserType you wrote now, but when
 I try to test it, I'm getting this error:

 org.hibernate.MappingException: Cannot instantiate custom type:
 com.foo.jpaweb.model.EnumvType

 At first I thought this was because EnumvType was abstract, but changing
 that didn't do anything. I've set the property on the Book class as:

   @Type{val `type` = com.foo.jpaweb.model.EnumvType}
   var genre = Genre.unknown

 Is the not correct? Any ideas? I've only ever used Hibernate Types that
 were written in Java, so I wasn't sure if that might also be an issue...

 Derek


 On Mon, Sep 22, 2008 at 8:29 AM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 Looks good. In keeping with the theme of a Library catalog I'm going to
 rework Gender as Genre and add things like Mystery, Horror, Comedy,
 Childrens' , etc. I think I can just put the Money on as a purchase price.

 Thanks,

 Derek

 On Sun, Sep 21, 2008 at 1:19 AM, Oliver Lambert [EMAIL PROTECTED]wrote:

 Hi,

 I've extended the JPA Demo project to include hibernate mappings for
 Money and Enumerations.
 The example money is Australian, but its simple enough to add other
 currencies.
 The example enumeration is for Gender - I've mapped the name of the
 enumeration rather than
 the ordinal value and extended it to include a description field,
 valueOf method and list of name value pairs.

 Hope its of use
 Oliver






 On 21/09/2008, at 1:40 PM, Jorge Ortiz wrote:

 
  On Sat, Sep 20, 2008 at 9:14 AM, Oliver Lambert [EMAIL PROTECTED]
  wrote:
 
  I need this too so I might have a go at implementing it. Does lift
  persist
  enumerations (cant see a mapper it)
 
  There's a MappedEnum class in MappedInt.scala

 Thanks for this - I should have looked more
 
 
  --j
 
  








 



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



[Lift] Re: JPA and enumerations

2008-10-02 Thread Derek Chen-Becker
I tried that before and I got compilation errors, but this time I did a
maven clean test and it all compiled and tested fine. I must have had some
artifact in my targets dir :(

Thanks again for the help!

Derek

On Thu, Oct 2, 2008 at 9:28 PM, Oliver [EMAIL PROTECTED] wrote:



 On Thu, Oct 2, 2008 at 11:07 PM, Derek Chen-Becker [EMAIL PROTECTED]wrote:

 OK, I've run into problems again now that I'm trying to actually use the
 enumerations. In my book class I have the variable defined as:

   @Type{val `type` = com.foo.jpaweb.model.GenreType}
   var genre = Genre.unknown


 Enumv.Value(name: String, desc: String) should be returning a type of Value
 (Val is the implementation). I'll fix this, or you can.


 [WARNING]  found   : com.foo.jpaweb.model.Genre.Value
 [WARNING]  required: com.foo.jpaweb.model.Genre.Val

 I tried changing the variable definition to

 var genre : Genre.Value = Genre.unknown

 But then I get a runtime error when I run my unit tests:

 java.lang.NoSuchMethodError:
 com.foo.jpaweb.model.Book.genre_$eq(Lscala/Enumeration$Val;)V


 I don't get this error, can you supply me the test code?



 It appears that setting genre to Genre.unknown makes its type Genre.Val
 instead of Genre.Value, but I have no idea how to fix it at this point.

 Thanks,

 Derek




 On Wed, Oct 1, 2008 at 11:38 PM, Derek Chen-Becker [EMAIL PROTECTED]
  wrote:

 Doh. I missed where you had extended it. It works now that I'm using it
 correctly (imagine that!)

 Thanks much,

 Derek


 On Wed, Oct 1, 2008 at 5:08 PM, Oliver [EMAIL PROTECTED] wrote:

 You have to extend it - I did it at the top of the model, but it
 probably makes sense to create a separate file(s).
 So Gender would have a corresponding type
 class GenderType extends EnumvType(Gender) {}

 and then you can use
   @Type{val `type`=com.foo.jpaweb.model.GenderType}

 I hadn't coded a user type in Scala before either and I couldn't find a
 way to generically do all enumerations as one user type - Scala is just too
 strict.

 hope that helps

 Oliver

 On Thu, Oct 2, 2008 at 6:58 AM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 Hmmm. Oliver, I'm working on using the UserType you wrote now, but when
 I try to test it, I'm getting this error:

 org.hibernate.MappingException: Cannot instantiate custom type:
 com.foo.jpaweb.model.EnumvType

 At first I thought this was because EnumvType was abstract, but
 changing that didn't do anything. I've set the property on the Book class
 as:

   @Type{val `type` = com.foo.jpaweb.model.EnumvType}
   var genre = Genre.unknown

 Is the not correct? Any ideas? I've only ever used Hibernate Types that
 were written in Java, so I wasn't sure if that might also be an issue...

 Derek


 On Mon, Sep 22, 2008 at 8:29 AM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 Looks good. In keeping with the theme of a Library catalog I'm going
 to rework Gender as Genre and add things like Mystery, Horror, 
 Comedy,
 Childrens' , etc. I think I can just put the Money on as a purchase 
 price.

 Thanks,

 Derek

 On Sun, Sep 21, 2008 at 1:19 AM, Oliver Lambert [EMAIL PROTECTED]wrote:

 Hi,

 I've extended the JPA Demo project to include hibernate mappings for
 Money and Enumerations.
 The example money is Australian, but its simple enough to add other
 currencies.
 The example enumeration is for Gender - I've mapped the name of the
 enumeration rather than
 the ordinal value and extended it to include a description field,
 valueOf method and list of name value pairs.

 Hope its of use
 Oliver






 On 21/09/2008, at 1:40 PM, Jorge Ortiz wrote:

 
  On Sat, Sep 20, 2008 at 9:14 AM, Oliver Lambert [EMAIL PROTECTED]
  wrote:
 
  I need this too so I might have a go at implementing it. Does lift
  persist
  enumerations (cant see a mapper it)
 
  There's a MappedEnum class in MappedInt.scala

 Thanks for this - I should have looked more
 
 
  --j
 
  












 


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