Lift CalendarMonthView 示例因 Lift 1.1-SNAPSHOT 失败
新手 scala/lift 问题:
我查看了 CalendarMonthView 示例:
与 Lift 1.1 -M6 并编译并运行。
当我尝试将示例迁移到 Lift 1.1-SNAPSHOT 时,AnonFunc 的签名似乎已从类 JsRaw 更改为 JsCmd(这是一个特征)。
编译器在这里失败:
def itemClick = Full(AnonFunc("elem, param", JsCmd("alert('itemClick' + param + ' - ' + elem.nodeName)")))
未找到:值 JsCmd
我错过了什么吗?
问候 保罗
A newbie scala/lift question:
I checked out the CalendarMonthView sample:
with Lift 1.1-M6 and it compiled and worked.
When i tried to migrate the sample to Lift 1.1-SNAPSHOT the signature of AnonFunc seems to have changed from class JsRaw to JsCmd (which is a trait).
The compiler fails here:
def itemClick = Full(AnonFunc("elem, param", JsCmd("alert('itemClick' + param + ' - ' + elem.nodeName)")))
not found: value JsCmd
am i missing something ?
Regards
Paul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在子项目
/lift-modules/lift-widgets
中发现了 CalendarMonthView 示例的新 Lift 1.1-SNAPSHOT 实现,其中还有其他令人印象深刻的小部件示例:-)
最好的方法是通过以下方式获取整个 liftweb 存储库:
git clone git://github.com/dpp/liftweb.git
I found the new Lift 1.1-SNAPSHOT implementation of the CalendarMonthView sample in the sub-project
/lift-modules/lift-widgets
which has other quite impressive widget samples :-)
The best way is to get the whole liftweb repo via:
git clone git://github.com/dpp/liftweb.git
尝试使用 net.liftweb.http.js.JE.JsRaw 而不是 JsCmd:
我不确定这是否会通过 AnonFunc 中的 elem 和 param,但我相信是这样
Try using net.liftweb.http.js.JE.JsRaw instead of JsCmd:
I'm not sure if that will pass through your elem and param from the AnonFunc, but I believe so
此问题有两种解决方案:
为了说明这两个示例,假设您的原始命令是:
转换器将是:
新命令将是:
当然,这些不是完整的导入列表,只是相关更改所需的那些导入。
There are two solutions to this problem:
To illustrate these two examples, assuming that your original command was:
The the converter would be:
And the new Command would be:
Of course, those are not full import lists, simply those imports that are needed for the change in question.