[Lift] Re: How to use the many-to-many relationship in the lift Model ?

2009-10-26 Thread Neil.Lv



In your students class:
   1. declare a teacher object of type MappedLongForeignKey(this,
Role)
   In your teacher_student class:


   I have a silly question,  I don't understand this code that the
Role.

   Why is the Role not the teacher_student ?

Cheers,
  Neil

On Oct 26, 1:09 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 What is your intention regarding the students.teacher object?

 -

 YING-KWANG TUying.kwang...@gmail.com wrote:

 Neil,

 In a nutshell... assuming teacher is the main entity and student is another
 entity. You will need to:

 In your teachers class:

1. extend with ManyToMany trait
2. declare a students object of type MappedManyToMany(teacher_student,
teacher_student.teacher_id, teacher_student.student_id, students)

 In your students class:

1. declare a teacher object of type MappedLongForeignKey(this, Role)

 In your teacher_student class:

1. declare a teacher_id object of type MappedLongForeignKey(this,
teachers)
2. declare a student_id object of type MappedLongForeignKey(this,
students)

 *Note: the names are according to your convention.

 Yours,
   yk

 On Mon, Oct 26, 2009 at 12:29 PM, YING-KWANG TU 
 ying.kwang...@gmail.comwrote:

  Neil,

  The following thread has very good information on many-to-many
  implementation:

 http://groups.google.com.my/group/liftweb/browse_thread/thread/579391...

  I can't summarize it for you but the thread above do give you some
  pointers.

  Cheers,
yk

  On Mon, Oct 26, 2009 at 11:52 AM, Neil.Lv anim...@gmail.com wrote:

  Hi all,

   Dose anybody know that how to use the many-to-many relationship in
  the lift model ?

   * We need to create a 3 models to represent the 3 tables ( teachers,
  students, teacher_student )
 ex:
 teachers  -  id, name, sex, age, ...
 students -   id, name, sex, age, ...
 teacher_student - id, student_id, teacher_id

   * How to write the code in the model to represent this
  relationship ?

   Or any other ways that can achieve this purpose ?

   Thanks for any suggestion !

  Cheers,
   Neil
--~--~-~--~~~---~--~~
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: Proposal : Lift ticketing system

2009-10-26 Thread Derek Chen-Becker
I'm a fan of Trac, which is one incarnation of Wiki+Tracking+Planning. I've
set up a repo here:

http://github.com/dchenbecker/LiftTicket

My preference is for this to be an issue tracking system first and a
Wiki/CMS second, but I'm open to any and all ideas on how this can be
fleshed out. I would also like to plan on doing a couple of iterations to
get it all working. I like Marius' list of features but I'd like to start
with a subset of those and expand it. My first milestone would be getting
it to the point where it could self-host its own planning for enhancements
and bug tracking, and I think I can do that with a small set of initial
features.

Derek

On Sat, Oct 24, 2009 at 9:17 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 How about we integrate the wiki, blog, forum, and issue tracker into the
 CMS? ;)
 Seriously, maybe it would be a good idea to create a repo and list, and
 start serious discussion on all aspects of its design. Maybe it could become
 a big community project, with lots of feedback to Lift.


 -
 jlist9jli...@gmail.com wrote:


 CMS, wiki, blog, forum also sound more interesting than bug tracking
 system to me :-)

 On Sat, Oct 24, 2009 at 11:13 AM, aw anth...@whitford.com wrote:
 
  I don't mean to be negative, but are other options being considered
  besides a ticketing system?  I kind of wonder if the effort is worth
  it when excellent alternatives exist (like JIRA -- their Git
  integration may interest you:
 https://plugins.atlassian.com/plugin/details/4984
  -- I have used their Subversion integration and was very pleased).
 
  I would be far more interested in seeing something done for the
  benefit of the Lift Web Site.  (Is it written with Lift?)  I don't see
  a Lift CMS -- and that is something that could evolve well over time.
  I think it is important for a web framework to use their own stuff,
  and it should be indicative of the cool things that it can do,
  stability, scale, and performance...  (I am amazed that I have seen
  rather poor demonstrations of this, specifically by Adobe and JBoss --
  but again, I'm not trying to be negative...)
 
  I see the Lift site integrating Google Analytics...  Is that something
  that could be out of the box with Lift?  That could be a selling
  point to people making external web sites.
 
  Another area that would be neat to develop is instrumentation.  Sort
  of the JMX-Console equivalent for Lift.  For scalability and sizing
  analysis, this would be really useful.
 
 
  Having said that, one major feature that I feel is missing from github
  is the lack of attachments for an issue.  How do you attach test cases
  or patches for an issue?
 
  
 



 


--~--~-~--~~~---~--~~
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] CometActor fixedRender vs. render

2009-10-26 Thread Heiko Seeberger
Hi,

In CometActor, what's the puropse of fixedRender? What's the
difference/relation to render?

Thanks

Heiko

--

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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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] About the rewrite and dispatch in the LiftRules ?

2009-10-26 Thread Neil.Lv

Hi all;

  I have a newbie question, I'm confused with the LiftRules.rewrite
and LiftRules.dispatch.

  When we need to use the rewrite and dispatch ?

  I feel that they are very similar.

Cheers,
  Neil
--~--~-~--~~~---~--~~
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: About the rewrite and dispatch in the LiftRules ?

2009-10-26 Thread Timothy Perrett

Hi Niel,

Please see:

http://blog.getintheloop.eu/2009/5/3/url-rewriting-with-the-lift-framework

Have a read, that will explain rewriting for you. Dispatching is quite  
different; one would use it where you want to supply a response  
without a HTML file (for instance, with a json api)

Does that help?

Cheers, Tim

Sent from my iPhone

On 26 Oct 2009, at 07:59, Neil.Lv anim...@gmail.com wrote:


 Hi all;

  I have a newbie question, I'm confused with the LiftRules.rewrite
 and LiftRules.dispatch.

  When we need to use the rewrite and dispatch ?

  I feel that they are very similar.

 Cheers,
  Neil
 


--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Timothy Perrett

Neil,

Can you zip and send me an example? It's quite likley your missing  
something and without seeing the code it's difficult to say.

Cheers, Tim

Sent from my iPhone

On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:



 in the /index.html
 ###  both of them are not work !
  lift:loc locid=log.inLog in/lift:loc
  lift:loc id=log.inLog in/lift:loc
 ###

 Cheers,
  Neil

 On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Neil,

 This is normal practice with java localisation - the best thing is do
 write all your strings then use native2ascii or similar tooling to
 convert it into the unicode representation.

 Glad you found my article helpful.

 Cheers, Tim

 On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

   if i use this code and it works correctly !

  Code:
  ###
login = \u52a8\u4f5c
  ###

  But it's so difficult to write code !

  I don't know what happens with it .

 Cheers,
  Neil

 On Oct 25, 7:19 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Please make sure your lift-core_zh_CN.properties was saved as UTF-8

 On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com  
 wrote:

 Hi all,

  I create a props file in the resources folder  /src/main/ 
 resources/
 i18n/lift-core_zh_CN.properties

  And i changed the log.in text value.

  Now i use this code in my index.html page, and it doesn't  
 corretly.
 (garbled)

  ### it doesn't work
lift:loc locid=log.inLog in/lift:loc
  ###

 This information from:

 http://blog.getintheloop.eu/2009/7/26/how-to-extensive-localization-w 
 ...

 Cheers,
 Neil

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


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 use the many-to-many relationship in the lift Model ?

2009-10-26 Thread Neil.Lv

  Thanks guys!

  Maybe i should look at this thread first!
  
http://groups.google.com.my/group/liftweb/browse_thread/thread/5793917fee419f89

Cheers,
  Neil


On Oct 26, 2:21 pm, Neil.Lv anim...@gmail.com wrote:
 In your students class:
1. declare a teacher object of type MappedLongForeignKey(this,
 Role)
In your teacher_student class:



I have a silly question,  I don't understand this code that the
 Role.

Why is the Role not the teacher_student ?

 Cheers,
   Neil

 On Oct 26, 1:09 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:

  What is your intention regarding the students.teacher object?

  -

  YING-KWANG TUying.kwang...@gmail.com wrote:

  Neil,

  In a nutshell... assuming teacher is the main entity and student is another
  entity. You will need to:

  In your teachers class:

 1. extend with ManyToMany trait
 2. declare a students object of type MappedManyToMany(teacher_student,
 teacher_student.teacher_id, teacher_student.student_id, students)

  In your students class:

 1. declare a teacher object of type MappedLongForeignKey(this, Role)

  In your teacher_student class:

 1. declare a teacher_id object of type MappedLongForeignKey(this,
 teachers)
 2. declare a student_id object of type MappedLongForeignKey(this,
 students)

  *Note: the names are according to your convention.

  Yours,
yk

  On Mon, Oct 26, 2009 at 12:29 PM, YING-KWANG TU 
  ying.kwang...@gmail.comwrote:

   Neil,

   The following thread has very good information on many-to-many
   implementation:

  http://groups.google.com.my/group/liftweb/browse_thread/thread/579391...

   I can't summarize it for you but the thread above do give you some
   pointers.

   Cheers,
 yk

   On Mon, Oct 26, 2009 at 11:52 AM, Neil.Lv anim...@gmail.com wrote:

   Hi all,

Dose anybody know that how to use the many-to-many relationship in
   the lift model ?

* We need to create a 3 models to represent the 3 tables ( teachers,
   students, teacher_student )
  ex:
  teachers  -  id, name, sex, age, ...
  students -   id, name, sex, age, ...
  teacher_student - id, student_id, teacher_id

* How to write the code in the model to represent this
   relationship ?

Or any other ways that can achieve this purpose ?

Thanks for any suggestion !

   Cheers,
Neil
--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Neil.Lv


1:)   I create a file in the i18n folder
/src/main/resources/i18n/lift-core_zh_CN.properties
.
login = \u767b\u5f55
logout = \u9000\u51fa
log.in = \u767b\u5f55
log.out = \u9000\u51fa
sign.up = \u6ce8\u518c
logged.in = \u5df2\u7ecf\u767b\u5f55
..
the others are default (copy from lift-core_en_US.properties)

2:)
### index.html
lift:surround with=default at=content
  lift:loc id=loginLog in 111/lift:loc
  lift:loc locid=loginLog in 222/lift:loc
/lift:surround

The lift:loc doesn't work that it should read the i18n string from the
lift-core_zh_CN.properties and show the chinese chars, (login = \u767b
\u5f55)

but it always shows the default string (Log in 111, Log in 222).

Has anything will be config ?

Cheers,
  Neil

On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Neil,

 Can you zip and send me an example? It's quite likley your missing
 something and without seeing the code it's difficult to say.

 Cheers, Tim

 Sent from my iPhone

 On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:



  in the /index.html
  ###  both of them are not work !
   lift:loc locid=log.inLog in/lift:loc
   lift:loc id=log.inLog in/lift:loc
  ###

  Cheers,
   Neil

  On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  Neil,

  This is normal practice with java localisation - the best thing is do
  write all your strings then use native2ascii or similar tooling to
  convert it into the unicode representation.

  Glad you found my article helpful.

  Cheers, Tim

  On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

if i use this code and it works correctly !

   Code:
   ###
 login = \u52a8\u4f5c
   ###

   But it's so difficult to write code !

   I don't know what happens with it .

  Cheers,
   Neil

  On Oct 25, 7:19 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:

  Please make sure your lift-core_zh_CN.properties was saved as UTF-8

  On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com
  wrote:

  Hi all,

   I create a props file in the resources folder  /src/main/
  resources/
  i18n/lift-core_zh_CN.properties

   And i changed the log.in text value.

   Now i use this code in my index.html page, and it doesn't
  corretly.
  (garbled)

   ### it doesn't work
 lift:loc locid=log.inLog in/lift:loc
   ###

  This information from:

 http://blog.getintheloop.eu/2009/7/26/how-to-extensive-localization-w
  ...

  Cheers,
  Neil

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 use the many-to-many relationship in the lift Model ?

2009-10-26 Thread Timothy Perrett

Neil,

If you found this useful we would very much appreciate it if you could
put something on the wiki about it to help people who follow.

Cheers, Tim

On Oct 26, 8:22 am, Neil.Lv anim...@gmail.com wrote:
   Thanks guys!

   Maybe i should look at this thread first!
  http://groups.google.com.my/group/liftweb/browse_thread/thread/579391...

 Cheers,
   Neil

 On Oct 26, 2:21 pm, Neil.Lv anim...@gmail.com wrote:



  In your students class:
     1. declare a teacher object of type MappedLongForeignKey(this,
  Role)
     In your teacher_student class:

     I have a silly question,  I don't understand this code that the
  Role.

     Why is the Role not the teacher_student ?

  Cheers,
    Neil

  On Oct 26, 1:09 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:

   What is your intention regarding the students.teacher object?

   -

   YING-KWANG TUying.kwang...@gmail.com wrote:

   Neil,

   In a nutshell... assuming teacher is the main entity and student is 
   another
   entity. You will need to:

   In your teachers class:

      1. extend with ManyToMany trait
      2. declare a students object of type 
   MappedManyToMany(teacher_student,
      teacher_student.teacher_id, teacher_student.student_id, students)

   In your students class:

      1. declare a teacher object of type MappedLongForeignKey(this, 
   Role)

   In your teacher_student class:

      1. declare a teacher_id object of type MappedLongForeignKey(this,
      teachers)
      2. declare a student_id object of type MappedLongForeignKey(this,
      students)

   *Note: the names are according to your convention.

   Yours,
     yk

   On Mon, Oct 26, 2009 at 12:29 PM, YING-KWANG TU 
   ying.kwang...@gmail.comwrote:

Neil,

The following thread has very good information on many-to-many
implementation:

   http://groups.google.com.my/group/liftweb/browse_thread/thread/579391...

I can't summarize it for you but the thread above do give you some
pointers.

Cheers,
  yk

On Mon, Oct 26, 2009 at 11:52 AM, Neil.Lv anim...@gmail.com wrote:

Hi all,

 Dose anybody know that how to use the many-to-many relationship in
the lift model ?

 * We need to create a 3 models to represent the 3 tables ( teachers,
students, teacher_student )
   ex:
   teachers  -  id, name, sex, age, ...
   students -   id, name, sex, age, ...
   teacher_student - id, student_id, teacher_id

 * How to write the code in the model to represent this
relationship ?

 Or any other ways that can achieve this purpose ?

 Thanks for any suggestion !

Cheers,
 Neil
--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Timothy Perrett

Hmm - you posted a link to my article at the begining of this thread;
in that article I explain lifts locale calculator. Without this, Lift
has no idea how you want to handle different locales. By default, the
following is used:

  var localeCalculator: Box[HTTPRequest] = Locale =
defaultLocaleCalculator _

  def defaultLocaleCalculator(request: Box[HTTPRequest]) =
  request.flatMap(_.locale).openOr(Locale.getDefault())

As you can see, that will get only the locale of your JVM, not the
browser. You will need to write the appropriate locale calculator; the
one in my article is a little out of date as there was a breaking
change not so long ago to the HTTP container providers but it should
give you enough to go on.

Does that help?

Cheers, Tim

On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:
 1:)   I create a file in the i18n folder
 /src/main/resources/i18n/lift-core_zh_CN.properties
 .
 login = \u767b\u5f55
 logout = \u9000\u51fa
 log.in = \u767b\u5f55
 log.out = \u9000\u51fa
 sign.up = \u6ce8\u518c
 logged.in = \u5df2\u7ecf\u767b\u5f55
 ..
 the others are default (copy from lift-core_en_US.properties)

 2:)
 ### index.html
 lift:surround with=default at=content
   lift:loc id=loginLog in 111/lift:loc
   lift:loc locid=loginLog in 222/lift:loc
 /lift:surround

 The lift:loc doesn't work that it should read the i18n string from the
 lift-core_zh_CN.properties and show the chinese chars, (login = \u767b
 \u5f55)

 but it always shows the default string (Log in 111, Log in 222).

 Has anything will be config ?

 Cheers,
   Neil

 On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu wrote:



  Neil,

  Can you zip and send me an example? It's quite likley your missing
  something and without seeing the code it's difficult to say.

  Cheers, Tim

  Sent from my iPhone

  On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

   in the /index.html
   ###  both of them are not work !
    lift:loc locid=log.inLog in/lift:loc
    lift:loc id=log.inLog in/lift:loc
   ###

   Cheers,
    Neil

   On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu wrote:
   Neil,

   This is normal practice with java localisation - the best thing is do
   write all your strings then use native2ascii or similar tooling to
   convert it into the unicode representation.

   Glad you found my article helpful.

   Cheers, Tim

   On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

     if i use this code and it works correctly !

    Code:
    ###
      login = \u52a8\u4f5c
    ###

    But it's so difficult to write code !

    I don't know what happens with it .

   Cheers,
    Neil

   On Oct 25, 7:19 am, David Pollak feeder.of.the.be...@gmail.com
   wrote:

   Please make sure your lift-core_zh_CN.properties was saved as UTF-8

   On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com
   wrote:

   Hi all,

    I create a props file in the resources folder  /src/main/
   resources/
   i18n/lift-core_zh_CN.properties

    And i changed the log.in text value.

    Now i use this code in my index.html page, and it doesn't
   corretly.
   (garbled)

    ### it doesn't work
      lift:loc locid=log.inLog in/lift:loc
    ###

   This information from:

  http://blog.getintheloop.eu/2009/7/26/how-to-extensive-localization-w
   ...

   Cheers,
   Neil

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: About the rewrite and dispatch in the LiftRules ?

2009-10-26 Thread Neil.Lv

  Thanks Timothy, this thread is very good and helpful.

  But the the partial function link maybe broken,  :)
  http://suereth.blogspot.com/2008/11/using-partial-functions-and-pattern.html


Cheers,
  Neil

On Oct 26, 4:09 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Hi Niel,

 Please see:

 http://blog.getintheloop.eu/2009/5/3/url-rewriting-with-the-lift-fram...

 Have a read, that will explain rewriting for you. Dispatching is quite
 different; one would use it where you want to supply a response
 without a HTML file (for instance, with a json api)

 Does that help?

 Cheers, Tim

 Sent from my iPhone

 On 26 Oct 2009, at 07:59, Neil.Lv anim...@gmail.com wrote:



  Hi all;

   I have a newbie question, I'm confused with the LiftRules.rewrite
  and LiftRules.dispatch.

   When we need to use the rewrite and dispatch ?

   I feel that they are very similar.

  Cheers,
   Neil
--~--~-~--~~~---~--~~
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 plugin 'org.apache.maven.plugins:maven-scala-plugin' does not exist

2009-10-26 Thread Timothy Perrett

Hey Indrajit,

No that branch does not work either - im trying to build from the very  
root of lift - this should work!! I have the maven plugin in my local  
repo and build lots of other scala projects fine; this has only been  
an issue since your restructure.

Any ideas what could be going wrong? Could do with fixing this ASAP as  
its annoying as hell to have to build separate modules.

Cheers, Tim

On 26 Oct 2009, at 04:39, Indrajit Raychaudhuri wrote:


 Tim,

 That's odd indeed. Hopefully your local repository is not broken.

 Can you please attempt it on the branch irc_wip_restruct_stage and see
 if it happens there too? If it still persists for you I'll take a look
 later in the day.

 Cheers, Indrajit


 On 26/10/09 12:42 AM, Timothy Perrett wrote:

 Guys,

 Im getting the below when building a fresh pull of lift - It doesnt
 even appear to be looking at scala-tools, despite it being defined.
 Very odd, any ideas?

 Cheers, Tim


 [INFO] Searching repository for plugin with prefix: 'scala'.
 [INFO] org.apache.maven.plugins: checking for updates from scala-
 tools.release
 [INFO] org.apache.maven.plugins: checking for updates from scala-
 tools.snapshot
 [INFO] org.apache.maven.plugins: checking for updates from central
 [INFO] org.codehaus.mojo: checking for updates from scala-
 tools.release
 [INFO] org.codehaus.mojo: checking for updates from scala-
 tools.snapshot
 [INFO] org.codehaus.mojo: checking for updates from central
 [INFO] artifact org.apache.maven.plugins:maven-scala-plugin: checking
 for updates from scala-tools.release
 [INFO] artifact org.apache.maven.plugins:maven-scala-plugin: checking
 for updates from scala-tools.snapshot
 [INFO] artifact org.apache.maven.plugins:maven-scala-plugin: checking
 for updates from central
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] The plugin 'org.apache.maven.plugins:maven-scala-plugin' does
 not exist or no valid version could be found
 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 


 



--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Neil.Lv

 tryo(r.getParameter(locale)) match {
case Full(null) = workOutLocale
case Empty = workOutLocale
case Failure(_,_,_) = workOutLocale
case Full(selectedLocale) = {
  setLocale(selectedLocale)
  selectedLocale
}
  }

  In this code ,  what's the tryo ? is try ?
  tryo () match {}

  What's the changes about the HTTP container providers?

  Thanks very much!

Cheers,
  Neil


On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Hmm - you posted a link to my article at the begining of this thread;
 in that article I explain lifts locale calculator. Without this, Lift
 has no idea how you want to handle different locales. By default, the
 following is used:

   var localeCalculator: Box[HTTPRequest] = Locale =
 defaultLocaleCalculator _

   def defaultLocaleCalculator(request: Box[HTTPRequest]) =
   request.flatMap(_.locale).openOr(Locale.getDefault())

 As you can see, that will get only the locale of your JVM, not the
 browser. You will need to write the appropriate locale calculator; the
 one in my article is a little out of date as there was a breaking
 change not so long ago to the HTTP container providers but it should
 give you enough to go on.

 Does that help?

 Cheers, Tim

 On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

  1:)   I create a file in the i18n folder
  /src/main/resources/i18n/lift-core_zh_CN.properties
  .
  login = \u767b\u5f55
  logout = \u9000\u51fa
  log.in = \u767b\u5f55
  log.out = \u9000\u51fa
  sign.up = \u6ce8\u518c
  logged.in = \u5df2\u7ecf\u767b\u5f55
  ..
  the others are default (copy from lift-core_en_US.properties)

  2:)
  ### index.html
  lift:surround with=default at=content
lift:loc id=loginLog in 111/lift:loc
lift:loc locid=loginLog in 222/lift:loc
  /lift:surround

  The lift:loc doesn't work that it should read the i18n string from the
  lift-core_zh_CN.properties and show the chinese chars, (login = \u767b
  \u5f55)

  but it always shows the default string (Log in 111, Log in 222).

  Has anything will be config ?

  Cheers,
Neil

  On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu wrote:

   Neil,

   Can you zip and send me an example? It's quite likley your missing
   something and without seeing the code it's difficult to say.

   Cheers, Tim

   Sent from my iPhone

   On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

in the /index.html
###  both of them are not work !
 lift:loc locid=log.inLog in/lift:loc
 lift:loc id=log.inLog in/lift:loc
###

Cheers,
 Neil

On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu wrote:
Neil,

This is normal practice with java localisation - the best thing is do
write all your strings then use native2ascii or similar tooling to
convert it into the unicode representation.

Glad you found my article helpful.

Cheers, Tim

On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

  if i use this code and it works correctly !

 Code:
 ###
   login = \u52a8\u4f5c
 ###

 But it's so difficult to write code !

 I don't know what happens with it .

Cheers,
 Neil

On Oct 25, 7:19 am, David Pollak feeder.of.the.be...@gmail.com
wrote:

Please make sure your lift-core_zh_CN.properties was saved as UTF-8

On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com
wrote:

Hi all,

 I create a props file in the resources folder  /src/main/
resources/
i18n/lift-core_zh_CN.properties

 And i changed the log.in text value.

 Now i use this code in my index.html page, and it doesn't
corretly.
(garbled)

 ### it doesn't work
   lift:loc locid=log.inLog in/lift:loc
 ###

This information from:

   http://blog.getintheloop.eu/2009/7/26/how-to-extensive-localization-w
...

Cheers,
Neil

--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: About the localization with lift:loc !

2009-10-26 Thread Neil.Lv


  lift:loc locid=loginLog in 222/lift:loc
  That means this code is correctly, the problem is that the browser
doesn't know the locale?

  So we need to calculate the locale in the Boot.scala file ?

Cheers,
  Neil



On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
  tryo(r.getParameter(locale)) match {
 case Full(null) = workOutLocale
 case Empty = workOutLocale
 case Failure(_,_,_) = workOutLocale
 case Full(selectedLocale) = {
   setLocale(selectedLocale)
   selectedLocale
 }
   }

   In this code ,  what's the tryo ? is try ?
   tryo () match {}

   What's the changes about the HTTP container providers?

   Thanks very much!

 Cheers,
   Neil

 On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu wrote:

  Hmm - you posted a link to my article at the begining of this thread;
  in that article I explain lifts locale calculator. Without this, Lift
  has no idea how you want to handle different locales. By default, the
  following is used:

var localeCalculator: Box[HTTPRequest] = Locale =
  defaultLocaleCalculator _

def defaultLocaleCalculator(request: Box[HTTPRequest]) =
request.flatMap(_.locale).openOr(Locale.getDefault())

  As you can see, that will get only the locale of your JVM, not the
  browser. You will need to write the appropriate locale calculator; the
  one in my article is a little out of date as there was a breaking
  change not so long ago to the HTTP container providers but it should
  give you enough to go on.

  Does that help?

  Cheers, Tim

  On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

   1:)   I create a file in the i18n folder
   /src/main/resources/i18n/lift-core_zh_CN.properties
   .
   login = \u767b\u5f55
   logout = \u9000\u51fa
   log.in = \u767b\u5f55
   log.out = \u9000\u51fa
   sign.up = \u6ce8\u518c
   logged.in = \u5df2\u7ecf\u767b\u5f55
   ..
   the others are default (copy from lift-core_en_US.properties)

   2:)
   ### index.html
   lift:surround with=default at=content
 lift:loc id=loginLog in 111/lift:loc
 lift:loc locid=loginLog in 222/lift:loc
   /lift:surround

   The lift:loc doesn't work that it should read the i18n string from the
   lift-core_zh_CN.properties and show the chinese chars, (login = \u767b
   \u5f55)

   but it always shows the default string (Log in 111, Log in 222).

   Has anything will be config ?

   Cheers,
 Neil

   On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu wrote:

Neil,

Can you zip and send me an example? It's quite likley your missing
something and without seeing the code it's difficult to say.

Cheers, Tim

Sent from my iPhone

On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

 in the /index.html
 ###  both of them are not work !
  lift:loc locid=log.inLog in/lift:loc
  lift:loc id=log.inLog in/lift:loc
 ###

 Cheers,
  Neil

 On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Neil,

 This is normal practice with java localisation - the best thing is do
 write all your strings then use native2ascii or similar tooling to
 convert it into the unicode representation.

 Glad you found my article helpful.

 Cheers, Tim

 On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

   if i use this code and it works correctly !

  Code:
  ###
login = \u52a8\u4f5c
  ###

  But it's so difficult to write code !

  I don't know what happens with it .

 Cheers,
  Neil

 On Oct 25, 7:19 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Please make sure your lift-core_zh_CN.properties was saved as UTF-8

 On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com
 wrote:

 Hi all,

  I create a props file in the resources folder  /src/main/
 resources/
 i18n/lift-core_zh_CN.properties

  And i changed the log.in text value.

  Now i use this code in my index.html page, and it doesn't
 corretly.
 (garbled)

  ### it doesn't work
lift:loc locid=log.inLog in/lift:loc
  ###

 This information from:

http://blog.getintheloop.eu/2009/7/26/how-to-extensive-localization-w
 ...

 Cheers,
 Neil

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: About the localization with lift:loc !

2009-10-26 Thread Timothy Perrett

Yes, your template code is right - your just seeing the default value  
because you have not told lift what resources to use when it gets the  
locale header from the browser.

tryo() is like try/catch however, it will catch exceptions and returns  
Box[T]

I would really suggest starting with something a lot simpler than the  
one i detailed that uses cookies and all sorts. Perhaps something like:

def localeCalculator(request : Box[HTTPRequest]): Locale =
   request.flatMap(r = {
   tryo(r.locale) match {
 // your match here
   }
}).openOr(java.util.Locale.getDefault())

Hope that helps

Cheers, Tim

On 26 Oct 2009, at 09:21, Neil.Lv wrote:



  lift:loc locid=loginLog in 222/lift:loc
  That means this code is correctly, the problem is that the browser
 doesn't know the locale?

  So we need to calculate the locale in the Boot.scala file ?

 Cheers,
  Neil



 On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
 tryo(r.getParameter(locale)) match {
case Full(null) = workOutLocale
case Empty = workOutLocale
case Failure(_,_,_) = workOutLocale
case Full(selectedLocale) = {
  setLocale(selectedLocale)
  selectedLocale
}
  }

  In this code ,  what's the tryo ? is try ?
  tryo () match {}

  What's the changes about the HTTP container providers?

  Thanks very much!

 Cheers,
  Neil

 On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu wrote:

 Hmm - you posted a link to my article at the begining of this  
 thread;
 in that article I explain lifts locale calculator. Without this,  
 Lift
 has no idea how you want to handle different locales. By default,  
 the
 following is used:

  var localeCalculator: Box[HTTPRequest] = Locale =
 defaultLocaleCalculator _

  def defaultLocaleCalculator(request: Box[HTTPRequest]) =
  request.flatMap(_.locale).openOr(Locale.getDefault())

 As you can see, that will get only the locale of your JVM, not the
 browser. You will need to write the appropriate locale calculator;  
 the
 one in my article is a little out of date as there was a breaking
 change not so long ago to the HTTP container providers but it should
 give you enough to go on.

 Does that help?

 Cheers, Tim

 On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

 1:)   I create a file in the i18n folder
 /src/main/resources/i18n/lift-core_zh_CN.properties
 .
 login = \u767b\u5f55
 logout = \u9000\u51fa
 log.in = \u767b\u5f55
 log.out = \u9000\u51fa
 sign.up = \u6ce8\u518c
 logged.in = \u5df2\u7ecf\u767b\u5f55
 ..
 the others are default (copy from lift-core_en_US.properties)

 2:)
 ### index.html
 lift:surround with=default at=content
  lift:loc id=loginLog in 111/lift:loc
  lift:loc locid=loginLog in 222/lift:loc
 /lift:surround

 The lift:loc doesn't work that it should read the i18n string  
 from the
 lift-core_zh_CN.properties and show the chinese chars, (login =  
 \u767b
 \u5f55)

 but it always shows the default string (Log in 111, Log in 222).

 Has anything will be config ?

 Cheers,
  Neil

 On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu  
 wrote:

 Neil,

 Can you zip and send me an example? It's quite likley your missing
 something and without seeing the code it's difficult to say.

 Cheers, Tim

 Sent from my iPhone

 On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

 in the /index.html
 ###  both of them are not work !
 lift:loc locid=log.inLog in/lift:loc
 lift:loc id=log.inLog in/lift:loc
 ###

 Cheers,
 Neil

 On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu  
 wrote:
 Neil,

 This is normal practice with java localisation - the best  
 thing is do
 write all your strings then use native2ascii or similar  
 tooling to
 convert it into the unicode representation.

 Glad you found my article helpful.

 Cheers, Tim

 On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

  if i use this code and it works correctly !

 Code:
 ###
   login = \u52a8\u4f5c
 ###

 But it's so difficult to write code !

 I don't know what happens with it .

 Cheers,
 Neil

 On Oct 25, 7:19 am, David Pollak  
 feeder.of.the.be...@gmail.com
 wrote:

 Please make sure your lift-core_zh_CN.properties was saved  
 as UTF-8

 On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com
 wrote:

 Hi all,

 I create a props file in the resources folder  /src/main/
 resources/
 i18n/lift-core_zh_CN.properties

 And i changed the log.in text value.

 Now i use this code in my index.html page, and it doesn't
 corretly.
 (garbled)

 ### it doesn't work
   lift:loc locid=log.inLog in/lift:loc
 ###

 This information from:

 http://blog.getintheloop.eu/2009/7/26/how-to-extensive-localization-w
 ...

 Cheers,
 Neil

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this 

[Lift] How to render ajax response that needs dynamic snippets?

2009-10-26 Thread Jeppe Nejsum Madsen

Hi,

I'm using the same rewriting code as in CRUDify, so that URLs like

tender/results/2

show a result page for the tender with id 2. This page contains lots of
snippets, defined (as in CRUDify) within a SnippetTest partial function.

The page renders fine when hit for the first time. The user can change
various parameters on the page, causing some of the content on the page
to change using ajax. 

I can't seem to render the content in this ajax call. It doesn't render
the snippets defined in the snippets partial function, but renders other
(ie global snippets) ok. This is an example of a select element, that
should change some content on the page:

case (result.name, Full(wp: Result)) = s = Text(wp.name.is)
case (result.select, Full(result: Result)) = {
  curResult(Full(result)); 
  s = {
def doSelect(msg: NodeSeq) =
ajaxSelectObj(lcs.map(lc = (lc, lc.name.is)), Empty,
lc = {
  val nodeseq = 
TemplateFinder.findAnyTemplate(List(result, results)).open_!
  val sub = chooseTemplate(lift, 
result.result_comparison, nodeseq)
  val markup = 
S.session.open_!.processSurroundAndInclude(mypage, sub)
  println(processed:+markup)
  SetHtml(mylc, Text(lc.name.is))
})


bind(select, s, 
 lc1 - doSelect _,
 lc2 - doSelect _
)
  }
}
 
Here, markup does not contain the contents of the snippet result.name,
but does contain the results of other, standalone, snippets.

Any clues? Or is there a better way to render partial page content?

/Jeppe

--~--~-~--~~~---~--~~
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 plugin 'org.apache.maven.plugins:maven-scala-plugin' does not exist

2009-10-26 Thread Indrajit Raychaudhuri

Tim,

That's confusing to me too. I was trying to see if it has something 
related to the problem that affects Netbeans. Looks like it's not.

Can you please send me the output of mvn goal with -X switch?

Cheers, Indrajit


On 26/10/09 2:23 PM, Timothy Perrett wrote:

 Hey Indrajit,

 No that branch does not work either - im trying to build from the very
 root of lift - this should work!! I have the maven plugin in my local
 repo and build lots of other scala projects fine; this has only been
 an issue since your restructure.

 Any ideas what could be going wrong? Could do with fixing this ASAP as
 its annoying as hell to have to build separate modules.

 Cheers, Tim

 On 26 Oct 2009, at 04:39, Indrajit Raychaudhuri wrote:


 Tim,

 That's odd indeed. Hopefully your local repository is not broken.

 Can you please attempt it on the branch irc_wip_restruct_stage and see
 if it happens there too? If it still persists for you I'll take a look
 later in the day.

 Cheers, Indrajit


 On 26/10/09 12:42 AM, Timothy Perrett wrote:

 Guys,

 Im getting the below when building a fresh pull of lift - It doesnt
 even appear to be looking at scala-tools, despite it being defined.
 Very odd, any ideas?

 Cheers, Tim


 [INFO] Searching repository for plugin with prefix: 'scala'.
 [INFO] org.apache.maven.plugins: checking for updates from scala-
 tools.release
 [INFO] org.apache.maven.plugins: checking for updates from scala-
 tools.snapshot
 [INFO] org.apache.maven.plugins: checking for updates from central
 [INFO] org.codehaus.mojo: checking for updates from scala-
 tools.release
 [INFO] org.codehaus.mojo: checking for updates from scala-
 tools.snapshot
 [INFO] org.codehaus.mojo: checking for updates from central
 [INFO] artifact org.apache.maven.plugins:maven-scala-plugin: checking
 for updates from scala-tools.release
 [INFO] artifact org.apache.maven.plugins:maven-scala-plugin: checking
 for updates from scala-tools.snapshot
 [INFO] artifact org.apache.maven.plugins:maven-scala-plugin: checking
 for updates from central
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] The plugin 'org.apache.maven.plugins:maven-scala-plugin' does
 not exist or no valid version could be found
 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 






 

--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Neil.Lv

I have a silly question ,  where is the setLocale method ?

I don't know where the package located.

src\main\scala\bootstrap\liftweb\Boot.scala:63: error: not found:
value setLocale
   setLocale(selectedLocale)

:)

Cheers,
  Neil

On Oct 26, 5:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Yes, your template code is right - your just seeing the default value  
 because you have not told lift what resources to use when it gets the  
 locale header from the browser.

 tryo() is like try/catch however, it will catch exceptions and returns  
 Box[T]

 I would really suggest starting with something a lot simpler than the  
 one i detailed that uses cookies and all sorts. Perhaps something like:

 def localeCalculator(request : Box[HTTPRequest]): Locale =
    request.flatMap(r = {
    tryo(r.locale) match {
      // your match here
    }

 }).openOr(java.util.Locale.getDefault())

 Hope that helps

 Cheers, Tim

 On 26 Oct 2009, at 09:21, Neil.Lv wrote:



   lift:loc locid=loginLog in 222/lift:loc
   That means this code is correctly, the problem is that the browser
  doesn't know the locale?

   So we need to calculate the locale in the Boot.scala file ?

  Cheers,
   Neil

  On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
  tryo(r.getParameter(locale)) match {
     case Full(null) = workOutLocale
     case Empty = workOutLocale
     case Failure(_,_,_) = workOutLocale
     case Full(selectedLocale) = {
       setLocale(selectedLocale)
       selectedLocale
     }
   }

   In this code ,  what's the tryo ? is try ?
   tryo () match {}

   What's the changes about the HTTP container providers?

   Thanks very much!

  Cheers,
   Neil

  On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu wrote:

  Hmm - you posted a link to my article at the begining of this  
  thread;
  in that article I explain lifts locale calculator. Without this,  
  Lift
  has no idea how you want to handle different locales. By default,  
  the
  following is used:

   var localeCalculator: Box[HTTPRequest] = Locale =
  defaultLocaleCalculator _

   def defaultLocaleCalculator(request: Box[HTTPRequest]) =
   request.flatMap(_.locale).openOr(Locale.getDefault())

  As you can see, that will get only the locale of your JVM, not the
  browser. You will need to write the appropriate locale calculator;  
  the
  one in my article is a little out of date as there was a breaking
  change not so long ago to the HTTP container providers but it should
  give you enough to go on.

  Does that help?

  Cheers, Tim

  On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

  1:)   I create a file in the i18n folder
  /src/main/resources/i18n/lift-core_zh_CN.properties
  .
  login = \u767b\u5f55
  logout = \u9000\u51fa
  log.in = \u767b\u5f55
  log.out = \u9000\u51fa
  sign.up = \u6ce8\u518c
  logged.in = \u5df2\u7ecf\u767b\u5f55
  ..
  the others are default (copy from lift-core_en_US.properties)

  2:)
  ### index.html
  lift:surround with=default at=content
   lift:loc id=loginLog in 111/lift:loc
   lift:loc locid=loginLog in 222/lift:loc
  /lift:surround

  The lift:loc doesn't work that it should read the i18n string  
  from the
  lift-core_zh_CN.properties and show the chinese chars, (login =  
  \u767b
  \u5f55)

  but it always shows the default string (Log in 111, Log in 222).

  Has anything will be config ?

  Cheers,
   Neil

  On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu  
  wrote:

  Neil,

  Can you zip and send me an example? It's quite likley your missing
  something and without seeing the code it's difficult to say.

  Cheers, Tim

  Sent from my iPhone

  On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

  in the /index.html
  ###  both of them are not work !
  lift:loc locid=log.inLog in/lift:loc
  lift:loc id=log.inLog in/lift:loc
  ###

  Cheers,
  Neil

  On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu  
  wrote:
  Neil,

  This is normal practice with java localisation - the best  
  thing is do
  write all your strings then use native2ascii or similar  
  tooling to
  convert it into the unicode representation.

  Glad you found my article helpful.

  Cheers, Tim

  On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

   if i use this code and it works correctly !

  Code:
  ###
    login = \u52a8\u4f5c
  ###

  But it's so difficult to write code !

  I don't know what happens with it .

  Cheers,
  Neil

  On Oct 25, 7:19 am, David Pollak  
  feeder.of.the.be...@gmail.com
  wrote:

  Please make sure your lift-core_zh_CN.properties was saved  
  as UTF-8

  On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv anim...@gmail.com
  wrote:

  Hi all,

  I create a props file in the resources folder  /src/main/
  resources/
  i18n/lift-core_zh_CN.properties

  And i changed the log.in text value.

  Now i use this code in my index.html page, and it doesn't
  corretly.
  (garbled)

  ### it doesn't work
    lift:loc locid=log.inLog in/lift:loc
  ###

  This information 

[Lift] Re: About the localization with lift:loc !

2009-10-26 Thread Timothy Perrett

setLocale was a method created by me, specific to my application - it  
does not exist in Lift... hence why I removed it in my simplified  
example.

Cheers, Tim

On 26 Oct 2009, at 11:45, Neil.Lv wrote:


 I have a silly question ,  where is the setLocale method ?

 I don't know where the package located.

 src\main\scala\bootstrap\liftweb\Boot.scala:63: error: not found:
 value setLocale
   setLocale(selectedLocale)

 :)

 Cheers,
  Neil

 On Oct 26, 5:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Yes, your template code is right - your just seeing the default value
 because you have not told lift what resources to use when it gets the
 locale header from the browser.

 tryo() is like try/catch however, it will catch exceptions and  
 returns
 Box[T]

 I would really suggest starting with something a lot simpler than the
 one i detailed that uses cookies and all sorts. Perhaps something  
 like:

 def localeCalculator(request : Box[HTTPRequest]): Locale =
request.flatMap(r = {
tryo(r.locale) match {
  // your match here
}

 }).openOr(java.util.Locale.getDefault())

 Hope that helps

 Cheers, Tim

 On 26 Oct 2009, at 09:21, Neil.Lv wrote:



  lift:loc locid=loginLog in 222/lift:loc
  That means this code is correctly, the problem is that the browser
 doesn't know the locale?

  So we need to calculate the locale in the Boot.scala file ?

 Cheers,
  Neil

 On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
 tryo(r.getParameter(locale)) match {
case Full(null) = workOutLocale
case Empty = workOutLocale
case Failure(_,_,_) = workOutLocale
case Full(selectedLocale) = {
  setLocale(selectedLocale)
  selectedLocale
}
  }

  In this code ,  what's the tryo ? is try ?
  tryo () match {}

  What's the changes about the HTTP container providers?

  Thanks very much!

 Cheers,
  Neil

 On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu  
 wrote:

 Hmm - you posted a link to my article at the begining of this
 thread;
 in that article I explain lifts locale calculator. Without this,
 Lift
 has no idea how you want to handle different locales. By default,
 the
 following is used:

  var localeCalculator: Box[HTTPRequest] = Locale =
 defaultLocaleCalculator _

  def defaultLocaleCalculator(request: Box[HTTPRequest]) =
  request.flatMap(_.locale).openOr(Locale.getDefault())

 As you can see, that will get only the locale of your JVM, not the
 browser. You will need to write the appropriate locale calculator;
 the
 one in my article is a little out of date as there was a breaking
 change not so long ago to the HTTP container providers but it  
 should
 give you enough to go on.

 Does that help?

 Cheers, Tim

 On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

 1:)   I create a file in the i18n folder
 /src/main/resources/i18n/lift-core_zh_CN.properties
 .
 login = \u767b\u5f55
 logout = \u9000\u51fa
 log.in = \u767b\u5f55
 log.out = \u9000\u51fa
 sign.up = \u6ce8\u518c
 logged.in = \u5df2\u7ecf\u767b\u5f55
 ..
 the others are default (copy from lift-core_en_US.properties)

 2:)
 ### index.html
 lift:surround with=default at=content
  lift:loc id=loginLog in 111/lift:loc
  lift:loc locid=loginLog in 222/lift:loc
 /lift:surround

 The lift:loc doesn't work that it should read the i18n string
 from the
 lift-core_zh_CN.properties and show the chinese chars, (login =
 \u767b
 \u5f55)

 but it always shows the default string (Log in 111, Log in 222).

 Has anything will be config ?

 Cheers,
  Neil

 On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu
 wrote:

 Neil,

 Can you zip and send me an example? It's quite likley your  
 missing
 something and without seeing the code it's difficult to say.

 Cheers, Tim

 Sent from my iPhone

 On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

 in the /index.html
 ###  both of them are not work !
 lift:loc locid=log.inLog in/lift:loc
 lift:loc id=log.inLog in/lift:loc
 ###

 Cheers,
 Neil

 On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu
 wrote:
 Neil,

 This is normal practice with java localisation - the best
 thing is do
 write all your strings then use native2ascii or similar
 tooling to
 convert it into the unicode representation.

 Glad you found my article helpful.

 Cheers, Tim

 On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

  if i use this code and it works correctly !

 Code:
 ###
   login = \u52a8\u4f5c
 ###

 But it's so difficult to write code !

 I don't know what happens with it .

 Cheers,
 Neil

 On Oct 25, 7:19 am, David Pollak
 feeder.of.the.be...@gmail.com
 wrote:

 Please make sure your lift-core_zh_CN.properties was saved
 as UTF-8

 On Sat, Oct 24, 2009 at 11:31 AM, Neil.Lv  
 anim...@gmail.com
 wrote:

 Hi all,

 I create a props file in the resources folder  /src/main/
 resources/
 i18n/lift-core_zh_CN.properties

 And i changed the log.in text value.

 Now i use this code in my index.html page, and it doesn't
 corretly.
 (garbled)

 ### it 

[Lift] Re: About the localization with lift:loc !

2009-10-26 Thread Neil.Lv


  ...

  Where is the locale to be set that the browser can know the
locale ?

  Thanks very much!

Cheers,
  Neil



On Oct 26, 7:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 setLocale was a method created by me, specific to my application - it  
 does not exist in Lift... hence why I removed it in my simplified  
 example.

 Cheers, Tim

 On 26 Oct 2009, at 11:45, Neil.Lv wrote:



  I have a silly question ,  where is the setLocale method ?

  I don't know where the package located.

  src\main\scala\bootstrap\liftweb\Boot.scala:63: error: not found:
  value setLocale
    setLocale(selectedLocale)

  :)

  Cheers,
   Neil

  On Oct 26, 5:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  Yes, your template code is right - your just seeing the default value
  because you have not told lift what resources to use when it gets the
  locale header from the browser.

  tryo() is like try/catch however, it will catch exceptions and  
  returns
  Box[T]

  I would really suggest starting with something a lot simpler than the
  one i detailed that uses cookies and all sorts. Perhaps something  
  like:

  def localeCalculator(request : Box[HTTPRequest]): Locale =
     request.flatMap(r = {
     tryo(r.locale) match {
       // your match here
     }

  }).openOr(java.util.Locale.getDefault())

  Hope that helps

  Cheers, Tim

  On 26 Oct 2009, at 09:21, Neil.Lv wrote:

   lift:loc locid=loginLog in 222/lift:loc
   That means this code is correctly, the problem is that the browser
  doesn't know the locale?

   So we need to calculate the locale in the Boot.scala file ?

  Cheers,
   Neil

  On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
  tryo(r.getParameter(locale)) match {
     case Full(null) = workOutLocale
     case Empty = workOutLocale
     case Failure(_,_,_) = workOutLocale
     case Full(selectedLocale) = {
       setLocale(selectedLocale)
       selectedLocale
     }
   }

   In this code ,  what's the tryo ? is try ?
   tryo () match {}

   What's the changes about the HTTP container providers?

   Thanks very much!

  Cheers,
   Neil

  On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu  
  wrote:

  Hmm - you posted a link to my article at the begining of this
  thread;
  in that article I explain lifts locale calculator. Without this,
  Lift
  has no idea how you want to handle different locales. By default,
  the
  following is used:

   var localeCalculator: Box[HTTPRequest] = Locale =
  defaultLocaleCalculator _

   def defaultLocaleCalculator(request: Box[HTTPRequest]) =
   request.flatMap(_.locale).openOr(Locale.getDefault())

  As you can see, that will get only the locale of your JVM, not the
  browser. You will need to write the appropriate locale calculator;
  the
  one in my article is a little out of date as there was a breaking
  change not so long ago to the HTTP container providers but it  
  should
  give you enough to go on.

  Does that help?

  Cheers, Tim

  On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

  1:)   I create a file in the i18n folder
  /src/main/resources/i18n/lift-core_zh_CN.properties
  .
  login = \u767b\u5f55
  logout = \u9000\u51fa
  log.in = \u767b\u5f55
  log.out = \u9000\u51fa
  sign.up = \u6ce8\u518c
  logged.in = \u5df2\u7ecf\u767b\u5f55
  ..
  the others are default (copy from lift-core_en_US.properties)

  2:)
  ### index.html
  lift:surround with=default at=content
   lift:loc id=loginLog in 111/lift:loc
   lift:loc locid=loginLog in 222/lift:loc
  /lift:surround

  The lift:loc doesn't work that it should read the i18n string
  from the
  lift-core_zh_CN.properties and show the chinese chars, (login =
  \u767b
  \u5f55)

  but it always shows the default string (Log in 111, Log in 222).

  Has anything will be config ?

  Cheers,
   Neil

  On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu
  wrote:

  Neil,

  Can you zip and send me an example? It's quite likley your  
  missing
  something and without seeing the code it's difficult to say.

  Cheers, Tim

  Sent from my iPhone

  On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

  in the /index.html
  ###  both of them are not work !
  lift:loc locid=log.inLog in/lift:loc
  lift:loc id=log.inLog in/lift:loc
  ###

  Cheers,
  Neil

  On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu
  wrote:
  Neil,

  This is normal practice with java localisation - the best
  thing is do
  write all your strings then use native2ascii or similar
  tooling to
  convert it into the unicode representation.

  Glad you found my article helpful.

  Cheers, Tim

  On Oct 25, 5:02 am, Neil.Lv anim...@gmail.com wrote:

   if i use this code and it works correctly !

  Code:
  ###
    login = \u52a8\u4f5c
  ###

  But it's so difficult to write code !

  I don't know what happens with it .

  Cheers,
  Neil

  On Oct 25, 7:19 am, David Pollak
  feeder.of.the.be...@gmail.com
  wrote:

  Please make sure your lift-core_zh_CN.properties was saved
  

[Lift] Re: How to use the many-to-many relationship in the lift Model ?

2009-10-26 Thread Naftoli Gugenheim

Probably a copy-paste error.

-
Neil.Lvanim...@gmail.com wrote:




In your students class:
   1. declare a teacher object of type MappedLongForeignKey(this,
Role)
   In your teacher_student class:


   I have a silly question,  I don't understand this code that the
Role.

   Why is the Role not the teacher_student ?

Cheers,
  Neil

On Oct 26, 1:09 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 What is your intention regarding the students.teacher object?

 -

 YING-KWANG TUying.kwang...@gmail.com wrote:

 Neil,

 In a nutshell... assuming teacher is the main entity and student is another
 entity. You will need to:

 In your teachers class:

1. extend with ManyToMany trait
2. declare a students object of type MappedManyToMany(teacher_student,
teacher_student.teacher_id, teacher_student.student_id, students)

 In your students class:

1. declare a teacher object of type MappedLongForeignKey(this, Role)

 In your teacher_student class:

1. declare a teacher_id object of type MappedLongForeignKey(this,
teachers)
2. declare a student_id object of type MappedLongForeignKey(this,
students)

 *Note: the names are according to your convention.

 Yours,
   yk

 On Mon, Oct 26, 2009 at 12:29 PM, YING-KWANG TU 
 ying.kwang...@gmail.comwrote:

  Neil,

  The following thread has very good information on many-to-many
  implementation:

 http://groups.google.com.my/group/liftweb/browse_thread/thread/579391...

  I can't summarize it for you but the thread above do give you some
  pointers.

  Cheers,
yk

  On Mon, Oct 26, 2009 at 11:52 AM, Neil.Lv anim...@gmail.com wrote:

  Hi all,

   Dose anybody know that how to use the many-to-many relationship in
  the lift model ?

   * We need to create a 3 models to represent the 3 tables ( teachers,
  students, teacher_student )
 ex:
 teachers  -  id, name, sex, age, ...
 students -   id, name, sex, age, ...
 teacher_student - id, student_id, teacher_id

   * How to write the code in the model to represent this
  relationship ?

   Or any other ways that can achieve this purpose ?

   Thanks for any suggestion !

  Cheers,
   Neil


--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Timothy Perrett

The browser already knows the locale, you have it backward! Your  
localeCalculator is so that the browser can get lift to return the  
right content.

Take a look at:

http://scala-tools.org/mvnsites/liftweb-1.1-M6/lift-webkit/scaladocs/net/liftweb/http/provider/HTTPRequest.html

I would start with just getting lift to explicitly set locale based on  
a query string or something... it will help you understand how the  
mechanism works.

Cheers, Tim

On 26 Oct 2009, at 12:34, Neil.Lv wrote:



  ...

  Where is the locale to be set that the browser can know the
 locale ?

  Thanks very much!

 Cheers,
  Neil



 On Oct 26, 7:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 setLocale was a method created by me, specific to my application - it
 does not exist in Lift... hence why I removed it in my simplified
 example.

 Cheers, Tim

 On 26 Oct 2009, at 11:45, Neil.Lv wrote:



 I have a silly question ,  where is the setLocale method ?

 I don't know where the package located.

 src\main\scala\bootstrap\liftweb\Boot.scala:63: error: not found:
 value setLocale
   setLocale(selectedLocale)

 :)

 Cheers,
  Neil

 On Oct 26, 5:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Yes, your template code is right - your just seeing the default  
 value
 because you have not told lift what resources to use when it gets  
 the
 locale header from the browser.

 tryo() is like try/catch however, it will catch exceptions and
 returns
 Box[T]

 I would really suggest starting with something a lot simpler than  
 the
 one i detailed that uses cookies and all sorts. Perhaps something
 like:

 def localeCalculator(request : Box[HTTPRequest]): Locale =
request.flatMap(r = {
tryo(r.locale) match {
  // your match here
}

 }).openOr(java.util.Locale.getDefault())

 Hope that helps

 Cheers, Tim

 On 26 Oct 2009, at 09:21, Neil.Lv wrote:

  lift:loc locid=loginLog in 222/lift:loc
  That means this code is correctly, the problem is that the  
 browser
 doesn't know the locale?

  So we need to calculate the locale in the Boot.scala file ?

 Cheers,
  Neil

 On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
 tryo(r.getParameter(locale)) match {
case Full(null) = workOutLocale
case Empty = workOutLocale
case Failure(_,_,_) = workOutLocale
case Full(selectedLocale) = {
  setLocale(selectedLocale)
  selectedLocale
}
  }

  In this code ,  what's the tryo ? is try ?
  tryo () match {}

  What's the changes about the HTTP container providers?

  Thanks very much!

 Cheers,
  Neil

 On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu
 wrote:

 Hmm - you posted a link to my article at the begining of this
 thread;
 in that article I explain lifts locale calculator. Without this,
 Lift
 has no idea how you want to handle different locales. By  
 default,
 the
 following is used:

  var localeCalculator: Box[HTTPRequest] = Locale =
 defaultLocaleCalculator _

  def defaultLocaleCalculator(request: Box[HTTPRequest]) =
  request.flatMap(_.locale).openOr(Locale.getDefault())

 As you can see, that will get only the locale of your JVM, not  
 the
 browser. You will need to write the appropriate locale  
 calculator;
 the
 one in my article is a little out of date as there was a  
 breaking
 change not so long ago to the HTTP container providers but it
 should
 give you enough to go on.

 Does that help?

 Cheers, Tim

 On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

 1:)   I create a file in the i18n folder
 /src/main/resources/i18n/lift-core_zh_CN.properties
 .
 login = \u767b\u5f55
 logout = \u9000\u51fa
 log.in = \u767b\u5f55
 log.out = \u9000\u51fa
 sign.up = \u6ce8\u518c
 logged.in = \u5df2\u7ecf\u767b\u5f55
 ..
 the others are default (copy from lift-core_en_US.properties)

 2:)
 ### index.html
 lift:surround with=default at=content
  lift:loc id=loginLog in 111/lift:loc
  lift:loc locid=loginLog in 222/lift:loc
 /lift:surround

 The lift:loc doesn't work that it should read the i18n string
 from the
 lift-core_zh_CN.properties and show the chinese chars, (login =
 \u767b
 \u5f55)

 but it always shows the default string (Log in 111, Log in  
 222).

 Has anything will be config ?

 Cheers,
  Neil

 On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu
 wrote:

 Neil,

 Can you zip and send me an example? It's quite likley your
 missing
 something and without seeing the code it's difficult to say.

 Cheers, Tim

 Sent from my iPhone

 On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

 in the /index.html
 ###  both of them are not work !
 lift:loc locid=log.inLog in/lift:loc
 lift:loc id=log.inLog in/lift:loc
 ###

 Cheers,
 Neil

 On Oct 25, 6:27 pm, Timothy Perrett timo...@getintheloop.eu
 wrote:
 Neil,

 This is normal practice with java localisation - the best
 thing is do
 write all your strings then use native2ascii or similar
 tooling to
 convert it into the unicode representation.

 Glad you found my article helpful.

 Cheers, Tim


[Lift] hot entertainment

2009-10-26 Thread golden star

http://www.123maza.com/domain-web-design/earn-money/

--~--~-~--~~~---~--~~
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: About the localization with lift:loc !

2009-10-26 Thread Neil.Lv

  I feel the information of this page is less for me,

  but Thanks all the same !   :)

Cheers,
  Neil

On Oct 26, 9:12 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 The browser already knows the locale, you have it backward! Your  
 localeCalculator is so that the browser can get lift to return the  
 right content.

 Take a look at:

 http://scala-tools.org/mvnsites/liftweb-1.1-M6/lift-webkit/scaladocs/...

 I would start with just getting lift to explicitly set locale based on  
 a query string or something... it will help you understand how the  
 mechanism works.

 Cheers, Tim

 On 26 Oct 2009, at 12:34, Neil.Lv wrote:



   ...

   Where is the locale to be set that the browser can know the
  locale ?

   Thanks very much!

  Cheers,
   Neil

  On Oct 26, 7:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  setLocale was a method created by me, specific to my application - it
  does not exist in Lift... hence why I removed it in my simplified
  example.

  Cheers, Tim

  On 26 Oct 2009, at 11:45, Neil.Lv wrote:

  I have a silly question ,  where is the setLocale method ?

  I don't know where the package located.

  src\main\scala\bootstrap\liftweb\Boot.scala:63: error: not found:
  value setLocale
    setLocale(selectedLocale)

  :)

  Cheers,
   Neil

  On Oct 26, 5:50 pm, Timothy Perrett timo...@getintheloop.eu wrote:
  Yes, your template code is right - your just seeing the default  
  value
  because you have not told lift what resources to use when it gets  
  the
  locale header from the browser.

  tryo() is like try/catch however, it will catch exceptions and
  returns
  Box[T]

  I would really suggest starting with something a lot simpler than  
  the
  one i detailed that uses cookies and all sorts. Perhaps something
  like:

  def localeCalculator(request : Box[HTTPRequest]): Locale =
     request.flatMap(r = {
     tryo(r.locale) match {
       // your match here
     }

  }).openOr(java.util.Locale.getDefault())

  Hope that helps

  Cheers, Tim

  On 26 Oct 2009, at 09:21, Neil.Lv wrote:

   lift:loc locid=loginLog in 222/lift:loc
   That means this code is correctly, the problem is that the  
  browser
  doesn't know the locale?

   So we need to calculate the locale in the Boot.scala file ?

  Cheers,
   Neil

  On Oct 26, 5:09 pm, Neil.Lv anim...@gmail.com wrote:
  tryo(r.getParameter(locale)) match {
     case Full(null) = workOutLocale
     case Empty = workOutLocale
     case Failure(_,_,_) = workOutLocale
     case Full(selectedLocale) = {
       setLocale(selectedLocale)
       selectedLocale
     }
   }

   In this code ,  what's the tryo ? is try ?
   tryo () match {}

   What's the changes about the HTTP container providers?

   Thanks very much!

  Cheers,
   Neil

  On Oct 26, 4:44 pm, Timothy Perrett timo...@getintheloop.eu
  wrote:

  Hmm - you posted a link to my article at the begining of this
  thread;
  in that article I explain lifts locale calculator. Without this,
  Lift
  has no idea how you want to handle different locales. By  
  default,
  the
  following is used:

   var localeCalculator: Box[HTTPRequest] = Locale =
  defaultLocaleCalculator _

   def defaultLocaleCalculator(request: Box[HTTPRequest]) =
   request.flatMap(_.locale).openOr(Locale.getDefault())

  As you can see, that will get only the locale of your JVM, not  
  the
  browser. You will need to write the appropriate locale  
  calculator;
  the
  one in my article is a little out of date as there was a  
  breaking
  change not so long ago to the HTTP container providers but it
  should
  give you enough to go on.

  Does that help?

  Cheers, Tim

  On Oct 26, 8:35 am, Neil.Lv anim...@gmail.com wrote:

  1:)   I create a file in the i18n folder
  /src/main/resources/i18n/lift-core_zh_CN.properties
  .
  login = \u767b\u5f55
  logout = \u9000\u51fa
  log.in = \u767b\u5f55
  log.out = \u9000\u51fa
  sign.up = \u6ce8\u518c
  logged.in = \u5df2\u7ecf\u767b\u5f55
  ..
  the others are default (copy from lift-core_en_US.properties)

  2:)
  ### index.html
  lift:surround with=default at=content
   lift:loc id=loginLog in 111/lift:loc
   lift:loc locid=loginLog in 222/lift:loc
  /lift:surround

  The lift:loc doesn't work that it should read the i18n string
  from the
  lift-core_zh_CN.properties and show the chinese chars, (login =
  \u767b
  \u5f55)

  but it always shows the default string (Log in 111, Log in  
  222).

  Has anything will be config ?

  Cheers,
   Neil

  On Oct 26, 4:17 pm, Timothy Perrett timo...@getintheloop.eu
  wrote:

  Neil,

  Can you zip and send me an example? It's quite likley your
  missing
  something and without seeing the code it's difficult to say.

  Cheers, Tim

  Sent from my iPhone

  On 26 Oct 2009, at 03:54, Neil.Lv anim...@gmail.com wrote:

  in the /index.html
  ###  both of them are not work !
  lift:loc locid=log.inLog in/lift:loc
  lift:loc id=log.inLog in/lift:loc
  ###

  Cheers,
  Neil

  On Oct 25, 6:27 pm, Timothy Perrett 

[Lift] Newbee Question: Why does MappedXXX do not generate a CSS-class/style attribute?

2009-10-26 Thread hyperion

Hello,

I use the _toForm method of the MappedFields. Why do they not have
a
field for specifing a CSS-class by default. Ok, it is easy to override
the
_toForm method, but I think there may be a reason that such a field is
not
provided by default???

hyperion


--~--~-~--~~~---~--~~
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] compatible versions

2009-10-26 Thread bob

is there a list of Lift-compatible versions of software? i'm still
struggling with actual (from maven) or rumored (from private
conversations) incompatibilities among scala, lift, IntelliJ, IntelliJ
scala plugin, Databinder Dispatch. and the best the maven plug-in
seems to be able do is tell me about that it has detected multiple
versions of scala.
--~--~-~--~~~---~--~~
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 give a time lmit to display a message

2009-10-26 Thread Ross Mellgren

SetHtml(msg, Text(hello))  After(1 minute, SetHtml(msg, Empty))

-Ross

On Oct 25, 2009, at 9:03 PM, sunanda wrote:


 Hi,
 I need to display a message only for few seconds using SetHtml.
 E.g. SetHtml(msg,Text(Hello)).
 How can I do this

 Thanks.
 Sunanda
 


--~--~-~--~~~---~--~~
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: compatible versions

2009-10-26 Thread David Pollak
Lift 1.0.2, 1.1-M6 and 1.1-SNAPSHOT are all Scala 2.7.5.  2.7.5 is the
latest stable release of Scala.  If you want to use a 2.7.4 or 2.7.6
compiled library, it should work (the changes across 2.7.4-2.7.6 do not
trigger any of the trait inheritance problems.)

You can consult your library for what version of Scala it uses.

IntelliJ 8.1.x uses a 2.7.4-2.7.6 compatible version of Scala and will work
(as will NetBeans) for Lift-related development.

On Mon, Oct 26, 2009 at 8:14 AM, bob rbpas...@gmail.com wrote:


 is there a list of Lift-compatible versions of software? i'm still
 struggling with actual (from maven) or rumored (from private
 conversations) incompatibilities among scala, lift, IntelliJ, IntelliJ
 scala plugin, Databinder Dispatch. and the best the maven plug-in
 seems to be able do is tell me about that it has detected multiple
 versions of scala.
 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: Newbee Question: Why does MappedXXX do not generate a CSS-class/style attribute?

2009-10-26 Thread David Pollak
Cool feature.  Please open a ticket at
http://github.com/dpp/liftweb/issuesfor formStyle: Box[String] and
formClass: Box[String] on MappedField

On Mon, Oct 26, 2009 at 7:46 AM, hyperion hyperion1...@googlemail.comwrote:


 Hello,

 I use the _toForm method of the MappedFields. Why do they not have
 a
 field for specifing a CSS-class by default. Ok, it is easy to override
 the
 _toForm method, but I think there may be a reason that such a field is
 not
 provided by default???

 hyperion


 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: compatible versions

2009-10-26 Thread bob

Dispatch requires 2.7.6, but Josh Suereth told me not to use 2.7.6
with Lift http://groups.google.com/group/maven-and-scala/msg/0f0574b08d72

this is why i'm suggesting there needs to be a single voice for Lift
for version compatibility

On Oct 26, 11:55 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Lift 1.0.2, 1.1-M6 and 1.1-SNAPSHOT are all Scala 2.7.5.  2.7.5 is the
 latest stable release of Scala.  If you want to use a 2.7.4 or 2.7.6
 compiled library, it should work (the changes across 2.7.4-2.7.6 do not
 trigger any of the trait inheritance problems.)

 You can consult your library for what version of Scala it uses.

 IntelliJ 8.1.x uses a 2.7.4-2.7.6 compatible version of Scala and will work
 (as will NetBeans) for Lift-related development.

 On Mon, Oct 26, 2009 at 8:14 AM, bob rbpas...@gmail.com wrote:

  is there a list of Lift-compatible versions of software? i'm still
  struggling with actual (from maven) or rumored (from private
  conversations) incompatibilities among scala, lift, IntelliJ, IntelliJ
  scala plugin, Databinder Dispatch. and the best the maven plug-in
  seems to be able do is tell me about that it has detected multiple
  versions of scala.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: compatible versions

2009-10-26 Thread Timothy Perrett

Bob,

This is not right. Dispatch can use 2.7.5... I have a lift project  
running on 1.1-SNAPSHOT that works seamlessly with dispatch and lift  
within the same lift app.

Cheers, Tim

On 26 Oct 2009, at 16:05, bob wrote:


 Dispatch requires 2.7.6, but Josh Suereth told me not to use 2.7.6
 with Lift http://groups.google.com/group/maven-and-scala/msg/0f0574b08d72

 this is why i'm suggesting there needs to be a single voice for Lift
 for version compatibility

 On Oct 26, 11:55 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
 Lift 1.0.2, 1.1-M6 and 1.1-SNAPSHOT are all Scala 2.7.5.  2.7.5 is  
 the
 latest stable release of Scala.  If you want to use a 2.7.4 or 2.7.6
 compiled library, it should work (the changes across 2.7.4-2.7.6 do  
 not
 trigger any of the trait inheritance problems.)

 You can consult your library for what version of Scala it uses.

 IntelliJ 8.1.x uses a 2.7.4-2.7.6 compatible version of Scala and  
 will work
 (as will NetBeans) for Lift-related development.

 On Mon, Oct 26, 2009 at 8:14 AM, bob rbpas...@gmail.com wrote:

 is there a list of Lift-compatible versions of software? i'm still
 struggling with actual (from maven) or rumored (from private
 conversations) incompatibilities among scala, lift, IntelliJ,  
 IntelliJ
 scala plugin, Databinder Dispatch. and the best the maven plug-in
 seems to be able do is tell me about that it has detected multiple
 versions of scala.

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: compatible versions

2009-10-26 Thread David Pollak
On Mon, Oct 26, 2009 at 9:05 AM, bob rbpas...@gmail.com wrote:


 Dispatch requires 2.7.6, but Josh Suereth told me not to use 2.7.6


Don't use 2.7.6 period.  It's a very broken release of Scala.


 with Lift
 http://groups.google.com/group/maven-and-scala/msg/0f0574b08d72

 this is why i'm suggesting there needs to be a single voice for Lift
 for version compatibility


Lift is always on the most recent stable version of Scala.  Currently that's
2.7.5.  You can look through the Scala mailing list archives for further
discussion of why 2.7.6 is not stable (I don't want to be seen as insulting
the EPFL team over this issue yet again).  I'm wicked sorry that Dispatch is
compiled against it... if you are *actually* having problems mixing Dispatch
with Lift, please chat with the Dispatch folks.

If you configure your pom.xml file to specify 2.7.5, you'll get the 2.7.5
compiler and libraries.  Yes, you'll get a version incompatibility warning
if you're using Dispatch, but it should work (there were no library changes
between 2.7.5 and 2.7.6 and there were no incompatible pickler changes
between the two... the two things that cause problems between Scala
versions).



 On Oct 26, 11:55 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Lift 1.0.2, 1.1-M6 and 1.1-SNAPSHOT are all Scala 2.7.5.  2.7.5 is the
  latest stable release of Scala.  If you want to use a 2.7.4 or 2.7.6
  compiled library, it should work (the changes across 2.7.4-2.7.6 do not
  trigger any of the trait inheritance problems.)
 
  You can consult your library for what version of Scala it uses.
 
  IntelliJ 8.1.x uses a 2.7.4-2.7.6 compatible version of Scala and will
 work
  (as will NetBeans) for Lift-related development.
 
  On Mon, Oct 26, 2009 at 8:14 AM, bob rbpas...@gmail.com wrote:
 
   is there a list of Lift-compatible versions of software? i'm still
   struggling with actual (from maven) or rumored (from private
   conversations) incompatibilities among scala, lift, IntelliJ, IntelliJ
   scala plugin, Databinder Dispatch. and the best the maven plug-in
   seems to be able do is tell me about that it has detected multiple
   versions of scala.
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics
 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: compatible versions

2009-10-26 Thread Timothy Perrett

Further to my last email, checkout the numerous versions of dispatch  
latest:

http://scala-tools.org/repo-releases/net/databinder/

n8han makes sure that he is 2.7.5 compatible.

Cheers, Tim

On 26 Oct 2009, at 16:05, bob wrote:


 Dispatch requires 2.7.6, but Josh Suereth told me not to use 2.7.6
 with Lift http://groups.google.com/group/maven-and-scala/msg/0f0574b08d72

 this is why i'm suggesting there needs to be a single voice for Lift
 for version compatibility

 On Oct 26, 11:55 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
 Lift 1.0.2, 1.1-M6 and 1.1-SNAPSHOT are all Scala 2.7.5.  2.7.5 is  
 the
 latest stable release of Scala.  If you want to use a 2.7.4 or 2.7.6
 compiled library, it should work (the changes across 2.7.4-2.7.6 do  
 not
 trigger any of the trait inheritance problems.)

 You can consult your library for what version of Scala it uses.

 IntelliJ 8.1.x uses a 2.7.4-2.7.6 compatible version of Scala and  
 will work
 (as will NetBeans) for Lift-related development.

 On Mon, Oct 26, 2009 at 8:14 AM, bob rbpas...@gmail.com wrote:

 is there a list of Lift-compatible versions of software? i'm still
 struggling with actual (from maven) or rumored (from private
 conversations) incompatibilities among scala, lift, IntelliJ,  
 IntelliJ
 scala plugin, Databinder Dispatch. and the best the maven plug-in
 seems to be able do is tell me about that it has detected multiple
 versions of scala.

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 Actor names

2009-10-26 Thread David Pollak
On Sun, Oct 25, 2009 at 10:46 PM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 I agree, the names could be improved.
 Is there still a chance to do so?


No.  This code was in the repository for  1 month and was well advertised.
The time to make suggestions was while the code was in a WIP branch or at
the very latest during the review board process.  Now is not the time.



 Heiko

 2009/10/25 Naftoli Gugenheim naftoli...@gmail.com


 I was looking at Actor.scala, which contains SimpleActor, SimplestActor,
 TypedActor, GenericActor, and ForwardableActor.
 Some people will say, once you know what something does, who cares what
 it's called? But names can really make a difference in learning curve,
 memorization, and code readability.
 Other than ForwardableActor, do these names reflect what they do?
 My suggestions:
 Change  SimpleActor  to  Messageable (it only defines an abstract !
 method; arguably more general than an actor)
 SimplestActor  to  AnyMessageable (it's SimpleActor with Any for T)
 TypedActor  to  RespondingActor etc. (what it adds is !? and !! methods)
 GenericActor  to  AnyRespondingActor (or could it be replaced by
 'RespondingActor with AnyMessageable'?)
 ForwardableActor  to  ForwardingActor (it doesn't get forwarded, it
 forwards messages)
 Thoughts?

 Thanks.





 --
 Heiko Seeberger

 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: 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
Surf the harmonics

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: CometActor fixedRender vs. render

2009-10-26 Thread David Pollak
There are parts of a comet component that may not change on every render
of the component.  For example, if a Chat component were to re-render its
whole self on every chat message, the input box would be re-rendered,
erasing any in-process input.  So, there's a fixed part of the the comet
component and a changes a lot part of the comet component.  By default
(reRender(false)) only the non-fixed part of the component is
re-rendered.  Does this answer your question?

On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 
heiko.seeber...@googlemail.com wrote:

 Hi,

 In CometActor, what's the puropse of fixedRender? What's the
 difference/relation to render?

 Thanks

 Heiko

 --

 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: 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
Surf the harmonics

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 render ajax response that needs dynamic snippets?

2009-10-26 Thread David Pollak
The ajax rendering is not done in the same SiteMap context as the full page
request, so the page-specific snippets are not being accessed.  This is an
interesting problem and deserves a ticket.  I'll capture the current custom
snippet context when ajax requests for a given page are executed.

On Mon, Oct 26, 2009 at 3:39 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


 Hi,

 I'm using the same rewriting code as in CRUDify, so that URLs like

 tender/results/2

 show a result page for the tender with id 2. This page contains lots of
 snippets, defined (as in CRUDify) within a SnippetTest partial function.

 The page renders fine when hit for the first time. The user can change
 various parameters on the page, causing some of the content on the page
 to change using ajax.

 I can't seem to render the content in this ajax call. It doesn't render
 the snippets defined in the snippets partial function, but renders other
 (ie global snippets) ok. This is an example of a select element, that
 should change some content on the page:

case (result.name, Full(wp: Result)) = s = Text(wp.name.is)
case (result.select, Full(result: Result)) = {
  curResult(Full(result));
  s = {
def doSelect(msg: NodeSeq) =
ajaxSelectObj(lcs.map(lc = (lc, lc.name.is)), Empty,
lc = {
  val nodeseq =
 TemplateFinder.findAnyTemplate(List(result, results)).open_!
  val sub = chooseTemplate(lift,
 result.result_comparison, nodeseq)
  val markup =
 S.session.open_!.processSurroundAndInclude(mypage, sub)
  println(processed:+markup)
  SetHtml(mylc, Text(lc.name.is))
})


bind(select, s,
 lc1 - doSelect _,
 lc2 - doSelect _
)
  }
}

 Here, markup does not contain the contents of the snippet result.name,
 but does contain the results of other, standalone, snippets.

 Any clues? Or is there a better way to render partial page content?

 /Jeppe

 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 render ajax response that needs dynamic snippets?

2009-10-26 Thread Jeppe Nejsum Madsen

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

 The ajax rendering is not done in the same SiteMap context as the full page
 request, so the page-specific snippets are not being accessed.  This is an
 interesting problem and deserves a ticket.  I'll capture the current custom
 snippet context when ajax requests for a given page are executed.

Do you want me to create a ticket or?

Is there a workaround for this (or perhaps a better way to solve the
problem :-)

I guess I can always extract the body of the snippet into a method and
just invoke this from the ajax call as well as the snippet..

/Jeppe

--~--~-~--~~~---~--~~
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 render ajax response that needs dynamic snippets?

2009-10-26 Thread David Pollak
On Mon, Oct 26, 2009 at 9:52 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


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

  The ajax rendering is not done in the same SiteMap context as the full
 page
  request, so the page-specific snippets are not being accessed.  This is
 an
  interesting problem and deserves a ticket.  I'll capture the current
 custom
  snippet context when ajax requests for a given page are executed.

 Do you want me to create a ticket or?


Yes.



 Is there a workaround for this (or perhaps a better way to solve the
 problem :-)


If I understand your issue, the best thing to do is capture the special
snippet state in ajax requests.



 I guess I can always extract the body of the snippet into a method and
 just invoke this from the ajax call as well as the snippet..


You won't be the first person to experience this.



 /Jeppe

 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: CometActor fixedRender vs. render

2009-10-26 Thread Heiko Seeberger
Thank you for your very detailed answer!

Heiko

2009/10/26 David Pollak feeder.of.the.be...@gmail.com

 There are parts of a comet component that may not change on every render
 of the component.  For example, if a Chat component were to re-render its
 whole self on every chat message, the input box would be re-rendered,
 erasing any in-process input.  So, there's a fixed part of the the comet
 component and a changes a lot part of the comet component.  By default
 (reRender(false)) only the non-fixed part of the component is
 re-rendered.  Does this answer your question?


 On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 
 heiko.seeber...@googlemail.com wrote:

 Hi,

 In CometActor, what's the puropse of fixedRender? What's the
 difference/relation to render?

 Thanks

 Heiko

 --

 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: 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
 Surf the harmonics

 



-- 
Heiko Seeberger

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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: Generate Visual Diagram from existing Sources

2009-10-26 Thread Naftoli Gugenheim

Don't know. It would be neat if someone would write a compiler plugin to 
generate ispace diagrams (an eclipse plugin). Probably not very hard.

-
Hanneshannes.flo...@gmx.li wrote:


Hi Lifters,

Is there a way to automatically generate a Diagram (e.g. UML) from 
existing source files, that shows composition, association, class 
attributes, methods, etc.?


thanks.



--~--~-~--~~~---~--~~
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: compatible versions

2009-10-26 Thread bob

from http://www.scala-lang.org/downloads/

Current Stable Release: The current version of Scala is 2.7.6

if Lift doesnt support 2.7.6, then maybe the Lift POM needs to say so.
or at least the Downloads page should warn.


On Oct 26, 12:12 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
Lift is always on the most recent stable version of Scala.  Currently that's
2.7.5.  You can look through the Scala mailing list archives for further
discussion of why 2.7.6 is not stable
--~--~-~--~~~---~--~~
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: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread GA
I have made a test that worked. I have modified my code like this:

 newUser.save
 newUser.devices += newDevice
 newUser.save

The newDevice was already saved. It looks like both parents must be  
saved before I save the relationship. Am I right? or I am doing  
something wrong?

Thanks,

GA




On Oct 26, 2009, at 6:55 PM, GA wrote:

 Hello guys,

 I have a many-to-many relationship between two mappers called, Users  
 and Devices.

 There is also an API that receives and XML message that contains one  
 user and one device.

 The API could create the Device and User with the relationship or it  
 could create only the relationship in case the users and/or device  
 already exists.

 The problem I have is that the API creates the User and the Device,  
 but the not the relationship. This is the code that saves the  
 records (just a test for a now):

 def addUser(req: Req): LiftResponse = {

 var tempUserName = 
 var tempDeviceName = 
 var deviceAlreadyExists = false

 val newUser = new User
 val newDevice = new Device
 req.xml match {
 case Full(person{parameters @_*}/person) = {
 for(parameter - parameters){ parameter match {
 case userName{userName}/userName =  
 tempUserName = userName.text
 case firstName{firstName}/firstName  
 = newUser.firstName(firstName.text)
 case lastName{lastName}/lastName =  
 newUser.lastName(lastName.text)
 case password{password}/password =  
 newUser.password(password.text)
 case email{email}/email =  
 newUser.email(email.text)
 case createdon{createdOn}/createdon  
 = newUser.createdOn(new java.util.Date(createdOn.text))
 case updatedon{updatedOn}/updatedon  
 = newUser.updatedOn(new java.util.Date(updatedOn.text))
 case device{deviceName}/device =  
 tempDeviceName = deviceName.text
 case _ =
 }
 }
 try {
 Device.find(By 
 (Device.deviceName,tempDeviceName)) match {
 case Full(deviceRequested) =
 deviceAlreadyExists = true
 case _ = {
 newDevice.deviceName 
 (tempDeviceName)
 newDevice.createdBy(tempUserName)
 newDevice.createdOn 
 (newUser.createdOn)
 newDevice.updatedBy(tempUserName)
 newDevice.updatedOn 
 (newUser.updatedOn)
 newDevice.save
 }
 }
 User.find(By(User.userName, tempUserName))  
 match {
 case Full(userRequested) =
 CreatedResponse(wrapXmlBody 
 (operation id=addPerson success=1/operation), text/xml)
 case _ = {
 newUser.userName(tempUserName)
 newUser.createdBy(tempUserName)
 newUser.updatedBy(tempUserName)
 newUser.devices.clear
 newUser.validated(true)
 newUser.devices += newDevice
 newUser.save
 CreatedResponse(wrapXmlBody 
 (operation id=addPerson success=0/operation), text/xml)
 }
 }
 }
 catch {
 case e = Log.error(Could not add person/ 
 device, e); BadResponse()
 }
 }
 case _ = Log.error(Request was malformed +req.view);  
 BadResponse()
 }
 }

 The field devices is the MappedManyToMany field within the User  
 mapper.

 What am I doing wrong?

 Thanks in advance,

 GA


 


--~--~-~--~~~---~--~~
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: CometActor fixedRender vs. render

2009-10-26 Thread Peter Robinett

fixedRender sounds very useful and was something I didn't know about.
How do you use it? Do you call render from within fixedRender?

Peter Robinett

On Oct 26, 9:40 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 There are parts of a comet component that may not change on every render
 of the component.  For example, if a Chat component were to re-render its
 whole self on every chat message, the input box would be re-rendered,
 erasing any in-process input.  So, there's a fixed part of the the comet
 component and a changes a lot part of the comet component.  By default
 (reRender(false)) only the non-fixed part of the component is
 re-rendered.  Does this answer your question?

 On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 



 heiko.seeber...@googlemail.com wrote:
  Hi,

  In CometActor, what's the puropse of fixedRender? What's the
  difference/relation to render?

  Thanks

  Heiko

  --

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

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread Jim Barrows
On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:

 I have made a test that worked. I have modified my code like this:

 newUser.save
 newUser.devices += newDevice
 newUser.save

 The newDevice was already saved. It looks like both parents must be saved
 before I save the relationship. Am I right? or I am doing something wrong?


No, you always have to save the parents before the relationship.  Well.. as
long as the relationship table has the parents PK as it's PK's anyway.
If you remove that restriction, then nah.. it doesn't matter.  Of course
that way lies madness


 Thanks,

 GA




 On Oct 26, 2009, at 6:55 PM, GA wrote:

 Hello guys,

 I have a many-to-many relationship between two mappers called, Users and
 Devices.

 There is also an API that receives and XML message that contains one user
 and one device.

 The API could create the Device and User with the relationship or it could
 create only the relationship in case the users and/or device already exists.

 The problem I have is that the API creates the User and the Device, but the
 not the relationship. This is the code that saves the records (just a test
 for a now):

 def addUser(req: Req): LiftResponse = {

 var tempUserName = 
 var tempDeviceName = 
 var deviceAlreadyExists = false

 val newUser = new User
 val newDevice = new Device
 req.xml match {
 case Full(person{parameters @_*}/person) = {
 for(parameter - parameters){ parameter match {
 case userName{userName}/userName =
 tempUserName = userName.text
 case firstName{firstName}/firstName =
 newUser.firstName(firstName.text)
 case lastName{lastName}/lastName =
 newUser.lastName(lastName.text)
 case password{password}/password =
 newUser.password(password.text)
 case email{email}/email =
 newUser.email(email.text)
 case createdon{createdOn}/createdon =
 newUser.createdOn(new java.util.Date(createdOn.text))
 case updatedon{updatedOn}/updatedon =
 newUser.updatedOn(new java.util.Date(updatedOn.text))
 case device{deviceName}/device =
 tempDeviceName = deviceName.text
 case _ =
 }
 }
 try {
 Device.find(By(Device.deviceName,tempDeviceName))
 match {
 case Full(deviceRequested) =
 deviceAlreadyExists = true
 case _ = {
 newDevice.deviceName(tempDeviceName)
 newDevice.createdBy(tempUserName)
 newDevice.createdOn(newUser.createdOn)
 newDevice.updatedBy(tempUserName)
 newDevice.updatedOn(newUser.updatedOn)
 newDevice.save
 }
 }
 User.find(By(User.userName, tempUserName)) match {
 case Full(userRequested) =
 CreatedResponse(wrapXmlBody(operation
 id=addPerson success=1/operation), text/xml)
 case _ = {
 newUser.userName(tempUserName)
 newUser.createdBy(tempUserName)
 newUser.updatedBy(tempUserName)
 newUser.devices.clear
 newUser.validated(true)
 *newUser.devices += newDevice*
 newUser.save
 CreatedResponse(wrapXmlBody(operation
 id=addPerson success=0/operation), text/xml)
 }
 }
 }
 catch {
 case e = Log.error(Could not add person/device,
 e); BadResponse()
 }
 }
 case _ = Log.error(Request was malformed +req.view);
 BadResponse()
 }
 }

 The field devices is the MappedManyToMany field within the User mapper.

 What am I doing wrong?

 Thanks in advance,

 GA





 



-- 
James A Barrows

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

[Lift] Re: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread GA
Thanks for the answer.

I understand now. But I have a follow up question. This is the code  
for my relationship table, which I've done following some examples and  
previous discussions about this subject:

class UserDevice extends LongKeyedMapper[UserDevice] with IdPK {
 def getSingleton = UserDevice

 object userId extends MappedLongForeignKey(this, User)
 object deviceId extends MappedLongForeignKey(this, Device)
}

object UserDevice extends UserDevice with LongKeyedMetaMapper 
[UserDevice]


The question is:

Shouldn't be both fields (userID and deviceID) be the primary key of  
this table? Why am I using IdPK? Couldn't I just remove it?

Thanks,

GA


On Oct 26, 2009, at 7:49 PM, Jim Barrows wrote:

 On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:
 I have made a test that worked. I have modified my code like this:

 newUser.save
 newUser.devices += newDevice
 newUser.save

 The newDevice was already saved. It looks like both parents must be  
 saved before I save the relationship. Am I right? or I am doing  
 something wrong?

 No, you always have to save the parents before the relationship.   
 Well.. as long as the relationship table has the parents PK as it's  
 PK's anyway.
 If you remove that restriction, then nah.. it doesn't matter.  Of  
 course that way lies madness


 Thanks,

 GA




 On Oct 26, 2009, at 6:55 PM, GA wrote:

 Hello guys,

 I have a many-to-many relationship between two mappers called,  
 Users and Devices.

 There is also an API that receives and XML message that contains  
 one user and one device.

 The API could create the Device and User with the relationship or  
 it could create only the relationship in case the users and/or  
 device already exists.

 The problem I have is that the API creates the User and the Device,  
 but the not the relationship. This is the code that saves the  
 records (just a test for a now):

 def addUser(req: Req): LiftResponse = {

 var tempUserName = 
 var tempDeviceName = 
 var deviceAlreadyExists = false

 val newUser = new User
 val newDevice = new Device
 req.xml match {
 case Full(person{parameters @_*}/person) = {
 for(parameter - parameters){ parameter match {
 case userName{userName}/userName =  
 tempUserName = userName.text
 case firstName{firstName}/firstName  
 = newUser.firstName(firstName.text)
 case lastName{lastName}/lastName =  
 newUser.lastName(lastName.text)
 case password{password}/password =  
 newUser.password(password.text)
 case email{email}/email =  
 newUser.email(email.text)
 case createdon{createdOn}/createdon  
 = newUser.createdOn(new java.util.Date(createdOn.text))
 case updatedon{updatedOn}/updatedon  
 = newUser.updatedOn(new java.util.Date(updatedOn.text))
 case device{deviceName}/device =  
 tempDeviceName = deviceName.text
 case _ =
 }
 }
 try {
 Device.find(By 
 (Device.deviceName,tempDeviceName)) match {
 case Full(deviceRequested) =
 deviceAlreadyExists = true
 case _ = {
 newDevice.deviceName 
 (tempDeviceName)
 newDevice.createdBy(tempUserName)
 newDevice.createdOn 
 (newUser.createdOn)
 newDevice.updatedBy(tempUserName)
 newDevice.updatedOn 
 (newUser.updatedOn)
 newDevice.save
 }
 }
 User.find(By(User.userName, tempUserName))  
 match {
 case Full(userRequested) =
 CreatedResponse(wrapXmlBody 
 (operation id=addPerson success=1/operation), text/xml)
 case _ = {
 newUser.userName(tempUserName)
 newUser.createdBy(tempUserName)
 newUser.updatedBy(tempUserName)
 newUser.devices.clear
 newUser.validated(true)
 newUser.devices += newDevice
 newUser.save
 CreatedResponse(wrapXmlBody 
 (operation id=addPerson success=0/operation), text/xml)
 }
 }
  

[Lift] Re: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread Naftoli Gugenheim

It would be feasible to refactor ManyToMany to remove this restriction. 
OneToMany does not require either side to be saved first.
Can you describe a use case where it would be desirable?

-
Jim Barrowsjim.barr...@gmail.com wrote:

On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:

 I have made a test that worked. I have modified my code like this:

 newUser.save
 newUser.devices += newDevice
 newUser.save

 The newDevice was already saved. It looks like both parents must be saved
 before I save the relationship. Am I right? or I am doing something wrong?


No, you always have to save the parents before the relationship.  Well.. as
long as the relationship table has the parents PK as it's PK's anyway.
If you remove that restriction, then nah.. it doesn't matter.  Of course
that way lies madness


 Thanks,

 GA




 On Oct 26, 2009, at 6:55 PM, GA wrote:

 Hello guys,

 I have a many-to-many relationship between two mappers called, Users and
 Devices.

 There is also an API that receives and XML message that contains one user
 and one device.

 The API could create the Device and User with the relationship or it could
 create only the relationship in case the users and/or device already exists.

 The problem I have is that the API creates the User and the Device, but the
 not the relationship. This is the code that saves the records (just a test
 for a now):

 def addUser(req: Req): LiftResponse = {

 var tempUserName = 
 var tempDeviceName = 
 var deviceAlreadyExists = false

 val newUser = new User
 val newDevice = new Device
 req.xml match {
 case Full(person{parameters @_*}/person) = {
 for(parameter - parameters){ parameter match {
 case userName{userName}/userName =
 tempUserName = userName.text
 case firstName{firstName}/firstName =
 newUser.firstName(firstName.text)
 case lastName{lastName}/lastName =
 newUser.lastName(lastName.text)
 case password{password}/password =
 newUser.password(password.text)
 case email{email}/email =
 newUser.email(email.text)
 case createdon{createdOn}/createdon =
 newUser.createdOn(new java.util.Date(createdOn.text))
 case updatedon{updatedOn}/updatedon =
 newUser.updatedOn(new java.util.Date(updatedOn.text))
 case device{deviceName}/device =
 tempDeviceName = deviceName.text
 case _ =
 }
 }
 try {
 Device.find(By(Device.deviceName,tempDeviceName))
 match {
 case Full(deviceRequested) =
 deviceAlreadyExists = true
 case _ = {
 newDevice.deviceName(tempDeviceName)
 newDevice.createdBy(tempUserName)
 newDevice.createdOn(newUser.createdOn)
 newDevice.updatedBy(tempUserName)
 newDevice.updatedOn(newUser.updatedOn)
 newDevice.save
 }
 }
 User.find(By(User.userName, tempUserName)) match {
 case Full(userRequested) =
 CreatedResponse(wrapXmlBody(operation
 id=addPerson success=1/operation), text/xml)
 case _ = {
 newUser.userName(tempUserName)
 newUser.createdBy(tempUserName)
 newUser.updatedBy(tempUserName)
 newUser.devices.clear
 newUser.validated(true)
 *newUser.devices += newDevice*
 newUser.save
 CreatedResponse(wrapXmlBody(operation
 id=addPerson success=0/operation), text/xml)
 }
 }
 }
 catch {
 case e = Log.error(Could not add person/device,
 e); BadResponse()
 }
 }
 case _ = Log.error(Request was malformed +req.view);
 BadResponse()
 }
 }

 The field devices is the MappedManyToMany field within the User mapper.

 What am I doing wrong?

 Thanks in advance,

 GA





 



-- 
James A Barrows



--~--~-~--~~~---~--~~
You received this message 

[Lift] Re: CometActor fixedRender vs. render

2009-10-26 Thread Peter Robinett

Thanks, David. To make sure I'm not confused, the fixed part isn't
redrawn by render because render binds to bodyArea, not the inputArea
bound in fixedRender?

Peter

On Oct 26, 11:45 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 http://github.com/dpp/liftweb/blob/master/lift-examples/example/src/m...

 On Mon, Oct 26, 2009 at 11:43 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:





  fixedRender sounds very useful and was something I didn't know about.
  How do you use it? Do you call render from within fixedRender?

  Peter Robinett

  On Oct 26, 9:40 am, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   There are parts of a comet component that may not change on every
  render
   of the component.  For example, if a Chat component were to re-render its
   whole self on every chat message, the input box would be re-rendered,
   erasing any in-process input.  So, there's a fixed part of the the comet
   component and a changes a lot part of the comet component.  By default
   (reRender(false)) only the non-fixed part of the component is
   re-rendered.  Does this answer your question?

   On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 

   heiko.seeber...@googlemail.com wrote:
Hi,

In CometActor, what's the puropse of fixedRender? What's the
difference/relation to render?

Thanks

Heiko

--

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

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

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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] Flot Demo Broken

2009-10-26 Thread Peter Robinett

The flot demo in lift-examples/flotDemo on github.com/dpp/liftweb
won't compile because of the following errors:
lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
comet/FlotCometExample.scala:34: error: type mismatch;
 found   : net.liftweb.flot_demo.web.comet.FlotCometExample
 required: scala.actors.Actor
Sensor.acum !? AddListener(this) match {
   ^
lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
comet/FlotCometExample.scala:50: error: type mismatch;
 found   : net.liftweb.flot_demo.web.comet.FlotCometExample
 required: scala.actors.Actor
Sensor.acum ! RemoveListener(this)
 ^
two errors found

I assume this is related to the switch of CometActor to LiftActor. Is
there any way I can easily help fix this? Should I file a bug?

Peter Robinett
--~--~-~--~~~---~--~~
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: About the ajaxButton's confirm ?

2009-10-26 Thread Marius

That is exactly what I described above does. jsFunc: Call is the
javascript function call that will receive an extra parameter which is
the function that does your Ajax call. You can choose whne to invoke
the ajax call.

Do you need a more concrete example?

Br's,
Marius

On Oct 26, 4:07 am, Neil.Lv anim...@gmail.com wrote:
   The work flow is like this:

   1. When pressing the button, the js function will be executed, like
 the js confirm() method,
        if choose the 'NO' and nothing will be happen, but choose the
 'YES' and the Ajax request is
        sent to the server
   2. On server side Lift executes your scala function

 Cheers,
   Neil

 On Oct 25, 11:18 pm, Marius marius.dan...@gmail.com wrote:

  Please use this definition of the ajax button:

    def ajaxButton(text: NodeSeq, jsFunc: Call, func: () = JsCmd,
  attrs: (String, String)*): Elem

  I described the functionality 
  here:http://groups.google.com/group/liftweb/browse_thread/thread/ec573c0e3...
  .. see the last post.

  Let me know if you have further questions.

  Br's,
  Marius

  On Oct 25, 1:24 pm, Neil.Lv anim...@gmail.com wrote:

   Hi all,

     I use the ajaxButton to delete the record from the database, and How
   can the ajaxButton surpport

     the confirm dialog when clicking the delete button(ajaxButton) ?

     1:)
     I use this method that it will be show the confirm dialog when
   clicking the delete button, but it never call the deleteItemFromDb()
   method.
   ###
   ajaxButton(S.?(delete), Call(confirm, Str(are you sure?)), () =
   {deleteItemFromDb(); reDraw()})
   ###

     2:)
      When clicking the delete button, the record will be deleted from
   the db, but it doesn't show the
   confrim dialog (the js confirm dialog) .
   ###
   ajaxButton(S.?(delete), () = {deleteItemFromDb(); reDraw();})

     Thanks for any suggestion !

   Cheers,
     Neil

   ###
--~--~-~--~~~---~--~~
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: Flot Demo Broken

2009-10-26 Thread Peter Robinett

That's a start but I'm sure we don't want broken code in the
repository! =)

Peter

On Oct 26, 12:48 pm, Java1Guy mark.cha...@gmail.com wrote:
 I got it to run pretty easily by locally back porting to 1.1m4.
 Just change back the one package name change, IIRC.
 Otherwise it was becoming a big rat hole.

 Mark
--~--~-~--~~~---~--~~
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: Flot Demo Broken

2009-10-26 Thread Indrajit Raychaudhuri

Yes please, file a ticket.

Just noticed, oddly flotDemo isn't part of the reactor either (not 
listed as sub-module for lift-examples). Would have been trapped by now 
otherwise.

Cheers, Indrajit


On 27/10/09 12:54 AM, Peter Robinett wrote:

 The flot demo in lift-examples/flotDemo on github.com/dpp/liftweb
 won't compile because of the following errors:
 lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
 comet/FlotCometExample.scala:34: error: type mismatch;
   found   : net.liftweb.flot_demo.web.comet.FlotCometExample
   required: scala.actors.Actor
  Sensor.acum !? AddListener(this) match {
 ^
 lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
 comet/FlotCometExample.scala:50: error: type mismatch;
   found   : net.liftweb.flot_demo.web.comet.FlotCometExample
   required: scala.actors.Actor
  Sensor.acum ! RemoveListener(this)
   ^
 two errors found

 I assume this is related to the switch of CometActor to LiftActor. Is
 there any way I can easily help fix this? Should I file a bug?

 Peter Robinett
 

--~--~-~--~~~---~--~~
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 render ajax response that needs dynamic snippets?

2009-10-26 Thread Jeppe Nejsum Madsen

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

 On Mon, Oct 26, 2009 at 9:52 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:


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

  The ajax rendering is not done in the same SiteMap context as the full
 page
  request, so the page-specific snippets are not being accessed.  This is
 an
  interesting problem and deserves a ticket.  I'll capture the current
 custom
  snippet context when ajax requests for a given page are executed.

 Do you want me to create a ticket or?


 Yes.

Done. http://github.com/dpp/liftweb/issues/#issue/134


/Jeppe


--~--~-~--~~~---~--~~
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] generating TABLE columns

2009-10-26 Thread bob

Listing 2.7: The Embedded Expense Table in the LiftBook.pdf, page
19, has a great example of generating individual rows of a table.

But lets say you wanted to generate the columns in the table, as well
as the rows.

is there a good example of how to do this in a template+snippet?

TIA, bob

--~--~-~--~~~---~--~~
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: generating TABLE columns

2009-10-26 Thread bob

PS: I know I can generate the TABLE, THEAD, TBODY, TR and TD elements
directly in my snippet (although SHtml doesnt seems to be geared
towards FORMs, rather than HTML generation like htmlKona)


On Oct 26, 4:30 pm, bob rbpas...@gmail.com wrote:
 Listing 2.7: The Embedded Expense Table in the LiftBook.pdf, page
 19, has a great example of generating individual rows of a table.

 But lets say you wanted to generate the columns in the table, as well
 as the rows.

 is there a good example of how to do this in a template+snippet?

 TIA, bob
--~--~-~--~~~---~--~~
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: generating TABLE columns

2009-10-26 Thread Naftoli Gugenheim

Sorry I can't give you code, but the key here is the the BindParam can take a 
function from a NodeSeq to a NodeSeq. Say each column represents a field.
  eachfield  -  bindIndividualFields
where bindIndividalField is a function that takes and returns a NodeSeq. Its 
input will be the contents of prefix:eachfield. Inside the function do a 
flatMap on your list of fields, and pass it another call to bind, passing bind 
the input to bindIndividualFields. Thus you are calling bind on the contents of 
eachfield repetitiously for each field, and concatenating (via flatMap) the 
outputs of bind.

-
bobrbpas...@gmail.com wrote:


PS: I know I can generate the TABLE, THEAD, TBODY, TR and TD elements
directly in my snippet (although SHtml doesnt seems to be geared
towards FORMs, rather than HTML generation like htmlKona)


On Oct 26, 4:30 pm, bob rbpas...@gmail.com wrote:
 Listing 2.7: The Embedded Expense Table in the LiftBook.pdf, page
 19, has a great example of generating individual rows of a table.

 But lets say you wanted to generate the columns in the table, as well
 as the rows.

 is there a good example of how to do this in a template+snippet?

 TIA, bob


--~--~-~--~~~---~--~~
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: Flot Demo Broken

2009-10-26 Thread Peter Robinett

Thanks, Indrajit. I created the ticket here: 
http://github.com/dpp/liftweb/issues/#issue/135

Peter

On Oct 26, 12:57 pm, Indrajit Raychaudhuri indraj...@gmail.com
wrote:
 Yes please, file a ticket.

 Just noticed, oddly flotDemo isn't part of the reactor either (not
 listed as sub-module for lift-examples). Would have been trapped by now
 otherwise.

 Cheers, Indrajit

 On 27/10/09 12:54 AM, Peter Robinett wrote:



  The flot demo in lift-examples/flotDemo on github.com/dpp/liftweb
  won't compile because of the following errors:
  lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
  comet/FlotCometExample.scala:34: error: type mismatch;
    found   : net.liftweb.flot_demo.web.comet.FlotCometExample
    required: scala.actors.Actor
       Sensor.acum !? AddListener(this) match {
                                  ^
  lift/lift-examples/flotDemo/src/main/scala/net/liftweb/flot_demo/web/
  comet/FlotCometExample.scala:50: error: type mismatch;
    found   : net.liftweb.flot_demo.web.comet.FlotCometExample
    required: scala.actors.Actor
       Sensor.acum ! RemoveListener(this)
                                    ^
  two errors found

  I assume this is related to the switch of CometActor to LiftActor. Is
  there any way I can easily help fix this? Should I file a bug?

  Peter Robinett
--~--~-~--~~~---~--~~
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: Friendly url parameter for PaginateSnippet?

2009-10-26 Thread Naftoli Gugenheim

I was just thinking about your question. If you want Paginator to generate 
links with query parameters indeed it's not straightforward. But if you want to 
optionally allow users to specify the page in the URL, add code like the 
following in a (possibly anonymous) subclass of Paginator (example sets number 
per page):
override def paginate(ns: NodeSeq) = {
  S.param(num).foreach(num = _)
  super.paginate(ns)
}

-
night_stalkerusur...@gmail.com wrote:


Hi all, I've just tried the PaginatedSnippet and is willing to make
some query pages with it, but the url parameter looks not very good (I
got a /post?F1054255562605UD5=_ ).

So —— how to make paginated page's url more friendly? I'd prefer
something like /posts?page=2.


--~--~-~--~~~---~--~~
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: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread Jim Barrows
On Mon, Oct 26, 2009 at 12:05 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 It would be feasible to refactor ManyToMany to remove this restriction.
 OneToMany does not require either side to be saved first.
 Can you describe a use case where it would be desirable?


I don't think there is.
OneToMany it makes sense that there is no requirement for either side to be
saved first.  However, the pivot table involved in a ManyToMany always needs
both PK's to be unique.


 -
 Jim Barrowsjim.barr...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:

  I have made a test that worked. I have modified my code like this:
 
  newUser.save
  newUser.devices += newDevice
  newUser.save
 
  The newDevice was already saved. It looks like both parents must be saved
  before I save the relationship. Am I right? or I am doing something
 wrong?
 

 No, you always have to save the parents before the relationship.  Well.. as
 long as the relationship table has the parents PK as it's PK's anyway.
 If you remove that restriction, then nah.. it doesn't matter.  Of course
 that way lies madness


  Thanks,
 
  GA
 
 
 
 
  On Oct 26, 2009, at 6:55 PM, GA wrote:
 
  Hello guys,
 
  I have a many-to-many relationship between two mappers called, Users and
  Devices.
 
  There is also an API that receives and XML message that contains one user
  and one device.
 
  The API could create the Device and User with the relationship or it
 could
  create only the relationship in case the users and/or device already
 exists.
 
  The problem I have is that the API creates the User and the Device, but
 the
  not the relationship. This is the code that saves the records (just a
 test
  for a now):
 
  def addUser(req: Req): LiftResponse = {
 
  var tempUserName = 
  var tempDeviceName = 
  var deviceAlreadyExists = false
 
  val newUser = new User
  val newDevice = new Device
  req.xml match {
  case Full(person{parameters @_*}/person) = {
  for(parameter - parameters){ parameter match {
  case userName{userName}/userName =
  tempUserName = userName.text
  case firstName{firstName}/firstName =
  newUser.firstName(firstName.text)
  case lastName{lastName}/lastName =
  newUser.lastName(lastName.text)
  case password{password}/password =
  newUser.password(password.text)
  case email{email}/email =
  newUser.email(email.text)
  case createdon{createdOn}/createdon =
  newUser.createdOn(new java.util.Date(createdOn.text))
  case updatedon{updatedOn}/updatedon =
  newUser.updatedOn(new java.util.Date(updatedOn.text))
  case device{deviceName}/device =
  tempDeviceName = deviceName.text
  case _ =
  }
  }
  try {
  Device.find(By(Device.deviceName,tempDeviceName))
  match {
  case Full(deviceRequested) =
  deviceAlreadyExists = true
  case _ = {
  newDevice.deviceName(tempDeviceName)
  newDevice.createdBy(tempUserName)
 
 newDevice.createdOn(newUser.createdOn)
  newDevice.updatedBy(tempUserName)
 
 newDevice.updatedOn(newUser.updatedOn)
  newDevice.save
  }
  }
  User.find(By(User.userName, tempUserName)) match
 {
  case Full(userRequested) =
  CreatedResponse(wrapXmlBody(operation
  id=addPerson success=1/operation), text/xml)
  case _ = {
  newUser.userName(tempUserName)
  newUser.createdBy(tempUserName)
  newUser.updatedBy(tempUserName)
  newUser.devices.clear
  newUser.validated(true)
  *newUser.devices += newDevice*
  newUser.save
 
 CreatedResponse(wrapXmlBody(operation
  id=addPerson success=0/operation), text/xml)
  }
  }
  }
  catch {
  case e = Log.error(Could not add
 person/device,
  e); BadResponse()
  }
  }
  case _ = Log.error(Request was 

[Lift] Re: generating TABLE columns

2009-10-26 Thread bob

Thanks, Naftoli -- so are you suggesting a separate template for the
TD and for the TR? bind the TD template, and then concatenate them up
for each row?

nevertheless, I started out with this:

  var columns : Set

  def buildHeader : NodeSeq = {
TR{columns.map{TD{_}/TD}.reduceLeft(_+_)) }/TR
  }

but i couldn't figure out the right incantation, and went for the easy
way out

  def buildHeader : NodeSeq = {
val result=TR + (if (columns.isEmpty)  else columns.map
{TD + _ + /TD}.reduceLeft(_+_)) + /TR
XML.loadString(result)
  }




On Oct 26, 4:47 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Sorry I can't give you code, but the key here is the the BindParam can take a 
 function from a NodeSeq to a NodeSeq. Say each column represents a field.
   eachfield  -  bindIndividualFields
 where bindIndividalField is a function that takes and returns a NodeSeq. Its 
 input will be the contents of prefix:eachfield. Inside the function do a 
 flatMap on your list of fields, and pass it another call to bind, passing 
 bind the input to bindIndividualFields. Thus you are calling bind on the 
 contents of eachfield repetitiously for each field, and concatenating (via 
 flatMap) the outputs of bind.

 -

 bobrbpas...@gmail.com wrote:

 PS: I know I can generate the TABLE, THEAD, TBODY, TR and TD elements
 directly in my snippet (although SHtml doesnt seems to be geared
 towards FORMs, rather than HTML generation like htmlKona)

 On Oct 26, 4:30 pm, bob rbpas...@gmail.com wrote:



  Listing 2.7: The Embedded Expense Table in the LiftBook.pdf, page
  19, has a great example of generating individual rows of a table.

  But lets say you wanted to generate the columns in the table, as well
  as the rows.

  is there a good example of how to do this in a template+snippet?

  TIA, bob
--~--~-~--~~~---~--~~
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: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread Naftoli Gugenheim

What do you mean by that? Every primary key is unique.

-
Jim Barrowsjim.barr...@gmail.com wrote:

On Mon, Oct 26, 2009 at 12:05 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 It would be feasible to refactor ManyToMany to remove this restriction.
 OneToMany does not require either side to be saved first.
 Can you describe a use case where it would be desirable?


I don't think there is.
OneToMany it makes sense that there is no requirement for either side to be
saved first.  However, the pivot table involved in a ManyToMany always needs
both PK's to be unique.


 -
 Jim Barrowsjim.barr...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:

  I have made a test that worked. I have modified my code like this:
 
  newUser.save
  newUser.devices += newDevice
  newUser.save
 
  The newDevice was already saved. It looks like both parents must be saved
  before I save the relationship. Am I right? or I am doing something
 wrong?
 

 No, you always have to save the parents before the relationship.  Well.. as
 long as the relationship table has the parents PK as it's PK's anyway.
 If you remove that restriction, then nah.. it doesn't matter.  Of course
 that way lies madness


  Thanks,
 
  GA
 
 
 
 
  On Oct 26, 2009, at 6:55 PM, GA wrote:
 
  Hello guys,
 
  I have a many-to-many relationship between two mappers called, Users and
  Devices.
 
  There is also an API that receives and XML message that contains one user
  and one device.
 
  The API could create the Device and User with the relationship or it
 could
  create only the relationship in case the users and/or device already
 exists.
 
  The problem I have is that the API creates the User and the Device, but
 the
  not the relationship. This is the code that saves the records (just a
 test
  for a now):
 
  def addUser(req: Req): LiftResponse = {
 
  var tempUserName = 
  var tempDeviceName = 
  var deviceAlreadyExists = false
 
  val newUser = new User
  val newDevice = new Device
  req.xml match {
  case Full(person{parameters @_*}/person) = {
  for(parameter - parameters){ parameter match {
  case userName{userName}/userName =
  tempUserName = userName.text
  case firstName{firstName}/firstName =
  newUser.firstName(firstName.text)
  case lastName{lastName}/lastName =
  newUser.lastName(lastName.text)
  case password{password}/password =
  newUser.password(password.text)
  case email{email}/email =
  newUser.email(email.text)
  case createdon{createdOn}/createdon =
  newUser.createdOn(new java.util.Date(createdOn.text))
  case updatedon{updatedOn}/updatedon =
  newUser.updatedOn(new java.util.Date(updatedOn.text))
  case device{deviceName}/device =
  tempDeviceName = deviceName.text
  case _ =
  }
  }
  try {
  Device.find(By(Device.deviceName,tempDeviceName))
  match {
  case Full(deviceRequested) =
  deviceAlreadyExists = true
  case _ = {
  newDevice.deviceName(tempDeviceName)
  newDevice.createdBy(tempUserName)
 
 newDevice.createdOn(newUser.createdOn)
  newDevice.updatedBy(tempUserName)
 
 newDevice.updatedOn(newUser.updatedOn)
  newDevice.save
  }
  }
  User.find(By(User.userName, tempUserName)) match
 {
  case Full(userRequested) =
  CreatedResponse(wrapXmlBody(operation
  id=addPerson success=1/operation), text/xml)
  case _ = {
  newUser.userName(tempUserName)
  newUser.createdBy(tempUserName)
  newUser.updatedBy(tempUserName)
  newUser.devices.clear
  newUser.validated(true)
  *newUser.devices += newDevice*
  newUser.save
 
 CreatedResponse(wrapXmlBody(operation
  id=addPerson success=0/operation), text/xml)
  }
  }
  }
  catch {
  case e = Log.error(Could 

[Lift] Re: How to give a time lmit to display a message

2009-10-26 Thread sunanda

Thanks Ross

On Oct 27, 2:33 am, Ross Mellgren dri...@gmail.com wrote:
 SetHtml(msg, Text(hello))  After(1 minute, SetHtml(msg, Empty))

 -Ross

 On Oct 25, 2009, at 9:03 PM,sunandawrote:





  Hi,
  I need to display a message only for few seconds using SetHtml.
  E.g. SetHtml(msg,Text(Hello)).
  How can I do this

  Thanks.
 Sunanda- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: generating TABLE columns

2009-10-26 Thread Jeppe Nejsum Madsen

bob rbpas...@gmail.com writes:

 Listing 2.7: The Embedded Expense Table in the LiftBook.pdf, page
 19, has a great example of generating individual rows of a table.

 But lets say you wanted to generate the columns in the table, as well
 as the rows.

 is there a good example of how to do this in a template+snippet?

 TIA, bob

Here's some sample (based on, tada, CRUDify :-). There's some extra
stuff in there, but you should be able see the idea. If not, ask away...

/Jeppe

Template:

  lift:crud.all
{_showAllHeader} 
table id={showAllId} class={tablesorter +showAllClass}
  thead   
  tr
th /th
crud:header_itemth crud:style=crud:name//th/crud:header_item
  /tr
  /thead
  tbody
crud:row
  tr
  td{itemListActionsTemplate}/td
  crud:row_itemtd 
nowrap=nowrapcrud:value//td/crud:row_item
  /tr
/crud:row
  /tbody
/table
  /lift:crud.all



Snippet:

  def doCrudAll(in: NodeSeq): NodeSeq = {
 val list = findAll(findForListParams : _*)

  def doHeaderItems(in: NodeSeq): NodeSeq = listFields(list.head).flatMap(f 
= bind(crud, in, name - f.displayHtml, 

AttrBindParam(style,Text(columnStyle(f.dbColumnName)), style)))

  def doRows(in: NodeSeq): NodeSeq =
  list.flatMap{
c =
def doRowItem(in: NodeSeq): NodeSeq = listFields(c).flatMap(f = 
bind(crud, in, value - f.asHtml))
itemListActions(c,bind(crud, in , row_item - doRowItem _))
}

  if (list.isEmpty) 
_showAllHeader ++ divDer er ingen data./div 
  else
bind(crud, in, header_item - doHeaderItems _,
   row - doRows _)
}



--~--~-~--~~~---~--~~
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: CometActor fixedRender vs. render

2009-10-26 Thread David Pollak
On Mon, Oct 26, 2009 at 12:20 PM, Peter Robinett pe...@bubblefoundry.comwrote:


 Thanks, David. To make sure I'm not confused, the fixed part isn't
 redrawn by render because render binds to bodyArea, not the inputArea


yep


 bound in fixedRender?

 Peter

 On Oct 26, 11:45 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  http://github.com/dpp/liftweb/blob/master/lift-examples/example/src/m...
 
  On Mon, Oct 26, 2009 at 11:43 AM, Peter Robinett 
 pe...@bubblefoundry.comwrote:
 
 
 
 
 
   fixedRender sounds very useful and was something I didn't know about.
   How do you use it? Do you call render from within fixedRender?
 
   Peter Robinett
 
   On Oct 26, 9:40 am, David Pollak feeder.of.the.be...@gmail.com
   wrote:
There are parts of a comet component that may not change on every
   render
of the component.  For example, if a Chat component were to re-render
 its
whole self on every chat message, the input box would be re-rendered,
erasing any in-process input.  So, there's a fixed part of the the
 comet
component and a changes a lot part of the comet component.  By
 default
(reRender(false)) only the non-fixed part of the component is
re-rendered.  Does this answer your question?
 
On Mon, Oct 26, 2009 at 12:53 AM, Heiko Seeberger 
 
heiko.seeber...@googlemail.com wrote:
 Hi,
 
 In CometActor, what's the puropse of fixedRender? What's the
 difference/relation to render?
 
 Thanks
 
 Heiko
 
 --
 
 My job: weiglewilczek.com
 My blog: heikoseeberger.name
 Follow me: twitter.com/hseeberger
 OSGi on Scala: scalamodules.org
 Lift, the simply functional web framework: liftweb.net
 
--
Lift, the simply functional web frameworkhttp://liftweb.net
Beginning Scalahttp://www.apress.com/book/view/1430219890
Follow me:http://twitter.com/dpp
Surf the harmonics
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Surf the harmonics
 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread Jim Barrows
On Mon, Oct 26, 2009 at 2:36 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 What do you mean by that? Every primary key is unique.


The pivot table is typically only 2 columns, which are the PK's for each
side of the MTM.
----  ---
|Table1|-|Pivot||Table2|
---  ---
PK1PK1PK2
  PK2


Sorry, should have drawn that out earlier :)


 -
 Jim Barrowsjim.barr...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 12:05 PM, Naftoli Gugenheim naftoli...@gmail.com
 wrote:

 
  It would be feasible to refactor ManyToMany to remove this restriction.
  OneToMany does not require either side to be saved first.
  Can you describe a use case where it would be desirable?
 

 I don't think there is.
 OneToMany it makes sense that there is no requirement for either side to be
 saved first.  However, the pivot table involved in a ManyToMany always
 needs
 both PK's to be unique.


  -
  Jim Barrowsjim.barr...@gmail.com wrote:
 
  On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:
 
   I have made a test that worked. I have modified my code like this:
  
   newUser.save
   newUser.devices += newDevice
   newUser.save
  
   The newDevice was already saved. It looks like both parents must be
 saved
   before I save the relationship. Am I right? or I am doing something
  wrong?
  
 
  No, you always have to save the parents before the relationship.  Well..
 as
  long as the relationship table has the parents PK as it's PK's anyway.
  If you remove that restriction, then nah.. it doesn't matter.  Of course
  that way lies madness
 
 
   Thanks,
  
   GA
  
  
  
  
   On Oct 26, 2009, at 6:55 PM, GA wrote:
  
   Hello guys,
  
   I have a many-to-many relationship between two mappers called, Users
 and
   Devices.
  
   There is also an API that receives and XML message that contains one
 user
   and one device.
  
   The API could create the Device and User with the relationship or it
  could
   create only the relationship in case the users and/or device already
  exists.
  
   The problem I have is that the API creates the User and the Device, but
  the
   not the relationship. This is the code that saves the records (just a
  test
   for a now):
  
   def addUser(req: Req): LiftResponse = {
  
   var tempUserName = 
   var tempDeviceName = 
   var deviceAlreadyExists = false
  
   val newUser = new User
   val newDevice = new Device
   req.xml match {
   case Full(person{parameters @_*}/person) = {
   for(parameter - parameters){ parameter match {
   case userName{userName}/userName =
   tempUserName = userName.text
   case firstName{firstName}/firstName =
   newUser.firstName(firstName.text)
   case lastName{lastName}/lastName =
   newUser.lastName(lastName.text)
   case password{password}/password =
   newUser.password(password.text)
   case email{email}/email =
   newUser.email(email.text)
   case createdon{createdOn}/createdon =
   newUser.createdOn(new java.util.Date(createdOn.text))
   case updatedon{updatedOn}/updatedon =
   newUser.updatedOn(new java.util.Date(updatedOn.text))
   case device{deviceName}/device =
   tempDeviceName = deviceName.text
   case _ =
   }
   }
   try {
  
 Device.find(By(Device.deviceName,tempDeviceName))
   match {
   case Full(deviceRequested) =
   deviceAlreadyExists = true
   case _ = {
  
 newDevice.deviceName(tempDeviceName)
   newDevice.createdBy(tempUserName)
  
  newDevice.createdOn(newUser.createdOn)
   newDevice.updatedBy(tempUserName)
  
  newDevice.updatedOn(newUser.updatedOn)
   newDevice.save
   }
   }
   User.find(By(User.userName, tempUserName))
 match
  {
   case Full(userRequested) =
   CreatedResponse(wrapXmlBody(operation
   id=addPerson success=1/operation), text/xml)
   case _ = {
   newUser.userName(tempUserName)
   newUser.createdBy(tempUserName)
   newUser.updatedBy(tempUserName)
 

[Lift] Re: generating TABLE columns

2009-10-26 Thread bob

that's nice. thank you

On Oct 26, 6:04 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 bob rbpas...@gmail.com writes:
  Listing 2.7: The Embedded Expense Table in the LiftBook.pdf, page
  19, has a great example of generating individual rows of a table.

  But lets say you wanted to generate the columns in the table, as well
  as the rows.

  is there a good example of how to do this in a template+snippet?

  TIA, bob

 Here's some sample (based on, tada, CRUDify :-). There's some extra
 stuff in there, but you should be able see the idea. If not, ask away...

 /Jeppe

 Template:

   lift:crud.all
     {_showAllHeader}
     table id={showAllId} class={tablesorter +showAllClass}
       thead                                                  
       tr
         th /th
         crud:header_itemth 
 crud:style=crud:name//th/crud:header_item
       /tr
       /thead
       tbody
         crud:row
           tr
               td{itemListActionsTemplate}/td
               crud:row_itemtd 
 nowrap=nowrapcrud:value//td/crud:row_item
           /tr
         /crud:row
       /tbody
     /table
   /lift:crud.all

 Snippet:

   def doCrudAll(in: NodeSeq): NodeSeq = {
      val list = findAll(findForListParams : _*)

       def doHeaderItems(in: NodeSeq): NodeSeq = 
 listFields(list.head).flatMap(f = bind(crud, in, name - f.displayHtml,
                         
 AttrBindParam(style,Text(columnStyle(f.dbColumnName)), style)))

       def doRows(in: NodeSeq): NodeSeq =
       list.flatMap{
         c =
         def doRowItem(in: NodeSeq): NodeSeq = listFields(c).flatMap(f = 
 bind(crud, in, value - f.asHtml))
         itemListActions(c,bind(crud, in , row_item - doRowItem _))
         }

       if (list.isEmpty)
         _showAllHeader ++ divDer er ingen data./div
       else
         bind(crud, in, header_item - doHeaderItems _,
            row - doRows _)
     }
--~--~-~--~~~---~--~~
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: I am not able to save a many-to-many relationship from an API

2009-10-26 Thread Naftoli Gugenheim

Do you mean foreign keys? Why does that preclude linking them before they're 
saved? OneToMany also uses a foregn key / primary key relationship, and you can 
use LongMapperMapper.

-
Jim Barrowsjim.barr...@gmail.com wrote:

On Mon, Oct 26, 2009 at 2:36 PM, Naftoli Gugenheim naftoli...@gmail.comwrote:


 What do you mean by that? Every primary key is unique.


The pivot table is typically only 2 columns, which are the PK's for each
side of the MTM.
----  ---
|Table1|-|Pivot||Table2|
---  ---
PK1PK1PK2
  PK2


Sorry, should have drawn that out earlier :)


 -
 Jim Barrowsjim.barr...@gmail.com wrote:

 On Mon, Oct 26, 2009 at 12:05 PM, Naftoli Gugenheim naftoli...@gmail.com
 wrote:

 
  It would be feasible to refactor ManyToMany to remove this restriction.
  OneToMany does not require either side to be saved first.
  Can you describe a use case where it would be desirable?
 

 I don't think there is.
 OneToMany it makes sense that there is no requirement for either side to be
 saved first.  However, the pivot table involved in a ManyToMany always
 needs
 both PK's to be unique.


  -
  Jim Barrowsjim.barr...@gmail.com wrote:
 
  On Mon, Oct 26, 2009 at 11:43 AM, GA my_li...@me.com wrote:
 
   I have made a test that worked. I have modified my code like this:
  
   newUser.save
   newUser.devices += newDevice
   newUser.save
  
   The newDevice was already saved. It looks like both parents must be
 saved
   before I save the relationship. Am I right? or I am doing something
  wrong?
  
 
  No, you always have to save the parents before the relationship.  Well..
 as
  long as the relationship table has the parents PK as it's PK's anyway.
  If you remove that restriction, then nah.. it doesn't matter.  Of course
  that way lies madness
 
 
   Thanks,
  
   GA
  
  
  
  
   On Oct 26, 2009, at 6:55 PM, GA wrote:
  
   Hello guys,
  
   I have a many-to-many relationship between two mappers called, Users
 and
   Devices.
  
   There is also an API that receives and XML message that contains one
 user
   and one device.
  
   The API could create the Device and User with the relationship or it
  could
   create only the relationship in case the users and/or device already
  exists.
  
   The problem I have is that the API creates the User and the Device, but
  the
   not the relationship. This is the code that saves the records (just a
  test
   for a now):
  
   def addUser(req: Req): LiftResponse = {
  
   var tempUserName = 
   var tempDeviceName = 
   var deviceAlreadyExists = false
  
   val newUser = new User
   val newDevice = new Device
   req.xml match {
   case Full(person{parameters @_*}/person) = {
   for(parameter - parameters){ parameter match {
   case userName{userName}/userName =
   tempUserName = userName.text
   case firstName{firstName}/firstName =
   newUser.firstName(firstName.text)
   case lastName{lastName}/lastName =
   newUser.lastName(lastName.text)
   case password{password}/password =
   newUser.password(password.text)
   case email{email}/email =
   newUser.email(email.text)
   case createdon{createdOn}/createdon =
   newUser.createdOn(new java.util.Date(createdOn.text))
   case updatedon{updatedOn}/updatedon =
   newUser.updatedOn(new java.util.Date(updatedOn.text))
   case device{deviceName}/device =
   tempDeviceName = deviceName.text
   case _ =
   }
   }
   try {
  
 Device.find(By(Device.deviceName,tempDeviceName))
   match {
   case Full(deviceRequested) =
   deviceAlreadyExists = true
   case _ = {
  
 newDevice.deviceName(tempDeviceName)
   newDevice.createdBy(tempUserName)
  
  newDevice.createdOn(newUser.createdOn)
   newDevice.updatedBy(tempUserName)
  
  newDevice.updatedOn(newUser.updatedOn)
   newDevice.save
   }
   }
   User.find(By(User.userName, tempUserName))
 match
  {
   case Full(userRequested) =
   CreatedResponse(wrapXmlBody(operation
   id=addPerson success=1/operation), 

[Lift] Lift 1.1 Milestone 7

2009-10-26 Thread David Pollak
Folks,

We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November 4th.

We would like to release M7 against Scala 2.7.7 final if EPFL's schedule can
accommodate this.

We are going into code-slush on Thursday October 29th (this means we're not
going to make material changes to the codebase unless it's to fix a material
bug).

Please post any blocking defects to this list (with links to the ticket).
We'll endeavor to close any of these defects this week.

If you're a production site running against M6 and planning to upgrade to
M7, please start testing as soon as possible so we can get fixes into M7
sooner rather than later.

Thanks,

David


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 1.1 Milestone 7

2009-10-26 Thread Viktor Klang
Folks,

may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from that?
(It'd eliminate the potential problems of synchronizing on a master/HEAD
freeze)

On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Folks,

 We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November 4th.

 We would like to release M7 against Scala 2.7.7 final if EPFL's schedule
 can accommodate this.

 We are going into code-slush on Thursday October 29th (this means we're not
 going to make material changes to the codebase unless it's to fix a material
 bug).

 Please post any blocking defects to this list (with links to the ticket).
 We'll endeavor to close any of these defects this week.

 If you're a production site running against M6 and planning to upgrade to
 M7, please start testing as soon as possible so we can get fixes into M7
 sooner rather than later.

 Thanks,

 David


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

 



-- 
Viktor Klang
| A complex system that works is invariably
| found to have evolved from a simple system
| that worked. - John Gall

Blog: klangism.blogspot.com
Twttr: viktorklang
Code: github.com/viktorklang

--~--~-~--~~~---~--~~
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] Firefox issue with ajaxSelectObj and page refresh

2009-10-26 Thread Jeppe Nejsum Madsen

Hi,

When using ajaxSelectObj and I have the currently selected object in a
SessionVar and refreshes the page, the selected object is not selected
in the browser after the page refresh, even if the generated html has
the correct selected=selected option.

This only happens on Firefox (OS X), not Chrome or Safari and seems to
be a known FF issue (eg
http://www.beyondcoding.com/2008/12/16/option-selectedselected-not-working/)

but I was wondering if there's some well known Lift workaround? The
obvious problem is of course that the view is now out of sync with the
server

/Jeppe

The basic lift app with the following template  snippet:

  form
lift:helloWorld.select
  My select select:lc1/
/lift:helloWorld.select
  /form

class HelloWorld {
  val lcs = List(1,2,3)
  private object lc1 extends SessionVar[Box[Int]](Empty)
  
  def select(in: NodeSeq): NodeSeq = {
println(lc1 is: +lc1.is)
bind(select, in, lc1 -ajaxSelectObj(lcs.map(lc = (lc, Item 
+lc.toString)), lc1.is,
(lc:Int) = {
  lc1(Full(lc))
  println(selected lc1=%s.format(lc1)); 
  SetHtml(mylc, Text(lc.toString))
}))
  }
}  

--~--~-~--~~~---~--~~
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 1.1 Milestone 7

2009-10-26 Thread David Pollak
On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 Folks,

 may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from that?
 (It'd eliminate the potential problems of synchronizing on a master/HEAD
 freeze)


And it makes it more complex to figure out what to merge off master, please
it means that testing against SNAPSHOT isn't testing against what will be in
M7.




 On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
 4th.

 We would like to release M7 against Scala 2.7.7 final if EPFL's schedule
 can accommodate this.

 We are going into code-slush on Thursday October 29th (this means we're
 not going to make material changes to the codebase unless it's to fix a
 material bug).

 Please post any blocking defects to this list (with links to the ticket).
 We'll endeavor to close any of these defects this week.

 If you're a production site running against M6 and planning to upgrade to
 M7, please start testing as soon as possible so we can get fixes into M7
 sooner rather than later.

 Thanks,

 David


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





 --
 Viktor Klang
 | A complex system that works is invariably
 | found to have evolved from a simple system
 | that worked. - John Gall

 Blog: klangism.blogspot.com
 Twttr: viktorklang
 Code: github.com/viktorklang


 



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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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 1.1 Milestone 7

2009-10-26 Thread Viktor Klang
On Tue, Oct 27, 2009 at 12:34 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:



 On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 Folks,

 may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from that?
 (It'd eliminate the potential problems of synchronizing on a master/HEAD
 freeze)


 And it makes it more complex to figure out what to merge off master, please
 it means that testing against SNAPSHOT isn't testing against what will be in
 M7.


Yeah, you're right, unless you're doing all features+fixes in topic branches
it'll be less than stellar to merge from master/HEAD






 On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
 4th.

 We would like to release M7 against Scala 2.7.7 final if EPFL's schedule
 can accommodate this.

 We are going into code-slush on Thursday October 29th (this means we're
 not going to make material changes to the codebase unless it's to fix a
 material bug).

 Please post any blocking defects to this list (with links to the
 ticket).  We'll endeavor to close any of these defects this week.

 If you're a production site running against M6 and planning to upgrade to
 M7, please start testing as soon as possible so we can get fixes into M7
 sooner rather than later.

 Thanks,

 David


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





 --
 Viktor Klang
 | A complex system that works is invariably
 | found to have evolved from a simple system
 | that worked. - John Gall

 Blog: klangism.blogspot.com
 Twttr: viktorklang
 Code: github.com/viktorklang






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

 



-- 
Viktor Klang
| A complex system that works is invariably
| found to have evolved from a simple system
| that worked. - John Gall

Blog: klangism.blogspot.com
Twttr: viktorklang
Code: github.com/viktorklang

--~--~-~--~~~---~--~~
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] how to use mapper like clause questions

2009-10-26 Thread george

Is there any way to do this, but have it match on OR instead of AND?

User.findAll(Like(User.firstName, % + q + %), Like(User.lastName,
% + q + %))

I couldn't see a way to do it, so I tried out BySQL instead. However,
when I put in the % wildcards I get a sql exception..

User.findAll( BySql(users.email like '%?%',
  IHaveValidatedThisSQL(george, 2009-10-26), q) )

So how do you specify the wildcards?

thanks

george
--~--~-~--~~~---~--~~
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 give a time lmit to display a message

2009-10-26 Thread sunanda

 I am trying to display the message for 2 seconds and remove the
message using following code. It is  displaying the meassage but not
removing after 2 seconds. Where am I going wrong.

SetHtml(editcoldefmsg,Text(Edited Column Definition
+coldef.displayname)) After(2 seconds, SetHtml(editcoldefmsg, Text
()))


Sunanda

On Oct 27, 8:50 am, sunanda sunanda.pa...@gmail.com wrote:
 Thanks Ross

 On Oct 27, 2:33 am, Ross Mellgren dri...@gmail.com wrote:



  SetHtml(msg, Text(hello))  After(1 minute, SetHtml(msg, Empty))

  -Ross

  On Oct 25, 2009, at 9:03 PM,sunandawrote:

   Hi,
   I need to display a message only for few seconds using SetHtml.
   E.g. SetHtml(msg,Text(Hello)).
   How can I do this

   Thanks.
  Sunanda- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 1.1 Milestone 7

2009-10-26 Thread Naftoli Gugenheim

Could someone fix #121 (loginRedirect using S.uri; not getting part after '?')

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

On Mon, Oct 26, 2009 at 4:24 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 Folks,

 may I suggest cutting a Lift 1.1 Milestone 7 branch and deploy from that?
 (It'd eliminate the potential problems of synchronizing on a master/HEAD
 freeze)


And it makes it more complex to figure out what to merge off master, please
it means that testing against SNAPSHOT isn't testing against what will be in
M7.




 On Tue, Oct 27, 2009 at 12:18 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 We are scheduled to release Lift 1.1 Milestone 7 on Wednesday November
 4th.

 We would like to release M7 against Scala 2.7.7 final if EPFL's schedule
 can accommodate this.

 We are going into code-slush on Thursday October 29th (this means we're
 not going to make material changes to the codebase unless it's to fix a
 material bug).

 Please post any blocking defects to this list (with links to the ticket).
 We'll endeavor to close any of these defects this week.

 If you're a production site running against M6 and planning to upgrade to
 M7, please start testing as soon as possible so we can get fixes into M7
 sooner rather than later.

 Thanks,

 David


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





 --
 Viktor Klang
 | A complex system that works is invariably
 | found to have evolved from a simple system
 | that worked. - John Gall

 Blog: klangism.blogspot.com
 Twttr: viktorklang
 Code: github.com/viktorklang


 



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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to 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] Easy way to force IE7 only to quirks mode

2009-10-26 Thread Charles F. Munat

I have an ExtJS form that it failing in IE7 Standards mode (works fine
on IE8 or in quirks mode on IE7). I don't want to force quirks mode on
all browsers or serve the form improperly. I read that inserting a
comment between the XML processing tag and the DOCTYPE declaration will
force IE7 to quirks mode and leave all other browsers alone.

Anyone know an easy way to do this in Lift? I know we can respond to
individual browsers (though I can't seem to find that on the list), but 
how to insert that comment? Or is there a better way?

Chas.


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



[Lift] Problem with RequestVar

2009-10-26 Thread sunanda

Hi,
I need to retain the value of gridid throughout the session.

The sample code is given below.


object gridid extends RequestVar(S.param(gridid) openOr )
class CreateDominoColDefinition extends StatefulSnippet{

   def dispatch = {
case createColDef = createColDef _
  }
def createColDef(html:NodeSeq):NodeSeq ={


}

The value is retained with the submit button clicked for the fist
time.

Then its value becomes empty string with the click of the submit
button more than once.

 What do I need to do  to retain the  value for the gridid .

Thanks.






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