SHtml.link and File not found Problem

已查看 30 次
跳至第一个未读帖子

odo

未读,
2011年5月17日 19:03:302011/5/17
收件人 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

未读,
2011年5月17日 22:14:152011/5/17
收件人 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

未读,
2011年5月18日 02:21:322011/5/18
收件人 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"*
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
回复全部
回复作者
转发
0 个新帖子