Glenn,

If you are posting to an external URL im not sure there is a good case
for using bind(...) as that binds served HTML with a server side
function to be executed upon form submission. If you want to post
directly to another URL that is not managed by lift, there is little
point executing something on the lift side of things right?

Alterntivly, if you want the post to the 3rd part to be transparent,
you could do a programatic POST using Apache HTTP lib or something so
that its transparent to the user. Is this the functionality you
desire?

Cheers, Tim

On May 5, 7:15 am, glenn <[email protected]> wrote:
> This may be a dumb question from a lift novice, but here goes...
> I want to post a form to an external url for processing. Specifically,
> I have in mind inserting a node into an Apache Sling instance (JCR).
>
> I have a form like so:
>
> <lift:Sling.add form="POST" action="http://admin:ad...@localhost:8888/
> content/first">
>                         <entry:title/><entry:text/><br/>
>                         <entry:submit/>
>                 </lift:Sling.add>
>
> and a snippet:
>
> class Sling {
>         object title extends RequestVar("")
>     object text extends RequestVar("")
>
>     def add(xhtml:NodeSeq):NodeSeq = {
>       def processEntryAdd() = {println("You entered: "  + title.is + "
> = " + text.is)}
>
>       bind("entry", xhtml,
>            "title" -> SHtml.text(title.is, title(_)),
>            "text" -> SHtml.text(text.is, text(_)),
>            "submit" -> SHtml.submit("Submit", processEntryAdd))
>
>    }
>
> }
>
> Of course, lift removes the action attribute on the form, substituting
> just "/" for the url.
>
> Does this call for a custom dispatch function? If so, what would it
> look like. I understand the path part is just
> a list, but what about the context-path and how would I set that up?
>
> Glenn Silverman
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to