Of course ... You can use:
1. DispatchPf functions and return an XmlResponse
2. Try this:
def ajaxButton(text: NodeSeq, func: () => NodeSeq, attrs: (String,
String)*): Elem = {
attrs.foldLeft(fmapFunc(NFuncHolder(func))(name =>
<button lift:gc={name} onclick={makeAjaxCall(Str(name
+"=true")).toJsCmd+
"; return false;"}>{text}</button>))(_ % _)
}
When processing Ajax requests lift automatically recognizes, JsCmd,
NodeSeq, JsCommands, LiftResponse. So Instead of func: () => NodeSeq
you could also say func: () => LiftResponse and have your function to
return an XmlResponse. But NodeSeq seems easier to me.
Br's,
Marius
On Apr 27, 12:57 pm, pravin <[email protected]> wrote:
> Hi guys,
>
> i want send xml response to request
> when i click on button i should get xml file as response in browser .
> How can i do that in lift?
>
> Thanks in advanced.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---