SHtml.link and File not found Problem

30 views
Skip to first unread message

odo

unread,
May 17, 2011, 7:03:30 PM5/17/11
to Lift
Hi all,

at the moment i'm trying to write a little web application to learn
scala/lift.
Scala: 2.8.1
Lift: 2.3

I'm trying to generate some Links. One from Page 1 to Page 2 and vice
versa.
So i added this to my Sitemap definition:

Menu.i("First Page") / "/temp/firstPage",
Menu.i("Second Page") / "/temp/secondPage"

And create this snippet:

object LinkCheck {
private object currentVal extends RequestVar[String]("")

def listing = {
".link1 *" #> link("/temp/secondPage", () => currentVal("link1"),
Text("Link 1")) &
".link2 *" #> link("/temp/firstPage", () => currentVal("link2"),
Text("Link 2"))
}
}

The HTML page (/webapp/temp/firstPage.html) contains the following
code:

<span class="lift:LinkCheck.listing">
<div class="link1">LINK</div>
</span>

My Problem is that the webpages under /temp/ are not found via the
SHtml.link generated href.
Can some tell me what i'm doing wrong ?

All examples do not stores the html pages in a different directory and
access them via SHtml.link.

Thanks,
Oliver

DoomPirate

unread,
May 17, 2011, 10:14:15 PM5/17/11
to lif...@googlegroups.com
Here is a basic app i make to help newbies.

Menu.i("First Page") / "temp" / "firstPage", 
 Menu.i("Second Page") / "temp" / "secondPage"






odo

unread,
May 18, 2011, 2:21:32 AM5/18/11
to Lift
Thanks. It can be so easy.

On 18 Mai, 04:14, DoomPirate <nguyen.phili...@gmail.com> wrote:
> Here is a basic app i make to help newbies.https://github.com/DoomPirate/Lift-Menu-Example
>
> Menu.i("First Page") / *"temp" / "firstPage", *
>  Menu.i("Second Page") /* "temp" / "secondPage"*
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
Reply all
Reply to author
Forward
0 new messages