[Lift] Re: problems with tomcat

2009-11-12 Thread ben

Have you got any conflicting jars in TOMCAT_HOME/lib ?
--~--~-~--~~~---~--~~
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: form input tag name values changed when moving from M6 to M7

2009-11-10 Thread ben

Hi,

Bear in mind that I'm a newbie Lifter, so I won't have the knowledge
of why certain choices were made or the knock on effects of changing
how things work in Lift ...

From my perspective (ie automatically testing a form on a page via
Cucumber), I'm not sure the unique id (as in unique id across all
forms in a webapp) is required. All I need is a unique id for a given
form on a page.
For my needs, the following line alone will provide that :
val prefix: String = new DecimalFormat(0).format
(bump + num)

Is there a reason I'm not understanding for why a unique id provided
by the stack trace is required ?

Cheers,
Ben



--~--~-~--~~~---~--~~
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: form input tag name values changed when moving from M6 to M7

2009-11-10 Thread ben

Which brings us back to my original point ... how can we preserve
acceptance tests ?
Do we need to have a stack-trace hash on the form ids or can we have a
non-unique-id-through-the-webapp but unique to the form in order to
achieve this.
My newbie knowledge of Lift suggests we can, but I don't have enough
of a big picture view of Lift to give a conclusive answer ...
--~--~-~--~~~---~--~~
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] Lift's servlet/filter chain when handling non-Lift resources

2009-11-04 Thread ben

Hi,

I'm not sure if I was just doing it wrong or whether its a problem
with Lift's chain handling. I suspect its my problem, but you never
know !

So, don't ask why, but I wrote a servlet that I need to be able to
call which is not part of Lift. I defined my servlet in the normal
manner.
I then added LiftRules.passNotFoundToChain to Boot.

I then hit the servlet with some request parameters (ie form data),
but also wrote some data to the servlet's request stream.
Lift successfully passes control to the servlet, and I can access the
form data from the HttpServletRequest, but I cannot read any of the
request's input stream (ie new BufferedReader(new InputStreamReader
(request.getInputStream())) ) - it just seems to have lost the data on
the stream.

If I then stop jetty, and comment out the Lift Filter in web.xml, then
re-running the same test succeeds - ie I can read the request stream
just fine.

I got around this problem by in effect writing my own filter, and
passing URIs I need to avoid Lift to the approprate request
dispatcher, and passing the rest onto the Lift filter. Code is below,
if anyone is interested.

I realise its probably me doing something wrong, but you never know !

/**
 * A filter which avoids Lift for certain URIs, configured as :
 * filter
 *   filter-nameAvoidLiftFilter/filter-name
 *   display-nameAvoidLiftFilter/display-name
 *   descriptionAvoid Lift for certain URIs, else chain it to
LiftFilter/description
 *   filter-classcom.acme.web.filter.AvoidLiftFilter/filter-
class
 *   init-param
 *   param-nameURIs/param-name
 *   param-value/TestServlet,/Finder/param-value
 *   /init-param
 *   /filter
 *
 *   filter-mapping
 *   filter-nameAvoidLiftFilter/filter-name
 *   url-pattern/*/url-pattern
 *   /filter-mapping
 */

class AvoidLiftFilter extends Filter  {
  var uris = List[String]()

  def init(config: FilterConfig) {
val initParams = config.getInitParameterNames();
while (initParams.hasMoreElements()) {
  val name = initParams.nextElement().asInstanceOf[String];
  if (name == URIs) {
val value = config.getInitParameter(name).asInstanceOf[String]
uris = List.fromString(value, ',')
  }
}
  }

  def doFilter(request: ServletRequest, response: ServletResponse,
chain: FilterChain) = {
val requestUri = request.asInstanceOf
[HttpServletRequest].getRequestURI();
if (uris.filter(x = requestUri.startsWith(x)).length  0) {
request.getRequestDispatcher(requestUri).forward(request,
response)
} else {
chain.doFilter(request, response);
}
  }

  def destroy {}
}




--~--~-~--~~~---~--~~
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's servlet/filter chain when handling non-Lift resources

2009-11-04 Thread ben

Thanks for the reply Andew.
That does indeed work, cheers.
I googled and googled and googled, and then thought bx to it, I
can get around this. Good waste of an afternoon !
My Google skills - 0
Liftweb group list - 1 !
--~--~-~--~~~---~--~~
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's servlet/filter chain when handling non-Lift resources

2009-11-04 Thread ben

Just a note to the committers if they read this :

I did find it really hard to work out how to get this working, just
couldn't find anything on google. I also looked at the LIftRules
source code, and just couldn't see anything obvious.

I just altered LiftRules.scala on my local version of 1.1-M6 to add
the following method :

  def bypassLiftServletFilterChainFor(uriList: List[String]) {
uriList.foreach(uri = {
liftRequest.append({
  case r if (r.path.partPath match
  {
case uri :: _ = true case _ = false
  }) = false
})
})
  }

It just occurs to me (and maybe its only me !) that some of the things
people want to do are not overly obvious to the newbie, and having
little functions such as the above are easy to add to the codebase,
and may go a long way to making things like this a bit easier to work
out how to do :)

Cheers,
Ben
--~--~-~--~~~---~--~~
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: Anything similar as Rack::Test and rspec for lift applications?

2009-11-04 Thread ben

Vesa,

Maybe I'm way off, but is there a problem with using Ruby tools like
rack or cucumber to test webapps written in Lift ?
I've got a webapp written in Lift, with all the web acceptance tests
written in cucumber+webrat, and all the code level tests written in
scala-test+specs - ie the classic TDD tests written in scala, and the
web acceptance/functional tests written in Ruby.

Ben

--~--~-~--~~~---~--~~
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: cucumber + webrat with Lift (switch off auto generation of name/id attrs)

2009-11-03 Thread ben

Hi,

Thanks very much, that's exactly what I'm after !

For anyone reading this and wondering how to put Lift in test mode,
here is one way if you're using maven+jetty :

mvn jetty:run -Drun.mode=test


--~--~-~--~~~---~--~~
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] cucumber + webrat with Lift (switch off auto generation of name/id attrs)

2009-10-30 Thread ben

Hi,

I love how Lift generates name/id attributes on form values - its a
great security feature.
But it does tend to make acceptance frameworks like cucumber+webrat
impossible to use.

For those not familar with cucumber+webrat, it is an acceptance
framework for testing, amongst other things, websites.
So if we were writing a test to submit a form, we would write a test
script which looked something like :

  fill_in my_form_text_input_name, :with = inputValue
  click_button Submit

where the html would be :

 input type=text name=my_form_text_input_name /

With Lift generating these automatic name/id attributes, it makes the
above impossible.

So my question is : Is it possible to turn this auto-generation off
for use when testing and then turn it back on for production ?

Thanks,
Ben
--~--~-~--~~~---~--~~
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: Submitting a form and returning results

2009-10-25 Thread ben

I worked around this in the end with a stateful snippet, not sure it
feels right though !
--~--~-~--~~~---~--~~
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] Submitting a form and returning results

2009-10-22 Thread ben

Hi,

I'm having trouble working out how to do a really simple thing -
submit a form and return some results.
Imagine a simple page that took a name of a person to search for, and
displayed a list of people matching that name.
I've put together a dummy example to show you what I've tried :

So the view is pretty simple :

lift:PeopleSearchSnippet.searchForPeople form=post
table
tr
tdFind People !/td
tdpeopleSearch:nameToSearchForValue to search
on/peopleSearch:nameToSearchFor/td
/tr
tr
tdnbsp;/td
tdpeopleSearch:submitbuttonFind People/
button/peopleSearch:submit/td
/tr
tr
td colspan=2peopleSearch:searchResultsValue
to search on/peopleSearch:searchResults/td
/tr
/table
/lift:PeopleSearchSnippet.searchForPeople


The snippet is :

class PeopleSearchSnippet  {

  def searchForPeople(form: NodeSeq) = {
val search = PeopleSearch.create
println(\n\n
\n---
\n +search)

def performSearch(): Unit =
  search.validate match {
case Nil = performSearchOn(search)
case xs = S.error(xs); S.mapSnippet
(PeopleSearchSnippet.searchForPeople, doBind)
  }

def doBind(form: NodeSeq) = {
  bind(peopleSearch, form,
nameToSearchFor - search.nameToSearchFor.toForm,
submit - submit(Search For People, performSearch),
searchResults - renderResults(search)
)
}

doBind(form)
  }

  /**
   *  Dummy render method which would render the search results
   */
  def renderResults(search: PeopleSearch) = {
// Just make some dummy results if they actually performed a
search
// If done for real, it would render the results on the
search:PeopleSearch object
if (search.nameToSearchFor != ) {
  List(dave smith, jimmy cracked corn, lazy t.
bones).foldLeft (List[Elem]())((x, y) = div{y}/div :: x)
} else {
  divNo search done yet/div
}
  }

  /**
   *  Dummy method that would do a search, save some results to be
rendered to the view
   */
  def performSearchOn(search: PeopleSearch) = {
println(Searching on  +search)
// This would populate the results to display if done for real,
// so that renderResults() method could render the search results
into html
search.save
  }


I think I know whats going wrong, but I'm not really sure how to get
Lift to do what I'm after.

The problem is that when renderResults() is called, the search value
(nameToSearchFor) is always empty.
But when the submit button is clicked, the performSearchOn method
has a populated search value.

I think the reason is that performSearch() is bound to the submit
action in doBind() - and is executed when a form submit is done - but
the searchResults value is bound before that method is actually
called - hence its always got empty search values.

I guess its because I'm expecting List to be doing something I don't
quite understand, based on my experience with  MVC frameworks like
Spring MVC etc.
In my mind, the process is submit form, use object to perform search
on, populate the results, render the page, but obviously thats not
whats going on.

Any help on how to achieve my aim (ie submit a form, render some
results) would be most appreciated,

Thanks,

Ben

--~--~-~--~~~---~--~~
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: problem in getting started

2009-10-08 Thread ben

Prabhat, the command works fine for me, using Maven 2.0.9. Could it be
a problem with a corporate proxy perhaps ?

I executed :
mvn  archetype:generate -U  -DarchetypeGroupId=net.liftweb  -
DarchetypeArtifactId=lift-archetype-blank  -DarchetypeVersion=1.0  -
DremoteRepositories=http://scala-tools.org/repo-releases  -
DgroupId=demo.helloworld   -DartifactId=helloworld   -Dversion=1.0-
SNAPSHOT
--~--~-~--~~~---~--~~
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: Struggling with mapping a list of objects

2009-09-25 Thread ben

Just an update ...

I did manage to get maven to pull down 1.1-M5, not sure what was up
with it before, but it worked in the morning.
I couldn't resolve the class MappedOneToMany, or Owned, even though I
can see them in the lift-mapper-1.1-M5.jar . Used the import import
net.liftweb.mapper._

Oh well, I got around it in a horrible way by in effect serializing
the list of objects I wanted to save as XML and storing them in a
MappedText field. It works, but its grim.

Thanks for your help though everyone, the support on this list is
great, and lift is a breath of fresh air.

Cheers,
Ben
--~--~-~--~~~---~--~~
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: Struggling with mapping a list of objects

2009-09-24 Thread ben

If I was in Java/Hibernate mode, I guess I'd tag it as one-to-many and
have a Skill object, which maps back to the Person object via  a
key ...  just not sure how to do that with Lift's OR mapper. I keep
having mental blocks when it comes to lift  scala :(

I guess if I was doing it in Java, I would have something like :

@Entity
public class Person {
@Id
@GeneratedValue
private Long id;


@OneToMany
@JoinColumn( name=id)
private ListSkill skills;
}

@Entity
public class Skill {
@Id
@GeneratedValue
private Long id;

private String name;
}

Can anyone lift'ify / scal'ify that for me ?!

--~--~-~--~~~---~--~~
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: Struggling with mapping a list of objects

2009-09-24 Thread ben

Thanks for the reply, will have a go at that.

Cheers,
Ben
--~--~-~--~~~---~--~~
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: Struggling with mapping a list of objects

2009-09-24 Thread ben

Jeppe : Yes, thats what I was after. It seems like a lot of work to
map a list of objects (compared to other ORMs), but I'm willing to
give it a go.
Shame really, as I've got used to writing less code lately with
Scala !

Problem is, LongMappedForeignMapper seems to be only from Lift 1.1 ...
but I can't find a mvn repo for it ... I normally use the scala-tools
repo, and while it has a bunch of POMs and Maven stuff in there, there
is no jar file, and my build can't resolve the dependancy.

http://scala-tools.org/repo-releases/net/liftweb/lift/1.1-M5

Any ideas ?

(Sorry to be a pain with the noob questions !)
--~--~-~--~~~---~--~~
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: Getting Started tutorial - not understanding some syntax

2009-07-31 Thread ben

Thankyou all for your posts, I now understand whats going on !

Victor : Thanks for the great examples of how to pass functions into
other functions - a very illuminating example, I'm sitting here
thinking about how much that will make a difference to code
conciseness compared with Java !

David : Combined with Victor's example of how to pass a function via
another function, I can now see how the value from the user is applied
to the domain object. Pretty slick, once you grasp whats going on.

Cracking stuff, looking forward to learning more about Lift+Scala, and
hopefully getting a site into production in the future.

Ben

--~--~-~--~~~---~--~~
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] Getting Started tutorial - not understanding some syntax

2009-07-30 Thread ben

Hi,

I feel I must apologise for this  post ... I've only been doing scala
for a week, and lift for 3 days, but I'm stuck.
I'm coming from an experienced java background, just struggling with
some scala constructs.

I feel I understand the basics of lambda and function literals - but
I'm blown away by some of the syntax in the lift Getting Started
tutorial.
For example, given :

val mylist = Array(1,2,3)
mylist..foreach(v = println(v)

Here I understand where v comes from - its each int in the list.

In the tutorial (http://liftweb.net/docs/getting_started/
mod_master.html)
there is a function desc (Listing 15) :

private def desc(td: ToDo, reDraw: () = JsCmd) =
 swappable(span{td.desc}/span,
 span{ajaxText(td.desc,
 v = {td.desc(v).save; reDraw()})}
 /span)

For my own brain to try and break it down, I have :

  private def desc(td: ToDo, reDraw: () = JsCmd) = {
val myFunctionLiteral = (xxx: String) = {td.desc(xxx).save;
println(!Desc function : + xxx); reDraw()}

swappable(span{td.desc}/span,
  span{ajaxText(td.desc, myFunctionLiteral)}/span)
  }

This is called from the doList method :

private def doList(reDraw: () = JsCmd)(html: NodeSeq): NodeSeq =
 toShow.
 flatMap(td =
   bind(todo, html,
  desc - desc(td, reDraw)
   ))

I understand where the ToDo object td is coming from, and how the
reDraw thing works, and how they are passed to the desc function,
but what I don't understand at all is where the val xxx in
myFunctionLiteral comes from ?
How is it passed into the function ? Is it currying ?

I'm sorry for such a vague question, I'm totally at sea here.

Thankyou for reading this, and for any help you may provide !

Ben

--~--~-~--~~~---~--~~
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: Getting Started tutorial - not understanding some syntax

2009-07-30 Thread ben

Hi Viktor,

Thanks for your reply.

I do understand the simple examples, like the one you were kind enough
to post.

My problem is that I just can't seem to break through from the simple
examples to the code in the Getting Started tutorial 

To elaborate, given the following in a scala console :

scala val square = (x : Int) = x * x
square: (Int) = Int = function

scala square(2)
res5: Int = 4

I can easily (in my mind) see how that function literal works - ie
function square takes an int and apply(s) a square on the value passed
in. In my mind I can see where x is coming from - its clearly the
value 2 passed in the operation square(2) - but I just don't get
where the string xxx (in the code posted (from the tutorial - see
Listing 15) is actually coming from ... there never seems to be the
string passed to the function !


--~--~-~--~~~---~--~~
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: Getting Started tutorial - not understanding some syntax

2009-07-30 Thread ben

Hi,

Thanks for patience (and for the interesting subpost on the diff
between val  def) !
OK, the callback thing you suggested is starting to clear the mist ...
I found this article : 
http://www.ibm.com/developerworks/java/library/j-scala01228.html
I've not had time to read it fully yet, as its getting late over here
in the UK, but it looks like what I'm after. I'll have a proper read
tomorrow.

Thanks again for your time.

Ben

--~--~-~--~~~---~--~~
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: Sitemap, restricted menus and skinning a cat

2009-07-11 Thread Ben James

It seems that the best way to set the redirect location is using the
LiftRules object, for example:

LiftRules.siteMapFailRedirectLocation = user_mgt :: login :: Nil

I hope this helps,

Ben

On Jul 3, 11:39 am, Ewan ehar...@gmail.com wrote:
 I wonder if anyone would care to advise of the most appropriate
 solution for not rendering sitemap menu items with additional redirect
 to a login page.  I have read a couple of solutions in this list but
 here is what I have done cobbled together from the liftbook.

 I have an If LocParam for testing if a user is logged in which is
 added to a menu:

   val loggedInLocParam = If(() = User.loggedIn_?,
                             () = RedirectWithState(/user_mgt/login,
 RedirectState(Empty, (You must login, NoticeType.Notice

 this seems to achieve the effect I am looking for in that the menuitem
 is not rendered and if the url was bookmarked and the user tries a GET
 then they are redirected to login and a notice is added and rendered
 at the top of the page accordingly.

 Is this a good solution or can this cat be skinned better?  I have
 read something about Loc.EarlyResponse and was hoping for an
 explanation.

 --Ewan

--~--~-~--~~~---~--~~
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: Rails - Lift

2009-04-10 Thread Ben Diola

Does anyone know how to get a console in netbeans that I can run mvn
scala:cc?


On Apr 10, 8:12 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I think this thread points out something important about Lift... what
 matters most is what works for you.  There are plenty of people on this list
 that use one editor or another... use mapper or JPA... use lots of
 comet/ajax or use very little.  The only thing that's right is what works
 for you... and if you do something different than everyone, please share...
 I expect we'll learn something.

 Thanks,

 David

 On Apr 9, 2009 1:20 PM, TylerWeir tyler.w...@gmail.com wrote:

 It's not an editor/IDE war unless someone brings up Vim or Emacs,
 so...

 I've been using Vim+Scala+Ctags since I started.

 I'd recommend not getting hung-up on which editor is the best  just
 start coding.

 On Apr 9, 3:01 pm, Charles F. Munat c...@munat.com wrote:  I was
 thinking that I'd start with...

   On Thu, Apr 9, 2009 at 2:38 AM, Alexander Kellett lypa...@gmail.com  

 mailto:lypa...@gmail.c...

       On Thu, Apr 9, 2009 at 5:58 AM, Charles F. Munat c...@munat.com
       mailto:c...@munat.com wrote:      I'm writing a proposal

 for a presentation on mo...

   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: Does memcache fit in here somewhere?

2009-01-07 Thread Ramzi BEN YAHIA

David,
What is the actual status of scala.actors.remote. I mean if you want
to distribute your application, do you still need to use JMS or AMQP
or something like that?

Thx,
Ramzi

On Wed, Jan 7, 2009 at 5:15 AM, David Pollak
feeder.of.the.be...@gmail.com wrote:
 Bob,
 memcached is failure.  Using memcached means that the application stack has
 somehow failed to deliver the appropriate caching and concurrency tools.
 Scala and Scala Actors provide a powerful mechanism for building domain
 appropriate caching.

 Please look at this presentation.
 Thanks,
 David
 On Tue, Jan 6, 2009 at 7:27 PM, Bob Eastbrook baconeater...@gmail.com
 wrote:


 I'm keeping my eye on Lift, but I'm primarily a PHP guy as far as
 paying the bills goes.  I've got a slightly better high-level
 understanding of things now versus a month or so ago, but I'm not sure
 where caching fits into the picture.  In the LAMP world, it's standard
 practice to put memcache in front of your database server.  It's
 pretty much a cache everything philosophy.  Is this not encouraged
 with Lift?  I assume there are more caching choices in the Java world
 such as ehcache, but I don't see them mentioned on the list.

 Bob





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

 


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



[Lift] Re: I need to show all nested menus (drop down)

2008-11-18 Thread Ramzi BEN YAHIA

David,
I can do without it for now, however I'll be giving a demo at the end
of this week, and I just did a mvn clean jetty:run and, well, I get
110 compilation errors now ! :-)
I'm not going to panic, is there some way to fix the lift version in
maven to the one which I've been using until now? Do I have to
checkout the version from git and compile it locally?

Thanks,
Ramzi

On Mon, Nov 17, 2008 at 6:13 PM, David Pollak
[EMAIL PROTECTED] wrote:
 Ramzi,

 This is possible, but tricky with the current code.

 We're in the process of upgrading Lift to work with Scala 2.7.2  Once the
 switch-over happens (sometime this week), I'll code up some stuff in SiteMap
 to give you a complete menu.

 Thanks,

 David

 On Sat, Nov 15, 2008 at 1:36 PM, Ramzi BEN YAHIA [EMAIL PROTECTED]
 wrote:

 Hi all,
 The actual behavior of nested menus is that kids are only returned
 when their parent is selected. I'd like  to have all kids returned.

 If my guess is right the code that's controlling this is in sitemap.Menu:

 //code
 override def buildUpperLines(pathAt: HasKids, actual: Menu, populate:
 List[MenuItem]): List[MenuItem]
  = {
val kids: List[MenuItem] =
 _parent.toList.flatMap(_.kids.toList.flatMap(m = m.loc.buildItem(if
 (m == this) populate else Nil, m == actual, m == pathAt)))
_parent.toList.flatMap(p = p.buildUpperLines(p, actual, kids))
  }
 //code

 it calls buildItem on all the other menus passing an empty List
 instead of their actual kids.
 So I've tried to override this method(even though it won't work
 because _parent is a private variable and I don't know if lift.sitemap
 package is sealed) and I got this compile error:

 class DropMenu needs to be abstract, since type _$1 in class Menu with
 bounds : Nothing : Any is not defined

 I used to have this error gone away after a mvn clean compile on some
 parts of my current project, but it didn't in this case.

 Is there a simpler way for overriding this behaviour?

 Thanks,

 Ramzi





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

 


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



[Lift] I need to show all nested menus (drop down)

2008-11-15 Thread Ramzi BEN YAHIA

Hi all,
The actual behavior of nested menus is that kids are only returned
when their parent is selected. I'd like  to have all kids returned.

If my guess is right the code that's controlling this is in sitemap.Menu:

//code
override def buildUpperLines(pathAt: HasKids, actual: Menu, populate:
List[MenuItem]): List[MenuItem]
  = {
val kids: List[MenuItem] =
_parent.toList.flatMap(_.kids.toList.flatMap(m = m.loc.buildItem(if
(m == this) populate else Nil, m == actual, m == pathAt)))
_parent.toList.flatMap(p = p.buildUpperLines(p, actual, kids))
  }
//code

it calls buildItem on all the other menus passing an empty List
instead of their actual kids.
So I've tried to override this method(even though it won't work
because _parent is a private variable and I don't know if lift.sitemap
package is sealed) and I got this compile error:

class DropMenu needs to be abstract, since type _$1 in class Menu with
bounds : Nothing : Any is not defined

I used to have this error gone away after a mvn clean compile on some
parts of my current project, but it didn't in this case.

Is there a simpler way for overriding this behaviour?

Thanks,

Ramzi

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



[Lift] Re: Ajax error/notice/warning works but no class attribute is specified

2008-11-13 Thread Ramzi BEN YAHIA
Very helpful, Thanks!

Ramzi



On Thu, Nov 13, 2008 at 1:36 PM, Marius [EMAIL PROTECTED] wrote:


 Hi,

 Please see
 http://liftweb.net/index.php/HowTo_style_the_error/warning/notice_messages

 
 3. You can use construct like S.error(msg_id, Error message) for
 both Ajax and non Ajax request however styling the messages differs a
 bit:
   3.1 For Non-Ajax the styling is given by lift:error_class as in
 the above example.
   3.2. For Ajax we can not use the same information as for Non-Ajax
 because that would imply that Lift needs to keep more state on server
 side.
Momentarily this is to be avoided. So the alternative is to
 provide styling information through three LiftRules variables:
ajaxNoticeMeta/ajaxWarningMeta/ajaxErrorMeta : Can
 [AjaxMessageMeta] where AjaxMessageMeta is

case class AjaxMessageMeta(title: Can[String], cssClass: Can
 [String])

 
 Of course you can use this in order to specify css class names but
 youcan also set styles using html ID and you don;t even need to
 specify a class in your markup.

 Br's,
 Marius

 On Nov 12, 8:22 pm, Ramzi BEN YAHIA [EMAIL PROTECTED]
 wrote:
  Hi,
  the following for example loses the class attribute when rendered
 
  def deleteDialog(video: Video, deleteFun: Video = Boolean) = {
  val yesLink = SHtml.a(Text(S.?(video.do.delete))){
  if(deleteFun(video)){
  S.notice(S.?(video.delete.success))
  JsDelVideo(video)  ModalClose
  }else{
  S.error(S.?(video.delete.failed))
  ModalClose
  }
  }
  val noLink = SHtml.a(Text(S.?(video.dont.delete)),ModalClose)
  BasicModal(
  div class=modal
  div  h2{S.?(video.delete.warn)}/h2/div
  div 
  h3 {S.?(video.delete.continue)} /h3
  p { yesLink} { noLink } /p
  /div
  /div
  )
  }
 
  Best regards,
  Ramzi
 
  On Wed, Nov 12, 2008 at 1:56 PM, Marius [EMAIL PROTECTED] wrote:
 
   Hi,
 
   Can you please provide a code example?
 
   Br's,
   Marius
 
   On Nov 10, 4:21 pm, Ramzi BEN YAHIA [EMAIL PROTECTED]
   wrote:
Hi guys,
I use lift:msgs in my template and specify the error_class,
 notice_class
   as
explained somewhere,
it works as expected but not when called within an ajaxCall, the
   class=..
disappears.
this happens on 0.9, should I use the snapshot ?
 
Cheers,
Ramzi.
A Lift user from France.
 


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