[Lift] Re: JPA and annotations

2008-09-01 Thread Viktor Klang
Hi Oliver!

I think you need to qualiify the parameter:

@Column(name = NAME)

Cheers,
Viktor

On Mon, Sep 1, 2008 at 9:27 AM, Oliver [EMAIL PROTECTED] wrote:

 When I try to use the following annotation in a JPA labled entity in a
 Scala class

 @Column(columnName)

 I get a error: wrong number of arguments for constructor Column:
 ()javax.persistence.Column
 Same thing for a @Table(tableName)

 Any ideas?

 cheers
 Oliver



 



-- 
Viktor Klang
Rogue Software Architect

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

2008-09-01 Thread Viktor Klang
Seems like my memory doesn't serve anyone any good today either,
here's hopefully the working solution (sitting @ work without access to my
beloved Scalac.

@Column{ var name=O_ID }


http://suereth.blogspot.com/2008/04/scala-annotations.html

On Mon, Sep 1, 2008 at 12:37 PM, Oliver [EMAIL PROTECTED] wrote:

 Viktor
 Well spotted - I shouldn't rely on my memory to write emails.
 Unfortunately,

 @Column(name = NAME)

 gives me exactly the same error.

 On Mon, Sep 1, 2008 at 6:32 PM, Viktor Klang [EMAIL PROTECTED]wrote:

 Hi Oliver!

 I think you need to qualiify the parameter:

 @Column(name = NAME)

 Cheers,
 Viktor


 On Mon, Sep 1, 2008 at 9:27 AM, Oliver [EMAIL PROTECTED] wrote:

 When I try to use the following annotation in a JPA labled entity in a
 Scala class

 @Column(columnName)

 I get a error: wrong number of arguments for constructor Column:
 ()javax.persistence.Column
 Same thing for a @Table(tableName)

 Any ideas?

 cheers
 Oliver







 --
 Viktor Klang
 Rogue Software Architect




 



-- 
Viktor Klang
Rogue Software Architect

--~--~-~--~~~---~--~~
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: One further: JPA + JTA + Lift

2008-09-09 Thread Viktor Klang
On Tue, Sep 9, 2008 at 3:59 PM, Oliver Lambert [EMAIL PROTECTED] wrote:

 Now, now lets not get testi ;-)


*laugh*

It's chill ;)

Cheers,



 On 09/09/2008, at 9:34 PM, Viktor Klang wrote:



 On Tue, Sep 9, 2008 at 10:09 AM, Oliver [EMAIL PROTECTED] wrote:

 Actually, is this the essence of the cookie. Why has the object been
 detached in the example Kris gives - is there something wrong with
 RequestVar lifecycle?


 Actually, just add a simple debug-print when the session is created and
 when it's closed. And if it prints that it is closed _before_ the execption
 is raised then there certainly is a problem with the requestvar lifecycle.

 Ideally the entitymanager should be managed outside the scope of
 request-vars, since the order of request-var destruction isn't given, which
 means that if the cleanup is done in the wrong order, the Session is
 closed before referenced objects are cleaned up, which introduces the
 possibility for weirdness.

 Cheers,
 Viktor




 On Tue, Sep 9, 2008 at 5:27 PM, Viktor Klang [EMAIL PROTECTED]wrote:

 Hello Kris,

 this is a quite common problem in the world of JPA and object references.
 I'm not going to bore people out by talking about object lifecycles, but
 here's the essence of the cookie:

 When a JPA Session is created, it is bound to some context (wether it be
 the currently running thread, a session-bean, an HTTPSession or a
 RequestVar)
 Any PEs ( Persistent Entities) loaded through it will be associated with
 that particular Session instance, however, JPA tries to proxy alot of
 objects and collections
 to avoid having to load whole object graphs into memory when they haven't
 been requested.
 Your problem arises when you try to access a proxy outside the scope of
 the Session ( Google for Detached + JPA for more info on when an object is
 outside the scope of a Session)


 What I usually do if I want to hang onto references (Detached) to
 JPA-managed objects is that I create my own proxy around it that does
 something like the following:

 if(!currentSession.contains(myObject))
currentSession.refresh(myObject); //Reattaches the object to the
 session

 return myObject;

 However, this is also a pretty dangerous strategy, so you'll have to know
 what you're doing here. (First-commit-wins, Last-commit-wins, partial
 overwrites, lost updates... the list goes on)

 Hope someone finds this informative.

 Cheers,
 Viktor


 On Mon, Sep 8, 2008 at 11:31 PM, Kris Nuttycombe 
 [EMAIL PROTECTED] wrote:


 I've been following the advancement of the JPA/Lift tutorial with
 great interest, and have managed to get my app working, but I'm now
 struggling with a problem that occurs whenever I try to retrieve a
 collection that is mapped as a lazy association:

 Exception occured while processing /orders/list

 Message: org.hibernate.LazyInitializationException: failed to lazily
 initialize a collection of role:
 com.gaiam.gcsi.entities.subscription.Order.subscriptions, no session
 or session was closed

  
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)

  
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)

  
 org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)

  org.hibernate.collection.PersistentBag.size(PersistentBag.java:225)

  com.gaiam.gcsi.snippet.Orders$$anonfun$list$1.apply(Orders.scala:21)

  com.gaiam.gcsi.snippet.Orders$$anonfun$list$1.apply(Orders.scala:18)
scala.Seq$class.flatMap(Seq.scala:267)
com.gaiam.gcsi.model.EM$$anon$1.flatMap(EM.scala:11)
com.gaiam.gcsi.snippet.Orders.list(Orders.scala:18)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

 I took the simplest-possible route of encapsulating the EntityManager
 in a RequestVar per Derek's suggestion as such:

 object EM {
  def entityManager() = (new

 InitialContext()).lookup(java:comp/env/persistence/em).asInstanceOf[EntityManager]
 }

 class Orders {
  object em extends RequestVar(entityManager())

  def list(xhtml: NodeSeq) : NodeSeq = {
val orders = em.createQuery(from
 Order).getResultList().asInstanceOf[java.util.List[Order]]
orders.flatMap(order =
  bind(order, xhtml,
   id -- Text(order.getId().toString),
   count -- Text(order.getSubscriptions().size().toString)))
  }
 }

 The issue appears to be that the transaction that the the query ran in
 is no longer active by the time of the call to
 order.getSubscriptions(). Has anyone else been using JTA and
 encountered this? I'm running the latest stable Glassfish (2.1 UR2)
 and using Hibernate for the persistence layer.

 Thanks,

 Kris





 --
 Viktor Klang
 Rogue Software Architect








 --
 Viktor Klang
 Senior Systems Analyst





 



-- 
Viktor Klang
Senior Systems Analyst

--~--~-~--~~~---~--~~
You

[Lift] Re: JPA w/Scala (and hibernate validator)

2008-09-10 Thread Viktor Klang
(JUnit4ClassRunner.java:
 42)
at
 org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
 62)
at

 org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:
 140)
at

 org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:
 127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
 39)
at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
 25)
at java.lang.reflect.Method.invoke(Method.java:585)
at

 org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:
 338)
at
 org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
 997)
 Caused by: java.lang.IllegalArgumentException: Invoking name_$eq with
 wrong parameters
at

 org.hibernate.annotations.common.reflection.java.JavaXMethod.invoke(JavaXMethod.java:
 39)
at
 org.hibernate.validator.ClassValidator.getMemberValue(ClassValidator.java:
 534)
... 45 more
 Caused by: java.lang.IllegalArgumentException: wrong number of
 arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
 39)
at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
 25)
at java.lang.reflect.Method.invoke(Method.java:585)
at

 org.hibernate.annotations.common.reflection.java.JavaXMethod.invoke(JavaXMethod.java:
 33)





 



-- 
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: [scala] A Lift and Scala presentation at SAP TechEd

2008-09-12 Thread Viktor Klang
Excellent stuff David!

Gonna show it to some people today :)

Cheers!

Viktor

On Thu, Sep 11, 2008 at 11:16 PM, David Pollak [EMAIL PROTECTED] wrote:



 Marius wrote:

 BRAVO !


  Thanks... and now you have a face and a voice with the email. :-)

 Plus 3,000+ SAP developers saw the Lift logo on my T-Shirt. :-) :-)


  On Sep 12, 12:01 am, David Pollak [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote:


  http://www.youtube.com/watch?v=JFJMpFkpoQU

 Marius Danciu wrote:


  Excellent Dave and congrats!


  Can't wait to see the videos ... hopefully this time the videos
 quality is better so I can actually see you :)


  Br's,
 Marius


  On Thu, Sep 11, 2008 at 10:07 AM, David Pollak
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:


  Folks,


  I've been at SAP TechEd (the geek fest that SAP throws every year
 to get developers in the SAP ecosystem together) this week
 chatting with folks about Scala and Lift.


  I gave a presentation tonight to about 40 RIA (Rich Internet App)
 developers about Lift and Scala.  In 30 minutes I created a Lift
 real-time chat application with no cutting/pasting of code.  The
 source is here:
http://code.google.com/p/sdn-mentor-handson-2008/source/browse/#svn/t...


  SAP's NetWeaver platform is a J2EE container with a ton of SAP
 extensions.  Lift apps run perfectly in NetWeaver.


  Over the next few months, I think we will see a fair number of
 these folks joining the Scala and Lift lists and asking lots of
 questions.


  I'll post links to videos and blogs that resulted from TechEd as
 they become available.


  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: JPA and enumerations

2008-09-21 Thread Viktor Klang
On Sat, Sep 20, 2008 at 6:14 PM, 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)
 On 21/09/2008, at 12:29 AM, Viktor Klang wrote:

 Yo man,

 all you've gotto do is to write your own UserType for Scala Enums (please
 post it as Open Source for all to benefit)


 Are you implying this is difficult to do?


Nope, not at all, but I assume that this will be requested by many, so why
have lots of people reinventing this nice wheel. :)





 Cheers,

 Viktor

 On Fri, Sep 19, 2008 at 11:03 PM, Charles F. Munat [EMAIL PROTECTED] wrote:


 I'm still trying to get a Gender enumeration to work with JPA. The
 problem now seems to be on the JPA end (I'm using the JPADemo code that
 Derek provided).

 I get the following error:
 javax.persistence.PersistenceException: org.hibernate.MappingException:
 Could not determine type for: scala.Enumeration$Value, for columns:
 [org.hibernate.mapping.Column(gender)]

 Here is the relevant code:


 @serializable
 object Gender extends Enumeration {
   type Gender = Value
   val Unknown = Value(0, Unknown)
   val Male = Value(1, Male)
   val Female = Value(2, Female)
 }

 import Gender._

 @Entity
 @Table{val name = USERS}
 class User {
   @Id
   @GeneratedValue{val strategy = GenerationType.AUTO}
   var id : Long = _

   @Column{val name=NAME_LAST}
   var nameLast : String = 

   @Column{val name=NAME_FIRST}
   var nameFirst : String = 

   var username : String = 

   @Column{val name=EMAIL_ADDRESS}
   var emailAddress : String = 

   @Enumerated(EnumType.ORDINAL)
   var gender : Gender = _

 ...
 }

 Also, where is the best place to put the Gender enumeration so that it
 is visible both in the persistence project and in the webapp?

 Thanks for any and all help.

 Chas.





 --
 Viktor Klang
 Senior Systems Analyst





 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: HTTP Client?

2008-09-24 Thread Viktor Klang
Also, when writing immutable objects, constructors suck since they do not
encourage object sharing...

On Wed, Sep 24, 2008 at 4:36 PM, Kris Nuttycombe
[EMAIL PROTECTED]wrote:


 If you're going to take that approach, why not just make the
 constructor or factory method ensure that the object is in a valid
 state to begin with? When I write immutable objects, they usually
 don't have any setters for that very reason. It doesn't make sense to
 me that one would construct a PayPal object in an unusable state.

 Kris

 On Tue, Sep 23, 2008 at 7:46 PM, David Pollak [EMAIL PROTECTED] wrote:
  Tim,
 
  I like the work, but I tend not to like mutable data structures (stuff
 with
  properties that one sets.)  I'd structure things such that the PayPal
  object's setters return a new, immutable instance of the PayPal object,
 so
  you're code would look like:
 
  val pp: PayPal = new
  PayPal(sandbox).transactionToken(S.param(tx)).useSSL(true)
 
  I'd also update the execute method so that it returns another immutable
  object that has current state rather than mutating the original PayPal
  object.
 
  Thanks,
 
  David
 
  Tim Perrett wrote:
 
  Thanks Derek :-) I have commited any code for ages, so its about time
  I did!
 
  My plan is this - once I get this roll out of the site im doing now
  (which just needs PDT) done, I'll add the IPN functions to it. From
  the docs, it looks pretty straight forward.
 
  You can configure a whole bunch of options like so:
 
  /* values can be sanbox or live */
  var paypal: PayPal = new PayPal(sandbox)
  /* self expanitory */
  paypal.transactionToken = S.param(tx).openOr()
  /* set if you need to use SSL (changes port and protocol) */
  paypal.useSSL = true
  /* run the paypal transaction - either with a PDT payload or IPN
  payload */
  paypal.execute(pdt)
 
  Anything else / different way of doing it people think I should build
  in?
 
  Tim
 
  On Sep 23, 6:24 pm, Derek Chen-Becker [EMAIL PROTECTED] wrote:
 
 
  Tim, you rock :)
 
 
 
 
  
 

 



-- 
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: Image Submit Buttons fail to Submit (in IE)

2008-09-26 Thread Viktor Klang
On Fri, Sep 26, 2008 at 12:15 PM, Charles F. Munat [EMAIL PROTECTED] wrote:


 Ah, I forgot that you were talking server-side. Hmm. I'll have to think
 about this.

 For mobile browsers, are you talking ones that use WML? (Does anyone
 still use that?) For something like that, I think you could use the
 Accept HTTP header. User Agent is going to be very tricky.


Perhaps you want to have a more light-weighted page for mobile consumers?



 But for something like this, shouldn't you send a default button
 (assuming JS is off), and then a JS script that does the object
 detection client-side and replaces the button with an image button? I'm
 not clear -- why do you want to do the detection server-side?

 Chas.

 Marius wrote:
  Charles ... this is not only about JS level. One may simply click a
  link or submit a simple form (with NO JS involved) and lift should
  probably be aware of browser type it can correct some browser specific
  idiosyncrasies in the resulting markup. Certain applications may need
  for instance to detect if a mobile browser is used instead of a PC
  browser.
 
  I don't think there is some other option then user-agent. But user-
  agent can be used today in lift but I agree that a higher abstraction
  is needed.
 
  P.S.
  At JS level, yeah object detection sounds really good.
 
  Br's,
  Marius
 
  On Sep 26, 12:25 pm, Charles F. Munat [EMAIL PROTECTED] wrote:
  Browser detection is a really bad idea, and I would recommend avoiding
  it at all costs. A much better solution is object detection.
 
  Here's one pretty good description about why this is so:
 
  http://developer.apple.com/internet/webcontent/objectdetection.html
 
  Here's another:
 
  http://www.quirksmode.org/js/support.html
 
  And one more (for the unconvinced :-)
 
  http://www.evotech.net/blog/2007/07/browser-detection-versus-object-d.
 ..
 
  Chas.
 
  Tim Perrett wrote:
  Am I being dumb here - could we not just run some checks on the user-
  agent header and respond appropriately?
  It would be very cool if SHtml was browser aware.
  Cheers
  Tim
  

 



-- 
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: NetBeans and complex parser combinator files

2008-10-09 Thread Viktor Klang
Is it permGen OOM or Heap OOM?

On Wed, Oct 8, 2008 at 7:21 PM, David Pollak [EMAIL PROTECTED] wrote:


 Folks,

 I've been using NetBean pretty successfully... except for projects that
 refer to complex parser combinator files (e.g., Lift's Textile parser.)
 NetBeans looks for stuff on the classpath and when it gets to the file
 with the complex parser combinator stuff in it, it gets Out of Memory
 exceptions (I've allocated 3GB to the NB process).

 Is there a way to ask NetBeans to not parse these files?  Alternatively,
 is there a way to reduce the memory needs for these complex files?

 Thanks,

 David

 PS -- There's a separate problem editing these files, but I'm not
 worried about that right now... I'm happy to use emacs to edit the files.


 



-- 
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: 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: Preview form (JPA)

2008-10-18 Thread Viktor Klang
Chas,

this like that takes quite some forethought before implementing. (holding on
to entity in either transient, detached or persistent state. And then you
have the problem that if you try to save the transient entity, and it fails,
it still gets allocated an identifier, and then you have a transient entity
with an identifier)

The simplest way around this is to save the object but have different
statuses (DRAFT,LIVE) etc.

There are surely other ways of doing it aswell, this is just from the top of
my head.


Cheers,
Viktor

On Sat, Oct 18, 2008 at 1:08 AM, Charles F. Munat [EMAIL PROTECTED] wrote:


 Derek,

 Have you figured out how to keep the object in the continuation instead
 of just the id?

 Also, I'm working on a form. I'd like it to have four states:

 1. Initial form is blank
a. Click Save to save the data
b. Click Preview to preview the data

 2. Preview shows what it will look like
a. Click Save to save the data
b. Click Edit to edit the data

 3. Edit shows the form with the previously entered values
(Same as add form, but preloaded)
a. Click Save to save the data
b. Click Preview to preview the data

 4. Response shows the saved data

 Any ideas on how to do this? Anyone else?

 Chas.

 



-- 
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: JPA and hiberated generated fields in Lift app

2008-10-22 Thread Viktor Klang
After migrating from Hibernate 3.0 to 3.3.1 the past 2 weeks I have gained
some hatred towards Hibernate.

I had to write atleast 3 workarounds to Hibernate bugs. No cool at all. :/

I feel your pain,

cheers,
Viktor

On Wed, Oct 22, 2008 at 1:41 AM, Charles F. Munat [EMAIL PROTECTED] wrote:


 Nope. Turns out this is a really poorly explained feature of Hibernate
  (and, in the opinion of many, a really dumb one). My code was correct,
 and the problem isn't anything Scala-related. In order for this code to
 work, the *database* has to generate the values, e.g. via a trigger,
 which I, the designer, have to add.

 Sheesh. The whole point of Hibernate, I thought, was that I don't have
 to deal with the database end. Why this can't just add the triggers for
 me is beyond me. It's easier just to set them in the application, I think.

 Thanks for the help. Live and learn, I guess.

 Chas.

 Derek Chen-Becker wrote:
  Yeah, I think you want insertable to be true on the first one (just omit
  the insertable val) and on the second one you want to omit both
  insertable and updatable to make them both true.
 
  Derek
 
  On Tue, Oct 21, 2008 at 6:00 AM, Viktor Klang [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  But both are updatable false and insertable false?
 
  I might be daft, but that doesn't look good to me...
 
  Cheers
  Viktor
 
 
  On Tue, Oct 21, 2008 at 5:06 AM, Charles F. Munat [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
 
  In my Lift app based on the JPA demo I tried this, which should
 work
  beautifully according to everything I've been able to get my
  hands on:
 
  @Temporal(TemporalType.TIMESTAMP)
  @Column{val name=CREATED_AT, val updatable = false,
val insertable = false}
 
 @org.hibernate.annotations.Generated(org.hibernate.annotations.GenerationTime.INSERT)
  var createdAt : Date = new Date()
 
  @Temporal(TemporalType.TIMESTAMP)
  @Column{val name=UPDATED_AT, val updatable = false,
val insertable = false}
 
 @org.hibernate.annotations.Generated(org.hibernate.annotations.GenerationTime.ALWAYS)
var updatedAt : Date = new Date()
 
  This should, if I'm right, set an immutable created_at timestamp
  and a
  mutable updated_at timestamp upon insert, and update the
 updated_at
  timestamp upon each update.
 
  What it actually does is leave both fields null. What a drag.
 
  Any ideas? Is this a Scala thing? Am I missing something really
  obvious,
  as usual?
 
  Thanks,
 
  Chas.
 
 
 
 
 
  --
  Viktor Klang
  Senior Systems Analyst
 
 
 
 
 
  

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Scala+Lift Philosophical Question

2008-10-22 Thread Viktor Klang
On Wed, Oct 22, 2008 at 2:50 AM, efleming969 [EMAIL PROTECTED] wrote:


 Most questions in the group are technical and I apologize if this is
 not appropriate, but I I'm curious about how members are justifying
 their use of Scala+Lift vs. a traditional Java architecture.  I
 understand if you are creating applications for your own business or
 personal use, but what about employee or consulting work (if any).

 I'm currently a one man consultant and would like to do more work with
 Scala and Lift but it seems high risk for my client to have an
 application built with newer and practically unknown technologies like
 these.

 Any thoughts?


High risk? High risk of what?
Compared to doing it in Java?

I always say that the thing of uttermost importance is to stay competitive
in the market,
and if you want to stay competitive, you'll have to be daring.

Using Scala+Lift over Java/Struts2/JSF/whatnot most likely means less than
half time-to-market.
And that means lower development-costs, better ROI and more possibilities.
But I guess that's nothing compared to feeling really secure. So perhaps
they should go for COBOL + COBOL On Cogs. ;)

Cheers,
Viktor


 



-- 
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: Thanks!

2008-10-22 Thread Viktor Klang
Hi Josh,

thanks for the positive and constructive feedback!
It's people like you that fuel the work of the Lift committers.

Cheers,
Viktor

On Wed, Oct 22, 2008 at 5:35 AM, Josh Suereth [EMAIL PROTECTED]wrote:

 Hey Lift community.

 Just wanted to say thanks for working on the Lift Web Framework.  I began
 using it (to be honest) because I have to interface with EJBs and Lift has
 much better maven-support than Grails, and I wanted a language that had some
 power (i.e. not Java).

 I'm now more than happy with the choice of Lift.  Lift really is *not*
 just another Rails.  I'm amazed at how different and consistent the
 paradigm is! (I had heard similar things about Wicket).   Anyway, my only
 real complaint is lack of documentation, but I'm hoping to help contribute
 to this problem (as soon as I know enough to help).

 Anyway, just wanted to say great job, and I'm liking how my application is
 turning out so far!

 -Josh

 



-- 
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: Scala+Lift Philosophical Question

2008-10-22 Thread Viktor Klang
On Wed, Oct 22, 2008 at 4:30 PM, efleming969 [EMAIL PROTECTED] wrote:


 Wow, thanks for the feedback.

 I should have been more clear as to what I meant by High Risk.  I'm
 not concerned so much with Lift's technical merit, but rather the risk
 of personnel.  If I get hit by the proverbial bus then my client/
 employer will have a difficult time completing/maintaining the project
 due to skill set alone.


I think it's naïve to think that you can swap-in and swap-out programmers
like they were generic building blocks.
I've been building enterprise systems using Java for 7 years now, and my
experience is that the only time
you can exchange one programmer for another is if someone writes the spec
and the programmer just puts the letters into the file.
And trust me, no programmer worth paying for would work under those terms.

So, to sum up what I mean: 1 star developer with tools of his/her choice 
100 Java Joes with Struts 1 and EJB2
Also, the star developer doesn't cost 100 times more or takes 100 times
longer to finish the task.

Also, the quality of the code (maintainability and defect ratio) is better
with the star developer.

So, to sum up. No it's not as easy to find a generic developer, but using
outdated technology with sub-par developers is not a good path to take. :)

This is, of course, my very personal opinion, and may be considered as the
ravings of a madman...

Cheers,
Viktor




 I agree with the points about infrastructure and Scala/Lift's cross-
 platform capabilities. I would not use it otherwise.  I also agree
 that Lift rocks and is a viable alternative to traditional Java
 approaches.

 That being said.  I do have my client's best interest in mind and I
 think using Scala and Lift is somewhat selfish on my part.  I guess
 I'll have to be on the lookout for buses :-)

 On Oct 22, 7:10 am, Tim Perrett [EMAIL PROTECTED] wrote:
  Interesting thread.
 
  Having done both emplyed work and freelance consultancy I agree
  totally with Marius in sense that selling in the idea of XYZ
  technology to enterprise is one of the most difficult things we face,
  as there are some very deep set processes in the enterprise
  environment (Microsoft, SAP et al) and a lot of reluctancy to touch
  OSS in general.
 
  Companies usually tackle this in one of two ways:
 
  1) Outsource the entire project to a 3rd party (dev, hosting etc) so
  then they just need it to work and fulfil the spec and not worry about
  organizational issues that may hinder the implementation of XYZ
  technology in there business. A classic of this is Ruby... it runs
  like crap on windows, and like it or not, M$ have a massive market
  share of infrastructure and deployment hardware in the enterprise
  environment so outsourcing the implementation and deployment makes
  sense and the organization still get quicker ROI of the shorter dev
  time.
 
  2) A drawn out internal wrangle / argument that is costly in both time
  and finances
 
  One of the nice things about Lift is that it runs on standard java web
  infrastructure so there is no extra stuff needed for deployment. It
  runs on the JVM so its easily cross-platform - i have lift apps
  running on OSX for Dev, windows and linux for deployment.
 
  Lift really does rock - the bottom line right now is that its not yet
  at 1.0, but rails had a pretty-widespread take-up between 0.9 and 1.2;
  I see the same pattern happening here. A great feature set, pragmatic
  design, and some awesome modules right out of the box. There will
  always be people who want to use what they know (otherwise we'd have
  killed off perl years ago), but there are an equal number of people
  (and therefore companies) who want to explore the edgy new technology.
  IMO, its about having balance in your toolset.
 
  Cheers
 
  Tim
 



-- 
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] WAS [Lift committers] Re: Adding JPA scaffolding to lift?

2008-11-25 Thread Viktor Klang
Derek, I still humbly suggest writing an implementation of
PropertyAccessorhttp://www.hibernate.org/hib_docs/v3/api/org/hibernate/property/PropertyAccessor.htmlto
map the values between JPA and the Lift business objects.

Then, in the Hibernate-mapping or the Configuration object, just define:

hibernate-mapping
   default-cascade=none
   default-access=*net.liftweb.jpa.LiftFieldAccessor* //Or something else
   package=bahblah


Cheers,
V
-- Forwarded message --
From: Derek Chen-Becker [EMAIL PROTECTED]
Date: Tue, Nov 25, 2008 at 3:54 PM
Subject: [Lift committers] Re: Adding JPA scaffolding to lift?
To: [EMAIL PROTECTED]


I thought about it a bit last night. JPA infers entity members from either
fields or getter/setter pairs. In that sense, I could create a JPA object
like

class MyEntity extends Record[MyEntity] {
  object nameField extends StringField(this,100)

  def name = nameField.value

  def name_=(value : String) = nameField.set(value)
}

But that seems a bit clunky. The other option may be to somehow come up with
a modified Field (JPAField?) trait that can access instance fields, perhaps
via a closure.

Derek


On Tue, Nov 25, 2008 at 2:42 AM, Tim Perrett [EMAIL PROTECTED] wrote:


 Hmm yeah - I wonder if record will need to be some kind of DAO for
 JPA?

 On Nov 24, 11:42 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
  I'm thinking about it. I think the fact that fields on a record are
 defined
  as objects and not members may complicate things a bit, but I'm still
  digesting all of the new stuff.
 
  Derek
 
  On Mon, Nov 24, 2008 at 12:01 PM, Tim Perrett [EMAIL PROTECTED]
 wrote:
 
   How did this go Derek?
 
   Now we have the record stuff in there, are you going to take a bash at
   writing a JPA backend? That would rock!
 
   Cheers, Tim
 
   On Nov 13, 2:17 pm, Derek Chen-Becker [EMAIL PROTECTED] wrote:
Fair enough. I'll check out the Record branch and start looking at
 it.
 
Thanks,
 
Derek
 
On Thu, Nov 13, 2008 at 6:42 AM, Marius [EMAIL PROTECTED]
 wrote:
 
 +1
 
 On Nov 9, 12:56 am, David Pollak [EMAIL PROTECTED]
 wrote:
  I'd rather wait until Marius and I are done with the record/field
   stuff
 and
  do a JPA back-end to that.
 
  On Sat, Nov 8, 2008 at 1:39 PM, TylerWeir [EMAIL PROTECTED]
   wrote:
 
   We may want to also offer an archetype that has the skeleton of
 a
   JPA-
   aware app ready to go.
 
   And +1 for adding this to Lift proper.
 
   On Nov 8, 2:43 pm, Tim Perrett [EMAIL PROTECTED] wrote:
Sounds like a good idea Derek - this is annoying the ass out
 of
   me
right now having to copy and paste the JPA scala wrapper
 files
   from
project to project so, sure, this would be a great idea
 and
   one
welcomed by the majority of lift-jpa users.
 
+1 for including this in lift proper
 
Cheers, Tim
 
On Nov 8, 4:06 pm, Derek Chen-Becker 
 [EMAIL PROTECTED]
 wrote:
 
 I've had several requests to move the JPA.scala source
   (ScalaEntityManager
 and ScalaQuery) out of the demo site and into lift proper
 so
   that
   people can
 just extend instead of copying and pasting code. Would
 anyone
   be
   opposed to
 me making a new lift-jpa module to hold common classes?
 
 Derek
 
  --
  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: WAS [Lift committers] Re: Adding JPA scaffolding to lift?

2008-11-25 Thread Viktor Klang
yes, if we resort into using xml configt' really just a matter of providing
implmentations that work with the different JPA providers.

What doyou think Derek?

On Tue, Nov 25, 2008 at 10:12 PM, Derek Chen-Becker
[EMAIL PROTECTED]wrote:

 That's a very interesting idea. It's been a long time since I've touched
 the XML mappings, but JPA definitely supports a newer version of it now. Let
 me look into that.
 Derek


 On Tue, Nov 25, 2008 at 2:55 PM, David Pollak 
 [EMAIL PROTECTED] wrote:



 On Tue, Nov 25, 2008 at 12:35 PM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 I'll look at PropertyAccessor, but I would prefer something that isn't
 Hibernate specific.


 I agree that Hiberate specific stuff may be less than optimal.

 Is there a way that we can queries the models at start-up time and
 generate XML that does EJB 2.1 style mapping such that we can feed that into
 JPA to do the mapping?



 Thanks,

 Derek


 On Tue, Nov 25, 2008 at 1:24 PM, Viktor Klang [EMAIL PROTECTED]wrote:

 Derek, I still humbly suggest writing an implementation of
 PropertyAccessorhttp://www.hibernate.org/hib_docs/v3/api/org/hibernate/property/PropertyAccessor.htmlto
  map the values between JPA and the Lift business objects.

 Then, in the Hibernate-mapping or the Configuration object, just define:

 hibernate-mapping
default-cascade=none

default-access=*net.liftweb.jpa.LiftFieldAccessor* //Or something else
package=bahblah


 Cheers,
 V
 -- Forwarded message --
 From: Derek Chen-Becker [EMAIL PROTECTED]
 Date: Tue, Nov 25, 2008 at 3:54 PM
 Subject: [Lift committers] Re: Adding JPA scaffolding to lift?
 To: [EMAIL PROTECTED]


 I thought about it a bit last night. JPA infers entity members from
 either fields or getter/setter pairs. In that sense, I could create a JPA
 object like

 class MyEntity extends Record[MyEntity] {
   object nameField extends StringField(this,100)

   def name = nameField.value

   def name_=(value : String) = nameField.set(value)
 }

 But that seems a bit clunky. The other option may be to somehow come up
 with a modified Field (JPAField?) trait that can access instance fields,
 perhaps via a closure.

 Derek


 On Tue, Nov 25, 2008 at 2:42 AM, Tim Perrett [EMAIL PROTECTED]wrote:


 Hmm yeah - I wonder if record will need to be some kind of DAO for
 JPA?

 On Nov 24, 11:42 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
  I'm thinking about it. I think the fact that fields on a record are
 defined
  as objects and not members may complicate things a bit, but I'm still
  digesting all of the new stuff.
 
  Derek
 
  On Mon, Nov 24, 2008 at 12:01 PM, Tim Perrett [EMAIL PROTECTED]
 wrote:
 
   How did this go Derek?
 
   Now we have the record stuff in there, are you going to take a bash
 at
   writing a JPA backend? That would rock!
 
   Cheers, Tim
 
   On Nov 13, 2:17 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
Fair enough. I'll check out the Record branch and start looking
 at it.
 
Thanks,
 
Derek
 
On Thu, Nov 13, 2008 at 6:42 AM, Marius [EMAIL PROTECTED]
 wrote:
 
 +1
 
 On Nov 9, 12:56 am, David Pollak 
 [EMAIL PROTECTED]
 wrote:
  I'd rather wait until Marius and I are done with the
 record/field
   stuff
 and
  do a JPA back-end to that.
 
  On Sat, Nov 8, 2008 at 1:39 PM, TylerWeir 
 [EMAIL PROTECTED]
   wrote:
 
   We may want to also offer an archetype that has the
 skeleton of a
   JPA-
   aware app ready to go.
 
   And +1 for adding this to Lift proper.
 
   On Nov 8, 2:43 pm, Tim Perrett [EMAIL PROTECTED]
 wrote:
Sounds like a good idea Derek - this is annoying the ass
 out of
   me
right now having to copy and paste the JPA scala wrapper
 files
   from
project to project so, sure, this would be a great
 idea and
   one
welcomed by the majority of lift-jpa users.
 
+1 for including this in lift proper
 
Cheers, Tim
 
On Nov 8, 4:06 pm, Derek Chen-Becker 
 [EMAIL PROTECTED]
 wrote:
 
 I've had several requests to move the JPA.scala source
   (ScalaEntityManager
 and ScalaQuery) out of the demo site and into lift
 proper so
   that
   people can
 just extend instead of copying and pasting code. Would
 anyone
   be
   opposed to
 me making a new lift-jpa module to hold common classes?
 
 Derek
 
  --
  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








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




 



-- 
Viktor Klang
Senior Systems Analyst

--~--~-~--~~~---~--~~
You received this message because you are subscribed

[Lift] Re: WAS [Lift committers] Re: Adding JPA scaffolding to lift?

2008-11-25 Thread Viktor Klang
On Tue, Nov 25, 2008 at 11:21 PM, Viktor Klang [EMAIL PROTECTED]wrote:

 yes, if we resort into using xml configt' really just a matter of providing
 implmentations that work with the different JPA providers.

 What doyou think Derek?


Sorry, that email turned out to get mangled.

Basically, there are a couple of good solutions available. :)



 On Tue, Nov 25, 2008 at 10:12 PM, Derek Chen-Becker [EMAIL PROTECTED]
  wrote:

 That's a very interesting idea. It's been a long time since I've touched
 the XML mappings, but JPA definitely supports a newer version of it now. Let
 me look into that.
 Derek


 On Tue, Nov 25, 2008 at 2:55 PM, David Pollak 
 [EMAIL PROTECTED] wrote:



 On Tue, Nov 25, 2008 at 12:35 PM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 I'll look at PropertyAccessor, but I would prefer something that isn't
 Hibernate specific.


 I agree that Hiberate specific stuff may be less than optimal.

 Is there a way that we can queries the models at start-up time and
 generate XML that does EJB 2.1 style mapping such that we can feed that into
 JPA to do the mapping?



 Thanks,

 Derek


 On Tue, Nov 25, 2008 at 1:24 PM, Viktor Klang [EMAIL PROTECTED]wrote:

 Derek, I still humbly suggest writing an implementation of
 PropertyAccessorhttp://www.hibernate.org/hib_docs/v3/api/org/hibernate/property/PropertyAccessor.htmlto
  map the values between JPA and the Lift business objects.

 Then, in the Hibernate-mapping or the Configuration object, just
 define:

 hibernate-mapping
default-cascade=none

default-access=*net.liftweb.jpa.LiftFieldAccessor* //Or something 
 else
package=bahblah


 Cheers,
 V
 -- Forwarded message --
 From: Derek Chen-Becker [EMAIL PROTECTED]
 Date: Tue, Nov 25, 2008 at 3:54 PM
 Subject: [Lift committers] Re: Adding JPA scaffolding to lift?
 To: [EMAIL PROTECTED]


 I thought about it a bit last night. JPA infers entity members from
 either fields or getter/setter pairs. In that sense, I could create a JPA
 object like

 class MyEntity extends Record[MyEntity] {
   object nameField extends StringField(this,100)

   def name = nameField.value

   def name_=(value : String) = nameField.set(value)
 }

 But that seems a bit clunky. The other option may be to somehow come up
 with a modified Field (JPAField?) trait that can access instance fields,
 perhaps via a closure.

 Derek


 On Tue, Nov 25, 2008 at 2:42 AM, Tim Perrett [EMAIL PROTECTED]wrote:


 Hmm yeah - I wonder if record will need to be some kind of DAO for
 JPA?

 On Nov 24, 11:42 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
  I'm thinking about it. I think the fact that fields on a record are
 defined
  as objects and not members may complicate things a bit, but I'm
 still
  digesting all of the new stuff.
 
  Derek
 
  On Mon, Nov 24, 2008 at 12:01 PM, Tim Perrett [EMAIL PROTECTED]
 wrote:
 
   How did this go Derek?
 
   Now we have the record stuff in there, are you going to take a
 bash at
   writing a JPA backend? That would rock!
 
   Cheers, Tim
 
   On Nov 13, 2:17 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
Fair enough. I'll check out the Record branch and start looking
 at it.
 
Thanks,
 
Derek
 
On Thu, Nov 13, 2008 at 6:42 AM, Marius 
 [EMAIL PROTECTED] wrote:
 
 +1
 
 On Nov 9, 12:56 am, David Pollak 
 [EMAIL PROTECTED]
 wrote:
  I'd rather wait until Marius and I are done with the
 record/field
   stuff
 and
  do a JPA back-end to that.
 
  On Sat, Nov 8, 2008 at 1:39 PM, TylerWeir 
 [EMAIL PROTECTED]
   wrote:
 
   We may want to also offer an archetype that has the
 skeleton of a
   JPA-
   aware app ready to go.
 
   And +1 for adding this to Lift proper.
 
   On Nov 8, 2:43 pm, Tim Perrett [EMAIL PROTECTED]
 wrote:
Sounds like a good idea Derek - this is annoying the ass
 out of
   me
right now having to copy and paste the JPA scala wrapper
 files
   from
project to project so, sure, this would be a great
 idea and
   one
welcomed by the majority of lift-jpa users.
 
+1 for including this in lift proper
 
Cheers, Tim
 
On Nov 8, 4:06 pm, Derek Chen-Becker 
 [EMAIL PROTECTED]
 wrote:
 
 I've had several requests to move the JPA.scala source
   (ScalaEntityManager
 and ScalaQuery) out of the demo site and into lift
 proper so
   that
   people can
 just extend instead of copying and pasting code. Would
 anyone
   be
   opposed to
 me making a new lift-jpa module to hold common
 classes?
 
 Derek
 
  --
  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








 --
 Lift, the simply functional web framework http://liftweb.net
 Collaborative Task Management http://much4.us
 Follow me: http

[Lift] Re: WAS [Lift committers] Re: Adding JPA scaffolding to lift?

2008-11-25 Thread Viktor Klang
On Tue, Nov 25, 2008 at 11:25 PM, Derek Chen-Becker
[EMAIL PROTECTED]wrote:

 :) I think that we may be able to use the XML approach, but I want to check
 to make sure that it's even possible to provide custom XML mappings directly
 to a JPA provider. It may be something that we have do a little custom
 coding for each vendor, but as long as there was a uniform interface that
 wouldn't be an issue.


Spoken by a smart man! :)



 Derek

 On Tue, Nov 25, 2008 at 4:23 PM, Viktor Klang [EMAIL PROTECTED]wrote:



 On Tue, Nov 25, 2008 at 11:21 PM, Viktor Klang [EMAIL PROTECTED]wrote:

 yes, if we resort into using xml configt' really just a matter of
 providing implmentations that work with the different JPA providers.

 What doyou think Derek?


 Sorry, that email turned out to get mangled.

 Basically, there are a couple of good solutions available. :)



 On Tue, Nov 25, 2008 at 10:12 PM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 That's a very interesting idea. It's been a long time since I've touched
 the XML mappings, but JPA definitely supports a newer version of it now. 
 Let
 me look into that.
 Derek


 On Tue, Nov 25, 2008 at 2:55 PM, David Pollak 
 [EMAIL PROTECTED] wrote:



 On Tue, Nov 25, 2008 at 12:35 PM, Derek Chen-Becker 
 [EMAIL PROTECTED] wrote:

 I'll look at PropertyAccessor, but I would prefer something that isn't
 Hibernate specific.


 I agree that Hiberate specific stuff may be less than optimal.

 Is there a way that we can queries the models at start-up time and
 generate XML that does EJB 2.1 style mapping such that we can feed that 
 into
 JPA to do the mapping?



 Thanks,

 Derek


 On Tue, Nov 25, 2008 at 1:24 PM, Viktor Klang [EMAIL PROTECTED]
  wrote:

 Derek, I still humbly suggest writing an implementation of
 PropertyAccessorhttp://www.hibernate.org/hib_docs/v3/api/org/hibernate/property/PropertyAccessor.htmlto
  map the values between JPA and the Lift business objects.

 Then, in the Hibernate-mapping or the Configuration object, just
 define:

 hibernate-mapping
default-cascade=none

default-access=*net.liftweb.jpa.LiftFieldAccessor* //Or something 
 else
package=bahblah


 Cheers,
 V
 -- Forwarded message --
 From: Derek Chen-Becker [EMAIL PROTECTED]
 Date: Tue, Nov 25, 2008 at 3:54 PM
 Subject: [Lift committers] Re: Adding JPA scaffolding to lift?
 To: [EMAIL PROTECTED]


 I thought about it a bit last night. JPA infers entity members from
 either fields or getter/setter pairs. In that sense, I could create a 
 JPA
 object like

 class MyEntity extends Record[MyEntity] {
   object nameField extends StringField(this,100)

   def name = nameField.value

   def name_=(value : String) = nameField.set(value)
 }

 But that seems a bit clunky. The other option may be to somehow come
 up with a modified Field (JPAField?) trait that can access instance 
 fields,
 perhaps via a closure.

 Derek


 On Tue, Nov 25, 2008 at 2:42 AM, Tim Perrett [EMAIL PROTECTED]wrote:


 Hmm yeah - I wonder if record will need to be some kind of DAO for
 JPA?

 On Nov 24, 11:42 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
  I'm thinking about it. I think the fact that fields on a record
 are defined
  as objects and not members may complicate things a bit, but I'm
 still
  digesting all of the new stuff.
 
  Derek
 
  On Mon, Nov 24, 2008 at 12:01 PM, Tim Perrett 
 [EMAIL PROTECTED] wrote:
 
   How did this go Derek?
 
   Now we have the record stuff in there, are you going to take a
 bash at
   writing a JPA backend? That would rock!
 
   Cheers, Tim
 
   On Nov 13, 2:17 pm, Derek Chen-Becker [EMAIL PROTECTED]
 wrote:
Fair enough. I'll check out the Record branch and start
 looking at it.
 
Thanks,
 
Derek
 
On Thu, Nov 13, 2008 at 6:42 AM, Marius 
 [EMAIL PROTECTED] wrote:
 
 +1
 
 On Nov 9, 12:56 am, David Pollak 
 [EMAIL PROTECTED]
 wrote:
  I'd rather wait until Marius and I are done with the
 record/field
   stuff
 and
  do a JPA back-end to that.
 
  On Sat, Nov 8, 2008 at 1:39 PM, TylerWeir 
 [EMAIL PROTECTED]
   wrote:
 
   We may want to also offer an archetype that has the
 skeleton of a
   JPA-
   aware app ready to go.
 
   And +1 for adding this to Lift proper.
 
   On Nov 8, 2:43 pm, Tim Perrett [EMAIL PROTECTED]
 wrote:
Sounds like a good idea Derek - this is annoying the
 ass out of
   me
right now having to copy and paste the JPA scala
 wrapper files
   from
project to project so, sure, this would be a great
 idea and
   one
welcomed by the majority of lift-jpa users.
 
+1 for including this in lift proper
 
Cheers, Tim
 
On Nov 8, 4:06 pm, Derek Chen-Becker 
 [EMAIL PROTECTED]
 wrote:
 
 I've had several requests to move the JPA.scala
 source
   (ScalaEntityManager
 and ScalaQuery) out of the demo site and into lift
 proper so
   that
   people can
 just extend instead of copying

[Lift] Re: JPA and Record

2008-11-29 Thread Viktor Klang
IMHO:

  @Column{val name = my_name}
  var name : String = _
  object nameField extends StringField(this,100) with Delegated
  nameField.delegate(name, name = _)

That's just too much boilerplate. For me, who went to scala to lose
boilerplate, this is not a viable solution.

Unfortunately the JPA spec is kind of weak when it comes to adaptation, so
my suggestion to make it work with Hibernate first still stands.

What do you guys think?

Cheers,
Viktor

On Sat, Nov 29, 2008 at 10:23 PM, Derek Chen-Becker
[EMAIL PROTECTED]wrote:

 No big deal. In the example code I did a by-name in the delegate method so
 at least it's transparent to the end-user.

 Derek


 On Sat, Nov 29, 2008 at 11:06 AM, Jorge Ortiz [EMAIL PROTECTED]wrote:

 Just wanted to chime in real quick...


 type Getter = () = MyType // Can this be by-name in any way?


 No. By-names are not first-class types. It's gotta be () = MyType

 --j





 



-- 
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: Using TemplatePf for JPA powered templates

2008-11-29 Thread Viktor Klang
If you use Hibernate you could simply configure the L2-cache and have
Hibernate manage it for you. (EHCache or whatever cache-provider you like)
This means you won't have to manually use the filesystem and can let the
cache-provider do what it's good at :)

Cheers,
Viktor

On Sun, Nov 30, 2008 at 3:25 AM, Tim Perrett [EMAIL PROTECTED] wrote:


 I've been playing around with this and extending the template loader
 is actually pretty easy. Its much simpler than I thought it would be!

 I have a dilemma however - store the templates (and associated meta
 data) in the database and then have to do a fetch / read on every
 request, or, use the file system and hold (for instance):

 example.html
 and
 example.meta // java properties file format

 The tree structure of the file system is the path of least resistance
 for my particular use case i think, but i guess im after some input /
 advice...? I feel as either way has a couple of hang-ups! The kind of
 meta data is just simple key-value pair stuff, but my plan would be to
 extend Record so that the save() etc became transparent and was
 abstracted away (i.e. don't need to worry about InputStreams etc)

 Appreciate any input / advice people have

 Cheers

 Tim

 On Nov 29, 2:31 pm, Derek Chen-Becker [EMAIL PROTECTED] wrote:
  Looking at findVisibleTemplate in LiftSession (line 512) certainly makes
 it
  appear that the template table defined by addTemplateBefore/After is
  consulted before it checks the filesystem.
 
  Derek
 
  On Fri, Nov 28, 2008 at 10:26 AM, Tim Perrett [EMAIL PROTECTED]
 wrote:
 
   Hey guys,
 
   I want to user lifts LiftRules.addTemplateBefore/After to load
   templates from a database, where my persistence is JPA.
 
   With TemplatePf can I do this? Im also thinking this will be one of
   the nice things about having lift tags, as it will mean i shouldn't
   need to build a custom tagging language or anything (as we already
   have it!). I presume that TemplatePf just tells lift where to get the
   XHTML from then it continues to do the processing on it (process
   snippets etc)?
 
   Cheers
 
   Tim
 



-- 
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: Using TemplatePf for JPA powered templates

2008-11-30 Thread Viktor Klang
On Mon, Dec 1, 2008 at 5:42 AM, Charles F. Munat [EMAIL PROTECTED] wrote:


 Doing nested sets in your Lift snippet is pretty easy with JPA. I'm
 doing it on one of my Lift sites. One thing to remember, however, is to
 use a transaction. You don't want to do half the update to the tree and
 then have another use start an update before you've finished yours (or
 have half of it fail). Once it gets messed up it's a disaster.

 Nested tables are good when you have lots of lookups, particularly
 pulling ancestors or descendants, but not too many updates. Inserts are
 not too bad, but if you have to move whole subtrees, that's a pain.

 I'm using one for, among other things, a forum, so messages once posted
 never get moved. Nested sets work great for that.

 But, honestly, it is astonishing to me that Java, Scala, and especially
 JPA/Hibernate apparently have no built in features for creating,
 manipulating, and persisting trees (and networks are even less
 supported). These problems were largely solved long ago. Why aren't they
 built in?


Charles, I hate to say this, but Hibernate is Open Source, so you can add
the support for it. :)




 Rails has a cool set of plugins -- acts_as_list, acts_as_tree, and
 acts_as_nested_set -- that make it drop-dead simple to implement trees.
 I was thinking that it would be cool if Lift had something similar but
 maybe as a trait? So my object extends ActsAsNestedSet?

 I tried to do this in Hibernate, but it would require the object to
 query for other similar objects. For example, if I had a Node object
 that I was persisting, I'd like to do

 class Node extends ActsAsNestedSet

 And then define methods such as moveToChildOf(node), moveToFirst,
 moveBack, moveForth, moveToLast, etc. But it appears that you need an
 EntityManager to run a query, and there doesn't seem to be a way to go
 backwards from the Node to the EntityManager (probably because, if I
 understand it correctly, there will only be one copy of a given Node in
 memory but there may be multiple EntityManagers?).

 So I put the code in the snippet.

 If you come up with any clever solutions, I'd love to hear them.

 Chas.

 Tim Perrett wrote:
  Hey Derek,
 
  I've been playing around with this nested set stuff today - it's pretty
  cool. I nearly have an app working that uses the db for page content and
  maps the urls out however you want, it's pretty neat.
 
  I have a slight HQL problem with subquery's but I'll post that 2mro :-)
 
  Thanks for all your help
 
  Tim
 
  Sent from my iPhone
 
  On 30 Nov 2008, at 23:37, Derek Chen-Becker [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  IIRC, JPA has support for batch updates, but I'm not 100% positive on
  that. I'll have more time tomorrow to look at this if you'd still like
  to discuss it.
 
  Derek
 
  On Sun, Nov 30, 2008 at 12:32 PM, Tim Perrett 
  mailto:[EMAIL PROTECTED][EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
 
  Derek,
 
  Those links are *extremely* good - thank you! I've not really done
  anything with tree structures before and they are really, really
  usefull.
 
  One thing however, it appears the optimal way of  doing the insert
  queries would be with stored procedures, however that im not down
  with, and ideally, i want to keep database vendor independent (part
 of
  the point of using JPA) so ideally i want to suck that up into the
  application logic. For instance:
 
  --START
  SELECT @myRight := rgt FROM nested_category WHERE name =
  'TELEVISIONS';
 
  UPDATE nested_category SET rgt = rgt + 2 WHERE rgt  @myRight;
  UPDATE nested_category SET lft = lft + 2 WHERE lft  @myRight;
 
  INSERT INTO nested_category(name, lft, rgt) VALUES('GAME CONSOLES',
  @myRight + 1, @myRight + 2);
  --END
 
  This makes use of variables, and i could of course do this via 3
  separate queries in JPA, but i wondered if there was a neater way to
  construct this type of thing with JPA?
 
  Any advice you guys have is most welcome
 
  Cheers
 
  Tim
 
 
  On Nov 30, 2:27 pm, Derek Chen-Becker [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
   If you're heavily skewed towards reads and not writes (as it
  seems in the
   case of a CMS), you might want to look at Celko nested sets:
  
  
  http://www.intelligententerprise.com/001020/celko.jhtml
 http://www.intelligententerprise.com/001020/celko.jhtml
  
  
 http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
 http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
  
   A little more work on updates than an adjacency model, but a lot
  more
   efficient.
  
   Derek
 
 
 
 
 
 
  

 



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

[Lift] Re: JPA find or create new

2008-11-30 Thread Viktor Klang
On Mon, Dec 1, 2008 at 7:12 AM, Charles F. Munat [EMAIL PROTECTED] wrote:


 Is there a simple way in JPA/Lift to query to retrieve a single object
 from the database, assign it to a val if found, or create a new object
 of that type and assign it instead of there is no such object in the
 database?

 Sort of a...

 val user: User =
   Model.createNamedQuery(
 findUserByUsername,
 username - hal
   ).findOr(new User())


(Can ! (yourQuery.uniqueResult)).openOr(new User())

Should work?



 or something like that? That would be very useful.

 Thanks,
 Chas.

 



-- 
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: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-14 Thread Viktor Klang
On Sun, Dec 14, 2008 at 11:42 AM, Marius marius.dan...@gmail.com wrote:




 On Dec 14, 12:10 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  On Sun, Dec 14, 2008 at 9:28 AM, Marius marius.dan...@gmail.com wrote:
 
   On Dec 14, 3:02 am, Jorge Ortiz jorge.or...@gmail.com wrote:
Not to beat a dead horse, but... what's the rationale, again, for
   throwing
an exception after boot? Is there a real danger to some or all
 RulesSeqs
being mutable after boot? If some, then those rules should
 selectively be
protected. Even if they're all dangerous, there are better (i.e.,
 type
   safe)
ways of protecting RulesSeqs from mutation than just throwing an
   exception.
 
   This was actually DPP's suggestion. I'm not sure why would someone
   mutate them after boot but I'm totally opened if there is a strong
   case for allowing that. I do not have strong feelings about this so
   changing it would be trivial. Still I kind of like it this way. What
   other ways of protecting mutations after boot are you referring? ...
   something like ignore it and do nothing?
 
  Hmm, how about locking them by havign a paralell lazy val?
 
  val somePf : RuleSeq = Nil;
 
  lazy val runtimeSomePf = somePf.toList
 
  Then prepending/appending on the somePf AFTER runtimeSomePf has been
  dereferenced won't make a difference.
  (runtimeSomePf would be used by Lift internally if that isn't clear
 enough
  :) )

 Still we'd allow useless strong references on those lists.

 
  Or another, perhaps more suitable suggestion:
 
  make boot() have an InitializationContext parameter that's only available
 in
  the scope of boot, and then the problem should disappear?

 How would the problem disappear? ... I mean after boot people would
 still be able to add their functions (from API perspective) and they
 would be surprised that their functions are not called and yet lift
 just allowed them to do that.



I meant something like:

def boot(val lc : LiftContext) =
{
 //prepend/append,configure everything on lc
}


And then when the LiftFilter runt boot:

{
   val lc = LiftContext(/*servletContext and stuff goes here*/)
   boot(lc)
   LiftRules.init(lc)
}

And then only have non-append/prependable stuff in LiftRules?




But really, what is it a problem that lift is reconfigurable during runtime?
I thought that was kind of cool?

Cheers,
Viktor





 
  Cheers,
  Viktor
 
 
 
 
 
Nit-pick: why is 'toList' (which just returns 'rules') defined as
private[http] when 'rules' itself is public?
 
   Why would you use toList in the lift app code? ...RulesSeq is mainly
   about adding user functions to lift. If rules itself is public
   doesn't necessary mean that it should not have its private logic.
 
Also, if RulesSeq are always made up of either Functions or
PartialFunctions, maybe we should enforce that at a type level, and
 the
helper methods on Seqs of PFs that now exist in the NamedPF object
 can be
put in the RulesSeq object.
 
   But what would be the benefit? .. except that it would simplify a bit
   how Lift calls these PF's?
 
   ... to me distinguishing between functions and partial functions here
   by using Either or even using different RulesSeq traits would not
   bring much benefits ... but I hope I'm wrong.
 
--j
 
On Sat, Dec 13, 2008 at 2:31 PM, Marius marius.dan...@gmail.com
 wrote:
 
 All,
 
 I committed a bunch of changes in LiftRules. In a previous thread
 Jorge suggested the abstraction of LiftRules variables. Lists of
 functions are now abstracted by RulesSeq trait, which contains
 prepend
 and append functions. Note that if you're calling prepend/append
 functions after boot they will throw an exception. If there are
 compelling reasons not to do this please let us know. This is just
 a
 mechanism to enforce the use of these functions on startup.
 
 Br's,
 Marius
 
  --
  Viktor Klang
  Senior Systems Analyst
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-14 Thread Viktor Klang
On Sun, Dec 14, 2008 at 12:54 PM, Marius marius.dan...@gmail.com wrote:




 On Dec 14, 12:53 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  On Sun, Dec 14, 2008 at 11:42 AM, Marius marius.dan...@gmail.com
 wrote:
 
   On Dec 14, 12:10 pm, Viktor Klang viktor.kl...@gmail.com wrote:
On Sun, Dec 14, 2008 at 9:28 AM, Marius marius.dan...@gmail.com
 wrote:
 
 On Dec 14, 3:02 am, Jorge Ortiz jorge.or...@gmail.com wrote:
  Not to beat a dead horse, but... what's the rationale, again, for
 throwing
  an exception after boot? Is there a real danger to some or all
   RulesSeqs
  being mutable after boot? If some, then those rules should
   selectively be
  protected. Even if they're all dangerous, there are better (i.e.,
   type
 safe)
  ways of protecting RulesSeqs from mutation than just throwing an
 exception.
 
 This was actually DPP's suggestion. I'm not sure why would someone
 mutate them after boot but I'm totally opened if there is a strong
 case for allowing that. I do not have strong feelings about this so
 changing it would be trivial. Still I kind of like it this way.
 What
 other ways of protecting mutations after boot are you referring?
 ...
 something like ignore it and do nothing?
 
Hmm, how about locking them by havign a paralell lazy val?
 
val somePf : RuleSeq = Nil;
 
lazy val runtimeSomePf = somePf.toList
 
Then prepending/appending on the somePf AFTER runtimeSomePf has been
dereferenced won't make a difference.
(runtimeSomePf would be used by Lift internally if that isn't clear
   enough
:) )
 
   Still we'd allow useless strong references on those lists.
 
Or another, perhaps more suitable suggestion:
 
make boot() have an InitializationContext parameter that's only
 available
   in
the scope of boot, and then the problem should disappear?
 
   How would the problem disappear? ... I mean after boot people would
   still be able to add their functions (from API perspective) and they
   would be surprised that their functions are not called and yet lift
   just allowed them to do that.
 
  I meant something like:
 
  def boot(val lc : LiftContext) =
  {
   //prepend/append,configure everything on lc
 
  }
 
  And then when the LiftFilter runt boot:
 
  {
 val lc = LiftContext(/*servletContext and stuff goes here*/)
 boot(lc)
 LiftRules.init(lc)
 
  }
 
  And then only have non-append/prependable stuff in LiftRules?
 
  But really, what is it a problem that lift is reconfigurable during
 runtime?
  I thought that was kind of cool?

 As I said I don't have strong opinions on this. It was DPP's
 suggestion and personally I kind of like it which does not mean that
 things can not change :) ... AFAIC reconfiguration at runtime does not
 make a whole lot of sense because:

 1. We'd have to expose other functions to allow people to also remove
 their function not only prepend  append them
 2. I do not see what kinds of problems runtime reconfiguration really
 solve (I'm only referring on the current RulesSeq members). I haven't
 encounter a practical need but if you have please let me know.
 3. Dynamic behavior can happen inside user's functions without
 allowing runtime reconfiguration.

 Just my 2 cents ...

 P.S.
 If the general consensus is to remove this restriction I have no
 problem removing it ... so more thoughts/perspectives on this are
 welcomed.



I have no opinion, I'm just offering solutions :)







 
  Cheers,
  Viktor
 
 
 
 
 
Cheers,
Viktor
 
  Nit-pick: why is 'toList' (which just returns 'rules') defined as
  private[http] when 'rules' itself is public?
 
 Why would you use toList in the lift app code? ...RulesSeq is
 mainly
 about adding user functions to lift. If rules itself is public
 doesn't necessary mean that it should not have its private logic.
 
  Also, if RulesSeq are always made up of either Functions or
  PartialFunctions, maybe we should enforce that at a type level,
 and
   the
  helper methods on Seqs of PFs that now exist in the NamedPF
 object
   can be
  put in the RulesSeq object.
 
 But what would be the benefit? .. except that it would simplify a
 bit
 how Lift calls these PF's?
 
 ... to me distinguishing between functions and partial functions
 here
 by using Either or even using different RulesSeq traits would not
 bring much benefits ... but I hope I'm wrong.
 
  --j
 
  On Sat, Dec 13, 2008 at 2:31 PM, Marius marius.dan...@gmail.com
 
   wrote:
 
   All,
 
   I committed a bunch of changes in LiftRules. In a previous
 thread
   Jorge suggested the abstraction of LiftRules variables. Lists
 of
   functions are now abstracted by RulesSeq trait, which contains
   prepend
   and append functions. Note that if you're calling
 prepend/append
   functions after boot they will throw an exception. If there are
   compelling reasons not to do

[Lift] Re: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-14 Thread Viktor Klang
On Sun, Dec 14, 2008 at 9:28 AM, Marius marius.dan...@gmail.com wrote:




 On Dec 14, 3:02 am, Jorge Ortiz jorge.or...@gmail.com wrote:
  Not to beat a dead horse, but... what's the rationale, again, for
 throwing
  an exception after boot? Is there a real danger to some or all RulesSeqs
  being mutable after boot? If some, then those rules should selectively be
  protected. Even if they're all dangerous, there are better (i.e., type
 safe)
  ways of protecting RulesSeqs from mutation than just throwing an
 exception.

 This was actually DPP's suggestion. I'm not sure why would someone
 mutate them after boot but I'm totally opened if there is a strong
 case for allowing that. I do not have strong feelings about this so
 changing it would be trivial. Still I kind of like it this way. What
 other ways of protecting mutations after boot are you referring? ...
 something like ignore it and do nothing?


Hmm, how about locking them by havign a paralell lazy val?

val somePf : RuleSeq = Nil;

lazy val runtimeSomePf = somePf.toList

Then prepending/appending on the somePf AFTER runtimeSomePf has been
dereferenced won't make a difference.
(runtimeSomePf would be used by Lift internally if that isn't clear enough
:) )


Or another, perhaps more suitable suggestion:

make boot() have an InitializationContext parameter that's only available in
the scope of boot, and then the problem should disappear?

Cheers,
Viktor





 
  Nit-pick: why is 'toList' (which just returns 'rules') defined as
  private[http] when 'rules' itself is public?

 Why would you use toList in the lift app code? ...RulesSeq is mainly
 about adding user functions to lift. If rules itself is public
 doesn't necessary mean that it should not have its private logic.

 
  Also, if RulesSeq are always made up of either Functions or
  PartialFunctions, maybe we should enforce that at a type level, and the
  helper methods on Seqs of PFs that now exist in the NamedPF object can be
  put in the RulesSeq object.

 But what would be the benefit? .. except that it would simplify a bit
 how Lift calls these PF's?

 ... to me distinguishing between functions and partial functions here
 by using Either or even using different RulesSeq traits would not
 bring much benefits ... but I hope I'm wrong.



 
  --j
 
  On Sat, Dec 13, 2008 at 2:31 PM, Marius marius.dan...@gmail.com wrote:
 
   All,
 
   I committed a bunch of changes in LiftRules. In a previous thread
   Jorge suggested the abstraction of LiftRules variables. Lists of
   functions are now abstracted by RulesSeq trait, which contains prepend
   and append functions. Note that if you're calling prepend/append
   functions after boot they will throw an exception. If there are
   compelling reasons not to do this please let us know. This is just a
   mechanism to enforce the use of these functions on startup.
 
   Br's,
   Marius
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-14 Thread Viktor Klang
David,

sounds reasonable.

So being able to call prepend/append after boot() makes no sense.

In the light of htis, it shouldn't be possible to call the prepend/append
outside of boot.
I suggest my approach described previously. (Injecting an initialization
context into boot and use that to configure LiftRules, then we don't expose
the mutativity in LiftRules.
Result: No runtime exceptions, no confusion on when to configure the webapp
etc.

Input?

Cheers,
Viktor

On Sun, Dec 14, 2008 at 3:41 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,

 I have not had a single instance of wanting to change global application
 behavior at runtime.  I cannot think of use case for such a feature.

 On the other hand, the idea that your program behavior is stable from the
 first HTTP request on makes a lot of sense to me.  It means tests work
 because the tests don't have to worry about the behavior of the program
 changing.  The same n steps will lead to the same result.

 If anyone can come up with a use case for globally changing program
 behavior during program execution, I'm all ears, but barring that, once the
 boot phase is over, the stuff in LiftRules should be frozen.

 Thanks,

 David



 On Sun, Dec 14, 2008 at 3:54 AM, Marius marius.dan...@gmail.com wrote:




 On Dec 14, 12:53 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  On Sun, Dec 14, 2008 at 11:42 AM, Marius marius.dan...@gmail.com
 wrote:
 
   On Dec 14, 12:10 pm, Viktor Klang viktor.kl...@gmail.com wrote:
On Sun, Dec 14, 2008 at 9:28 AM, Marius marius.dan...@gmail.com
 wrote:
 
 On Dec 14, 3:02 am, Jorge Ortiz jorge.or...@gmail.com wrote:
  Not to beat a dead horse, but... what's the rationale, again,
 for
 throwing
  an exception after boot? Is there a real danger to some or all
   RulesSeqs
  being mutable after boot? If some, then those rules should
   selectively be
  protected. Even if they're all dangerous, there are better
 (i.e.,
   type
 safe)
  ways of protecting RulesSeqs from mutation than just throwing an
 exception.
 
 This was actually DPP's suggestion. I'm not sure why would someone
 mutate them after boot but I'm totally opened if there is a strong
 case for allowing that. I do not have strong feelings about this
 so
 changing it would be trivial. Still I kind of like it this way.
 What
 other ways of protecting mutations after boot are you referring?
 ...
 something like ignore it and do nothing?
 
Hmm, how about locking them by havign a paralell lazy val?
 
val somePf : RuleSeq = Nil;
 
lazy val runtimeSomePf = somePf.toList
 
Then prepending/appending on the somePf AFTER runtimeSomePf has been
dereferenced won't make a difference.
(runtimeSomePf would be used by Lift internally if that isn't clear
   enough
:) )
 
   Still we'd allow useless strong references on those lists.
 
Or another, perhaps more suitable suggestion:
 
make boot() have an InitializationContext parameter that's only
 available
   in
the scope of boot, and then the problem should disappear?
 
   How would the problem disappear? ... I mean after boot people would
   still be able to add their functions (from API perspective) and they
   would be surprised that their functions are not called and yet lift
   just allowed them to do that.
 
  I meant something like:
 
  def boot(val lc : LiftContext) =
  {
   //prepend/append,configure everything on lc
 
  }
 
  And then when the LiftFilter runt boot:
 
  {
 val lc = LiftContext(/*servletContext and stuff goes here*/)
 boot(lc)
 LiftRules.init(lc)
 
  }
 
  And then only have non-append/prependable stuff in LiftRules?
 
  But really, what is it a problem that lift is reconfigurable during
 runtime?
  I thought that was kind of cool?

 As I said I don't have strong opinions on this. It was DPP's
 suggestion and personally I kind of like it which does not mean that
 things can not change :) ... AFAIC reconfiguration at runtime does not
 make a whole lot of sense because:

 1. We'd have to expose other functions to allow people to also remove
 their function not only prepend  append them
 2. I do not see what kinds of problems runtime reconfiguration really
 solve (I'm only referring on the current RulesSeq members). I haven't
 encounter a practical need but if you have please let me know.
 3. Dynamic behavior can happen inside user's functions without
 allowing runtime reconfiguration.

 Just my 2 cents ...

 P.S.
 If the general consensus is to remove this restriction I have no
 problem removing it ... so more thoughts/perspectives on this are
 welcomed.



 
  Cheers,
  Viktor
 
 
 
 
 
Cheers,
Viktor
 
  Nit-pick: why is 'toList' (which just returns 'rules') defined
 as
  private[http] when 'rules' itself is public?
 
 Why would you use toList in the lift app code? ...RulesSeq is
 mainly
 about adding user functions to lift. If rules itself is public

[Lift] Re: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-14 Thread Viktor Klang
On Sun, Dec 14, 2008 at 4:01 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Sun, Dec 14, 2008 at 6:51 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 David,

 sounds reasonable.

 So being able to call prepend/append after boot() makes no sense.

 In the light of htis, it shouldn't be possible to call the prepend/append
 outside of boot.
 I suggest my approach described previously. (Injecting an initialization
 context into boot and use that to configure LiftRules, then we don't expose
 the mutativity in LiftRules.
 Result: No runtime exceptions, no confusion on when to configure the
 webapp etc.


 I have no idea what this means or how to translate it into code.  Can you
 give me an example of code that injects an initialization context into
 boot?



class Boot
{
   def boot(val lc: LiftConfig) =
   {
  add all configuration to LiftConfig
   }
}

and then in the code that lookups, creates and calls Boot.boot (haven't got
access to the repository on this machine)

just add/modify the code in the bootstrap loader:

{
 val boot = ...//Lookup and create Boot instance
 val lc = LiftConfig() //(1)
 boot.boot(lc) //(2)
 LiftRules.init(lc) //(3)
}

(1) : Must create LiftConfig (this object is the placeholder of the
configuration=
(2) : Pass it into the boot-call
(3) : Initialize LiftRules with the configuration prepared by the boot-call

result:

No need to expose mutability in LiftRules (since we discovered that changing
stuff while the webserver was up and running had few applications at best)

More clear now?

Remeber that this is only a friendly suggestion to an issue brought up by
someone else in this thread.
If such suggestions are superflous, please just tell me so and I'll keep my
trap shut.


Cheers,
Viktor






 Input?

 Cheers,
 Viktor

 On Sun, Dec 14, 2008 at 3:41 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 I have not had a single instance of wanting to change global application
 behavior at runtime.  I cannot think of use case for such a feature.

 On the other hand, the idea that your program behavior is stable from the
 first HTTP request on makes a lot of sense to me.  It means tests work
 because the tests don't have to worry about the behavior of the program
 changing.  The same n steps will lead to the same result.

 If anyone can come up with a use case for globally changing program
 behavior during program execution, I'm all ears, but barring that, once the
 boot phase is over, the stuff in LiftRules should be frozen.

 Thanks,

 David



 On Sun, Dec 14, 2008 at 3:54 AM, Marius marius.dan...@gmail.com wrote:




 On Dec 14, 12:53 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  On Sun, Dec 14, 2008 at 11:42 AM, Marius marius.dan...@gmail.com
 wrote:
 
   On Dec 14, 12:10 pm, Viktor Klang viktor.kl...@gmail.com wrote:
On Sun, Dec 14, 2008 at 9:28 AM, Marius marius.dan...@gmail.com
 wrote:
 
 On Dec 14, 3:02 am, Jorge Ortiz jorge.or...@gmail.com
 wrote:
  Not to beat a dead horse, but... what's the rationale, again,
 for
 throwing
  an exception after boot? Is there a real danger to some or all
   RulesSeqs
  being mutable after boot? If some, then those rules should
   selectively be
  protected. Even if they're all dangerous, there are better
 (i.e.,
   type
 safe)
  ways of protecting RulesSeqs from mutation than just throwing
 an
 exception.
 
 This was actually DPP's suggestion. I'm not sure why would
 someone
 mutate them after boot but I'm totally opened if there is a
 strong
 case for allowing that. I do not have strong feelings about this
 so
 changing it would be trivial. Still I kind of like it this way.
 What
 other ways of protecting mutations after boot are you referring?
 ...
 something like ignore it and do nothing?
 
Hmm, how about locking them by havign a paralell lazy val?
 
val somePf : RuleSeq = Nil;
 
lazy val runtimeSomePf = somePf.toList
 
Then prepending/appending on the somePf AFTER runtimeSomePf has
 been
dereferenced won't make a difference.
(runtimeSomePf would be used by Lift internally if that isn't
 clear
   enough
:) )
 
   Still we'd allow useless strong references on those lists.
 
Or another, perhaps more suitable suggestion:
 
make boot() have an InitializationContext parameter that's only
 available
   in
the scope of boot, and then the problem should disappear?
 
   How would the problem disappear? ... I mean after boot people would
   still be able to add their functions (from API perspective) and they
   would be surprised that their functions are not called and yet lift
   just allowed them to do that.
 
  I meant something like:
 
  def boot(val lc : LiftContext) =
  {
   //prepend/append,configure everything on lc
 
  }
 
  And then when the LiftFilter runt boot:
 
  {
 val lc = LiftContext(/*servletContext and stuff goes here*/)
 boot(lc)
 LiftRules.init(lc)
 
  }
 
  And then only

[Lift] Re: *** MAJOR BREAKING CHANGES *** LiftRules abstractions

2008-12-15 Thread Viktor Klang
On Sun, Dec 14, 2008 at 10:46 PM, Marius marius.dan...@gmail.com wrote:


 So LiftConfig would take the role of LiftRules from API perspective
 meaning that LiftRules could be completely hidden from Lift users but
 available internally to Lift only ?


Since LiftRules would then only expose immutable data, I'd see no problem
exposing it if there is value in exposing it.
But keeping it private is a very viable strategy.




 Still from maintainability perspective initializing LifRules with a
 LiftConfig may imply lots of assignments (unless LiftRules will
 reference a LiftConfig in which case LiftRules code needs to change to
 use LiftConfig) or when we'd want to expose some new stuff we'd have
 to add it in two different places LiftConfig toexpose it to users and
 LiftRules so that Lift code to use that.


Yes, there'd be quite a few assignments, but with a nifty unit test you
could secure that everything is used properly.

Cheers,
Viktor




 Otherwise not a bad idea ...

 Br's,
 Marius

 On Dec 14, 5:21 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  On Sun, Dec 14, 2008 at 4:01 PM, David Pollak 
 feeder.of.the.be...@gmail.com
 
 
 
   wrote:
 
   On Sun, Dec 14, 2008 at 6:51 AM, Viktor Klang viktor.kl...@gmail.com
 wrote:
 
   David,
 
   sounds reasonable.
 
   So being able to call prepend/append after boot() makes no sense.
 
   In the light of htis, it shouldn't be possible to call the
 prepend/append
   outside of boot.
   I suggest my approach described previously. (Injecting an
 initialization
   context into boot and use that to configure LiftRules, then we don't
 expose
   the mutativity in LiftRules.
   Result: No runtime exceptions, no confusion on when to configure the
   webapp etc.
 
   I have no idea what this means or how to translate it into code.  Can
 you
   give me an example of code that injects an initialization context into
   boot?
 
  class Boot
  {
 def boot(val lc: LiftConfig) =
 {
add all configuration to LiftConfig
 }
 
  }
 
  and then in the code that lookups, creates and calls Boot.boot (haven't
 got
  access to the repository on this machine)
 
  just add/modify the code in the bootstrap loader:
 
  {
   val boot = ...//Lookup and create Boot instance
   val lc = LiftConfig() //(1)
   boot.boot(lc) //(2)
   LiftRules.init(lc) //(3)
 
  }
 
  (1) : Must create LiftConfig (this object is the placeholder of the
  configuration=
  (2) : Pass it into the boot-call
  (3) : Initialize LiftRules with the configuration prepared by the
 boot-call
 
  result:
 
  No need to expose mutability in LiftRules (since we discovered that
 changing
  stuff while the webserver was up and running had few applications at
 best)
 
  More clear now?
 
  Remeber that this is only a friendly suggestion to an issue brought up by
  someone else in this thread.
  If such suggestions are superflous, please just tell me so and I'll keep
 my
  trap shut.
 
  Cheers,
  Viktor
 
 
 
 
 
   Input?
 
   Cheers,
   Viktor
 
   On Sun, Dec 14, 2008 at 3:41 PM, David Pollak 
   feeder.of.the.be...@gmail.com wrote:
 
   Folks,
 
   I have not had a single instance of wanting to change global
 application
   behavior at runtime.  I cannot think of use case for such a feature.
 
   On the other hand, the idea that your program behavior is stable from
 the
   first HTTP request on makes a lot of sense to me.  It means tests
 work
   because the tests don't have to worry about the behavior of the
 program
   changing.  The same n steps will lead to the same result.
 
   If anyone can come up with a use case for globally changing program
   behavior during program execution, I'm all ears, but barring that,
 once the
   boot phase is over, the stuff in LiftRules should be frozen.
 
   Thanks,
 
   David
 
   On Sun, Dec 14, 2008 at 3:54 AM, Marius marius.dan...@gmail.com
 wrote:
 
   On Dec 14, 12:53 pm, Viktor Klang viktor.kl...@gmail.com wrote:
On Sun, Dec 14, 2008 at 11:42 AM, Marius marius.dan...@gmail.com
 
   wrote:
 
 On Dec 14, 12:10 pm, Viktor Klang viktor.kl...@gmail.com
 wrote:
  On Sun, Dec 14, 2008 at 9:28 AM, Marius 
 marius.dan...@gmail.com
   wrote:
 
   On Dec 14, 3:02 am, Jorge Ortiz jorge.or...@gmail.com
   wrote:
Not to beat a dead horse, but... what's the rationale,
 again,
   for
   throwing
an exception after boot? Is there a real danger to some or
 all
 RulesSeqs
being mutable after boot? If some, then those rules should
 selectively be
protected. Even if they're all dangerous, there are better
   (i.e.,
 type
   safe)
ways of protecting RulesSeqs from mutation than just
 throwing
   an
   exception.
 
   This was actually DPP's suggestion. I'm not sure why would
   someone
   mutate them after boot but I'm totally opened if there is a
   strong
   case for allowing that. I do not have strong feelings about
 this
   so
   changing it would be trivial. Still I kind of like

[Lift] Re: liftweb xml schema location

2008-12-17 Thread Viktor Klang
Ah, I read I have a client doesn't want an external link* like*
  xmlns:lift=http://liftweb.net/;

If you're only talking about that namespace declaration, it's just as David
says, just a namespace declaration.

/Viktor

On Wed, Dec 17, 2008 at 1:29 PM, David Bernard
david.bernard...@gmail.comwrote:


 It's not an external link nor a link to a schema but the definition of
 a namespace : lift

 On Wed, Dec 17, 2008 at 10:07, Oliver Lambert ola...@gmail.com wrote:
  Don't I need the xsd or dtd specification?
  On 17/12/2008, at 7:50 PM, Viktor Klang wrote:
 
  Why not just add a hosts entry and redirect that host to an internal
  machine?
 
  On Wed, Dec 17, 2008 at 7:26 AM, Oliver ola...@gmail.com wrote:
 
  I have a client doesn't want an external link like
  xmlns:lift=http://liftweb.net/;
  Can I store the schema locally? How do I get it?
 
  cheers
  Oliver
 
 
 
 
 
  --
  Viktor Klang
  Senior Systems Analyst
 
 
 
 
 
  
 

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Can or Box or something else

2008-12-28 Thread Viktor Klang
Wonderful :)

On Sun, Dec 28, 2008 at 4:03 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Good points.  I'll make the changes today and check up the code.  It'll be
 massive code breakage... but for a good reason.


 On Sun, Dec 28, 2008 at 6:41 AM, Tim Perrett he...@timperrett.com wrote:


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

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

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

 personal_opinion

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

 == Can

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

 == Box

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

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

 /personal_opinion

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

 Cheers, Tim








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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: pom.xml

2008-12-30 Thread Viktor Klang
   -DartifactId=lift-webkit  -Dversion=0.10-SNAPSHOT
  -Dpackaging=jar
   -Dfile=/path/to/file
 
   Alternatively,  if  you  host  your  own
  repository  you
   deploy  the
   file  there:
   mvn  deploy:deploy-file
  -DgroupId=net.liftweb
   -DartifactId=lift-webkit  -Dversion=0.10-SNAPSHOT
  -Dpackaging=jar
   -Dfile=/path/to/file  -Durl=[url]
  -DrepositoryId=[id]
 
   Path  to  dependency:
   1)
  com.xxx:yyy-app:war:0.10-SNAPSHOT
   2)
  net.liftweb:lift-webkit:jar:0.10-SNAPSHOT
 
   --
   1  required  artifact  is  missing.
 
   Chas.
 
 
 
 
   
 
 
 
 
   

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Scala 2.7.3 and Lift testing

2009-01-13 Thread Viktor Klang
PRAISE THE LORD!


On Tue, Jan 13, 2009 at 5:09 AM, TylerWeir tyler.w...@gmail.com wrote:


 That's good news, or at least the precursor to good news.



 On Jan 12, 8:21 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
 
  I've been running tests all day long creating and destroying Lift
 sessions
  (Lift sessions have Actors and the 2.7.2 reference retention was causing
 Out
  of Memory Errors.)
 
  So far, the session/Actor creation and destruction process has been
 working
  perfectly and there's no memory use growth.  I'm cautiously optimistic
 and
  will give a further update tomorrow around 9am PST.
 
  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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [ANN] Lift 0.10

2009-01-14 Thread Viktor Klang
Awesome guys! Simply and stunningly awesome!

On Thu, Jan 15, 2009 at 2:57 AM, Matt Harrington mbh.li...@gmail.comwrote:


 Hats Off to you all.  Looking forward to 1.0 and the books!

 Matt

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: jQuery 1.3

2009-01-19 Thread Viktor Klang
On Mon, Jan 19, 2009 at 11:22 AM, Tim Perrett he...@timperrett.com wrote:

 Awesome Viktor,

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


I had to replace this.props with jQuery,event.props in the minified
version of 1.3 because I had FireBug give me a JavaScript error on the
fix(e) - function
Considering this, it should be a drop-in replacement (there might be some
quirks to churn out, but they are listed in the release docs).

I highly recommend the new live(trigger,func) and die(trigger,func)
system. (really speeds up ajax/comet content refreshes, from my
observations).

Who did the jQuery API integration? DaveB or Marius?

Cheers,
Viktor



 Cheers, Tim

 Sent from my iPhone

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

 Hey guys!

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

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

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

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

 cheers,

 --
 Viktor Klang
 Senior Systems Analyst



 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Firefox issue: anybody seen this?

2009-01-19 Thread Viktor Klang
Greetings mr Biggs,

I would humbly suggest using Tools-Clear private data-mark Cache only
and then press Clear private data now
Then Refresh the page.

I've been running into weird firefox caching issues since upgrading to FF 3.

(This may or may not help)

Also, try doing a view source and copy-n-paste the jquery.js URI into a
new tab and see if it gets served.

cheers,
Viktor

On Mon, Jan 19, 2009 at 4:52 PM, E. Biggs tacoban...@gmail.com wrote:


 Hello,

 So I'm getting an error on liftajax.js() [Line 110]  in firefox saying
 jQuery is not defined.

 I'm puzzled because it works just fine safari, and the AJAX Samples on
 demo.liftweb.net works fine for me in firefox - and the order the
 scripts are included in the head are the same as my code... namely
 jQuery is included before liftajax.

 I even went to /classpath/jquery.js  to make sure it was getting
 served (which seemed redundant since it works fine in safari) and
 indeed jetty served the js up just fine.

 Anybody encounter this or have any ideas?

 Thanks

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Additions to JqJsCmds

2009-01-21 Thread Viktor Klang
replaceWith works well with div but can sometimes choke on span if the
span is not closed correctly.

My solution was:

Send the attributes you want for the specified element, then alongside of
it, include what contents you'd like that element to have. (This gives the
effects of replaceWith, but without the possibility to cahnge tag-types)

consider:

div id='X'Foo/div

now, if the server'd like to make that div not displayed and make it contain
'Bar' instead, it'd send something that'd evaluate to something similar to
the following:

$(# + upd.update['id']).css('display','none').html('Bar')

I hope I make _any_ sense, I'm high on caffeine and am stressed like a
shaved pig.

/Viktor

On Wed, Jan 21, 2009 at 2:13 PM, Joachim A. wallaby.po...@googlemail.comwrote:


 Viktor,
 thanks for your note about IE6 and 7 so I'll avoid replacing tables, etc.
 Without IE the IT world would be better place ;)

 Did ReplaceWith work well for things like div and span?

 (I just noticed net.liftweb.http.js.jquery.JqJE.JqRemove, so Remove is
 already
 available.)

 Joachim

  My experience with replaceWith has been troublesome at best.
  IE6 (and in some cases IE7) crashes when trying to replace certain
  elements.
 
  I was able to work around it by only replacing the contents of ceertain
  elements.
  (TR, TABLE, THEAD etc cause intermittent IE6 crashes when replaced)




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: [ANN] Beginning Scala by David Pollak (published by APress)

2009-01-21 Thread Viktor Klang
Wonderful, David!

:)

Cheers!

Viktor

On Wed, Jan 21, 2009 at 7:15 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,

 I'm writing *Beginning Scala* for APress.  It should be out by JavaOne.

 Thanks,

 David

 PS -- My blog post about it:
 http://blog.lostlake.org/index.php?/archives/88-Announcing-Beginning-Scala.html

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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Jorge's birthday ...

2009-01-30 Thread Viktor Klang
Grattis på födelsedagen!

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

 Bon Anniversaire


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


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

 HAPPY BIRTHDAY MAN !

 Br's,
 Marius



 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: JTA showSQL

2009-02-10 Thread Viktor Klang
Otherwise you can enable it in the logging:

log4j.logger.org.hibernate.SQL=DEBUG

On Tue, Feb 10, 2009 at 7:50 AM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Interesting idea. I'll look into adding something like this (configurable
 at boot and/or runtime) into scalajpa.

 Derek


 On 2/9/09, Oliver ola...@gmail.com wrote:


 Hi Derek and interested parties

 I know there is a showSQL option that can be enabled with
 JTA/Hibernate but I find the output verbose and uninformative about
 parameter replacement.

 So, I have my own ScalaQuery that allows simple debugging - the main
 differences are -

 var queryParams: List[Pair[String,Any]] = Nil
/*  the following method needs to be called by the various
 SetParameter methods */
 def addParam(one: String,two: Any) = {
 query.setParameter(one, two)
 queryParams = (one, two) :: queryParams
 }
 /*
  output the query with parameters substitued, for debugging ...
  */
 def getQueryWithParams() = {
 var q = queryStr
 try {
 queryParams.foreach{v =
 var rep = v._2 match {
 case d: Date = '+SUtil.formatDate(d,
 dd/MM/)+'
 case s: String = '+s+'
 case x = if (x==null)  else x.toString
 }
 rep = rep.replaceAll(\\$, ddDollardd) // stupid bug
 q = q.replaceAll(:+v._1, rep)
 }
 q.replaceAll(ddDollardd, \\$)
 } catch {
 case e: Exception = q+ PARAMS +queryParams+  EXCEPTION +e
 }
 }

 With this I can log the query via
   Log.info(emailQuery.getQueryWithParams())

 Better still, (assuming execOnce exists in a utility object) when I
 only need to see the query once in the log
 /*
  execulte execFn, just once for the jvm.
  */
 val execOnceSet = scala.collection.mutable.Set()
 def execOnce(key: String, execFn: = Unit) = {
 if (!execOnceSet.contains(key)) {
 execOnceSet += key
 execFn
 }
 }

   execOnce(findByEmail,  Log.info(emailQuery.getQueryWithParams()) )


 You can add the functionality if you find it useful

 cheers
 Oliver


 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: JTA showSQL

2009-02-10 Thread Viktor Klang
Is there a JPA defined way to turn loggin of DML on?

On Tue, Feb 10, 2009 at 3:45 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Yes, but that only works for Hibernate. I use Hibernate from everything,
 but I'm trying to keep the library usable for any JPA provider.

 Derek

 On 2/10/09, Viktor Klang viktor.kl...@gmail.com wrote:

 Otherwise you can enable it in the logging:

 log4j.logger.org.hibernate.SQL=DEBUG

 On Tue, Feb 10, 2009 at 7:50 AM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 Interesting idea. I'll look into adding something like this (configurable
 at boot and/or runtime) into scalajpa.

 Derek


 On 2/9/09, Oliver ola...@gmail.com wrote:


 Hi Derek and interested parties

 I know there is a showSQL option that can be enabled with
 JTA/Hibernate but I find the output verbose and uninformative about
 parameter replacement.

 So, I have my own ScalaQuery that allows simple debugging - the main
 differences are -

 var queryParams: List[Pair[String,Any]] = Nil
/*  the following method needs to be called by the various
 SetParameter methods */
 def addParam(one: String,two: Any) = {
 query.setParameter(one, two)
 queryParams = (one, two) :: queryParams
 }
 /*
  output the query with parameters substitued, for debugging ...
  */
 def getQueryWithParams() = {
 var q = queryStr
 try {
 queryParams.foreach{v =
 var rep = v._2 match {
 case d: Date = '+SUtil.formatDate(d,
 dd/MM/)+'
 case s: String = '+s+'
 case x = if (x==null)  else x.toString
 }
 rep = rep.replaceAll(\\$, ddDollardd) // stupid bug
 q = q.replaceAll(:+v._1, rep)
 }
 q.replaceAll(ddDollardd, \\$)
 } catch {
 case e: Exception = q+ PARAMS +queryParams+  EXCEPTION
 +e
 }
 }

 With this I can log the query via
   Log.info(emailQuery.getQueryWithParams())

 Better still, (assuming execOnce exists in a utility object) when I
 only need to see the query once in the log
 /*
  execulte execFn, just once for the jvm.
  */
 val execOnceSet = scala.collection.mutable.Set()
 def execOnce(key: String, execFn: = Unit) = {
 if (!execOnceSet.contains(key)) {
 execOnceSet += key
 execFn
 }
 }

   execOnce(findByEmail,  Log.info(emailQuery.getQueryWithParams()) )


 You can add the functionality if you find it useful

 cheers
 Oliver






 --
 Viktor Klang
 Senior Systems Analyst




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: IMPORTANT: Library Upgrades

2009-02-12 Thread Viktor Klang
On Thu, Feb 12, 2009 at 8:00 PM, Joachim A. wallaby.po...@googlemail.comwrote:


 Jorge,
 thanks a lot for that (I especially like the JQuery 1.3.1 update).



Yeah, jQuery 1.31 is an awesome upgrade.
Love working with it :-)




 Is it possible to update to the latest blueprint css version? 0.8 was
 released
 2009-02-06. I noticed some type/font problem in Opera with the version
 shipped
 with Lift.

 Joachim

  I've upgraded the dependencies for all of the Lift components and sample
  projects. I used the latest backward-compatible version that was
 available
  on public Maven repositories. (See below for the complete list.) PLEASE
  CHECK YOUR APPS to make sure nothing breaks. You only have a couple of
  weeks to get bug reports in before our major 1.0 release.

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: IMPORTANT: Library Upgrades

2009-02-12 Thread Viktor Klang
Basically 1.3.x is bringing a new selector engine to the table, plus some
new cool features like live-events and some performance-tweaks with html()
etc.
But the release-docs are all up on the nice looking jquery.com site :)

So basically the selector-stuff will be faster in the general app. :)
The good thing is that the performance on IE6 ( which unfortunately still
has not been put out of it's misery ) has been improved.

Cheers,
Viktor

On Thu, Feb 12, 2009 at 8:34 PM, Tim Perrett he...@timperrett.com wrote:


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

 Cheers

 Tim
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: thanks

2009-02-13 Thread Viktor Klang
On Fri, Feb 13, 2009 at 12:55 AM, Jorge Ortiz jorge.or...@gmail.com wrote:



 On Thu, Feb 12, 2009 at 2:54 PM, Oliver ola...@gmail.com wrote:


 Thanks for all the help and support over the last few months. During
 that time, I've developed several
 Lift applications that are now successfully running in production at
 the company I work for.

 One of the things that has impressed me is the community spirit of the
 group.  I've had pretty much
 all my questions answered and problems fixed very quickly. This gave
 me confidence to push the
 adoption of the framework.

 I haven't always agreed with some of the design decisions in Lift, but
 that's true of any framework. I bet
 even a framework founder doesn't like everything about it.  Anyway
 sometimes programmers have to agree
 to disagree.

 I now find myself in the position of having to consider Slinky as an
 alternative to Lift. This brings up
 questions in my mind about community, support and maturity.  I'm not
 willing to let go of Lift's
 xhtml templating paradigm, so I can see some interesting discussions
 ahead.


 One of the projects I keep putting off is to extract Lift's templating
 system into a component that could be used as a stand-alone library. If this
 is something you'd be interested in, let me know and I'll try to prioritize
 it.


That'd be quite nifty actually.




 cheers
 Oliver




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: strange interaction with jQuery

2009-02-15 Thread Viktor Klang
How about a defect as a result of upgrading jQuery to 1.3.1?

Viktor,
Rogue Software Architect

15 feb 2009 kl. 14.43 Meredith Gregory lgreg.mered...@gmail.com skrev:

 Marius,

 Agreed on two points:
 JsRaw is not the culprit -- it seems to be a bad interaction with  
 version of JavaScript modules
 JavaScript is the source of the meta problem -- there's no way to  
 get the compiler to warn about this because this world is devoid of  
 useful typing info.
 It would appear that a vast number of web technologies have accepted  
 a programming model proposition that is predicated on typelessness.  
 'This has all happened before and it will happen again.' It looks  
 like i'm going to have to resurrect my rhoscript project.

 Best wishes,

 --greg

 On Sat, Feb 14, 2009 at 2:20 PM, Marius marius.dan...@gmail.com  
 wrote:

 Interesting ...

 When dragging I'm getting a JS error in jquery-ui.js:

 $.Event is not a function ... which appears to cause the odd
 behavior. I'm not sure yet why this error appears. BUt I found that
 this may appear when you have incompatible versions of jquery and
 jquery ui, Perhaps try here?
 http://groups.google.com/group/jquery-ui/browse_thread/thread/8fbe3061bd567e2f/a19f7e874ea48e74?lnk=raot

 I really do not think that JsRaw has anything to do with this. It
 fails even if you have a plain link in the page ... pretty much like
 in the static example.

 I don't think there is a way of detecting such behavioral things at
 compile time.

 Br's,
 Marius

 On Feb 13, 10:38 pm, Meredith Gregory lgreg.mered...@gmail.com
 wrote:
  Lifted,
 
  Attached is a minimal example of a strange interaction between  
 lift and a
  jQuery plugin. If you unzip the example you will find inside the
  liftTestCase directory 5 subdirectories two of which contain  
 behaviors to
  compare. The directory 23 contains an example that is purely  
 jQuery with the
  EasyWidgets plugin. The directory dspace contains a lift-based site.
 
  If you open 23/index.html in a browser you will see a page that  
 allows you
  to add widgets that can be dragged and dropped around. This all  
 works. If
  you cd into dspace and launch mvn jetty:run, sign up, login, then  
 you will
  see a boiled down version of the same thing. The difference is  
 that the
  javascript jQuery call is run as a JsRaw. Everything seems to work  
 except
  you attempt to drag and drop the components. Then you get very weird
  behavior that is easier to see than to describe.
 
  The thing is, we haven't actually done any interesting lift stuff,  
 yet, in
  the boiled down sample. We're just calling into the EasyWidgets  
 function
  just like in the sample. i would expect these two examples to  
 exhibit nearly
  identical behavior. i'm guessing there's some weird interaction  
 between
  lift-included javascript and the jQuery plugin.
 
  Several questions:
 
 - How could we devise a way to check at compile time that there  
 is such
 an interaction? This seems to be a crucial point as the  
 momentum is to use
 third party frontend web components.
 - What is the best way to go about finding the interaction if  
 it has
 escaped compile time detection?
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
   liftTestCase.zip
  407KViewDownload




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

 +1 206.650.3740

 http://biosimilarity.blogspot.com

 

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



[Lift] Re: Fwd: [jquery-dev] Re: Namespace failure

2009-02-16 Thread Viktor Klang
How about adding a class-attribute called gc to everything that's
supposedly collectible?
Then doing a scrape using jQuery(.gc) would be just as feasible.

Would it solve the problem or can it be extended to solve it fully?

On Mon, Feb 16, 2009 at 10:37 PM, David Pollak 
feeder.of.the.be...@gmail.com wrote:



 On Mon, Feb 16, 2009 at 1:36 PM, Jorge Ortiz jorge.or...@gmail.comwrote:

 Can lift:gc be renamed lift_gc until the bug is addressed?


 lift_gc is not a valid attribute in XHTML as far as I know, so browsers
 would reject any element containing that attribute. :-(




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



 On Mon, Feb 16, 2009 at 9:04 AM, Tim Perrett he...@timperrett.comwrote:


 What's the impact overall?


 The impact is: use innerHTML directly rather than going through jQuery's
 HTML re-writing.


 Is this a result of upgrade to JQuery
 1.3.1?


 No.  This is a latent Firefox bug and has to do with how jQuery sanitizes
 HTML.  The problem existed in prior versions of jQuery, but is now an issue
 because of the lift:gc stuff.




 Thanks, Tim

 On Feb 16, 4:51 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Folks,
  It turns out that there are issues with jQuery's methods that
 insert/replace
  HTML and using XHTML on Firefox.  Sigh.
 
  We should be aware of this.  using $(...).html(stuff) will likely
 fail if
  any of the elements in stuff have namespaces.
 
  Sorry.
 
  David
 
  -- Forwarded message --
  From: John Resig jere...@gmail.com
  Date: Sun, Feb 15, 2009 at 8:31 PM
  Subject: [jquery-dev] Re: Namespace failure
  To: jquery-...@googlegroups.com
 
  Anko -
 
  You're welcome to file a bug on XHTML support - let me know when you
  do. I have it penciled in the Roadmap for jQuery 1.4 - but it's going
  to require a lot of work (basic things like innerHTML aren't
  guaranteed to work, for example) - not to mention that things like
  attributes and expandos are handled very differently.
 
  I took some very basic steps of converting our test suite to run under
  the proper mimetype and wasn't terribly pleased with the result (lots
  of failures). I'll definitely revisit it at some point, though. Right
  now the only component guaranteed I'm sure that passes is the selector
  engine. I'd like to have 100% passing in all components for 1.4.
 
  http://dev.jquery.com/browser/trunk/jquery/test/xhtml.php
 
  --John
 
  On Sun, Feb 15, 2009 at 9:24 PM, Anko Painting anko@gmail.com
 wrote:
 
   Is there a ticket associated with this bug? I'm dealing with the
 same
   issue myself.
 
   It's frustrating because i need to serve as application/xhtml+xml so
   that I can put svg on the page.
 
   On Feb 14, 12:52 am, John Resig jere...@gmail.com wrote:
   Correct - you have to do it with the mimetype - which forces it in
 to
   the XML mode where everything becomes 'fun'.
 
   --John
 
   On Fri, Feb 13, 2009 at 9:37 AM, David Zhou da...@nodnod.net
 wrote:
 
   http://media.nodnod.net/test.htmlworksfor me.  Is it because I'm
 not
serving the page as application/xhtml+xml?
 
-- dz
 
On Fri, Feb 13, 2009 at 9:31 AM, Dave Methvin 
 dave.meth...@gmail.com
  wrote:
 
Me too.
 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6)
 Gecko/
2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp




 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890

 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp








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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: uh, oh... can't find classes

2009-02-18 Thread Viktor Klang
Ok, what about this:

Why not have addToPackages take an actual Package?

usage:

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

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

Worth thinking about?

Cheers,
Viktor

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


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

 Chas.

 Jean-Luc wrote:
  Is your LiftRules defined according to your snippet package ?
 
  Exemple of addToPackages rule for snippets in org.ansoft.myapp.snippet
  package :
  LiftRules.addToPackages(org.ansoft.myapp)
 
  Jean-Luc
 
  2009/2/18 Charles F. Munat c...@munat.com mailto:c...@munat.com
 
 
  Everything starts fine, but when I try to go to the home page of the
  app, I get this:
 
  XML Parsing Error: prefix not bound to a namespace
  Location: http://localhost:9988/
  Line Number 81, Column 5:  choose:logged_out
  ---^
 
  And this:
 
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(LoginOps.login),Class Not
 Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(Misc.logo),Class Not Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(Menu.navbar),Stateful
 Snippet:
  Dispatch Not Matched)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(Messages),Class Not Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(error_class),Class Not Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(warning_class),Class Not
 Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(notice_class),Class Not
 Found)
 
  Did I screw something up or did I miss an update? Any ideas?
 
  Chas.
 
 
 
 
 
  --
  Jean-Luc Canela
  jlcane...@gmail.com mailto:jlcane...@gmail.com
 
  

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: uh, oh... can't find classes

2009-02-18 Thread Viktor Klang
We could add another method that takes a Package and then deprecate the one
that takes a String?

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



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

 Cheers, Tim

 On Feb 18, 10:38 am, Viktor Klang viktor.kl...@gmail.com wrote:
  Ok, what about this:
 
  Why not have addToPackages take an actual Package?
 
  usage:
 
  addToPackages(com.my.stuff.SomeClass.getPackage) ?
 
  This would prevent stuff from breaking if you refactor/move some classes.
 
  Worth thinking about?
 
  Cheers,
  Viktor
 
  On Wed, Feb 18, 2009 at 10:58 AM, Charles F. Munat c...@munat.com
 wrote:
 
 
 
 
 
   Ah! That was it. Forgot I changed the name of the app, and didn't
 change
   it there. Thanks very much! That saved me a lot of trouble.
 
   Chas.
 
   Jean-Luc wrote:
Is your LiftRules defined according to your snippet package ?
 
Exemple of addToPackages rule for snippets in
 org.ansoft.myapp.snippet
package :
LiftRules.addToPackages(org.ansoft.myapp)
 
Jean-Luc
 
2009/2/18 Charles F. Munat c...@munat.com mailto:c...@munat.com
 
Everything starts fine, but when I try to go to the home page of
 the
app, I get this:
 
XML Parsing Error: prefix not bound to a namespace
Location:http://localhost:9988/
Line Number 81, Column 5:  choose:logged_out
---^
 
And this:
 
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(LoginOps.login),Class Not
   Found)
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(Misc.logo),Class Not
 Found)
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(Menu.navbar),Stateful
   Snippet:
Dispatch Not Matched)
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(Messages),Class Not
 Found)
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(error_class),Class Not
 Found)
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(warning_class),Class Not
   Found)
WARN - Snippet Failure: SnippetFailure(/ -
ParsePath(List(index),,true,false),Full(notice_class),Class Not
   Found)
 
Did I screw something up or did I miss an update? Any ideas?
 
Chas.
 
--
Jean-Luc Canela
jlcane...@gmail.com mailto:jlcane...@gmail.com
 
  --
  Viktor Klang
  Senior Systems Analyst
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Regression!

2009-02-19 Thread Viktor Klang
 at compile time that there
is such an interaction? This seems to be a crucial point as the 
 momentum is
to use third party frontend web components.
- What is the best way to go about finding the interaction if
it has escaped compile time detection?


 Best wishes,

 --greg

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

 +1 206.650.3740

 http://biosimilarity.blogspot.com




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

 +1 206.650.3740

 http://biosimilarity.blogspot.com





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





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

 +1 206.650.3740

 http://biosimilarity.blogspot.com




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

 +1 206.650.3740

 http://biosimilarity.blogspot.com





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





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

 +1 206.650.3740

 http://biosimilarity.blogspot.com





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





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

 +1 206.650.3740

 http://biosimilarity.blogspot.com

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Static pages vs. Lift-served pages

2009-02-19 Thread Viktor Klang
This is configurable in the web.xml

!-- Just an example --
mime-mapping
extensionxsd/extension
mime-typetext/xml/mime-type
/mime-mapping


However, this will not take in consideration that IE blows.

Serving a correct DOCTYPE declaration in combination with omitting the
xml-declaration will put FF, Chrome etc into standardsmode but IE in tag
soup.

As per: http://en.wikipedia.org/wiki/XHTML#DOCTYPEs
XML declaration

A character encoding http://en.wikipedia.org/wiki/Character_encoding may
be specified at the beginning of an XHTML document in the XML declaration
when the document is served using the application/xhtml+xml MIME type. (If
an XML document lacks encoding specification, an XML parser assumes that the
encoding is UTF-8 http://en.wikipedia.org/wiki/UTF-8 or
UTF-16http://en.wikipedia.org/wiki/UTF-16,
unless the encoding has already been determined by a higher protocol.)

For example:
?xml version=1.0 encoding=UTF-8?

The declaration may be optionally omitted because it declares as its
encoding the default encoding. However, if the document instead makes use of
XML 1.1 or another character encoding, a declaration is necessary. Internet
Explorer http://en.wikipedia.org/wiki/Internet_Explorer prior to version 7
enters quirks mode http://en.wikipedia.org/wiki/Quirks_mode if it
encounters an XML declaration in a document served as text/html.


Does this help?


Cheers,

Viktor


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

 Folks,
 There may be differences between statically served pages and Lift served
 pages.  Lift serves pages with application/xhtml+xml Content-Type.  This
 puts browsers like Firefox into a standards mode (rather than the default
 quirks or tag soup mode.)  The same page may look different and/or
 behavior differently between the two modes.

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



[Lift] Re: A round of thanks to Marius for better GC

2009-02-20 Thread Viktor Klang
I unfortunately have been working alot lately and havent had a chance to
check the new GC code out.

Some kind soul who can explain the new solution?

On Fri, Feb 20, 2009 at 4:18 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Great work! I ran into the issue yesterday and today with an update it
 seems to be working fine.

 Derek


 On Thu, Feb 19, 2009 at 7:29 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,
 Marius made some patches to Lift's GC support today.  He removed the
 lift:gc tag so we don't trip over the Firefox namespace issue.

 I've done some initial testing (and made a few minor updates).

 Please do a mvn -U clean install and let us know how well the new code
 works.

 Please also do tests like navigating to a page with form elements on it,
 waiting 45 minutes and then making sure the form can be submitted.

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



[Lift] Re: Removing xmlns:lift=http://liftweb.net/ in rendered page

2009-02-27 Thread Viktor Klang
May I ask why?

Cheers,
Viktor

On Fri, Feb 27, 2009 at 1:23 PM, rossputin rossaj...@gmail.com wrote:


 Hi.

 I am using lift 1.0.  I was hoping to remove the  'xmlns:lift=http://
 liftweb.net/' element from :

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
 www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 html xmlns:lift=http://liftweb.net/; xmlns=http://www.w3.org/1999/
 xhtml

 Thanks.

 Ross.

 On Feb 27, 12:18 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  Hey Ross,
 
  Which element are you referring to? Head items? What version of lift are
 you
  using? (you can find out by looking in pom.xml under the lift-*
  dependencies)
 
  Thanks
 
  Tim
 
  On 27/02/2009 11:36, rossputin rossaj...@gmail.com wrote:
 
 
 
 
 
   Hi.
 
   I must admit I have not worked my way through the book yet, but I was
   wondering if it is possible to remove the xmlns:lift=http://
   liftweb.net/ attribute on the html element in the rendered page?
 
   Thanks.
 
   Ross.

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Testing Help for Oracle?

2009-03-02 Thread Viktor Klang
Doesn't Oracle use Sequences?

On Mon, Mar 2, 2009 at 6:42 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 This sounds like a bug. I'm guessing that you mean the object's primary key
 field isn't updated after save, correct? According to the docs:


 http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/jdbcvers.htm#CHDEGDHJ

 Oracle's driver should support auto-generated keys, which is what we use in
 Mapper. Can you confirm that what I'm saying is what you're seeing?

 Thanks,

 Derek


 On Mon, Mar 2, 2009 at 8:56 AM, radoslaw.holewa radoslaw.hol...@gmail.com
  wrote:


 On 20 Lut, 01:50, Debby Meredith de...@jafco.com wrote:
  Folks,
 
  We're looking for some most excellent people to volunteer to test the
  Oracle 10g JDBC driver in lift-mapper as soon as possible.  Any hands
  going up out there?  Perhaps Greg Meredith, who has a wonderful last
  name if I do say so myself, would like to sign up?  Anyone else?
 
  Thanks in advance!

 Hi,

 I'm using Lift mapper in one of my projects and my database is Oracle
 10g.
 Unfortunately I have some problems with primary keys. After I save my
 object
 it's primary key is not set.
 I tested it with MySQL and H2 database and everything went well.
 So, my question is: do you have any solution for setting primary key
 after object is saved?
 Of course using oracle database :)

 Cheers,
 Radek







 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: chaining servlets

2009-03-02 Thread Viktor Klang
On Mon, Mar 2, 2009 at 8:51 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Lifted, scalads and lasses,

 Does anybody have a working sample of chaining the lift servlet with a 3rd
 party servlet? i'm interested in doing this with the Jersey servlet to get
 some of their request/response rendering support.


This is why we made Lift a Filter :)




 Best wishes,

 --greg

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

 +1 206.650.3740

 http://biosimilarity.blogspot.com

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: [Jersey] jersey as filter

2009-03-03 Thread Viktor Klang
()
 new com.sun.jersey.spi.container.servlet.ServletContainer()
 new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@50b410

 scala res0.getClass
 res0.getClass
 res0.getClass
 res1: java.lang.Class[_ : java.lang.Object] = class
 com.sun.jersey.spi.container.servlet.ServletContainer

 scala res0.getClass.getSuperclass
 res0.getClass.getSuperclass
 res0.getClass.getSuperclass
 res7: java.lang.Class[_ : ?0] = class javax.servlet.http.HttpServlet

 // i was expecting to see WebComponent here

 scala res0.getClass.getInterfaces
 res0.getClass.getInterfaces
 res0.getClass.getInterfaces
 res8: Array[java.lang.Class[_]] = Array(interface
 com.sun.jersey.spi.container.ContainerListener)

 // i was expecting to see Servlet, ServletConfig, Filter, Serializable
 in this list.




 On Mon, Mar 2, 2009 at 5:13 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 My guess would be that you have duplicate servlet-api-2.x.jar in your
 classloading hierarchy... can you check and remove any servlet.jar under
 your webapp WEB-INF/lib directory?

 alex




 On Mon, Mar 2, 2009 at 4:45 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for the interest. See below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app



 On Mon, Mar 2, 2009 at 4:43 PM, Alex Boisvert boisv...@intalio.com
  wrote:

 Can you post your web.xml?



 On Mon, Mar 2, 2009 at 3:50 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Marc,

 Thanks for the link! BTW, i'm looking at that sources from the
 Jersey jar and it appears that
 com.sun.jersey.spi.container.servlet.ServletContainer implements 
 Filter. And
 yet, when i launch with jetty i get:

 2009-03-02 15:46:18.043::WARN:  failed JerseyFilter
 java.lang.IllegalStateException: class
 com.sun.jersey.spi.container.servlet.ServletContainer is not a
 javax.servlet.Filter
 at
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:88)

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 2:16 PM, Marc Hadley 
 marc.had...@sun.comwrote:

 Apache Camel uses Jersey as a filter:


 https://svn.apache.org/repos/asf/camel/trunk/components/camel-web/src/main/webapp/WEB-INF/web.xml

 Marc.


 On Mar 2, 2009, at 4:46 PM, Meredith Gregory wrote:

  Jerseyans,

 Does anyone have any experience with using Jersey as a filter?
 i'd like to take advantage of some of Jersey's Request/Response 
 rendering as
 well as some of Lift's cool stuff. The Lift servlet is a filter 
 and deployed
 as such. i note that the
 com/sun/jersey/spi/container/servlet/ServletContainer implements 
 Filter.
 However, i have yet to find an example of Jersey deployed in a 
 filter
 capacity. If anyone has used Jersey this way, please let me know.

 Best wishes,

 --greg

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

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 -
 To unsubscribe, e-mail: users-unsubscr...@jersey.dev.java.net
 For additional commands, e-mail: users-h...@jersey.dev.java.net




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

 +1 206.650.3740

 http://biosimilarity.blogspot.com








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

 +1 206.650.3740

 http://biosimilarity.blogspot.com








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

 +1 206.650.3740

 http://biosimilarity.blogspot.com








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

 +1 206.650.3740

 http://biosimilarity.blogspot.com








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

 +1 206.650.3740

 http://biosimilarity.blogspot.com




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

 +1 206.650.3740

 http://biosimilarity.blogspot.com

 



-- 
Viktor Klang
Senior Systems Analyst

[Lift] Re: [Jersey] jersey as filter

2009-03-03 Thread Viktor Klang
Greg,

Great, then it was just me finding the wrong API docs online :)


But the real question is: Does it work? :)


Cheers,
Viktor

On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html


 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could try
 something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters.
 See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to 1.0.2
 which is the most recent on the sun repo that is not labeled SNAPSHOT) and 
 i
 get the right values from reflecting (BTW -- has anybody written a little
 lift browser app that hooks into reflection so that one can graphically
 browse the class/instances in memory?). Now i just need to figure out how 
 to
 pass the resources context to Jersey. It's got a config for the
 ServletContainer class, but i don't see anything if i'm just using it as a
 filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the
 scala interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with
 your Maven pom.xml or 2) your local artifacts are inconsistent with what's
 in the repos.

 alex



 On Mon, Mar 2, 2009 at 6:05 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Interesting. Did you build with mvn? If so, what were your
 plugins/dependencies?

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 6:01 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 Greg,

 Something must be messed up in your configuration Here's what I
 get:

 Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Server VM,
 Java 1.6.0_10).
 Type in expressions to have them evaluated.
 Type :help for more information.

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@15cd9a

 scala res0.getClass.getInterfaces
 res2: Array[java.lang.Class[_]] = Array(interface

[Lift] Re: [Jersey] jersey as filter

2009-03-04 Thread Viktor Klang
Greg,

have you tried Jersey completely standalone and verified that it's working?


Cheers,
Viktor

On Wed, Mar 4, 2009 at 12:08 AM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Viktor, et al,

 Well, i've scoped things down to just running the Jersey helloworld-webapp
 sample in jetty with Jersey as the ServletContainer, rather than a Filter.
 Even that is displaying the same behavior where the server is eating the
 requests, but it's not hitting the resource class get method. Frankly, i
 can't see a substantive difference between their sample and the one i've got
 -- apart from swapping out glassfish for jetty.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Viktor,

 The combined servlet is eating http requests, but it's not processing them
 correctly. i'm still not sure about all the Jersey path stuff. i'm the
 process of debugging.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Greg,

 Great, then it was just me finding the wrong API docs online :)


 But the real question is: Does it work? :)


 Cheers,
 Viktor


 On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html




 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could
 try something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters.
 See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to
 1.0.2 which is the most recent on the sun repo that is not labeled 
 SNAPSHOT)
 and i get the right values from reflecting (BTW -- has anybody written a
 little lift browser app that hooks into reflection so that one can
 graphically browse the class/instances in memory?). Now i just need to
 figure out how to pass the resources context to Jersey. It's got a 
 config
 for the ServletContainer class, but i don't see anything if i'm just 
 using
 it as a filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the
 scala interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact

[Lift] Re: url encoded javascript

2009-03-04 Thread Viktor Klang
If you use jQuery it's even simpler:

jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
)

On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll leemighd...@gmail.com wrote:

 Ah, sorry to be so cryptic.  The idea is to create a link containing a
 'javascript:' url that the user can then drag to the browser's bookmark
 bar.  I had something  like this:

 a
 href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src','
 http://foo.com/js/markCurrent.js?marklet=1234');document.getElementsByTagName('head')[0].appendChild(e)})(http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
 )
 Bookmarklet
 /a

 But the script is a little tricky to read and edit in that form, so I
 wanted to programmatically convert it from a more readable version.

 I figured out how to run mvn yui-compressor to remove comments from the
 script.  Then I read the compressed version of the script file in the
 snippet code.   If I were to polish it further, I'd next find a java version
 of encodeUriComponent... but it's probably enough for now.

 Lee


 On Sun, Mar 1, 2009 at 2:48 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Lee,
 If you want to include a JavaScript script on the page, the easiest
 mechanism is:

 import net.liftweb.http._
 import js._
 import JsCmds._
 import JE._

 Script(JsRaw(a String containing the raw script))

 This will create a script tag on the page and put a // ![CDATA[ in it
 followed by your script followed by //]] and the closing /script tag.

 If this is not what you were looking to do, please let us know.

 Thanks,

 David

 On Thu, Feb 26, 2009 at 11:28 AM, Lee Mighdoll leemighd...@gmail.comwrote:

 I'd like to make a bookmarklet snippet.  So I want to take a short
 javascript file, encode it as url, and then include it in a snippet.

 Any suggestions?  Not sure whether to solve this with mvn or lift -- I'm
 new to both.






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




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: [Jersey] jersey as filter

2009-03-04 Thread Viktor Klang
Awesome Greg,
I'm sorry I wasn't of much help :(

On Wed, Mar 4, 2009 at 5:50 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Viktor,

 Thanks for your note. i got things more or less working. See this thread:
 jersey and lift side-by-side + request for link to URL rewrite exampleBest 
 wishes,

 --greg

 On Wed, Mar 4, 2009 at 1:35 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Greg,

 have you tried Jersey completely standalone and verified that it's
 working?


 Cheers,
 Viktor
 - Show quoted text -


 On Wed, Mar 4, 2009 at 12:08 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor, et al,

 Well, i've scoped things down to just running the Jersey
 helloworld-webapp sample in jetty with Jersey as the ServletContainer,
 rather than a Filter. Even that is displaying the same behavior where the
 server is eating the requests, but it's not hitting the resource class get
 method. Frankly, i can't see a substantive difference between their sample
 and the one i've got -- apart from swapping out glassfish for jetty.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 The combined servlet is eating http requests, but it's not processing
 them correctly. i'm still not sure about all the Jersey path stuff. i'm the
 process of debugging.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Greg,

 Great, then it was just me finding the wrong API docs online :)


 But the real question is: Does it work? :)


 Cheers,
 Viktor


 On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang 
 viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html






 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you
 could try something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both
 filters. See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to
 1.0.2 which is the most recent on the sun repo that is not labeled 
 SNAPSHOT)
 and i get the right values from reflecting (BTW -- has anybody 
 written a
 little lift browser app that hooks into reflection so that one can
 graphically browse the class/instances in memory?). Now i just need to
 figure out how to pass the resources context to Jersey. It's got a 
 config
 for the ServletContainer class, but i don't see anything if i'm just 
 using

[Lift] Re: How do you get Jorge's LinkShare Comet example to work?

2009-03-05 Thread Viktor Klang
scarred.by.ie6.com ;)

On Thu, Mar 5, 2009 at 2:55 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 Anyone for registering IEateMyhtml.com ?

 On Thu, Mar 5, 2009 at 6:26 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 - Show quoted text -
 On Wed, Mar 4, 2009 at 10:17 PM, Atsuhiko Yamanaka 
 atsuhiko.yaman...@gmail.com wrote:


 Hi there,

 Please allow me to continue this thread, which nobody may be interested
 in.
 I found a reason(or solution) for that problem.

 On Wed, Mar 4, 2009 at 12:31 PM, Atsuhiko Yamanaka
 atsuhiko.yaman...@gmail.com wrote:
  By the way, I found the problem in running it on IE6/7; I mean that
  the page must not be updated automatically on IE6/7.

 The index.html had following html tags,
  p
lift:comet type=LinkActor
  links:viewLoading.../links:view
/lift:comet
  /p

 I found that, by wrapping lift:comet with div tag, it will works
 well on IE6/7; I mean that
  pdiv
lift:comet type=LinkActor
  links:viewLoading.../links:view
/lift:comet
  /div/p

 You can reproduce a similar phenomenon easily. For example,
 http://demo.liftweb.net/ has
 following tags in src/main/webapp/templates-hidden/default.html,
   div class=widget style=text-align: center
 lift:comet type=ClockCurrent Time: clk:timeMissing
 Clock/clk:time/lift:comet
   /div
 If div is replaced with p, the clock will not be updated on IE6/7.

 Anyway, I think this is not a problem from liftweb.  This is just a
 tips or know-how, which
 we should keep in our mind in using lift:comet.


 Thanks you for this pointer.  I was unaware of IEs breakage when changing
 the contents of a p tag.  Useful knowledge.

 IE does also have a problem with replace of content in td tags
 irrespective of Comet or plain or JavaScript.  One cannot set innerHTML on a
 td tag.  One has to put a span inside the td tag and then change the
 innerHTML of the span.




 Sincerely,
 --
 Atsuhiko Yamanaka
 JCraft,Inc.
 1-14-20 HONCHO AOBA-KU,
 SENDAI, MIYAGI 980-0014 Japan.
 Tel +81-22-723-2150
+1-415-578-3454
 Fax +81-22-224-8773
 Skype callto://jcraft/





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




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Custom Boot Class

2009-03-16 Thread Viktor Klang
No, it was working when we switched to the filter. :/

On Mon, Mar 16, 2009 at 2:58 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I wonder if this is something that broke when we moved to a Filter...

 Derek


 On Mon, Mar 16, 2009 at 7:02 AM, Jorge Ortiz jorge.or...@gmail.comwrote:

 I get the same error, unfortunately.

 --j


 On Mon, Mar 16, 2009 at 4:48 AM, Sergey Andreev andser...@gmail.comwrote:

 Jorge,

 I am using a custom Boot class and it works just fine. I believe that if
 you create a Brat.scala and put your class there, it will solve the problem

 Regards,
 Sergey


 On Mon, Mar 16, 2009 at 1:31 PM, Jorge Ortiz jorge.or...@gmail.comwrote:

 Folks,

 I'm trying to specify a custom Boot class, as per Chapter 3 of the Lift
 Book. To my web.xml I've added:

   context-param
 param-namebootloader/param-name
 param-valuebootstrap.liftweb.Brat/param-value
   /context-param

 and in Boot.scala I've commented out the regular Boot class and added a
 Brat class with identical implementation, except it extends Bootable.

   class Brat extends Bootable { ... }

 Unfortunately, I'm getting a:

   ERROR - Failed to Boot
   java.lang.ClassNotFoundException: bootstrap.liftweb.Boot

 Attached is the zipped project.

 Thanks,

 --j










 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Lift as a UI in server side OSGi

2009-03-20 Thread Viktor Klang
Guys,

I might only have 8 years of experience with working with the Servlet-stack,
but the main reason that Lift is hooked into a Filter is that Lift filters
requests... ;)

Hooking it in as a Servlet would only be feasible if we'd have a two-pass
system where:

The request first goes through the Filter, to do rewriting and see if it's a
Lift-request, then do a dispatch to a LiftServlet and let the lift servlet
do the actual delivery of the payload, else just passing the request through
the FilterChain

What do you think?

Cheers,
Viktor

On Fri, Mar 20, 2009 at 12:16 AM, Chad Skinner chadwskin...@gmail.comwrote:



 On Thu, Mar 19, 2009 at 5:44 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Chad,
 What would be most helpful is if you could mock up and example with
 servlets (written in Scala or Java).  If I have something that I can run and
 test, then I can figure out how to shim Lift into it.



 David, I'll try to mock something up when I get a little bit of time,
 however I don't know much about a lot of the services supported by Lift
 (Comet, being one) and so any example I come up with would be a little short
 sighted at best. Are you familiar with OSGi and would you be interested in
 discussing methods of implementing Lift as services? In the meantime I will
 start working on a couple of the simpler applications and getting the
 servlets working on OSGi.

 Also, I don't know much about the snippets, are the classes containing the
 snippets pooled or instantiated on a request basis or are they treated as
 singletons? The reason I ask is I am using Easybeans with JPA and would like
 to be able to inject the required EJB. If the snippets are singletons then
 this would not work otherwise I would need to know how to extend the factory
 to inject the EJB.

 Thanks Again,
 Chad

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: JPA inheritance

2009-03-20 Thread Viktor Klang
On Fri, Mar 20, 2009 at 11:43 AM, Charles F. Munat c...@munat.com wrote:


 Not really. What I want to do is have the object tell me what it is.
 Unless I'm really misunderstanding isInstanceOf, I have to iterate
 through all the possibilities. Plus, my brain is probably just fried,
 but I'm not seeing how to use it in a match, so I'm having to run
 through a bunch of if statements. I know there's a better way. Just
 can't see it at 3:45 AM.


But you wrote: . But then as I'm looping through them, I want to find out
what type of event they really are.

so when you're looping through them, if you're doing pattern-matching you
could probably just:

case x : MySubEvent = blah(x)
case y : MyOtherSubEvent = blugh(y)
case _ = ohSnap()!





 Chas.

 Viktor Klang wrote:
 
 
  On Fri, Mar 20, 2009 at 9:37 AM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  I have a BaseEvent object from which various other events (e.g.
 Seminar)
  inherit. I want to pull them all out in a query, so they come out as
  BaseEvents. But then as I'm looping through them, I want to find out
  what type of event they really are. There is an event_type column
 in
  the database, but I don't know how to get at that.
 
 
  Don't fancy isInstanceOf?
 
 
 
 
  Anyone know offhand how to get the class of the objects? This is in
 Lift
  with JPA/Hibernate.
 
  Thanks,
  Chas.
 
 
 
 
 
  --
  Viktor Klang
  Senior Systems Analyst
 
  

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: JPA inheritance

2009-03-20 Thread Viktor Klang
If you need the Class:

org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(obj)

On Fri, Mar 20, 2009 at 12:08 PM, Timothy Perrett
timo...@getintheloop.euwrote:

  Chas,

 If you want the object to tell you what it is can you not use some form of
 reflection?

 Tim


 On 20/03/2009 11:03, Viktor Klang viktor.kl...@gmail.com wrote:



 On Fri, Mar 20, 2009 at 11:43 AM, Charles F. Munat c...@munat.com wrote:


 Not really. What I want to do is have the object tell me what it is.
 Unless I'm really misunderstanding isInstanceOf, I have to iterate
 through all the possibilities. Plus, my brain is probably just fried,
 but I'm not seeing how to use it in a match, so I'm having to run
 through a bunch of if statements. I know there's a better way. Just
 can't see it at 3:45 AM.


 But you wrote: . But then as I'm looping through them, I want to find out
 what type of event they really are.

 so when you're looping through them, if you're doing pattern-matching you
 could probably just:

 case x : MySubEvent = blah(x)
 case y : MyOtherSubEvent = blugh(y)
 case _ = ohSnap()!





 Chas.

 Viktor Klang wrote:
 
 
  On Fri, Mar 20, 2009 at 9:37 AM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com c...@munat.com%3e wrote:
 
 
  I have a BaseEvent object from which various other events (e.g.
 Seminar)
  inherit. I want to pull them all out in a query, so they come out as
  BaseEvents. But then as I'm looping through them, I want to find out
  what type of event they really are. There is an event_type column
 in
  the database, but I don't know how to get at that.
 
 
  Don't fancy isInstanceOf?
 
 
 
 
  Anyone know offhand how to get the class of the objects? This is in
 Lift
  with JPA/Hibernate.
 
  Thanks,
  Chas.
 
 
 
 
 
  --
  Viktor Klang
  Senior Systems Analyst
 
  





 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: JPA inheritance... now it won't compile

2009-03-20 Thread Viktor Klang
Chas,

I have no clue since I don't know what your code looks like.
But just increase the heap size? Maybe you just hit the roof?

Cheers,
Viktor

On Fri, Mar 20, 2009 at 12:55 PM, Charles F. Munat c...@munat.com wrote:


 Viktor, I guess you didn't see my other never mind email as it went
 out about six minutes before you sent this. I arrived at the same
 conclusion. Duh.

 But now I'm running out of heap space when I try to compile. I shut
 everything down, rebooted. Still breaks. I pulled out all the code I'd
 just added. Still breaks. Tried another app -- that works no problem.

 What could I have done to make it run out of heap space on compile?
 Anyone else run into this? Nothing in the warnings seems to be of any
 use at all.

 Chas.

 [WARNING] Exception in thread main java.lang.OutOfMemoryError: Java
 heap space
 [WARNING]   at scala.StringBuilder.init(StringBuilder.scala:33)
 [WARNING]   at scala.StringBuilder.init(StringBuilder.scala:41)
 [WARNING]   at
 scala.tools.nsc.symtab.Names$Name.decode(Names.scala:390)
 [WARNING]   at
 scala.tools.nsc.symtab.Symbols$Symbol.nameString(Symbols.scala:1224)
 [WARNING]   at
 scala.tools.nsc.symtab.Symbols$Symbol.toString(Symbols.scala:1261)
 [WARNING]   at
 scala.tools.nsc.backend.icode.Members$Local.toString(Members.scala:305)
 [WARNING]   at java.lang.String.valueOf(String.java:2615)
 [WARNING]   at scala.StringBuilder.append(StringBuilder.scala:234)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.indexOf(GenJVM.scala:1526)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genBlock$1$1.apply(GenJVM.scala:914)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genBlock$1$1.apply(GenJVM.scala:866)
 [WARNING]   at scala.Iterator$class.foreach(Iterator.scala:414)
 [WARNING]   at
 scala.runtime.BoxedArray$AnyIterator.foreach(BoxedArray.scala:45)
 [WARNING]   at scala.Iterable$class.foreach(Iterable.scala:256)
 [WARNING]   at scala.runtime.BoxedArray.foreach(BoxedArray.scala:24)
 [WARNING]   at

 scala.tools.nsc.backend.icode.BasicBlocks$BasicBlock.foreach(BasicBlocks.scala:130)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genBlock$1(GenJVM.scala:866)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genBlocks$1(GenJVM.scala:789)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genCode(GenJVM.scala:1413)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genMethod(GenJVM.scala:592)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genClass$4.apply(GenJVM.scala:216)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$genClass$4.apply(GenJVM.scala:216)
 [WARNING]   at scala.List.foreach(List.scala:834)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genClass(GenJVM.scala:216)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:55)
 [WARNING]   at

 scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:55)
 [WARNING]   at scala.Iterator$class.foreach(Iterator.scala:414)
 [WARNING]   at scala.collection.Map$$anon$6.foreach(Map.scala:123)
 [WARNING]   at
 scala.tools.nsc.backend.jvm.GenJVM$JvmPhase.run(GenJVM.scala:55)
 [WARNING]   at
 scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
 [WARNING]   at scala.tools.nsc.Global$Run.compile(Global.scala:667)
 [WARNING]   at scala.tools.nsc.Main$.process(Main.scala:73)
 [INFO]
 
 [ERROR] BUILD FAILURE

 Viktor Klang wrote:
 
 
  On Fri, Mar 20, 2009 at 11:43 AM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  Not really. What I want to do is have the object tell me what it is.
  Unless I'm really misunderstanding isInstanceOf, I have to iterate
  through all the possibilities. Plus, my brain is probably just fried,
  but I'm not seeing how to use it in a match, so I'm having to run
  through a bunch of if statements. I know there's a better way. Just
  can't see it at 3:45 AM.
 
 
  But you wrote: . But then as I'm looping through them, I want to find
 out
  what type of event they really are.
 
  so when you're looping through them, if you're doing pattern-matching
  you could probably just:
 
  case x : MySubEvent = blah(x)
  case y : MyOtherSubEvent = blugh(y)
  case _ = ohSnap()!
 
 
 
 
 
  Chas.
 
  Viktor Klang wrote:
   
   
On Fri, Mar 20, 2009 at 9:37 AM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com
mailto:c...@munat.com mailto:c...@munat.com wrote:
   
   
I have a BaseEvent object from which various other events
  (e.g. Seminar)
inherit. I want to pull them all out

[Lift] Re: Lift as a UI in server side OSGi

2009-03-20 Thread Viktor Klang
On Fri, Mar 20, 2009 at 2:23 PM, Chad Skinner chadwskin...@gmail.comwrote:


 I might only have 8 years of experience with working with the
 Servlet-stack, but the main reason that Lift is hooked into a Filter is that
 Lift filters requests... ;)


 But, if OSGi does not support filters then another solution will need to be
 identified. For example, what if all requests are Lift Requests? I.E. in a
 bundle where everything is on the classpath and you need to register the
 snippet packages and the resource filter folders within that bundle or jar?

 ... I have some experience with servlets and filters, but not a great deal
 since we have used frameworks that provide the servlets and filters and we
 just implement the logic. What I would like to be able to do is work out a
 solution that would be common to many OSGi applications so that Lift could
 be used by other projects utilizing OSGi.

 I would like the solution to be useful to the community not just me ;-)


I'd suggest to create a LiftWrapperServlet where I'd use LiftFilter with a
wrapper over FilterChain that'd serve static content now served by
LiftFilter.




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: JPA inheritance

2009-03-20 Thread Viktor Klang

In my bag of knowledge :) (google)

Viktor,
Rogue Software Architect

20 mar 2009 kl. 20.24 Charles F. Munat c...@munat.com skrev:


 Ooooh. That's really good to know. Where did you find that?

 Chas.

 Viktor Klang wrote:
 If you need the Class:

 org.
 hibernate.
 proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(obj)

 On Fri, Mar 20, 2009 at 12:08 PM, Timothy Perrett
 timo...@getintheloop.eu wrote:

Chas,

If you want the object to tell you what it is can you not use some
form of reflection?

Tim


On 20/03/2009 11:03, Viktor Klang viktor.kl...@gmail.com
http://viktor.kl...@gmail.com wrote:



On Fri, Mar 20, 2009 at 11:43 AM, Charles F. Munat
c...@munat.com http://c...@munat.com wrote:


Not really. What I want to do is have the object tell me
what it is.
Unless I'm really misunderstanding isInstanceOf, I have to
iterate
through all the possibilities. Plus, my brain is probably
just fried,
but I'm not seeing how to use it in a match, so I'm having
to run
through a bunch of if statements. I know there's a better
way. Just
can't see it at 3:45 AM.


But you wrote: . But then as I'm looping through them, I want
to find out
what type of event they really are.

so when you're looping through them, if you're doing
pattern-matching you could probably just:

case x : MySubEvent = blah(x)
case y : MyOtherSubEvent = blugh(y)
case _ = ohSnap()!





Chas.

Viktor Klang wrote:


 On Fri, Mar 20, 2009 at 9:37 AM, Charles F. Munat
c...@munat.com http://c...@munat.com
 mailto:c...@munat.com mailto:c...@munat.com%3e wrote:


 I have a BaseEvent object from which various other
events (e.g. Seminar)
 inherit. I want to pull them all out in a query, so
they come out as
 BaseEvents. But then as I'm looping through them, I
want to find out
 what type of event they really are. There is an
event_type column in
 the database, but I don't know how to get at that.


 Don't fancy isInstanceOf?




 Anyone know offhand how to get the class of the
objects? This is in Lift
 with JPA/Hibernate.

 Thanks,
 Chas.





 --
 Viktor Klang
 Senior Systems Analyst











 --  
 Viktor Klang
 Senior Systems Analyst



 

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



[Lift] Re: [scala-user] [ANN] Exploring Lift: a Book for the Scala-based Web Framework

2009-03-23 Thread Viktor Klang
On Mon, Mar 23, 2009 at 10:16 PM, David Pollak 
feeder.of.the.be...@gmail.com wrote:



 On Mon, Mar 23, 2009 at 2:14 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 Guys,

 I'm expecting a signed copy... ;)


 Who's the father? :-)


You are the daddy. ;)






 On Mon, Mar 23, 2009 at 7:24 PM, TylerWeir tyler.w...@gmail.com wrote:




 Dave  Griffith wrote:
 
 
 
  Garrett Rowe-2 wrote:
 
  I'll be buying the e-version of the book today.
 
 
  Me too, or, more precisely, I'll be buying it whenever APress actually
  lets people purchase the e-book.   The publication date says April, but
  until then will the book be available as beta?
 

 I'll post again when I know dates.  Thanks for the patience.
 --
 View this message in context:
 http://www.nabble.com/-ANN---Exploring-Lift%3A-a-Book-for-the-Scala-based-Web-Framework-tp22663004p22666141.html
 Sent from the Scala - User mailing list archive at Nabble.com.




 --
 Viktor Klang
 Senior Systems Analyst




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




-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Absolute Beginner

2009-03-25 Thread Viktor Klang
I'm having a hard time visualizing how a Scala for absolute programming
newbs would look like.

But I'd believe that there could be a market for it.

On Wed, Mar 25, 2009 at 9:09 PM, Randinn rand...@gmail.com wrote:


 Thinking on it further it seems I need to ask this of the Scala crowd.
 My knowledge of programming is antiquated but I do not want to learn
 Java just to un-learn parts of it Scala changes.

 On Mar 26, 12:01 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  On Tue, Mar 24, 2009 at 9:35 PM, Randinn rand...@gmail.com wrote:
 
   Are there any plans for some tutorials/info for people that have no
   programming experience (at least none in the last decade)?
 
  Sorry.  Lift requires basic knowledge of Scala as well as some ability to
 do
  stuff at the command line.
 
 
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Dynamic Image generation / HttpServletResponse

2009-03-26 Thread Viktor Klang
For Graphs I'd recommend Flot :)



On Thu, Mar 26, 2009 at 12:14 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Here's some code to serve an image out of the database.  Here's the Mapper
 definition:

 class Image extends LongKeyedMapper[Image] with IdPK {
   def getSingleton = Image

   object image extends MappedBinary(this)
   object lookup extends MappedUniqueId(this, 32) {
 override def dbIndexed_? = true
   }
   object saveTime extends MappedLong(this) {
 override def defaultValue = millis
   }
   object mimeType extends MappedString(this, 256)
 }

 object Image extends Image with LongKeyedMetaMapper[Image]

 And here's the code that serves the image:

 object ImageLogic {
   object TestImage {
 def unapply(in: String): Option[Image] =
 Image.find(By(Image.lookup, in.trim))
   }

   def matcher: LiftRules.DispatchPF = {
 case r @ Req(image_logic :: TestImage(img) ::
  Nil, _, GetRequest) = () = servImage(img, r)
   }

   def servImage(img: Image, r: Req): Box[LiftResponse] = {
 if (r.testIfModifiedSince(img.saveTime))
 Full(InMemoryResponse(new Array[Byte](0),
   List(Last-Modified -
toInternetDate(img.saveTime.is)), Nil,
 304))
 else Full(InMemoryResponse(img.image.is,
List(Last-Modified -
 toInternetDate(img.saveTime.is),
 Content-Type - img.mimeType.is,
 Content-Length -
 img.image.is.length.toString), Nil,
 200))
   }
 }

 In Boot:

  LiftRules.dispatch.append(ImageLogic.matcher)

 Does this help?

 Thanks,

 David

 On Wed, Mar 25, 2009 at 2:38 PM, Thomas Rynne thomas.ry...@gmail.comwrote:


 Hi,
  I want to dynamically generate images (actually a graph). I could
 write a seperate servlet for this but I'd like easy access to the
 Mapper classes and the logged in User etc so would prefer to write it
 as a method in lift.

 Is there a hook for this? I suppose I essentially want direct acccess
 to the httpresponse.

 I found some discussion of this here:

 http://groups.google.com/group/liftweb/browse_thread/thread/9d6f61f69a20765/d98a32e89e87d317

 but I don't know if it was ever implemented, and need some pointers/
 documentation if it has been.

 thanks for any advice,
 Thomas





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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: MappedDateTime - Do we have a Date? Or is it a timestamp?

2009-04-01 Thread Viktor Klang
On Tue, Mar 31, 2009 at 11:10 PM, Timothy Perrett
timo...@getintheloop.euwrote:



  chronologies (calendar systems). It's also completely immutable (oh, you
  didn't know java.util.Calendar isn't thread-safe? you're lucky to have
 never
  had to track down that bug).

 LOL!!! Its not thread safe!? Thats somewhat of an oversight isnt it...


java.text.Format horror SimpleDateFormat horror...




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: A gap in my knowledge, JsCommands

2009-04-01 Thread Viktor Klang
On Wed, Apr 1, 2009 at 2:55 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 It looks like it's missing a function call. Compare

 onclick=lift_ajaxHandler(...

 to

 onclick=(F687305521435R3K,lift_ajaxHandler

 I'm no JS guru, so that second one might be perfectly valid JS, but it
 looks weird to me.


I'd recommend to stay away from referring to objects by reference instead of
by id..
(all kinds of weird stuff can happen when you start to remove objects/have
partial rendering)

I.e. somefun('F687305521435R3K',lift_ajaxHandler) instead of
somefun(F687305521435R3K,lift_ajaxHandler)
(Note the single-quotes.)




 Derek


 On Tue, Mar 31, 2009 at 9:57 AM, TylerWeir tyler.w...@gmail.com wrote:


 I'm wading into an area that I'm a bit unfamiliar with and not sure if
 I'm running in a bug.

 Snippet code:
 class HelloWorld {
  def ajaxFunc1() : JsCmd = JsRaw(alert('Button1 clicked'))

  def ajaxFunc2(str: String) : JsCmd = {
Log.info(Received + str)
JsRaw(alert('Button2 clicked'))
  }

  def renderAjaxButtons(xhtml: NodeSeq): NodeSeq = {
bind(ex, xhtml,
  button1 - SHtml.ajaxButton(Press Me, ajaxFunc1 _),
  button2 - buttonPress Me 2/button % (onclick -
 SHtml.ajaxCall(Str(Button-2), ajaxFunc2 _)))
  }
 }



 Which is in this template:
lift:HelloWorld.renderAjaxButtons
ex:button1 /br /
ex:button2 /br /
/lift:HelloWorld.renderAjaxButtons


 And is rendered thusly:
  button onclick=lift_ajaxHandler('F687305521434PIG=true', null,
 null); return false;Press Me/buttonbr /

button onclick=(F687305521435R3K,lift_ajaxHandler
 ('F687305521435R3K=' + 'Button-2', null, null))Press Me 2/
 buttonbr /



 Button 1 is find, but Button 2 causes FireBug to whine:
 F687305521435R3K is not defined
 onclick(click clientX=500, clientY=239)2 (line 2)
 [Break on this error] F687305521435R3K,
 lift_ajaxHandl...F687305521435R3K=Button-2, null, null);


 Does the second onclick look incorrect to you?




 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Fwd: Lift on OSGi

2009-04-01 Thread Viktor Klang
This is so awesome! :)

Wax on! Wax off!

On Wed, Apr 1, 2009 at 5:23 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 Folks,

 Here's an example of Lift on OSGi thanks to Heiko.


 Thanks,

 David

 -- Forwarded message --
 From: Heiko Seeberger seeber...@weiglewilczek.com
 Date: Mon, Mar 30, 2009 at 8:02 AM
 Subject: Lift on OSGi
 To: David Pollak feeder.of.the.be...@gmail.com


 Hi David,
 Yes!! I succeeded in OSGi-fying a simple Lift project
 (lift-archetype-blank).



 Attached you will find the Maven project. There shouldn't be any local
 dependencies for building. For runtime you will need to install ScalaModules
 (which you can download from http://www.scalamodules.org) into you local
 Maven repository (take a look at the run batch file). In order to run the
 demo you will have to install PaxRunner (and tweak the path to pax-run in
 the run batch file). This is the easiest way to run OSGi without needing to
 know too much about it.

 Let me know, how I can help you in getting the demo up an running on your
 machine.

 Heiko

 __

 Technical Director
 Weigle Wilczek GmbH
 Martinstraße 42-44
 73728 Esslingen
 Germany

 T (+49) 711 46050250
 F (+49) 711 45999829

 Managing Directors: Dr. Jörn Weigle, Dr. Stephan Wilczek
 Domicile: Esslingen a. N.
 Register Court: Stuttgart HRB 214442
 Commercial Register No. DE 213 472 880

 www.weiglewilczek.comwww.eclipse-training.net







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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: The Lift 1.1 list

2009-04-01 Thread Viktor Klang
On Wed, Apr 1, 2009 at 7:16 PM, Lee Mighdoll leemighd...@gmail.com wrote:

 Sounds great.

 One other feature I'd like (and I think would be widely useful):
 * Partitioned service cluster support for a/b testing:  redirect some users
 to a different server, e.g. to test the new version


Just do a redirect response?




 And possibly:
 * Backing store support for Voldemort (or does that come through goat
 rodeo?)

 How'd you get the name goat rodeo?! lol

 Lee


 On Wed, Apr 1, 2009 at 9:11 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 I think we've got our Lift 1.1 list.  If anyone has anything to add,
 please speak up now.

- Improved documentation: better VScalaDoc coverage as well as better
tutorial and cook-book documentation.
- Improved J2EE support including JTA and Portlets.
- Finish Record/Field code with backing store including JDBC, JPA and
Goat Rodeo (what's Goat Rodeo? http://goatrodeo.org)
- Improved client-side JavaScript support and better JavaScript
abstractions.
- Client/Server data synchronization (integrated with Record/Field)
- Improved support for REST.
- Improved performance including caching templates when running in
production mode.
- OSGi support.
- Improved testing framework and better testing support when running
in test mode.
- Implement Servlet 3.0 support.
- HTML 5 and Web Sockets support and integration with Kaazing's Web
Sockets server.  Also, sensing which browser is making the request and
performing optimizations based on that browser's characteristics
(specifically, Chrome and Firefox 3.1 support)

 We will have bug-fix releases of 1.0 along the way and we'll have a
 release off the 1.0 branch when Scala 2.8 is released.

 Feedback is welcome in the next 3 days.

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



[Lift] Re: Need for lightweight JPA archetype

2009-04-01 Thread Viktor Klang
Timmy,

yeah, I can see that coming in handy.

Cheers,
Viktor

On Wed, Apr 1, 2009 at 11:13 PM, Tim Perrett timo...@getintheloop.euwrote:


 Guys,

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

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

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

 Thoughts?

 Tim
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Thread safe configuration without abusing the session?

2009-04-06 Thread Viktor Klang
If the config is on a per-session basis, then SessionVar should be the way
to go.
But of course, put it in _one_ SessionVar, and not hundreds... :)

On Mon, Apr 6, 2009 at 2:13 PM, Tim Perrett timo...@getintheloop.eu wrote:


 Guys,

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

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

 Cheers, Tim



 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Thread safe configuration without abusing the session?

2009-04-06 Thread Viktor Klang
On Mon, Apr 6, 2009 at 2:27 PM, Timothy Perrett timo...@getintheloop.euwrote:


 Hey Viktor :)

 What’s the overhead associated with this? Little? Much?


The overhead of many SessionVars version one? From a memory/cpu-perspective
it's negligible (dang, how to spell that?).

However, from a developer-perspective, it's far easier to keep the data
consistent if you put it in a data structure of it's own (In the future, you
might wish to persist it, and then the work is almost all done.).

Cheers,
Viktor



 Cheers, Tim


 On 06/04/2009 13:17, Viktor Klang viktor.kl...@gmail.com wrote:

 If the config is on a per-session basis, then SessionVar should be the way
 to go.
 But of course, put it in _one_ SessionVar, and not hundreds... :)

 On Mon, Apr 6, 2009 at 2:13 PM, Tim Perrett timo...@getintheloop.eu
 wrote:


 Guys,

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

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

 Cheers, Tim







 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Google App Engine

2009-04-08 Thread Viktor Klang
As stated in the Scala list, GAE doesn't support JDBC or Threads.

It does however, support JPA.

Since it only supports the Servlet 2.4 spec currently, it doesn't include
the Continuations as in the 3.0 spec.

This means that for now, I think the odds are against us on this one.

Did I miss something?
Cheers,
Viktor

On Wed, Apr 8, 2009 at 10:08 AM, Timothy Perrett timo...@getintheloop.euwrote:


 Awesome! Hell yeah, i'll give this a try!

 On Apr 8, 8:40 am, Jorge Ortiz jorge.or...@gmail.com wrote:
  Google App Engine just released support for Java/Scala. I just sent in
  my laptop for repairs and won't get it back for a while.
 
  Anyone want to try Lift on GAE and report back?
 
  --j
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Liftweb without Maven?

2009-04-14 Thread Viktor Klang
On Tue, Apr 14, 2009 at 1:38 PM, marius d. marius.dan...@gmail.com wrote:


 Even if I find maven quite helpful for Lift there are people that just
 want to stay away from maven. I can understand that. Perhaps it would
 be helpful to also have some ant script to build a lift project? ...
 or perhaps have a downloadable zip archive from lift's site that
 contains incipient projects like the results produced by Lift's
 archetypes? ... so that people can just download that project zip file
 with the ant build in it and then start building the app on top of
 that? ... would that work ?


Nice angle!
Or perhaps have an online service where you can specify the archetype
details and have a compressed payload downloaded?




 Br's,
 Marius

 On Apr 14, 2:23 pm, João Pereira joaomiguel.pere...@gmail.com wrote:
  Hello,
 
  I find that maven will ease your work a lot. Usually it take only one
  step to get a lift app running.
 
  mvn jetty:run
 
  if you want to create an eclipse project for the downloaded app, you
  just do mvn eclipse:eclipse and then import it to eclipse.
 
  Not using maven you'll have to deal with all the dependency management
  by yourself :(
 
  Can you specify what do you expected from maven? what were the
  problems encountered?
 
  On Tue, Apr 14, 2009 at 12:11 PM, tk050305cnx tk050305...@gmail.com
 wrote:
 
   I am new to Liftweb. Unfortunately, the example app in the getting
   started doc did not work. That is... Maven did not produce the
   expected output. I don't want to bother with Maven at this time. Can
   you point me to a source that describes how to set up a helloworld
   type of application manually and deploy it on Tomcat? Is there any
   Eclipse automation for that?
 
   Cheers, CNX
 
  --
  João Miguel Pereira, PMPhttp://jpereira.euhttp://
 www.linkedin.com/in/joaomiguelpereira
  joaomiguel.pere...@gmail.com
  (351) 96 275 68 58
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: lift plugins/extensibility?

2009-04-14 Thread Viktor Klang
On Tue, Apr 14, 2009 at 5:53 PM, TylerWeir tyler.w...@gmail.com wrote:


 Btw, is there a good CMS module???

 Not currently.  I would *love* to rewrite Wordpress+WordpressMU
 +Buddypress.

 I have been talking about it for more than a year though.  :(


I've been gnawing on this idea for a while aswell, until I actually have
some spare time, I've only managed to create a working-name: facelift



 On Apr 14, 11:23 am, Mick  Delaney mickdela...@gmail.com wrote:
  sorry guys. i didnt realise it was moderated (doh!!).
  it's been almost 5 years since i did any java at all but i know how
  JAR's work
  and i've looked into maven. i think i'll probably just go and create a
  sample app
  fully, i was going to create a personal task manager website in lift
  so perhaps that will be a good start.
 
  Btw, is there a good CMS module???
 
  On Apr 14, 3:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 
 
 
   Mick,
 
   The list is moderated - please be patient for your messages to come
 through
   rather than repeat posting :-)
 
   Using your openID example - we already have modules for that which work
 out
   of the box! So you can just drop that in by adding a maven dependency
 and
   hooking up in Lifts boot process. In the same way we have modules for
 AMQP,
   PayPal etc etc etc. Anything we don't have, you can write with little
   problem provided you know enough about lift.
 
   I have modules that hook lift into our internal enterprise systems via
   dispatching (LiftRules.DispatchPF etc) - you could build anything you
 wanted
   really and just distribute that as a pluggable JAR. If you familiar
 with
   gems, its kind of like that, but it works properly ;-)
 
   Are you familiar with maven?
 
   Cheers, Tim
 
   On 14/04/2009 15:02, Mick Delaney mickdela...@gmail.com wrote:
 
i cant seem to reply to my previous post for some reason :-(
so i'll reply here:
 
i was evaluating lift versus rails plugins/gems mainly.
for example, lets say i want to drop in openid authentication or
something.
or if i wanted to make a class versionable (although that's scala
really not lift).
what about a pluggable CMS, e.g. comatose or browsercms in rails,
in djanjo for example its architected in such a way that allows u to
compose an app from smaller apps.
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Resizing images

2009-04-16 Thread Viktor Klang
On Thu, Apr 16, 2009 at 7:36 AM, Charles F. Munat c...@munat.com wrote:


 Has anyone here done anything with Lift in which uploaded images are
 resized (or otherwise manipulated) before saving? If so, how did you do
 it? Any recommendations for libraries?


GAE offers that kind of functionality.




 Thanks!

 Chas.

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: how to call my servlet from lift form

2009-04-16 Thread Viktor Klang
Hello Pravin,

I cannot understand what you mean.
Can you please try to describe the workflow.

(the flow involving web.xml makes no sense to me)

Cheers,
Viktor

On Thu, Apr 16, 2009 at 8:53 AM, pravin pravinka...@gmail.com wrote:


 Hi guys,
 I am new to Lift framework.
 I created one form. i want to submit this for to one servlet and
 perform some business logic on form data and display other page.

 How can i do this with the help of lift.

 I short i want to do this like sample web application - form - web.xm
 (navigartion rules)- servlet - web.xml --- other jsp


 Thanks in advance

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: A Lift preso

2009-04-23 Thread Viktor Klang
On Thu, Apr 23, 2009 at 3:52 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:


 http://www.slideshare.net/itemis/lift-mit-scala-ein-befrderungsmittel-in-die-nchste-etage-der-web-frameworks-presentation


Thank God for taking classes in German!



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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread Viktor Klang
Why don't collection mappings work?

Also, from personal experience, mixing persistence-logic in domain objects
does make you feel somewhat naughty.

On Mon, Apr 27, 2009 at 9:15 PM, Tim P tim.pig...@optrak.co.uk wrote:


 Hi
 I'm looking for some guidance here and I don't think this is addressed
 in the book.

 I've got domain classes that need to go get stuff from the database
 list all ...  type of methods.
 So presumably my domain class should have, or be allowed to have
 methods that access Model
 But my unit tests need to test these methods. So I need a model which
 is instantiated within the test environment and so does not need to be
 extended with RequestVarEM which presumably would be a bad thing
 (though perhaps it's harmless).
 Any suggestions on best practice to achieve this? (I'm still very
 much trying to find my way round natural scala constructs)

 Should it be mentioned in the jpa chapter in the book?

 Tim



 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: jpa, emf Model and unit tests

2009-04-27 Thread Viktor Klang
Also, if you use Hibernate, you can use:

*Session.createFilter*(city.getAddresses(), where this.name like
'S%').list();

On Tue, Apr 28, 2009 at 5:31 AM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 OK, for one, the bidirectional mapping adds no cost in terms of DB access
 other than the time it takes you to write it. Collections are lazily loaded,
 so unless your code *retrieves* City.addresses, the database never gets hit.
 JPA is really not designed with the concept of entities having access to the
 EntityManager that loaded them, although there may be some provider-specific
 way to get at it. Unfortunately, you're on your own if you want an entity to
 obtain other entities via queries or some other non-relationship means.
 Generally, if you need that kind of coverage you should do it through logic
 code that can glue things together instead of tying it to your entities.
 After all, I'd argue that if the logic isn't part of what you can express in
 the database then it doesn't belong in the entity classes anyways. When you
 say bogged down in bidirectional mappings are you referring simply to the
 overhead of adding the mappings to your entities, or do you think that
 there's some performance issue with bidirectional mappings (AFAIK, there
 aren't any).

 Derek



 On Mon, Apr 27, 2009 at 6:01 PM, TSP tim.pig...@optrak.co.uk wrote:


 There are two questions here. I don't really want to get bogged down
 in bidrectional mappings I was rather hoping for suggestions on how my
 domain objects might simply get at the right Model transparently from
 both application and junit (in Grails it was done with Spring
 injection - here perhaps an EMF factory (a factory-factory?)) However,
 in answer to the bidirectional mapping question here is an example:

 class City {
  var name: String;
  var population: Int;
  //  var addresses: java.util.Set[Address]  // BAD because London has
 approx 3m addresses

 }

 class Address {
name, street etc
var city: City
 }

 object Address {
def matchAddress( .. unstructured input strings from ERP
 system ...)  = {
,,,
Some[Address]
  else
None
   }
 }


 class Organisation {
var hq: Address;
 }

 So I can easily trace from organisation to it's address and then find
 out if the organisation is in a big city.
 But I never need to directly fetch the city and iterate through the
 addresses.

 There are many more examples where the many side of things runs into
 hundreds and thousands (shipments to a daily customer over the last 2
 years, tracking events on trucks at 1 minute intervals stored for 6
 months).

 Again with reference to Evans Domain Driven Design for a large and
 complex domain model (I expect to end up with well over 50 objects)
 universal bi-directional mappings are strongly discouraged (see for
 example discussion on p. 83)

 Now you might argue that my address matching should be delegated to a
 service, but the techniques can be quite country specific tying in the
 postcodes and town names for example or dealing with peculiarities
 (from my point of view) of US street naming conventions - so I want my
 address matching tied closely to may data objects (in that case it
 would be Address subclasses).  Also as soon as I do get rid of bi-
 directional mappings then any direct business logic that requires
 traversal in the missing direction can be readily accomplished by
 access to the database.

 On Apr 27, 11:00 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
  I may be misunderstanding this, but if you just do bidirectional
 mappings in
  JPA then the DB query is generally efficient and transparent. Could you
 post
  a little snippet showing what you're trying to do?
 
  Derek
 
  On Mon, Apr 27, 2009 at 2:44 PM, TSP tim.pig...@optrak.co.uk wrote:
 
   Viktor,
   It's a valid point, and I would where possible but I've got quite a
   lot of uni-directional references (for example, addressable locations
   in a city) where using a mapping would entail very large fetches that
   are better handled by querying the database. Evans in Domain Driven
   Design is very keen on uni-directional references and who am I to
   argue :-)
   Tim
 
   On Apr 27, 9:10 pm, Viktor Klang viktor.kl...@gmail.com wrote:
Why don't collection mappings work?
 
Also, from personal experience, mixing persistence-logic in domain
   objects
does make you feel somewhat naughty.
 
On Mon, Apr 27, 2009 at 9:15 PM, Tim P tim.pig...@optrak.co.uk
 wrote:
 
 Hi
 I'm looking for some guidance here and I don't think this is
 addressed
 in the book.
 
 I've got domain classes that need to go get stuff from the
 database
 list all ...  type of methods.
 So presumably my domain class should have, or be allowed to have
 methods that access Model
 But my unit tests need to test these methods. So I need a model
 which
 is instantiated within the test environment and so does not need
 to be
 extended

[Lift] Java Object Persistence

2009-04-29 Thread Viktor Klang
Hi guys,

it seems that my dementia keeps reminding itself. (the irony of it...)
Charles, what was the name of that persistence framework you were mentioning
on the conf-call?


Cheers!
-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Java Object Persistence

2009-04-29 Thread Viktor Klang
Ah! Thanks Charles! ^_^

On Wed, Apr 29, 2009 at 8:52 PM, Charles F. Munat c...@munat.com wrote:


 And I guess it is LGPL (I thought I saw something else, but maybe I'm
 confusing it with one of the other fifty solutions I looked at).

 Good enough.

 Chas.

 Viktor Klang wrote:
  Hi guys,
 
  it seems that my dementia keeps reminding itself. (the irony of it...)
  Charles, what was the name of that persistence framework you were
  mentioning on the conf-call?
 
 
  Cheers!
  --
  Viktor Klang
  Senior Systems Analyst
 
  

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: separation of presentation content and logic

2009-05-06 Thread Viktor Klang
On Wed, May 6, 2009 at 5:11 PM, Aaron aarondh...@gmail.com wrote:


 So far I'm impressed with Lift and have gone through the toy-app stage
 of experimenting. I have my own framework in production powering large
 scale sites like http://www.comcast.net and real experience with
 Django.

 I'm a little sketchy on the thinking behind this type of display logic
 deep in the code.  For example

 Snippet:
 class HelloWorld {
 def howdy: NodeSeq = spanWelcome to helloworld at {new
 java.util.Date}/span
 }

 In Model:
 override def loginXhtml =
 lift:surround with=default at=content
 { super.loginXhtml }
 /lift:surround

 In real applications are people delegating this type of rendering to
 template files?  In a freemarker world I have template macros
 (snippets) that would look like
 #macro helloWord
  spanWelcome to helloworld at ${exec.RunCustomDateFunction}
 /#macro

 or server code that would look like
 (In horrible python/java psudocode)
 function(){
  render_and_return(template('helloWorld', {date: new
 java.util.Date} )
 }


 I have strict rules about who gets to edit templates and who gets to
 edit server code.  Template code should NEVER affect server profiles
 (of course it can with bad javascript/ajax) and server code should
 never have display data.

 (In my world...) Display / presentation changes should NOT require
 a .war deployment

 I'm basically asking for other people's thoughts in this direction.  I
 have multiple HTML/CSS/JS experts and multiple Server devs.  Is this
 something that will 'people scale' in the way I need it to?


 We currently have Groovy embedded in places and were looking at
 Grails.  The problem is that it is groovy is not as fast to code in as
 Ruby and Grails is not much easier to deploy then a .war (because we
 have automation).  Lift solves some real problems for us and Scala
 seems like a language with real benefits.

 Besides SpringSource is offering Grails support so we don't want to be
 too mainstream ;)


Love the attitude!



 Thanks,
 -Aaron
 http://www.aaronheld.com

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Lift picking up momentum

2009-05-07 Thread Viktor Klang
On Thu, May 7, 2009 at 12:23 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Very cool.  Made my morning which was ruined by debugging JavaScript
 written by people who should find a new line of work.


My sympathies. :/




 On Wed, May 6, 2009 at 8:17 AM, Timothy Perrett 
 timo...@getintheloop.euwrote:


 This really is very good - I'd be interested to see how the group
 membership grows when that article drops!

 Cheers, Tim

 Sent from my iPhone

 On 6 May 2009, at 14:12, TylerWeir tyler.w...@gmail.com wrote:

 
  Just an FYI: http://www.scala-lang.org/node/1702
 
  Lift a Web Framework, is receiving more attention, growing a
  commercial user base and gaining momentum. In the May/June 2009
  Edition of the IEEE Internet Computing journal Steve Vinoski publishes
  an article Scala and Lift - Functional Recipes for the Web in his
  column The Functional Web
  
 





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


 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Tail merge?

2009-05-10 Thread Viktor Klang
What I've been noodling about for some time is to have dependency management
as a part of the framework. That could be easily obtained by having widgets
etc register their dependencies in a SessionVar[List[Dependency]] and then
simply add a DispatchPF to serve those dependencies as one package with the
separate GET.

The downsides I've come up with are:

* Adds a reasonable amount of complexity
* The order of the dependencies is hard to get right
* Premature optimization
* Moves away from idea to have JS libraries served by third party hosts
* Kind of defeats the purpose of caching JS

Just my 2 cents,
Viktor

On Sun, May 10, 2009 at 8:35 PM, Timothy Perrett timo...@getintheloop.euwrote:


 Yeah google analytics is a good use case. I think talking about
 smashing static files is off topic, but there is some value in having
 a tail merge for when you want to put stuff in just before the body
 tag. My only thinking right now is that why do we need a specific
 snippet to do this? Right now, lift-tag:bind and lift-tag:with-
 param would work perfectly for this right?

 Cheers, Tim



 On May 10, 3:21 pm, Bryan. germ...@gmail.com wrote:
  A nice use for this tail merge would be for the Google Analytics
  tracking code, especially the ecommerce tracking code.
 
  Here's something to keep an eye on as well:  http://blog.digg.com/?p=621
  -- still very new and in development.
 
  --Bryan
 
  On May 10, 9:57 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
 
 
 
   On Sun, May 10, 2009 at 6:55 AM, marius d. marius.dan...@gmail.com
 wrote:
 
People can choose to smash multiple js/css files into a single one,
in fact it is a common practice. However for scripts that can be
deferred putting them at the bottom of the page can improve
 rendering.
 
   Okay.. so we're not actually putting the scripts on the page, we're
 just
   putting them right about the /body tag?
 
Br's,
Marius
 
On May 10, 4:42 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Fri, May 8, 2009 at 5:26 PM, Timothy Perrett
 timo...@getintheloop.eu
wrote:
 
  Sounds like this could be a neat addition. Looking forward to see
 what
you
  come up with :-)
 
 I'm not 100% keen on it.  Loading a ton of stuff into the HTML page
(rather
 than having stuff cached by the browser) makes for larger page
 sizes.
 I'd
 much rather see a tool that would analyze the scripts and css that
 was
 included across lots of pages and recommending to the developer to
 make
10
 CSS files or 20 script files into 1.  But that's just me.
 
  Cheers, Tim
 
  On 08/05/2009 20:19, marius d. marius.dan...@gmail.com
 wrote:
 
   A lift:tail built in snippet might me a good addition. I
 could
   probably allocate some time to noodle on it.
 
   Br's,
   Marius
 
   On May 8, 5:05 pm, KWright kev.lee.wri...@googlemail.com
 wrote:
   It's becoming an established best practice that scripts should
 be
put
   at the END of a page, where possible, in order to speed up
 download
   times
 
   Good article here:
 http://developer.yahoo.com/performance/rules.html
 
   It would be nice if Lift could help encourage and support this
 by
   allowing a tail (or Lift:tail?) element that could be
 merged in
   the same fashion as the head element, perhaps also removing
   duplicates, etc.
 
   This element would then disappear and expose only its content
 when
the
   page is ultimately sent to the browser.
 
 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
 
   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Tail merge?

2009-05-11 Thread Viktor Klang
On Sun, May 10, 2009 at 10:39 PM, marius d. marius.dan...@gmail.com wrote:




 On May 10, 10:08 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  What I've been noodling about for some time is to have dependency
 management
  as a part of the framework. That could be easily obtained by having
 widgets
  etc register their dependencies in a SessionVar[List[Dependency]] and
 then
  simply add a DispatchPF to serve those dependencies as one package with
 the
  separate GET.

 So what would this solve? ... I mean there is the ResourceServer used
 currently by widgets so that widget's dependencies to be served ...
 perhaps I'm missing something?


Nevermind; I'll see if I can make a PoC using ResourceServer.




 
  The downsides I've come up with are:
 
  * Adds a reasonable amount of complexity
  * The order of the dependencies is hard to get right
  * Premature optimization
  * Moves away from idea to have JS libraries served by third party hosts
  * Kind of defeats the purpose of caching JS
 
  Just my 2 cents,
  Viktor
 
  On Sun, May 10, 2009 at 8:35 PM, Timothy Perrett timo...@getintheloop.eu
 wrote:
 
 
 
 
 
   Yeah google analytics is a good use case. I think talking about
   smashing static files is off topic, but there is some value in having
   a tail merge for when you want to put stuff in just before the body
   tag. My only thinking right now is that why do we need a specific
   snippet to do this? Right now, lift-tag:bind and lift-tag:with-
   param would work perfectly for this right?
 
   Cheers, Tim
 
   On May 10, 3:21 pm, Bryan. germ...@gmail.com wrote:
A nice use for this tail merge would be for the Google Analytics
tracking code, especially the ecommerce tracking code.
 
Here's something to keep an eye on as well:
 http://blog.digg.com/?p=621
-- still very new and in development.
 
--Bryan
 
On May 10, 9:57 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 
 On Sun, May 10, 2009 at 6:55 AM, marius d. 
 marius.dan...@gmail.com
   wrote:
 
  People can choose to smash multiple js/css files into a single
 one,
  in fact it is a common practice. However for scripts that can be
  deferred putting them at the bottom of the page can improve
   rendering.
 
 Okay.. so we're not actually putting the scripts on the page, we're
   just
 putting them right about the /body tag?
 
  Br's,
  Marius
 
  On May 10, 4:42 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   On Fri, May 8, 2009 at 5:26 PM, Timothy Perrett
   timo...@getintheloop.eu
  wrote:
 
Sounds like this could be a neat addition. Looking forward to
 see
   what
  you
come up with :-)
 
   I'm not 100% keen on it.  Loading a ton of stuff into the HTML
 page
  (rather
   than having stuff cached by the browser) makes for larger page
   sizes.
   I'd
   much rather see a tool that would analyze the scripts and css
 that
   was
   included across lots of pages and recommending to the developer
 to
   make
  10
   CSS files or 20 script files into 1.  But that's just me.
 
Cheers, Tim
 
On 08/05/2009 20:19, marius d. marius.dan...@gmail.com
   wrote:
 
 A lift:tail built in snippet might me a good addition. I
   could
 probably allocate some time to noodle on it.
 
 Br's,
 Marius
 
 On May 8, 5:05 pm, KWright kev.lee.wri...@googlemail.com
   wrote:
 It's becoming an established best practice that scripts
 should
   be
  put
 at the END of a page, where possible, in order to speed up
   download
 times
 
 Good article here:
  http://developer.yahoo.com/performance/rules.html
 
 It would be nice if Lift could help encourage and support
 this
   by
 allowing a tail (or Lift:tail?) element that could be
   merged in
 the same fashion as the head element, perhaps also
 removing
 duplicates, etc.
 
 This element would then disappear and expose only its
 content
   when
  the
 page is ultimately sent to the browser.
 
   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp
 
 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
 
  --
  Viktor Klang
  Senior Systems Analyst
 



-- 
Viktor Klang
Senior Systems Analyst

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

[Lift] Re: Alternating row colors

2009-05-11 Thread Viktor Klang
This is the jQuery approach: (written from head, so may not compile)

CSS= .striped tr { background-color : #FF }
MARKUP= tabletbody
class=stripedtrtdhoho/td/trtrtdhaha/td/trtrtdhihi/td/tr/tbody/table
JS= $('.striped tr:nth-child(odd)').css('background-color','#DD');

Ref: http://dev.opera.com/articles/view/zebra-striping-tables-with-css3/

Cheers,
Viktor

On Mon, May 11, 2009 at 3:54 PM, marius d. marius.dan...@gmail.com wrote:


 Assume that in your snippet you have a List[String] that you want to
 render as table rows such as:


 val list = one :: two :: three :: Nil

 def render(xhtml: NodeSeq): NodeSeq = {
  table{
  list.zipWithIndex((e, idx) = trtd{e}/td/tr %
 if (idx % 2 == 0)
 Null // Null is a MetaData here
 else
 (class - my_gray_out)
  )
  }/table
 }

 note that i did not test the code ... so it may not compile ... but I
 hope you got the idea.

 Br's,
 marius

 On May 11, 3:52 pm, Magnus Alvestad magnus.alves...@gmail.com wrote:
  I'm still learning lift (and scala). For my sample application I want
  to display a table with alternating row colors. I want to put the
  style in my CSS file and add a classname to every TR in my table to
  indicate odd and even rows. However, I don't know how to take a value
  from the snippet binding and assigning it to an attribute in my
  template file. Can anyone point me in the right direction?
 
  -Magnus
 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: OSGi support for Lift

2009-05-12 Thread Viktor Klang
I feel I owe Heiko a beer.

On Tue, May 12, 2009 at 3:36 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Very good stuff!
 Looking forward to playing with it today.

 Thanks for the hard work!

 On Tue, May 12, 2009 at 12:03 AM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi Lift folks,

 Today I checked in the first little step towards OSGi support:

- Modules lift-util and lift-webkit are no longer plain vanilla JARs,
but built as OSGi bundles (OSGi metadata in META-INF/MANIFEST.MF)
- New module lift-osgi which offers (yet very limited) support for
Lift application bundles (to ones you write)
- New example module (under sites) examples-osgi with one (yet very
limited) examples-osgi-hello bundle

 The first thing I would like to ask you is to verify that the changes to
 the existing modules are free of side effects: Lift should work without OSGi
 just like before. As the changes to lift-util and lift-webkit are merely in
 the manifest, I am very confident, but just to be sure ...

 And for those of you interested in OSGi:
 Currently there is only support for resources (templates) contributed from
 Lift-powered bundles to a composite Lift application. Yet no snippets, no
 custom dispatch, etc. Please take a look at sites/examples-osgi/hello.
 Note the new manifest header Lift-Config in the POM (the value is yet
 without any meaning). This bundle contributes its resources under webappto a 
 composite Lift application. The actual work is done by
 lift-osgi which is an implementation of the extender pattern. In order to
 run the example, I suggest you use Pax 
 Runnerhttp://paxrunner.ops4j.org/space/Pax+Runnerwith the scala and web 
 profiles and the provided component configuration
 file at sites/examples-osgi/hello/hello.component. Else you will have to
 provision OSGi bundles for Scala, ScalaModules, Lift and all required
 dependencies (take a look into hello.component) by hand.

 Of course I would be very glad to get some reviews on my Scala code,
 because I guess there is still a long way of learning ahead ...

 Cheers
 Heiko
 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net





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

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: OSGi support for Lift

2009-05-12 Thread Viktor Klang
On Tue, May 12, 2009 at 3:59 PM, Timothy Perrett timo...@getintheloop.euwrote:


 If your buying Viktor ;-)

 Say, when we having a lift team beer night? Feels like were long overdue
 for something like that!


We really should!



 Cheers, Tim

 On 12/05/2009 14:50, Viktor Klang viktor.kl...@gmail.com wrote:

 I feel I owe Heiko a beer.

 On Tue, May 12, 2009 at 3:36 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Very good stuff!

 Looking forward to playing with it today.

 Thanks for the hard work!


 On Tue, May 12, 2009 at 12:03 AM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi Lift folks,

 Today I checked in the first little step towards OSGi support:

- Modules lift-util and lift-webkit are no longer plain vanilla JARs,
but built as OSGi bundles (OSGi metadata in META-INF/MANIFEST.MF)
- New module lift-osgi which offers (yet very limited) support for Lift
application bundles (to ones you write)
- New example module (under sites) examples-osgi with one (yet very
limited) examples-osgi-hello bundle

 The first thing I would like to ask you is to verify that the changes to
 the existing modules are free of side effects: Lift should work without OSGi
 just like before. As the changes to lift-util and lift-webkit are merely in
 the manifest, I am very confident, but just to be sure ...

 And for those of you interested in OSGi:
 Currently there is only support for resources (templates) contributed from
 Lift-powered bundles to a composite Lift application. Yet no snippets, no
 custom dispatch, etc. Please take a look at sites/examples-osgi/hello. Note
 the new manifest header Lift-Config in the POM (the value is yet without any
 meaning). This bundle contributes its resources under webapp to a composite
 Lift application. The actual work is done by lift-osgi which is an
 implementation of the extender pattern. In order to run the example, I
 suggest you use Pax Runner http://paxrunner.ops4j.org/space/Pax+Runner
  with the scala and web profiles and the provided component configuration
 file at sites/examples-osgi/hello/hello.component. Else you will have to
 provision OSGi bundles for Scala, ScalaModules, Lift and all required
 dependencies (take a look into hello.component) by hand.

 Of course I would be very glad to get some reviews on my Scala code,
 because I guess there is still a long way of learning ahead ...

 Cheers
 Heiko


 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: OSGi support for Lift

2009-05-12 Thread Viktor Klang
Hi Heiko,

I'm a big fan of smoked German beer like Schlenkerla Rauchbier :)

On Tue, May 12, 2009 at 4:21 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Beer sounds great (I am form Bavaria) and team beer night also ;-)How does
 this work? Everybody chatting how much she has drunk?

 Cheers
 Heiko

 2009/5/12 Viktor Klang viktor.kl...@gmail.com



 On Tue, May 12, 2009 at 3:59 PM, Timothy Perrett timo...@getintheloop.eu
  wrote:


 If your buying Viktor ;-)

 Say, when we having a lift team beer night? Feels like were long overdue
 for something like that!


 We really should!



 Cheers, Tim

 On 12/05/2009 14:50, Viktor Klang viktor.kl...@gmail.com wrote:

 I feel I owe Heiko a beer.

 On Tue, May 12, 2009 at 3:36 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Very good stuff!

 Looking forward to playing with it today.

 Thanks for the hard work!


 On Tue, May 12, 2009 at 12:03 AM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi Lift folks,

 Today I checked in the first little step towards OSGi support:

- Modules lift-util and lift-webkit are no longer plain vanilla JARs,
but built as OSGi bundles (OSGi metadata in META-INF/MANIFEST.MF)
- New module lift-osgi which offers (yet very limited) support for
Lift application bundles (to ones you write)
- New example module (under sites) examples-osgi with one (yet very
limited) examples-osgi-hello bundle

 The first thing I would like to ask you is to verify that the changes to
 the existing modules are free of side effects: Lift should work without OSGi
 just like before. As the changes to lift-util and lift-webkit are merely in
 the manifest, I am very confident, but just to be sure ...

 And for those of you interested in OSGi:
 Currently there is only support for resources (templates) contributed
 from Lift-powered bundles to a composite Lift application. Yet no snippets,
 no custom dispatch, etc. Please take a look at sites/examples-osgi/hello.
 Note the new manifest header Lift-Config in the POM (the value is yet
 without any meaning). This bundle contributes its resources under webapp to
 a composite Lift application. The actual work is done by lift-osgi which is
 an implementation of the extender pattern. In order to run the example, I
 suggest you use Pax Runner http://paxrunner.ops4j.org/space/Pax+Runner
  with the scala and web profiles and the provided component configuration
 file at sites/examples-osgi/hello/hello.component. Else you will have to
 provision OSGi bundles for Scala, ScalaModules, Lift and all required
 dependencies (take a look into hello.component) by hand.

 Of course I would be very glad to get some reviews on my Scala code,
 because I guess there is still a long way of learning ahead ...

 Cheers
 Heiko






 --
 Viktor Klang
 Senior Systems Analyst





 --
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: www.scalamodules.org
 Lift, the simply functional web framework: liftweb.net

 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: OSGi support for Lift

2009-05-12 Thread Viktor Klang
I', down with that! :)

On Tue, May 12, 2009 at 7:01 PM, Timothy Perrett timo...@getintheloop.euwrote:



 If you like that Viktor, you should hang out in some of the finest (read:
 most local) drinking establishments the west-country of England has to
 offer!

 Who's in EMEA? Me, Viktor, Heiko? Anyone else? Until the EPFL meetup next
 fall (rumoured to be happening) cant help but feel EMEA is a little left
 out
 of the scala + beer drinking times!

 Cheers, Tim

 On 12/05/2009 17:43, Viktor Klang viktor.kl...@gmail.com wrote:

  I'm a big fan of smoked German beer like Schlenkerla Rauchbier :)



 



-- 
Viktor Klang
Senior Systems Analyst

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



[Lift] Re: Jetty Session problem

2009-05-14 Thread Viktor Klang
I've seen this happen to other session based java web frameworks,  
oftentimes it's been caused by improperly configured proxies or  
terminal servers.

Does this help you?

Viktor,
Rogue Software Architect

14 maj 2009 kl. 17.43 David Pollak feeder.of.the.be...@gmail.com  
skrev:



 On Thu, May 14, 2009 at 4:42 AM, sailormoo...@gmail.com 
 sailormoo...@gmail.com 
  wrote:

 Hi :

  The Jetty server just happened a weird bug, some ppl seems to get
 into another ppl's session,

 All session state in Lift is managed using JSESSIONID.  Session  
 management is a simple and solid mechanism.  I've never seen or  
 heard of mixing sessions.

 Can you be specific about the defect and the code in your  
 application where it's manifesting itself?


 as a logined user but it's another one's. I don't know why this would
 happen, anyone knows if there is a bug,
 or maybe some configuration should be made? Thanks.





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

 

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



[Lift] Re: Lift and interoperability

2009-05-17 Thread Viktor Klang
Hello guys,

if you could scribble together a scenario, then I might be able to help you
out.

Cheers,

On Sun, May 17, 2009 at 10:53 PM, johnnie jsm2p...@googlemail.com wrote:




 On May 17, 4:33 am, rintcius rintc...@gmail.com wrote:
  Interesting discussion! I think I see a bit where Glenn is coming
  from. To me it's about *ease* of interoperability.
  For enterprise architectures the most important question is: to what
  extent is Lift helping me to build a **composable** software system.
 ...
  My guess is that this is all possible in Lift but I haven't seen
  anything in the code or docs that facilitates this.
  Maybe I have overlooked something but what I have seen so far is based
  on an all or nothing approach

 Is it just a matter of documentation?  If so, I might be able to help
 with
 that.  When I am really interested in something, people praise me
 very
 highly for being explicit, easy to understand, and forceful.  I have
 the
 same feelings as Glen and Rintcius although I have great faith in
 everything else that has been said.  If you gurus want to expand your
 influence to the great unwashed masses, please see if
 you can determine a time when you are willing to explain everything
 to me at your location.

 I am a genius, a Ph.D. and many other good things although I have a
 learning disability, ADD, and other gifts which hold me closely to
 the
 masses.  I can't see this interoperability.  But if you will take the
 time to
 explain it to me as soon as I can come to visit you in person, I will
 write
 it up so that others can understand  it better/differently than your
 current documentation.
 Sincerely, Johnnie

 



-- 
Viktor Klang
Rockstar Developer

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



[Lift] Re: lift views

2009-06-01 Thread Viktor Klang
On Sun, May 31, 2009 at 7:05 PM, Timothy Perrett timo...@getintheloop.euwrote:



 Now you mention it though, it might well work quite nicely. Talk to me
 Viktor - what are you thinking?


Just create an XSLT template to convert the lift templates to a a more
readable form?

Should be possible?




 Cheers, Tim

 On 31/05/2009 14:10, Viktor Klang viktor.kl...@gmail.com wrote:

  Couldn't they just define an XSLT template to view the lift templates
 with?



 



-- 
Viktor Klang
Rockstar Developer

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



[Lift] Re: lift views

2009-06-01 Thread Viktor Klang
On Mon, Jun 1, 2009 at 11:05 AM, Timothy Perrett timo...@getintheloop.euwrote:



  Just create an XSLT template to convert the lift templates to a a more
  readable form?
 
  Should be possible?

 Your thinking just have an XSLT just for preview purposes? That would
 be pretty sweet.


Yes, my point exactly! :)




 Perhaps we can do something with this:

 http://mojo.codehaus.org/xslt-maven-plugin/transform-mojo.html

 Cheers, Tim
 



-- 
Viktor Klang
Rockstar Developer

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



  1   2   >