[Lift] Re: Help required with utility method

2010-01-18 Thread pabraham
Hi Adam, Thanks for your advice. Unfortunately if I paste your code, I get error: not found: value expensesformonth. I need to convert my m value to an instance of Month where the ID of this instance is m, but I can't work out how. I then tried this: def allexpenses(expenseTemplate: NodeSeq):

[Lift] Re: Help required with utility method

2010-01-18 Thread pabraham
Aargh! Yes that pesky capital M fixed the errors. Thanks Ross. Paul. On 18 Jan, 22:22, Ross Mellgren dri...@gmail.com wrote: flatMap (with a capital M) -Ross On Jan 18, 2010, at 5:21 PM, pabraham wrote: Hi Naftoli, The code I have is: def allexpenses(expenseTemplate

[Lift] Help required with utility method

2010-01-17 Thread pabraham
Greetings all, I need some help with a simple problem that I'm struggling to solve. I'm writing a simple expense tracking application. To keep it simple, I have a months and expenses. I can have a number of months, and each month can have more than one expense: class Month extends

[Lift] Dynamic URL creation

2009-08-13 Thread pabraham
Hello there, I'm stumped! I've got snippet code that is like this: val nextpage: String = ... calculate next page number ... bind(c, xhtml, next - a href=/customer/page-{nextpage}next/a, back - back ) But when the page is generated, the link is /customer/page-

[Lift] Re: SiteMap gives No Navigation Defined.

2009-08-07 Thread pabraham
...@gmail.com wrote: So it's working correctly, or it's still broken? same thing doesn't happen is a bit unclear ;) Derek On Thu, Aug 6, 2009 at 1:56 PM, pabraham paulabraham...@googlemail.comwrote: Actually, same thing doesn't happen.  If I change the third argument, I get

[Lift] URL rewriting woes

2009-08-07 Thread pabraham
Hello again, I've been looking at the article on URL rewriting at [1] and am having a problem getting a URL rewrite to work. My sitemap contains Menu(Loc(Customers, customer::list::1::Nil, Customers)), so clicking on Customers gives a link to /customer/list/1. My rewrite is:

[Lift] Re: More than one lift:surround in HTML file

2009-08-06 Thread pabraham
...@getintheloop.eu wrote: Marius is right, use with-param... That's the correct solution here. Cheers, Tim On 05/08/2009 22:19, pabraham paulabraham...@googlemail.com wrote: I've added lift:children to my index.html file and now get: XML Parsing Error: junk after document element Location:http

[Lift] Re: More than one lift:surround in HTML file

2009-08-06 Thread pabraham
Firefox 3.5.2 Funnily enough, I can't right click to view source, but Ctrl+U works. The first lines are: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns:lift=http://liftweb.net/;

[Lift] SiteMap gives No Navigation Defined.

2009-08-06 Thread pabraham
Hello there, I've been looking at SiteMap and trying to get it to give me a page title, based on the SiteMap section in the Lift book (PDF version). Here's how I've tried. Boot.scala // Build SiteMap val entries = Menu(Loc(Home, index::Nil, Home)) :: Nil

[Lift] Re: SiteMap gives No Navigation Defined.

2009-08-06 Thread pabraham
Same thing happens, i.e. I get No Navigation Defined. and no title. On 6 Aug, 20:38, Naftoli Gugenheim naftoli...@gmail.com wrote: Not sure why you're getting no nav, but I think you want to change the other Home - the first string is the id of the link.

[Lift] Re: SiteMap gives No Navigation Defined.

2009-08-06 Thread pabraham
Actually, same thing doesn't happen. If I change the third argument, I get this as the title in my browser as well as the link in the site map. On 6 Aug, 20:51, pabraham paulabraham...@googlemail.com wrote: Same thing happens, i.e. I get No Navigation Defined. and no title. On 6 Aug, 20:38

[Lift] More than one lift:surround in HTML file

2009-08-05 Thread pabraham
Hello there, Is it possible for an HTML file to have more than one lift:surround tag? For example, default.html contains ... lift:bind name=content ... lift:bind name=sidebar ... My index.html contains lift:surround with=default at=content pThis is some content/p /lift:surround

[Lift] Re: More than one lift:surround in HTML file

2009-08-05 Thread pabraham
I've added lift:children to my index.html file and now get: XML Parsing Error: junk after document element Location: http://192.168.96.150:8080/ Line Number 113, Column 1:html xmlns:lift=http://liftweb.net/; xmlns=http://www.w3.org/1999/xhtml; ^ Any ideas? In the meantime I can look at