I have the following form:
<form class="lift:form.ajax">
<input type="hidden" class="lift:StreamIn" id="path" value="PATH" />
<input type="submit" value="" />
</form>
哪些是:
object StreamIn {
def render = SHtml.onSubmit(path => {
StreamServer ! path
})
}
case class StreamItem(user: String, path: String, level: String, room: String)
object StreamServer extends LiftActor with ListenerManager {
private var streams: List[StreamItem] = Nil
def createUpdate = streams
override def lowPriority = {
case stream: String if stream.length > 0 =>
streams :+= StreamItem("James", stream, "_1", "demo-room");
updateListeners()
}
}
我所期待的是,一种方式是,把多种价值观带给精炼者,并投入不止一个。
因此,将不采用静态扼制数值“James”、“_1”和“demo-room”的形式。
事先得到任何帮助,非常赞赏: