I'm trying to produce a web page with editable content.
When the user clicks an edit button on a line it uses jQuery to
display a modal dialog which allows fields of that line to be edited.
I can easily produce a snippet to produce the lines using the backend
data and an XHTML template and binding etc.
However, I also want the template to include the template for the
dialog. So I want the ajax button callback to send JavaScript to
instantiate the jQuery UI dialog based on the template and bindings.
To build this I need to assemble a JsCmd containing the NodeSeq that
comes from the XHTML sequence and the bindings.
In short, if this was straight jQuery I would have some JavaScript of
the form:
$(<div title="Dialog Title">theFormNodeSeq</div>).dialog()
But in my case theFormNodeSeq comes from a NodeSeq that was assembled
from part of the XHTML template and the bindings and the end result
needs to be a JsCmd.
So I'm trying to do something like:
JsCmds.Run("$(" + theFormNodeSeq.toString + ").dialog()")
But I need to address escaping issues with the HTML and I also need to
pre-process any "<lift:… />" commands in theFormNodeSeq.
Any advice (please)?
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.