如何在Lift – Scala中制作一个片段
发布时间:2020-12-16 19:24:23 所属栏目:安全 来源:网络整理
导读:我需要做的是将一个标签放入html页面: lift:surround with="default" at="content" span class="lift:WorkingStatus.print"/span /lift:surround 并在适当的代码段中包含一个代码段.*包: class WorkingStatus { def print():String={return "table/table";
我需要做的是将一个标签放入html页面:
<lift:surround with="default" at="content"> <span class="lift:WorkingStatus.print"></span> </lift:surround> 并在适当的代码段中包含一个代码段.*包: class WorkingStatus { def print():String={return "<table></table>";} def speak = <span>Hello World</span> def render = "* *" #> "Hello there in span" } 函数将在字符串中生成一些html表格,它将以html格式显示,就像在def print()中一样. 所以,这是一件相当微不足道的事情,我无法以任何方式开展工作.我需要一个Scala类,它可以在html页面中的任何需要的地方合并,比如说 – 用< jsp:include>并且这个类应该能够连接到外部Web服务,获取一些数据的列表并生成html,然后将其插入到所需的位置……复杂到足够多? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |