[Lift] Re: Please welcome Kris Nuttycombe as a Lift committer

2008-10-14 Thread David Bernard

welcome Kris

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



[Lift] Re: Please welcome Kris Nuttycombe as a Lift committer

2008-10-14 Thread Marius

Welcome Kris!

On Oct 14, 2:32 pm, David Pollak [EMAIL PROTECTED]
wrote:
 Folks,

 I pleased to announce that Kris Nuttycombe has joined the Lift committers.
 Please join me in welcoming him!

 Thanks,

 David

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Collaborative Task Managementhttp://much4.us
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Please welcome Kris Nuttycombe as a Lift committer

2008-10-14 Thread TylerWeir

Welcome Kris!

On Oct 14, 9:13 am, Tim Perrett [EMAIL PROTECTED] wrote:
 Welcome Kris!

 On Oct 14, 1:13 pm, Viktor Klang [EMAIL PROTECTED] wrote:

  Glad to have you aboard Kris!

  On Tue, Oct 14, 2008 at 2:00 PM, Marius [EMAIL PROTECTED] wrote:

   Welcome Kris!

   On Oct 14, 2:32 pm, David Pollak [EMAIL PROTECTED]
   wrote:
Folks,

I pleased to announce that Kris Nuttycombe has joined the Lift
   committers.
Please join me in welcoming him!

Thanks,

David

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

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



[Lift] Re: Menu Builder active element

2008-10-14 Thread David Pollak

Bjarte,

What version of Lift are you using?

In the current trunk-head (0.10-SNAPSHOT, which I would strongly 
encourage using), you can do:

lift:Menu.builder li_item:class=foo li_path:class=bar /

And the class of the current menu item will be foo and the class of 
the li's that are in the breadcrumb path to the item will have the 
class bar

Thanks,

David

Bjarte S. Karlsen wrote:
 Helo list, 

 Playing around with implementing a already existing design as a lift 
 template. 

 The menu of this design requires some way of knowing the menu li element that 
 is the active page. 
 Currently Menu.builder puts to id=current on the a tag
 and not on the li tag. 

 Is this hard to fix? Or if this is not desired to fix this in core, can 
 anybody
 point me to how I can fix it myself? I have not looked much at the lift
 sourceode previously. 

   


--~--~-~--~~~---~--~~
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: Menu Builder active element

2008-10-14 Thread Bjarte S. Karlsen

Hello David, 

I am using 0.9 it looks like. But I can upgrade to 0.10-SNAPSHOT tonight and
check out this change. The only thing I have done in the project is to try to
adapt the default template so it is no hassle. 

Thanks for the response. I belive it will solve my problem :)

regards, 
Bjarte


David Pollak:
 
 Bjarte,
 
 What version of Lift are you using?
 
 In the current trunk-head (0.10-SNAPSHOT, which I would strongly 
 encourage using), you can do:
 
 lift:Menu.builder li_item:class=foo li_path:class=bar /
 
 And the class of the current menu item will be foo and the class of 
 the li's that are in the breadcrumb path to the item will have the 
 class bar
 
 Thanks,
 
 David
 
 Bjarte S. Karlsen wrote:
  Helo list, 
 
  Playing around with implementing a already existing design as a lift 
  template. 
 
  The menu of this design requires some way of knowing the menu li element 
  that is the active page. 
  Currently Menu.builder puts to id=current on the a tag
  and not on the li tag. 
 
  Is this hard to fix? Or if this is not desired to fix this in core, can 
  anybody
  point me to how I can fix it myself? I have not looked much at the lift
  sourceode previously. 
 

 
 
  
 

-- 
With kind regards  / Med vennlig hilsen,
Bjarte Stien Karlsen (GPG: 0x626B2F3A)
To find out the limits of the possible you have to go beyond them into the
impossible.

--~--~-~--~~~---~--~~
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 Kris Nuttycombe as a Lift committer

2008-10-14 Thread Viktor Klang
Glad to have you aboard Kris!

On Tue, Oct 14, 2008 at 2:00 PM, Marius [EMAIL PROTECTED] wrote:


 Welcome Kris!

 On Oct 14, 2:32 pm, David Pollak [EMAIL PROTECTED]
 wrote:
  Folks,
 
  I pleased to announce that Kris Nuttycombe has joined the Lift
 committers.
  Please join me in welcoming him!
 
  Thanks,
 
  David
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Collaborative Task Managementhttp://much4.us
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Configuring a lift webapp for https?

2008-10-14 Thread David Pollak
Kris,

You should be able to run Lift as a Servlet rather than a filter by
specifying the net.liftweb.http.LiftServlet in your web.xml file.  Try
this... if it doesn't work, it's a bug in Lift.

Thanks,

David

On Mon, Oct 13, 2008 at 7:49 PM, Kris Nuttycombe
[EMAIL PROTECTED]wrote:


 Hi, all,

 I was just trying to figure out how to configure a Lift webapp to use
 Java EE container-based security. Since Lift runs as a servlet filter,
 I'm not sure how to configure the web.xml file since
 security-role-ref is a member of the servlet tag. Has anyone done
 this yet? If not, is there (still) a way to run Lift as a servlet?

 Thanks,

 Kris

 



-- 
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] Please welcome Kris Nuttycombe as a Lift committer

2008-10-14 Thread David Pollak
Folks,

I pleased to announce that Kris Nuttycombe has joined the Lift committers.
Please join me in welcoming him!

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] A stupid question

2008-10-14 Thread Charles F. Munat

I must be very dense, but these cans are kicking my butt (kicking my 
can?). No matter what I do, I seem to end up with everything back in the 
can! I just... want... to get... the goodies... OUT!

An example:

How do I extract the URI of the current page from S.request?

I am currently doing something immensely stupid and wrong like this:

S.request.toList.head.location.toList.head.createDefaultLink.toList.head.text

I *know* this is way wrong, but I'm not clever enough, apparently, to 
figure out the puzzle, despite reading through the Can code repeatedly. 
I figure the above works only because what I'm looking for is there, 
which sort of defeats the purpose of the cans...

Can anyone help? This is driving me insane.

Chas.

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



[Lift] JPA questions (was Re: SnippetFailure)

2008-10-14 Thread Charles F. Munat

A question from the JPADemo...

How does one use this:

def find[A](clazz: Class[A], id: Any) =
   em.find[A](clazz, id).asInstanceOf[A]

If I have a User model and I want to use find on the EntityManager, what 
goes where the *** is below:

val user = Model.find[User]( ***, userId)

Thanks,

Chas.


Derek Chen-Becker wrote:
 OK, let me try to tackle a few of these things at once. First of all, 
 the hidden element is really just creating a function that is going to 
 be run when the form is submitted. If you look at the HTML that's 
 generated you'll see it like this:
 
 input name=F977465725002233_OGX type=hidden value=true /
 
 Basically what happens is that Lift processes form fields as functions. 
 It looks up the function F977...OGX (in this case) and executes it. I 
 believe (but am not 100% positive) that forms are executed in the 
 sequence that they're submitted, which is usually the order in which 
 they're defined. Anyways, back to the code at hand:
 
 id - SHtml.hidden({category.id http://category.id/ = currentId})
 
 It's going to call the category method (which if you're following the 
 template is tied to a RequestVar). Since there isn't one already defined 
 in the request, the default value of the RequestVar is constructed (new 
 Category()) and returned. That's a big part of the problem with the 
 current template (and something I'm fixing right now in my wip branch): 
 we're not really editing the same object, we're making a brand new 
 object and copying values. The issue is that, as you've found, any 
 fields that you're not explicitly copying are reset to defaults. What we 
 probably want to do instead is this:
 
 val ctgy = currentCategory // instead of currentId
 ...
 id - SHtml.hidden(categoryVar(ctgy))
 
 or even
 
 id - SHtml.hidden(categoryVar(Model.merge(ctgy))) // This 
 automatically re-attaches the category to the entity manager
 
 and then all you'd be required to do in your submit is a Model.flush(). 
 Technically, the flush is implicit once the transaction closes at the 
 end of the session, but if you have any constraints that you would want 
 to handle violations on (i.e. a duplicate name, deleting something 
 that's referenced as an FK), you need to do the flush at that point so 
 that the exceptions get thrown. Otherwise, the exception is thrown as 
 Lift is unwinding and your user gets a pretty stack trace.
 
 As for how Hibernate handles object lifecycle, I highly recommend 
 reading this section of the hibernate EM docs:
 
 http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/objectstate.html
 
 In particular, look at sections 3.1 and 3.6. Most of what we're doing 
 here is working with detached objects. The merge method is what 
 reattaches an object.
 
 I realize I'm still waving my hands a bit here and sweeping some 
 plumbing details under the rug, but I hope this makes more sense now. 
 Please feel free to ask questions. I'm actually working on the JPA 
 chapter of the book right now, so you're helping me see where I need to 
 clarify and explain things better :). I also need to refine the JPA 
 demo, since the pattern that I'm currently using is non-optimal and even 
 wrong in cases like yours.
 
 Derek
 
 
 On Mon, Oct 13, 2008 at 6:38 PM, Charles F. Munat [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:
 
 
 Yeah, I'm really unclear on how this is being passed around and how the
 continuation works. For example, what does this line do:
 
 id - SHtml.hidden({category.id http://category.id = currentId})
 
 I can see that it adds a hidden field in the form with the value true
 and the name of the field some sort of code. I can only presume that
 that code tells the snippet, upon submission of the form, that it should
 set the category.id http://category.id to currentId, thus handing
 the object back to the
 snippet. But how does this really work? What creates the code and what
 interprets it and recreates the object? I have been unable to figure
 this out.
 
 Also, I'm not entirely clear on hibernate. My understanding is that
 there is only one copy of any object, so if I pass the id of an object
 that already exists to my category, then I am manipulating the real
 object. Is that true? So when I merge, I'm merging changes to that
 object into the persisted one?
 
 A problem I'm having because I don't really understand how this works is
 that I have a createdAt field in my objects which is a timestamp
 that's set to now() when the object is created. But everytime I update
 the object, it resets that field to a new now(). And that is true for
 other fields as well. I can only guess that the object I'm merging isn't
 the same as the object in the database, and the null fields in my new
 object cause the fields in the database to be changed to the default
 values. That's not what I want, but I can't figure out how to get around
 it, and I'm not 

[Lift] Re: JPA questions (was Re: SnippetFailure)

2008-10-14 Thread Derek Chen-Becker
You can just do Model.find(classOf[User], userId) and the type on the method
will be inferred. Any time you see a Class[A] parameter, it wants the result
of a classOf[...].

Derek

On Tue, Oct 14, 2008 at 5:52 PM, Charles F. Munat [EMAIL PROTECTED] wrote:


 A question from the JPADemo...

 How does one use this:

 def find[A](clazz: Class[A], id: Any) =
   em.find[A](clazz, id).asInstanceOf[A]

 If I have a User model and I want to use find on the EntityManager, what
 goes where the *** is below:

 val user = Model.find[User]( ***, userId)

 Thanks,

 Chas.


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