no
thanks for the reply
but it still does not work in any of the 2 ways
But as I understand the idea is to work with the url:
http://localhost:8080/param/xxx
The example is as follows:
Above, we saw how to create a Loc[ParamInfo] to capture URL
parameters. Let’s look at the /param/xxx page and see how we can
access the parameters:
param.html
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-
type" />
<title>Param</title>
</head>
<body class="lift:content_id=main">
<div id="main" class="lift:surround?with=default;at=content">
<div>
Thanks for visiting this page. The parameter is
<span class="lift:ShowParam">???</span>.
</div>
<div>
Another way to get the param: <span class="lift:Param">???</
span>.
</div>
</div>
</body>
</html>
Param.scala
package code
package snippet
import lib._
import net.liftweb._
import util.Helpers._
import common._
import http._
import sitemap._
import java.util.Date
// capture the page parameter information
case class ParamInfo(theParam: String)
// a snippet that takes the page parameter information
class ShowParam(pi: ParamInfo) {
def render = "*" #> pi.theParam
}
object Param {
// Create a menu for /param/somedata
val menu = Menu.param[ParamInfo]("Param", "Param",
s => Full(ParamInfo(s)),
pi => pi.theParam) / "param"
lazy val loc = menu.toLoc
def render = "*" #> loc.currentValue.map(_.theParam)
}
so I do not understand where my mistake
On 24 mayo, 11:00, AGYNAMIX Torsten Uhlmann <
T.Uhlm...@agynamix.de>
wrote:
> Hi Sanx,
>
> I think your problem is the way you enter the parameter:
>
>
http://localhost:8080/param/xxxis not a parameter, it's a URL. You can get these values also, but if you want a param, enter it like this:
> >>>
http://simply.liftweb.net/index-3.4.html#sub: Param-Example