[Lift] Returning JS that runs on client and sets result in a div

2010-02-28 Thread greekscala
Hello lifters,

I am trying to find a way to return a JS expression, that will run on
the client and
a div should be updated with the result.

Someone here that did this?
with best regards

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



[Lift] Re: getting started feedback

2010-01-22 Thread greekscala
Hello,

I had the same problems too. There is a free book on Lift
http://groups.google.com/group/the-lift-book this should be
able to give you a good overview.

best regards

On 22 Jan., 07:37, The Trav the.t...@gmail.com wrote:
 Ok, so I'm trying out the lift framework, went through the guide
 without too much trouble.  Had a few points that threw me a bit.

 The biggest one is probably having a snippet named TD and a model
 named ToDo.
 It seems to me like it's trying to work around namespace collisions
 and/or potential confusion over namespaces, I think it would probably
 be a better idea to address that explicitly.

 What do people generally do for naming snippets?  Is naming them after
 the Model the exception rather than the rule?

 Another thing that got me was that it didn't address adding new pages
 past index.html which strikes me as somewhat incomplete...  After
 reading the getting started guide, I feel I'm going to have to find
 another document or two (or three) before I can do any meaningful work
 with the framework.

 Other than those two suggestions I found it a pretty good
 introduction, the framework is definitely pretty neat, and I like the
 mvn integration for getting started, very handy

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



[Lift] Re: Snippet question

2010-01-20 Thread greekscala
Hello,

yes a function that takes NodeSeq parameter and returns
a NodeSeq :)

foo - (ns) = {function body} or
foo - theCalledFunction

best regards

On 20 Jan., 21:26, Franz Bettag fr...@bett.ag wrote:
 How would that look like?
 foo = nodeSeqMethod _ ?

 On 20 Jan., 21:21, Naftoli Gugenheim naftoli...@gmail.com wrote:

  Meaning to the right of the - arrow.

  -

  Franz Bettagfr...@bett.ag wrote:

  Ah figured it out. Played long enough around to get the right way:

  () = {expand(trafficReply.subnet)}

  Another question though, would it be possible to use
  IPs:expandspantraffic:sometag//span/IPs:expand and pass the
  given NodeSeq over the bind into a function?

  On 20 Jan., 19:08, Franz Bettag fr...@bett.ag wrote:

   Sorry if i am asking a lot of questions lately, but i am trying to get
   this project of mine working so i can write about the specific
   problems i ran into and how they got done.

           def subnets(xhtml: NodeSeq): NodeSeq = {
                   val content = IPnet.findAll(OrderBy(IPnet.name, 
   Ascending)).map(ip
   = {

                           /* Bind the xml */
                           bind(ip, xhtml,
                                   subnet - Text(ip.name.toString),
                                   action - SHtml.a(expand(ip.subnet) _, 
   See all IPs)
                                   )
                   }).mkString

                   XML.loadString(span%s/span.format(content))
           }

           def expand(subnet: String): JsCmd = {
                   Log.info(Requested subnet %s.format(subnet))
                   Alert(subnet %s was requested.format(subnet))
           }

   The Problem is the action that gets binded. I don't get how i have
   to use SHtml.a to pass a value to the called function. Any hints?

   Thank you very much in advance

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




[Lift] Re: Simple Ajax call to server side function

2010-01-18 Thread greekscala
Hello,

know what you mean. You can use JsCmds._Noop to return nohting as
JsCmd.

best regards

On 18 Jan., 17:25, Felipe Rodrigues felipero.maill...@gmail.com
wrote:
 Here is how I made it, but seems ugly:

 SHtml.a(() = {serverSideFunction(t.text); Call(void, Num(0)).cmd}, t)

 It is awkward having to add a JsCmd even when I don't need it.

 Felipe

 Naftoli Gugenheim wrote:
  Never mind my question; I hadn't paid attention to the subject.

  -
  Felipe Rodriguesfelipero.maill...@gmail.com wrote:

  Hi all,

  I want to create a link which when clicked calls a server side function.
  No need for JavaScript callback.
  I tried with no success:

  SHtml.a(() = {serverSideFunction(t.text)}, t)

  Any idea how can I accomplish that will be appreciated.

  Thanks,

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




[Lift] Re: Replace HTML element after AJAX call

2010-01-18 Thread greekscala
Hello,

the Replace JsCmd is not present in 1.0.
workaround wrap it with an div.

best regards


On 18 Jan., 18:39, ced docpom...@googlemail.com wrote:
 Sorry, but I can't find it. Which version of Lift do you use? I'm
 using version 1.0. In the scaladoc I can't find it either.

 On 18 Jan., 18:21, greekscala hellectro...@gmail.com wrote:

  Hello,

  I looked at the source and there is JsCmds.Replace which replaces a
  Node with another.
  I am always using div as containers for replacement

  best regards

  On 18 Jan., 17:41, ced docpom...@googlemail.com wrote:

   Hello,
   I'm wondering if there is a way to replace an HTML element after an
   AJAX call? I've found the SetHtml JsCmd, but this one replaces the
   content. But I'd like to replace the element itself.
   Any idea anyone?
-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Backbutton for Ajax

2010-01-13 Thread greekscala
Hello,

I would really would like to have this type of support from lift.
I looked at GWT and think this is a nice way. They use url parameters
after a '#'. I dont understand the process because I have very little
javascript knowledge.

But I am thinking, lift is creating unique function names and is
calling them with ajax.
Maybe there is a way to have the functions be called over a way like
GWT?

Just creating some thoughts...

best regards


On 12 Jan., 13:23, greekscala hellectro...@gmail.com wrote:
 Hello Timothy,

 there is nothing stoping me from using it.
 But when I think of a framework it would be nice to activate
 backbutton support.
 I think this is somethink a lot of people would appreciate to have and
 not everybody
 should have to build this from the ground up.

 I do not have to deal with this now but in near future. I will have to
 search
 what ways are avalable. And if I can intergrate this im my app, maybe
 we
 can find a way to abstract it.

 with best regards

 On 12 Jan., 00:35, Timothy Perrett timo...@getintheloop.eu wrote:

  I'm not sure what is stopping you using something like this in  
  conjunction with lift?

  If you want something baked in, can you be specific with what and how  
  you might want it to work?

  Cheers, Tim

  Sent from my iPhone

  On 11 Jan 2010, at 23:13, greekscala hellectro...@gmail.com wrote:

   Hello Alex!

   I will take a look at sammy.js .
   I would like to have some way for this in Lift too.
   Since with Lift it is easy to do alot of ajax.

   with best regards

   On 11 Jan., 23:05, Alex Boisvert alex.boisv...@gmail.com wrote:
   I've been playing with sammy.js http://code.quirkey.com/sammy/  
   recently
   and I like the way they update the URL fragment identifier (hash)  
   when doing
   AJAX which makes apps more back-button friendly, in a manner that's  
   similar
   to GMail.

   It would be nice to have something similar in Lift.

   alex

   On Mon, Jan 11, 2010 at 4:55 PM, greekscala  
   hellectro...@gmail.com wrote:
   Hello Lift people!

   I would like to know how experienced lift devs think and what they  
   do
   about
   ajax backbutton support.

   with best regards

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




[Lift] Backbutton for Ajax

2010-01-11 Thread greekscala
Hello Lift people!

I would like to know how experienced lift devs think and what they do
about
ajax backbutton support.

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




[Lift] Re: Backbutton for Ajax

2010-01-11 Thread greekscala
Hello Marius,

I have some pages that will be located over a normal url.
But then there will be ajax interaction. I would like to
have the backbutton work in this situations.

best regards

On 11 Jan., 23:02, Marius marius.dan...@gmail.com wrote:
 Could you please be more specific? ... what use case are you  thinking
 of?

 Br's,
 Marius

 On Jan 11, 11:55 pm, greekscala hellectro...@gmail.com wrote:

  Hello Lift people!

  I would like to know how experienced lift devs think and what they do
  about
  ajax backbutton support.

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




[Lift] Re: Backbutton for Ajax

2010-01-11 Thread greekscala
Hello Alex!

I will take a look at sammy.js .
I would like to have some way for this in Lift too.
Since with Lift it is easy to do alot of ajax.

with best regards

On 11 Jan., 23:05, Alex Boisvert alex.boisv...@gmail.com wrote:
 I've been playing with sammy.js http://code.quirkey.com/sammy/ recently
 and I like the way they update the URL fragment identifier (hash) when doing
 AJAX which makes apps more back-button friendly, in a manner that's similar
 to GMail.

 It would be nice to have something similar in Lift.

 alex

 On Mon, Jan 11, 2010 at 4:55 PM, greekscala hellectro...@gmail.com wrote:
  Hello Lift people!

  I would like to know how experienced lift devs think and what they do
  about
  ajax backbutton support.

  with best regards

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




[Lift] Re: Lift and Akka Actors in comparison?

2010-01-10 Thread greekscala
Hello,

I read only little about AKKA, but I read that the Lift Actors are now
decopled and you can use AKKA
Actors or Scala Actors as implementation.

with best regards

On 9 Jan., 08:48, Franz Bettag fr...@bett.ag wrote:
 Hey guys,

 i was wondering if i can implement a real distributed application with
 lift and akka.
 Since akka actors can be forwarded (so that the actor can reply to the
 original sending actor),
 i thought it would be awesome if my akka-remoteActor could directly
 reply to a lift actor to interact
 with the user.

 On the google groups of akka i found out that this only works with
 akka-actors. Since my scala skill isn't that good and i don't
 understand the differences both, i hope that somebody here has done
 the comparison and can answer this question :)

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




[Lift] Re: Ajax button + submitting a form

2010-01-09 Thread greekscala
Hello,

I have a similar use case. For an AjaxForm you have to write:
  SHtml.ajaxForm(
  bind(mytags, xml,
   // binding to your tags ...

submit - SHtml.submit(do it, save),
  ) ++ SHtml.hidden(save)
)

You dont need to have a form element in your templates for this to
work
because ajaxForm will wrap the result of the bind method.

For my listelements checkbox, I attach to the checkbox a function,
that adds an Id and the
checkbox value to a ListBuffer[(Boolean, String)]. (checked and not
checked boxes are submittet)

Then I filter the List for the selected values a do what I have to do
with them.
I the above code example, my save method does some db stuff and then
returning
a JsCmds.SetHtml(an html id, some html/snippet nodeseq) for a
redraw.

Hope this helps a little

with best regards

On 9 Jan., 10:48, Adam Warski a...@warski.org wrote:
 Hello,

 I have a regular form, which is submitted with a POST (no AJAX here yet). The 
 form contains a list, to which you can add and remove elements using AJAX. So 
 the add and remove buttons are:

 add - ajaxButton(Add element, () = { elements += new Element; reDraw })

 The reDraw method is a SetHtml for the whole form. Now this almost works, 
 with the exception that when I press the add button all other changes in 
 the form are discarded, as the form is not submitted. So, when the button is 
 pressed, I would need to submit the form using ajax and execute a given 
 function on the server. In the archives I found SHtml.submitAjaxForm(formId) 
 method, which I guess does what I need, but I don't know how to combine it 
 with an ajaxButton?

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




[Lift] Performance related question

2010-01-09 Thread greekscala
Hello everyone,

I am surprised about the few code I have written and the effect I
get :)

I would like to know if this workflow can be optimized:

I my snippet method I findAnyTemplate() my xml fragments and
assigning them
to vals.

Then I have little functions that bind content with the above xml
fragments and return
the resulting NodeSeq, so I can do easy an SetHtml and return the new
content with
ajax.

I find this way very easy. So I can have many little fragments, load
them bind content
and return them via ajax.

Is it ok to load the fragments and save them in vals? Or can I do a
findAnyTemplate()
all the time? Or should I have snippets methods for this fragments and
let lift do the
snippet method calling?

with best regards

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




[Lift] Re: Performance related question

2010-01-09 Thread greekscala
Hello Marius,

yes it is more intended for caching. Ok so I can remove this vals from
my code.
Any other simple performance rules that one should be aware of for
Lift?

witth best regards

On 9 Jan., 16:38, Marius marius.dan...@gmail.com wrote:
 Are you using vals mainly for the purpose of caching ?

 I think it is ok to call findAnyTemplates (without using vals) as
 templates are cached (in production mode)

 Br's,
 Marius

 On Jan 9, 5:29 pm, greekscala hellectro...@gmail.com wrote:

  Hello everyone,

  I am surprised about the few code I have written and the effect I
  get :)

  I would like to know if this workflow can be optimized:

  I my snippet method I findAnyTemplate() my xml fragments and
  assigning them
  to vals.

  Then I have little functions that bind content with the above xml
  fragments and return
  the resulting NodeSeq, so I can do easy an SetHtml and return the new
  content with
  ajax.

  I find this way very easy. So I can have many little fragments, load
  them bind content
  and return them via ajax.

  Is it ok to load the fragments and save them in vals? Or can I do a
  findAnyTemplate()
  all the time? Or should I have snippets methods for this fragments and
  let lift do the
  snippet method calling?

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




[Lift] Re: Performance related question

2010-01-09 Thread greekscala
Like, makes it sense to cache a fragment xml when building a list so I
dont have to call findAnyTemplate all the time?

On 9 Jan., 17:31, greekscala hellectro...@gmail.com wrote:
 Hello Marius,

 yes it is more intended for caching. Ok so I can remove this vals from
 my code.
 Any other simple performance rules that one should be aware of for
 Lift?

 witth best regards

 On 9 Jan., 16:38, Marius marius.dan...@gmail.com wrote:

  Are you using vals mainly for the purpose of caching ?

  I think it is ok to call findAnyTemplates (without using vals) as
  templates are cached (in production mode)

  Br's,
  Marius

  On Jan 9, 5:29 pm, greekscala hellectro...@gmail.com wrote:

   Hello everyone,

   I am surprised about the few code I have written and the effect I
   get :)

   I would like to know if this workflow can be optimized:

   I my snippet method I findAnyTemplate() my xml fragments and
   assigning them
   to vals.

   Then I have little functions that bind content with the above xml
   fragments and return
   the resulting NodeSeq, so I can do easy an SetHtml and return the new
   content with
   ajax.

   I find this way very easy. So I can have many little fragments, load
   them bind content
   and return them via ajax.

   Is it ok to load the fragments and save them in vals? Or can I do a
   findAnyTemplate()
   all the time? Or should I have snippets methods for this fragments and
   let lift do the
   snippet method calling?

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




[Lift] Re: SessionVars in different snippets

2010-01-06 Thread greekscala
Hello,

I dont have to use SessionVars until now, but in near future.
But I had the same problem in mind.

Is there not a central place to get the user session with all the
values stored?

I think it is ugly to have sessionVars spread all over my code.

with best regards

On 5 Jan., 18:13, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Each SessionVar is distinct. Create one -- it can be global -- and use it in 
 both snippets.

 -

 michallchen...@gmail.com wrote:

 I have two snippets Login and Profile, and I want to read same object
 stored in session, when I use SessionVar it create two different
 object:

 object user extends SessionVar[Box[User]](Empty) // same in two
 snippets

 When I set this object in Login.scala :

  val usr = User.find(By(User.login,login))
 user.set(usr)

 in Profile it's still Empty

 why?

 --

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




[Lift] Re: SessionVars in different snippets

2010-01-06 Thread greekscala
Hello,

David I like the SessionVar Idea and the type safety.
But as Alex suggests, can I define an object with the fields?

I think now when I am writing this I think I understand it more :D
I thought it is not possible to have one object that stores the
values.
But the SessionVar knows what user is requesting a value right?

Because SessionVars were always defined inside the snippet class
I thought the SessionVar gets the context from the snippet class




On 6 Jan., 18:13, Alex Boisvert alex.boisv...@gmail.com wrote:
 I don't know if it's a common practice but I usually keep all my SessionVars
 in the same module (aka singleton object) for easy access:

 /** All session variables */
 object Session {
   private def currentWeekReq = S.param(currentWeek).map(Week.parse(_))
   object currentWeek extends SessionVar[Week](currentWeekReq openOr
 (Week())) {
     override def is = currentWeekReq openOr super.is
   }
   object latestEntry extends SessionVar(latestEntry)
   object editEntry   extends SessionVar(editEntry)
   object failedEntry extends SessionVar(failedEntry)
   /* etc... */

 }

 then I just import Session._ wherever needed.

 alex

 On Wed, Jan 6, 2010 at 11:31 AM, greekscala hellectro...@gmail.com wrote:
  Hello,

  I dont have to use SessionVars until now, but in near future.
  But I had the same problem in mind.

  Is there not a central place to get the user session with all the
  values stored?

  I think it is ugly to have sessionVars spread all over my code.

  with best regards

  On 5 Jan., 18:13, Naftoli Gugenheim naftoli...@gmail.com wrote:
   Each SessionVar is distinct. Create one -- it can be global -- and use it
  in both snippets.

   -

   michallchen...@gmail.com wrote:

   I have two snippets Login and Profile, and I want to read same object
   stored in session, when I use SessionVar it create two different
   object:

   object user extends SessionVar[Box[User]](Empty) // same in two
   snippets

   When I set this object in Login.scala :

    val usr = User.find(By(User.login,login))
   user.set(usr)

   in Profile it's still Empty

   why?

   --

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

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




[Lift] Re: SessionVars in different snippets

2010-01-06 Thread greekscala
Everything is alright then :D!

with best regards

On 6 Jan., 22:00, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Wed, Jan 6, 2010 at 10:51 AM, greekscala hellectro...@gmail.com wrote:
  Hello,

  David I like the SessionVar Idea and the type safety.
  But as Alex suggests, can I define an object with the fields?

 Sure.



  I think now when I am writing this I think I understand it more :D
  I thought it is not possible to have one object that stores the
  values.
  But the SessionVar knows what user is requesting a value right?

 Yes.  SessionVar and RequestVar are type-safe front ends to session-scoped
 or logical request-scoped backing store.



  Because SessionVars were always defined inside the snippet class
  I thought the SessionVar gets the context from the snippet class

 I rarely define my SessionVars inside snippets... I usually make them
 top-level scope.  I like Alex's idiom as well.





  On 6 Jan., 18:13, Alex Boisvert alex.boisv...@gmail.com wrote:
   I don't know if it's a common practice but I usually keep all my
  SessionVars
   in the same module (aka singleton object) for easy access:

   /** All session variables */
   object Session {
     private def currentWeekReq = S.param(currentWeek).map(Week.parse(_))
     object currentWeek extends SessionVar[Week](currentWeekReq openOr
   (Week())) {
       override def is = currentWeekReq openOr super.is
     }
     object latestEntry extends SessionVar(latestEntry)
     object editEntry   extends SessionVar(editEntry)
     object failedEntry extends SessionVar(failedEntry)
     /* etc... */

   }

   then I just import Session._ wherever needed.

   alex

   On Wed, Jan 6, 2010 at 11:31 AM, greekscala hellectro...@gmail.com
  wrote:
Hello,

I dont have to use SessionVars until now, but in near future.
But I had the same problem in mind.

Is there not a central place to get the user session with all the
values stored?

I think it is ugly to have sessionVars spread all over my code.

with best regards

On 5 Jan., 18:13, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Each SessionVar is distinct. Create one -- it can be global -- and
  use it
in both snippets.

 -

 michallchen...@gmail.com wrote:

 I have two snippets Login and Profile, and I want to read same object
 stored in session, when I use SessionVar it create two different
 object:

 object user extends SessionVar[Box[User]](Empty) // same in two
 snippets

 When I set this object in Login.scala :

  val usr = User.find(By(User.login,login))
 user.set(usr)

 in Profile it's still Empty

 why?

 --

 You received this message because you are subscribed to the Google
  Groups
Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

.
 For more options, visit this group athttp://
groups.google.com/group/liftweb?hl=en.

--
You received this message because you are subscribed to the Google
  Groups
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to
liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
  liftweb%2bunsubscr...@googlegroups.comliftweb%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/liftweb?hl=en.

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

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Surf the harmonics
-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




[Lift] Re: Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder

2010-01-02 Thread greekscala
Hello,

I think applier is to general. applier for...? As Naftoli said, a name
like StreamManager
or StreamHandler is clearer for a newbie like me.

best regards

On 31 Dez. 2009, 21:48, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Folks,

 I've changed LiftRules.getResourceAsStream and LiftRules.finder to return
 Box[Applier[InputStream]] rather than Box[InputStream].

 Applier has a single method, apply[T] which takes an InputStream = T and
 insures the InputStream is closed.

 This change is unlikely to impact much code out there, but does make sure
 that InputStreams are closed.

 If any of the folks out there that name things better than I do (at least I
 didn't call it Apply_A_Tron), please feel free to suggest name changes,
 variance changes, etc.

 Thanks,

 David

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

--

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




[Lift] Re: Form does not want to send

2009-12-29 Thread greekscala
Hello,

 You need to change the html to:

 lift:Bookmark.add form=post

 Otherwise lift does not render for the form element.

No the forms are rendered in html. I think the form=post is only
needed when ajaxForm is not used.

But I see now in the Firebug Console that the liftajax cannot find
jQuery.

jQuery is not defined
http://localhost:8080/ajax_request/liftAjax.js
Line 157

jQuery is not defined
http://localhost:8080/bookmarks/add
Line 105

For the second error this is the generated JS in my html:
script type=text/javascript
104 // ![CDATA[
105 jQuery(document).ready(function() {liftAjax.lift_successRegisterGC
();});
106 var lift_page = F1160735200508JPL;
107 // ]]
108 /script

The liftajax.js file is found.

The lift version I am using is a freshly build 1.1-snapshot of the
lift-base module.

with best regards

--

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




[Lift] Re: Form does not want to send

2009-12-29 Thread greekscala
I see now that I get the same error, that jQuery is not found
with lift 1.0 too. That is confusing.

--

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




[Lift] Re: Form does not want to send

2009-12-29 Thread greekscala
This is the generated head:

head
meta content=text/html; charset=utf-8 http-equiv=Content-Type/
titleTest/title
link type=text/css rel=stylesheet href=/css/my_layout.css
/link
script type=text/javascript src=/ajax_request/liftAjax.js
/script
/head

This is the generated form in a simple div element:

div id=addsf
form id=F392208970316G4M action=javascript://
onsubmit=lift_ajaxHandler(jQuery('#'+'F392208970316G4M').serialize(),
null, null);return false;
input type=text name=F392208970313SOO value=/
input type=submit name=F392208970314N0V value=add/
input type=hidden name=F392208970315CPR value=true/
/form
/div

And this is a generated script block at the bottom of the page:

script type=text/javascript
//
jQuery(document).ready(function() {lift_successRegisterGC();});
var lift_page = 'F392208970312QQE';
//
/script

with best regards

--

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




[Lift] Re: Form does not want to send

2009-12-29 Thread greekscala
I dont think I have to take care to reference jQuery myself for lift.
Lift should insert the version it needs automatically.

Ok I can workaround this by inserting a jquery reference, but I see
that jquery is in the lift sources.

The LiftBook states that by default the LiftRules.jsArtifacts variable
is
pointing to use jQuery by default.

with best regards

On 29 Dez., 14:08, Timothy Perrett timo...@getintheloop.eu wrote:
 It cant find JQuery, because, err, you have referenced it...

 You need to add:

 script type=text/javascript src=/classpath/jquery.js/script

 to your head element

 Cheers, Tim

 On 29 Dec 2009, at 12:43, greekscala wrote:

  This is the generated head:

  head
  meta content=text/html; charset=utf-8 http-equiv=Content-Type/
  titleTest/title
  link type=text/css rel=stylesheet href=/css/my_layout.css
  /link
  script type=text/javascript src=/ajax_request/liftAjax.js
  /script
  /head

  This is the generated form in a simple div element:

  div id=addsf
  form id=F392208970316G4M action=javascript://
  onsubmit=lift_ajaxHandler(jQuery('#'+'F392208970316G4M').serialize(),
  null, null);return false;
  input type=text name=F392208970313SOO value=/
  input type=submit name=F392208970314N0V value=add/
  input type=hidden name=F392208970315CPR value=true/
  /form
  /div

  And this is a generated script block at the bottom of the page:

  script type=text/javascript
  //
  jQuery(document).ready(function() {lift_successRegisterGC();});
  var lift_page = 'F392208970312QQE';
  //
  /script

  with best regards

  --

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

--

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




[Lift] Re: Form does not want to send

2009-12-29 Thread greekscala
Ok I did not use the archetypes. But I did not read this elsewhere.
Would be good to have this noted in the lift book or in the lift wiki.

I will post a comment on the liftbook group.

I will test it again with jQuery referenced.

with best regards

On 29 Dez., 14:54, Marius marius.dan...@gmail.com wrote:
 When you create a lift project using one of the Lift archetypes, the
 html templates include a reference to JQuery such as: script
 type=text/javascript src=/classpath/jquery.js/script

 Lift does not inject jquery reference in html head. I don't think it
 should as one could use Lift with YUI or other Lift framework. We
 could probably create a small builtin snippet that does that but I
 don't see lots of gains but probably would be helpful.

 Br's,
 Marius

 On Dec 29, 3:44 pm, greekscala hellectro...@gmail.com wrote:

  I dont think I have to take care to reference jQuery myself for lift.
  Lift should insert the version it needs automatically.

  Ok I can workaround this by inserting a jquery reference, but I see
  that jquery is in the lift sources.

  The LiftBook states that by default the LiftRules.jsArtifacts variable
  is
  pointing to use jQuery by default.

  with best regards

  On 29 Dez., 14:08, Timothy Perrett timo...@getintheloop.eu wrote:

   It cant find JQuery, because, err, you have referenced it...

   You need to add:

   script type=text/javascript src=/classpath/jquery.js/script

   to your head element

   Cheers, Tim

   On 29 Dec 2009, at 12:43, greekscala wrote:

This is the generated head:

head
meta content=text/html; charset=utf-8 http-equiv=Content-Type/
titleTest/title
link type=text/css rel=stylesheet href=/css/my_layout.css
/link
script type=text/javascript src=/ajax_request/liftAjax.js
/script
/head

This is the generated form in a simple div element:

div id=addsf
form id=F392208970316G4M action=javascript://
onsubmit=lift_ajaxHandler(jQuery('#'+'F392208970316G4M').serialize(),
null, null);return false;
input type=text name=F392208970313SOO value=/
input type=submit name=F392208970314N0V value=add/
input type=hidden name=F392208970315CPR value=true/
/form
/div

And this is a generated script block at the bottom of the page:

script type=text/javascript
//
jQuery(document).ready(function() {lift_successRegisterGC();});
var lift_page = 'F392208970312QQE';
//
/script

with best regards

--

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

--

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




[Lift] Re: Form does not want to send

2009-12-29 Thread greekscala
Test it and it works.

Thanks you guys.

with best regards

On 29 Dez., 15:02, greekscala hellectro...@gmail.com wrote:
 Ok I did not use the archetypes. But I did not read this elsewhere.
 Would be good to have this noted in the lift book or in the lift wiki.

 I will post a comment on the liftbook group.

 I will test it again with jQuery referenced.

 with best regards

 On 29 Dez., 14:54, Marius marius.dan...@gmail.com wrote:

  When you create a lift project using one of the Lift archetypes, the
  html templates include a reference to JQuery such as: script
  type=text/javascript src=/classpath/jquery.js/script

  Lift does not inject jquery reference in html head. I don't think it
  should as one could use Lift with YUI or other Lift framework. We
  could probably create a small builtin snippet that does that but I
  don't see lots of gains but probably would be helpful.

  Br's,
  Marius

  On Dec 29, 3:44 pm, greekscala hellectro...@gmail.com wrote:

   I dont think I have to take care to reference jQuery myself for lift.
   Lift should insert the version it needs automatically.

   Ok I can workaround this by inserting a jquery reference, but I see
   that jquery is in the lift sources.

   The LiftBook states that by default the LiftRules.jsArtifacts variable
   is
   pointing to use jQuery by default.

   with best regards

   On 29 Dez., 14:08, Timothy Perrett timo...@getintheloop.eu wrote:

It cant find JQuery, because, err, you have referenced it...

You need to add:

script type=text/javascript src=/classpath/jquery.js/script

to your head element

Cheers, Tim

On 29 Dec 2009, at 12:43, greekscala wrote:

 This is the generated head:

 head
 meta content=text/html; charset=utf-8 http-equiv=Content-Type/
 titleTest/title
 link type=text/css rel=stylesheet href=/css/my_layout.css
 /link
 script type=text/javascript src=/ajax_request/liftAjax.js
 /script
 /head

 This is the generated form in a simple div element:

 div id=addsf
 form id=F392208970316G4M action=javascript://
 onsubmit=lift_ajaxHandler(jQuery('#'+'F392208970316G4M').serialize(),
 null, null);return false;
 input type=text name=F392208970313SOO value=/
 input type=submit name=F392208970314N0V value=add/
 input type=hidden name=F392208970315CPR value=true/
 /form
 /div

 And this is a generated script block at the bottom of the page:

 script type=text/javascript
 //
 jQuery(document).ready(function() {lift_successRegisterGC();});
 var lift_page = 'F392208970312QQE';
 //
 /script

 with best regards

 --

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

--

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




[Lift] Form submit and Ajax

2009-12-29 Thread greekscala
Hello,

In a previous post I had the problem that my form was not send with
ajax.
With the help of Marius and Timothy I got it working.
(http://groups.google.com/group/liftweb/browse_thread/thread/
d052ed7191561ef1)

I have to questions.

Now I want, after the form is submittet, to fetch an object from my DB
do something
and update the site.

I tried the following:
def add(xml: NodeSeq): NodeSeq = {

def addBookmark(): JsCmd = {
  // fetch the object from DB

   JsCmds.SetHtml(WebHelper.MAIN_DIV_ID,
   TemplateFinder.findAnyTemplate
(WebHelper.bookmarkEdit).open_!)
}

SHtml.ajaxForm(
  bind(bookmark, xml,
url - SHtml.text(url, url = _),
submit - SHtml.submit(add, addBookmark)
  ), JsCmds._Noop, addBookmark
)
}

I hoped that the addBookmark method would be invoked after the form
is submitted and that the returned SetHtml will set the new snippet
fragment (that should be processed by lift).
The new fragment is a new form:
lift:Bookmark.edit
bookmark:url /
bookmark:title /
bookmark:submit /
/lift:Bookmark.edit

Is there a better way to do such ajax fragment replacements? would
like to know more about.
Are the NodeSeq that should be replaced with SetHtml processed by
Lift?

The second thing is, that when I am trying to make a browser request
to view the page,
the addBookmark method is already executed. Was this intended?

with best regards

--

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




[Lift] Re: Form submit and Ajax

2009-12-29 Thread greekscala
Hello Alex,

thank you for the answer.

Ok I will check it again set up a little example.

Is this a lift way workflow?

- show a page with a form
- data is submitted to snippet
- data is evaluated
- get other fragments/templates and bind the values for them
- invoke SetHtml that should replace div content on the page

 Not unless you're specifically calling templates, etc.

Do I have to load my fragments with templateFinder and then
invoke other snippet methods that are intended to process the
templates xml or is there another way so that Lift can do it.

with best regards

On 29 Dez., 20:13, Alex Boisvert alex.boisv...@gmail.com wrote:
 On Tue, Dec 29, 2009 at 7:44 AM, greekscala hellectro...@gmail.com wrote:
  Hello,

  In a previous post I had the problem that my form was not send with
  ajax.
  With the help of Marius and Timothy I got it working.
  (http://groups.google.com/group/liftweb/browse_thread/thread/
  d052ed7191561ef1http://groups.google.com/group/liftweb/browse_thread/thread/%0Ad052ed...
  )

  I have to questions.

  Now I want, after the form is submittet, to fetch an object from my DB
  do something
  and update the site.

  I tried the following:
  def add(xml: NodeSeq): NodeSeq = {

     def addBookmark(): JsCmd = {
       // fetch the object from DB

        JsCmds.SetHtml(WebHelper.MAIN_DIV_ID,
            TemplateFinder.findAnyTemplate
  (WebHelper.bookmarkEdit).open_!)
     }

     SHtml.ajaxForm(
       bind(bookmark, xml,
         url - SHtml.text(url, url = _),
         submit - SHtml.submit(add, addBookmark)
       ), JsCmds._Noop, addBookmark
     )
  }

  I hoped that the addBookmark method would be invoked after the form
  is submitted and that the returned SetHtml will set the new snippet
  fragment (that should be processed by lift).
  The new fragment is a new form:
  lift:Bookmark.edit
     bookmark:url /
     bookmark:title /
     bookmark:submit /
  /lift:Bookmark.edit

  Is there a better way to do such ajax fragment replacements? would
  like to know more about.

 I can't think of a better way right now;  what you're doing is pretty
 standard.

  Are the NodeSeq that should be replaced with SetHtml processed by
  Lift?

 Not unless you're specifically calling templates, etc.

  The second thing is, that when I am trying to make a browser request
  to view the page,
  the addBookmark method is already executed. Was this intended?

 No, that's not supposed to happen.  I'm guessing you're calling
 addBookmark() somewhere else in your code.

 alex

--

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




[Lift] Re: Form submit and Ajax

2009-12-29 Thread greekscala
Hello again,

I think I found an error in the form processing, correcct me if it is
not:
This is the snippet:

class Test {
  object name extends RequestVar[String](init)

  def render(xml: NodeSeq): NodeSeq = {
def printName(): JsCmd = {
  Log.debug(name =  + name.is)

  JsCmds.Alert(an ajax response! + name.is)
}
SHtml.ajaxForm(
  Helpers.bind(atest, xml,
name - SHtml.text(name.is, name(_)),
submit - SHtml.submit(add, printName)
  ), JsCmds._Noop, printName
)

/*
SHtml.ajaxForm(
  Helpers.bind(atest, xml,
name - SHtml.text(name.is, name(_)),
submit - SHtml.submit(add, printName)
  ) ++ SHtml.hidden(printName)
)
*/
  }
}

This is the template:
lift:surround with=default at=col3
lift:Test
atest:name /
atest:submit /
/lift:Test
/lift:surround

The problem is with the uncommented ajaxForm code, when the form is
submitted the name RequestVar is not updated. I seems that the
function
bound to the name-Textfield is not invoked. So I get back an ajax
response! init.

But the commented ajaxForm code gives me a correnct result. If I type
name in the
textfield I get an ajax response! name back.

with best regards


On 29 Dez., 20:46, greekscala hellectro...@gmail.com wrote:
 Hello Alex,

 thank you for the answer.

 Ok I will check it again set up a little example.

 Is this a lift way workflow?

 - show a page with a form
 - data is submitted to snippet
 - data is evaluated
 - get other fragments/templates and bind the values for them
 - invoke SetHtml that should replace div content on the page

  Not unless you're specifically calling templates, etc.

 Do I have to load my fragments with templateFinder and then
 invoke other snippet methods that are intended to process the
 templates xml or is there another way so that Lift can do it.

 with best regards

 On 29 Dez., 20:13, Alex Boisvert alex.boisv...@gmail.com wrote:

  On Tue, Dec 29, 2009 at 7:44 AM, greekscala hellectro...@gmail.com wrote:
   Hello,

   In a previous post I had the problem that my form was not send with
   ajax.
   With the help of Marius and Timothy I got it working.
   (http://groups.google.com/group/liftweb/browse_thread/thread/
   d052ed7191561ef1http://groups.google.com/group/liftweb/browse_thread/thread/%0Ad052ed...
   )

   I have to questions.

   Now I want, after the form is submittet, to fetch an object from my DB
   do something
   and update the site.

   I tried the following:
   def add(xml: NodeSeq): NodeSeq = {

      def addBookmark(): JsCmd = {
        // fetch the object from DB

         JsCmds.SetHtml(WebHelper.MAIN_DIV_ID,
             TemplateFinder.findAnyTemplate
   (WebHelper.bookmarkEdit).open_!)
      }

      SHtml.ajaxForm(
        bind(bookmark, xml,
          url - SHtml.text(url, url = _),
          submit - SHtml.submit(add, addBookmark)
        ), JsCmds._Noop, addBookmark
      )
   }

   I hoped that the addBookmark method would be invoked after the form
   is submitted and that the returned SetHtml will set the new snippet
   fragment (that should be processed by lift).
   The new fragment is a new form:
   lift:Bookmark.edit
      bookmark:url /
      bookmark:title /
      bookmark:submit /
   /lift:Bookmark.edit

   Is there a better way to do such ajax fragment replacements? would
   like to know more about.

  I can't think of a better way right now;  what you're doing is pretty
  standard.

   Are the NodeSeq that should be replaced with SetHtml processed by
   Lift?

  Not unless you're specifically calling templates, etc.

   The second thing is, that when I am trying to make a browser request
   to view the page,
   the addBookmark method is already executed. Was this intended?

  No, that's not supposed to happen.  I'm guessing you're calling
  addBookmark() somewhere else in your code.

  alex

--

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




[Lift] Re: Form submit and Ajax

2009-12-29 Thread greekscala
Hello Marius,

No there are no error messsages in the console window.

This is the generated form:
form id=F587106754336BUG action=javascript://
onsubmit=;liftAjax.lift_ajaxHandler(jQuery
('#'+F587106754336BUG).serialize(), function() { alert(an ajax
response! init);; }, null, javascript);return false;
postsubmit=alert(an ajax response! init);
input type=text value=init name=F5871067543340QE/
input type=submit name=F587106764335BDR value=add/
/form

Under the firebug network panel I see that there is a post (x is
typed value in the textfield):
F5871067543340QEx

And the response for this post is empty.

with best regards

I see that I get the predefined alert.


On 29 Dez., 22:28, Marius marius.dan...@gmail.com wrote:
 Could you please post your generated markup from the browser? ... Do
 you see anything unusual in FireBug?

 Br's,
 Marius

 On Dec 29, 10:59 pm, greekscala hellectro...@gmail.com wrote:

  Hello again,

  I think I found an error in the form processing, correcct me if it is
  not:
  This is the snippet:

  class Test {
    object name extends RequestVar[String](init)

    def render(xml: NodeSeq): NodeSeq = {
      def printName(): JsCmd = {
        Log.debug(name =  + name.is)

        JsCmds.Alert(an ajax response! + name.is)
      }
      SHtml.ajaxForm(
        Helpers.bind(atest, xml,
          name - SHtml.text(name.is, name(_)),
          submit - SHtml.submit(add, printName)
        ), JsCmds._Noop, printName
      )

      /*
      SHtml.ajaxForm(
        Helpers.bind(atest, xml,
          name - SHtml.text(name.is, name(_)),
          submit - SHtml.submit(add, printName)
        ) ++ SHtml.hidden(printName)
      )
      */
    }

  }

  This is the template:
  lift:surround with=default at=col3
      lift:Test
          atest:name /
          atest:submit /
      /lift:Test
  /lift:surround

  The problem is with the uncommented ajaxForm code, when the form is
  submitted the name RequestVar is not updated. I seems that the
  function
  bound to the name-Textfield is not invoked. So I get back an ajax
  response! init.

  But the commented ajaxForm code gives me a correnct result. If I type
  name in the
  textfield I get an ajax response! name back.

  with best regards

  On 29 Dez., 20:46, greekscala hellectro...@gmail.com wrote:

   Hello Alex,

   thank you for the answer.

   Ok I will check it again set up a little example.

   Is this a lift way workflow?

   - show a page with a form
   - data is submitted to snippet
   - data is evaluated
   - get other fragments/templates and bind the values for them
   - invoke SetHtml that should replace div content on the page

Not unless you're specifically calling templates, etc.

   Do I have to load my fragments with templateFinder and then
   invoke other snippet methods that are intended to process the
   templates xml or is there another way so that Lift can do it.

   with best regards

   On 29 Dez., 20:13, Alex Boisvert alex.boisv...@gmail.com wrote:

On Tue, Dec 29, 2009 at 7:44 AM, greekscala hellectro...@gmail.com 
wrote:
 Hello,

 In a previous post I had the problem that my form was not send with
 ajax.
 With the help of Marius and Timothy I got it working.
 (http://groups.google.com/group/liftweb/browse_thread/thread/
 d052ed7191561ef1http://groups.google.com/group/liftweb/browse_thread/thread/%0Ad052ed...
 )

 I have to questions.

 Now I want, after the form is submittet, to fetch an object from my DB
 do something
 and update the site.

 I tried the following:
 def add(xml: NodeSeq): NodeSeq = {

    def addBookmark(): JsCmd = {
      // fetch the object from DB

       JsCmds.SetHtml(WebHelper.MAIN_DIV_ID,
           TemplateFinder.findAnyTemplate
 (WebHelper.bookmarkEdit).open_!)
    }

    SHtml.ajaxForm(
      bind(bookmark, xml,
        url - SHtml.text(url, url = _),
        submit - SHtml.submit(add, addBookmark)
      ), JsCmds._Noop, addBookmark
    )
 }

 I hoped that the addBookmark method would be invoked after the form
 is submitted and that the returned SetHtml will set the new snippet
 fragment (that should be processed by lift).
 The new fragment is a new form:
 lift:Bookmark.edit
    bookmark:url /
    bookmark:title /
    bookmark:submit /
 /lift:Bookmark.edit

 Is there a better way to do such ajax fragment replacements? would
 like to know more about.

I can't think of a better way right now;  what you're doing is pretty
standard.

 Are the NodeSeq that should be replaced with SetHtml processed by
 Lift?

Not unless you're specifically calling templates, etc.

 The second thing is, that when I am trying to make a browser request
 to view the page,
 the addBookmark method is already executed. Was this intended?

No, that's not supposed to happen.  I'm guessing you're calling
addBookmark

[Lift] Form does not want to send

2009-12-28 Thread greekscala
Hello Lift people!

I am experimenting with Lift for building a web application.
I read alot on the list on the ajax subject and I think I get more
familiar with.

I try to get a form submittet with ajax. I want an easy solution
without much
code writing. I tried the following suggestion as found here in the
list:

SHtml.ajaxForm(
  bind(bookmark, xml,
url - SHtml.text(url, url = _),
submit - SHtml.submit(add, addBookmark)
  ) ++ SHtml.hidden(addBookmark)
)

I am using a StatefulSnippet. My little template:

lift:surround with=default at=col3
div id=addb
lift:Bookmark.add
bookmark:url /
bookmark:submit /
/lift:Bookmark.add
/div
/lift:surround

The form gets rendered but not submitted when the add button is
clicked.
I have a freshly build 1.1-snapshot and using simple-build-tool
(running jetty).

Do not understand it. Without Ajax it works.

with best regards

--

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




[Lift] Re: Lift is awesome (with reservations)

2009-12-26 Thread greekscala
Hello,

It would be great to see some more bind examples in more
complex scenarios and how different snippets can work
together. How to build fragments and replace fragments
for ajax. I think the people that do a lot with lift have some
patterns for this. Are there any Idioms out.

This is my problem area.

with best regards


On 26 Dez., 15:30, Marius marius.dan...@gmail.com wrote:
 While I admit that there is not yet enough documentation material or
 at least probably not in a single place I disagree with some
 complaints. The Lift book for example describes in quite detail that
 request processing lifecycle, disspath functions, rendering pipeline,
 LiftRules, S, SHtml, LiftResponse-s, binds,  JavaScript abstraction
 and many others etc. Sure new things came up in the mean time and
 we're trying to document them as time permits in many cases.

 About the Lift structure being too messy, what do you actually mean?
 AFAIK historically, people (a many newbies) asserted the contrary that
 they really liked the Lift concepts, the ease of use and understand
 how it works. For naming conventions there was a project opened and
 even discussed on this public list about renaming API's but AFAIK
 there was not a whole lot of feedback on this list so unless I'm
 wrong, the decision was to do ad-hoc renaming as we work on various
 things. This may mean deprecation of old names so there will be a
 smooth transition to better names.

 So I believe it is much more constructive for ALL of us to ask
 concrete questions, described concrete problems and let's see how we
 can fix it. Many things though may be subjective and leading to
 endless discussions without substance.

 Br's,
 Marius

 On Dec 26, 2:51 am, Erkki Lindpere vill...@gmail.com wrote:

  I think the best things I think you could do to help newbies is
  document in a well-structured way:

  * all the conventions over configuration rules
  * what classes to use for the basic stuff (what is S for and how it
  should be used, all the things you can do with LiftRules, etc.)
  * more advanced uses of bind(...) in snippets
  * better docs for the Lift tags.

  On Dec 25, 9:09 pm, Timothy Perrett timo...@getintheloop.eu wrote:

   It would be really good for us as a team to know what it is you *dont*
   get? Is it conceptual? code? If we can understand what is daunting for
   newbies that would really be helpful.

--

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




[Lift] Re: Lift is awesome (with reservations)

2009-12-25 Thread greekscala
Hello,

I would like to hear more about, how you get lift. I am new to lift
too and trying to get a better and clearer viewpoint.

Maybe it can help others to. If you can summarize it in a few
sentences.
This would be really great.

with best regards

On 25 Dez., 01:05, Erkki Lindpere vill...@gmail.com wrote:
 It took me a long time to get lift. For about a year I looked at
 examples from time to time and tried out some basic stuff, but it just
 didn't click. I found the structure to be too messy. I still do
 actually. It seems that the documentation is also not well structured
 enough for getting started and I had to look at examples and Lift's
 source to understand how things work (thanks for putting sources in
 the Maven repo BTW, I wish everyone would do that).

 After experimenting with Lift for about two days I think I get the
 basic idea and I've come to a better understanding about lift's
 structure by looking at the sources, I can now ignore the parts I
 don't like (Mapper being one, I use JPA instead) and use the parts
 that I do.

 The way the X(HT)ML processing, type-safe JavaScript/jQuery, Ajax and
 Comet work is just brilliant!

 PS. I'm working (on my spare time for now) on an Ajax  Comet heavy
 application that will hopefully also have a lot of runtime
 customization ability through OSGi. I haven't gotten to the OSGi part
 yet, because there's the hurdle of OSGifying all the jars I use and I
 want to get a good understanding of Lift before I start making things
 dynamic. But do you have any recommendations for OSGi framework/web
 container combinations to use with Lift? I have tried SpringSource
 dmServer (with the SpringSource tooling), but I don't like it much...
 Maybe plain Equinox + Jetty with the ScalaModules library would be a
 good combo?

--

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




[Lift] Re: Beginner Ajax question - redrawing a page fragment

2009-12-24 Thread greekscala
Hello,

it would be nice to see some more examples for ajax.
I am new to lift too, and I am trying to get the view point
of how to work with lift.

Some Idiom or standard way to say replace this with this snippet
there
in a how-to would be great to have.

with best regards


On 23 Dez., 22:47, Adam Warski a...@warski.org wrote:
 Hello,

  A couple of observations...

  First, having some XHTML in your Scala code is not a bad thing.  When the 
  XHTML declares the meaning (not the layout) of the information, it's my 
  opinion that it's okay.  This means that:
  ul{list.map(i = li{i}/li}ul
  Simply defines an unordered list.  It does not declare how to lay out that 
  list.  The layout should be controlled by CSS.

 True, xhtml can also be considered as logic. You got me convinced ;).

            TemplateFinder.findAnyTemplate(List(snippets-hidden, 
  userList)) openOr NodeSeq.Empty)

 Worked great; lots of Lift API to explore still :).

 If you don't mind, I'll put the results of this thread in a 
 tutorial-ajax-followup wiki page? I think quite a lot of people may want to 
 do something similar.

 --
 Adam

--

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




[Lift] Re: Confused about validation

2009-12-21 Thread greekscala
Nice to see that there is discussion about this.
I do not have much web framework background
but the Wicket Validators are really nice.

with best regards


On 18 Dez., 10:13, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
 Naftoli Gugenheim naftoli...@gmail.com writes:
  What would such an abstraction do?
  What code would you like to write (including templates) and what should it 
  do?

 I had some input here:

 http://groups.google.com/group/liftweb/browse_thread/thread/814de5be3...

 /Jeppe

--

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




[Lift] Re: Funny behavior of head merging with nested head blocks

2009-12-17 Thread greekscala
Hello,

I have a head element in my default template with a standard title
element.
When I define a head element in my snippet with a new title element,
it is appended into the head section of my resulting html.

Now there are two title element and the browser uses the first one.
I thought the title element in my default template will be replaced
with the one I defined in my snippet.

Is there another way to achieve this?

with best regards

On 16 Dez., 21:54, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Wed, Dec 16, 2009 at 11:55 AM, Ross Mellgren dri...@gmail.com wrote:
  I was diagnosing some incorrect HTML in our application using Lift,
  and I found a strange behavior of head merging (I assume) when you
  emit a head tag into a head tag from the snippet. The code speaks
  better than I do about this:

  ...
  object Dialog extends DispatchSnippet {
      val standardDialogOptions: JsObj = JsObj(
          autoOpen  - false,
          bgiframe  - true,
          modal     - true,
          resizable - false
      )

      val dispatch: DispatchIt = {
          case head = renderHead
          case render = render
      }

      def renderHead(ns: NodeSeq): NodeSeq =
          head{ Script { JsCrVar(pxStandardDialogOptions,
  Dialog.standardDialogOptions) } }/head
  ...
  }

          LiftRules.snippetDispatch.append {
  ...
              case Dialog           = Dialog
  ...
          }

  lift:surround with=default at=content
      head
          titleEmail Editor/title
          lift:Dialog.head /
      /head
  /lift:surround

  I agree I'm doing the wrong thing here -- the lift:Dialog.head / tag
  rightly should be outside of the head block, or the snippet should not
  emit head. However, the resulting behavior is funny (certainly more
  funny than I'd expect):

  html xmlns:lift=http://liftweb.net/; xmlns=http://www.w3.org/1999/xhtml
  
  head
  ...
  titleEmail Editor/title

  script type=text/javascript
  // ![CDATA[
  var pxStandardDialogOptions = {autoOpen: false, bgiframe: true,
  modal: true, resizable: false};
  // ]]
  /script

  headscript type=text/javascript
  // ![CDATA[
  var pxStandardDialogOptions = {autoOpen: false, bgiframe: true,
  modal: true, resizable: false};
  // ]]
  /script/head

  /head
  ...
  /html

  Ideally I'd like this to just work so that it doesn't matter
  precisely where the snippet is called, though it would be some special
  magic just to work around an erroneous case. But, the behavior that
  does happen seems odd, duplicating the markup inside the head?

  Should I file a bug? Just smile and nod?

 If we had to recursively check all the head tags for head tags, that
 would significantly increase the overhead of the rewrite phase.  I would
 suggest using the new Helpers.stripHead() call to remove head tags from
 stuff you already know is in a head tag.





  -Ross

  --

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

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

--

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




[Lift] Confused about validation

2009-12-16 Thread greekscala
Hello lift people,

lift seems very promising. I am trying to make some tests
and examples because I am new to lift.
I wanted to add some validation to a form element and show
the validation error to the user.
But after little searching I was a little disappointet to see that
there
is no such support, exept when using Mapper. I do not want to use
Mapper.  I want only simple field validation with the errors messages
printed in a feedback panel.

Before lift I was using Wicket. I think they did a good job with the
validators.

I try to understand why lift has not such support? I do not want to
code
everything in my submit method and validate things there.

best regards

--

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




[Lift] Re: Structuring Web Application

2009-08-24 Thread greekscala

Hello,

ok. I know that I can compose my logic together.
But I dont know how to configure my parts and where to do it.

David says to create objects that do extend my traits?
How do you guys do it, so that you have a seperation of
Lift and application layer...?

I am getting better :D

thanks a lot

On 24 Aug., 00:19, greekscala hellectro...@gmail.com wrote:
 Hello David,

 thanks for helping.
 Do you mean by composing my business logic with traits
 like the example of Jonas 
 Bonerhttp://jonasboner.com/2008/10/06/real-world-scala-dependency-injectio...
 ?
 I understand the example.

 What do you mean by objects? The object Scala keyword?

 It would be great if you can give me a little example. How to glue it
 with a Lift Snippet.

 Thanks
 kind regards

 On 23 Aug., 19:23, David Pollak feeder.of.the.be...@gmail.com wrote:

  On Sun, Aug 23, 2009 at 5:15 AM, greekscala hellectro...@gmail.com wrote:

   Hello Timothy,

   thank you.
   I know that I do not need Spring for Scala.
   I dont expressed it well. How do I glue my app parts
   together. And how do I glue the lift part with a facade or
   application service of my domain layer.

  Use traits to describe the pieces of your business logic rather than
  classes.  Traits can be composed very easily.

  Don't use new, but use object's as factories that make run-time decisions
  about how to compose traits and vend them.

   Thanks for your help

   On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
Can you please be more specific about your app tier that you wish to
access - im unfortunately not seeing what hurdle stops you from
accessing it just as you would from Java?

Cheers, Tim

On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:

 Hello Lift Community,

 I want to implement a new Project in Scala with Lift. I am new to
 Scala/Lift.
 Scala looks great and it expanded my horizon. FP is a new concept to
 me.

 My background is Java and a little bit of Spring. I read three Scala
 books
 and a lot on blogs. But there is a missing part for me on how to
 combine
 my classes. I read the Scalable Components Paper and I dont get it
 100%.
 I need a little bit more input on structuring a web app and I hope to
 get the 100%
 with you guys.
 With Spring you let the container manage the classes. ok.
 I think my problem is, I dont know how you structured a web app in
 days
 without Spring.

 I would like to have Lift access my domain logic over an application
 layer (Domain
 Driven Design).
 In Wicket I would have my SpringBean annotation.

 So I hope to understand, how
 - can I access my app layer?
 - how could I organize my domain logic. I want to use DDD. I know I
 have to use
 object and class in a bigger sense...?

 I hope you guys can give me some hints.

 Thanks a lot

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

--~--~-~--~~~---~--~~
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: Structuring Web Application

2009-08-23 Thread greekscala

Hello Timothy,

thank you.
I know that I do not need Spring for Scala.
I dont expressed it well. How do I glue my app parts
together. And how do I glue the lift part with a facade or
application service of my domain layer.

Thanks for your help


On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
 Can you please be more specific about your app tier that you wish to
 access - im unfortunately not seeing what hurdle stops you from
 accessing it just as you would from Java?

 Cheers, Tim

 On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:

  Hello Lift Community,

  I want to implement a new Project in Scala with Lift. I am new to
  Scala/Lift.
  Scala looks great and it expanded my horizon. FP is a new concept to
  me.

  My background is Java and a little bit of Spring. I read three Scala
  books
  and a lot on blogs. But there is a missing part for me on how to
  combine
  my classes. I read the Scalable Components Paper and I dont get it
  100%.
  I need a little bit more input on structuring a web app and I hope to
  get the 100%
  with you guys.
  With Spring you let the container manage the classes. ok.
  I think my problem is, I dont know how you structured a web app in
  days
  without Spring.

  I would like to have Lift access my domain logic over an application
  layer (Domain
  Driven Design).
  In Wicket I would have my SpringBean annotation.

  So I hope to understand, how
  - can I access my app layer?
  - how could I organize my domain logic. I want to use DDD. I know I
  have to use
  object and class in a bigger sense...?

  I hope you guys can give me some hints.

  Thanks a lot

--~--~-~--~~~---~--~~
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: Structuring Web Application

2009-08-23 Thread greekscala

Hello David,

thanks for helping.
Do you mean by composing my business logic with traits
like the example of Jonas Boner 
http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html
?
I understand the example.

What do you mean by objects? The object Scala keyword?

It would be great if you can give me a little example. How to glue it
with a Lift Snippet.

Thanks
kind regards

On 23 Aug., 19:23, David Pollak feeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 5:15 AM, greekscala hellectro...@gmail.com wrote:

  Hello Timothy,

  thank you.
  I know that I do not need Spring for Scala.
  I dont expressed it well. How do I glue my app parts
  together. And how do I glue the lift part with a facade or
  application service of my domain layer.

 Use traits to describe the pieces of your business logic rather than
 classes.  Traits can be composed very easily.

 Don't use new, but use object's as factories that make run-time decisions
 about how to compose traits and vend them.





  Thanks for your help

  On 23 Aug., 13:12, Timothy Perrett timo...@getintheloop.eu wrote:
   Can you please be more specific about your app tier that you wish to
   access - im unfortunately not seeing what hurdle stops you from
   accessing it just as you would from Java?

   Cheers, Tim

   On Aug 22, 9:45 pm, greekscala hellectro...@gmail.com wrote:

Hello Lift Community,

I want to implement a new Project in Scala with Lift. I am new to
Scala/Lift.
Scala looks great and it expanded my horizon. FP is a new concept to
me.

My background is Java and a little bit of Spring. I read three Scala
books
and a lot on blogs. But there is a missing part for me on how to
combine
my classes. I read the Scalable Components Paper and I dont get it
100%.
I need a little bit more input on structuring a web app and I hope to
get the 100%
with you guys.
With Spring you let the container manage the classes. ok.
I think my problem is, I dont know how you structured a web app in
days
without Spring.

I would like to have Lift access my domain logic over an application
layer (Domain
Driven Design).
In Wicket I would have my SpringBean annotation.

So I hope to understand, how
- can I access my app layer?
- how could I organize my domain logic. I want to use DDD. I know I
have to use
object and class in a bigger sense...?

I hope you guys can give me some hints.

Thanks a lot

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

--~--~-~--~~~---~--~~
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] Structuring Web Application

2009-08-22 Thread greekscala

Hello Lift Community,

I want to implement a new Project in Scala with Lift. I am new to
Scala/Lift.
Scala looks great and it expanded my horizon. FP is a new concept to
me.

My background is Java and a little bit of Spring. I read three Scala
books
and a lot on blogs. But there is a missing part for me on how to
combine
my classes. I read the Scalable Components Paper and I dont get it
100%.
I need a little bit more input on structuring a web app and I hope to
get the 100%
with you guys.
With Spring you let the container manage the classes. ok.
I think my problem is, I dont know how you structured a web app in
days
without Spring.

I would like to have Lift access my domain logic over an application
layer (Domain
Driven Design).
In Wicket I would have my SpringBean annotation.

So I hope to understand, how
- can I access my app layer?
- how could I organize my domain logic. I want to use DDD. I know I
have to use
object and class in a bigger sense...?

I hope you guys can give me some hints.

Thanks a lot

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