<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Bob, Hi Johan,<br>
      <br>
      your answers are eye-openers for me. Until you pointed me into the
      direction of accessing the response via self requestContext, I was
      under the false assumption that you cannot answer Ajax callbacks
      with return codes other than 200. This opens a whole new universe
      for me ;-) <br>
      <br>
      Thanks a lot!<br>
      <br>
      So far I've managed to integrate X-editable perfectly, but am
      still looking for a way to replace the edited text with the new
      input as it was re-formatted on the server in response to the
      .editable() call. But that is more a javascript/jQuery/X-editable
      problem than a seaside one. the editable() success function has no
      effect, and I guess I'll have to try if complete works any
      better...<br>
      <br>
      I'll make another handful of attempts before I look at jeditable,
      which allows you to submit the in-place-editing result to a local
      function in which I could send an ajax call back and do what I
      need (I think).<br>
      <br>
      Joachim<br>
      <br>
      <br>
      Am 01.01.14 10:10, schrieb Johan Brichau:<br>
    </div>
    <blockquote
      cite="mid:5B25B0CC-FEDB-428D-B3F8-E76F0FAC5AD2@inceptive.be"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Indeed.
      <div><br>
        <div>There is a bit of doc on this here:&nbsp;<a
            moz-do-not-send="true"
            href="http://book.seaside.st/book/advanced/restful/request-response">http://book.seaside.st/book/advanced/restful/request-response</a></div>
        <div>Although it&#8217;s in the context of REST, the #respond: method
          can be invoked in any request context (hence &#8220;self
          requestContext respond: [:response | &#8230; ]) to take low-level
          control on what Seaside should respond.</div>
        <div>&nbsp;And there are methods on WAResponse to set the status
          code.</div>
        <div><br>
        </div>
        <div>Cheers and happy new year!</div>
        <div>Johan</div>
        <div><br>
          <div>
            <div>On 31 Dec 2013, at 20:43, Bob Arning &lt;<a
                moz-do-not-send="true"
                href="mailto:arning315@comcast.net">arning315@comcast.net</a>&gt;
              wrote:</div>
            <br class="Apple-interchange-newline">
            <blockquote type="cite">
              <meta content="text/html; charset=ISO-8859-1"
                http-equiv="Content-Type">
              <div text="#000000" bgcolor="#FFFFFF"> <font
                  face="Georgia">Well, just trying things a bit, this
                  seems to work:<br>
                  <br>
                  "===================="<br>
                  &nbsp;&nbsp;&nbsp; html div<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onClick: (html jQuery ajax <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; callback: [ :val |<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; val inspect.<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self requestContext respond: [
                  :response |<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; response <br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; contentType: 'text/json'
                  seasideMimeType;<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nextPutAll: {'what arrived
                  was'. val} asJson<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ]<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ]<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value: (JSStream on: 'this.innerHTML')<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>
                  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; with: 't2'.<br>
                  "===================="<br>
                  <br>
                  Cheers,<br>
                  Bob<br>
                  <br>
                </font>
                <div class="moz-cite-prefix">On 12/31/13 9:30 AM, <a
                    moz-do-not-send="true"
                    class="moz-txt-link-abbreviated"
                    href="mailto:jtuchel@objektfabrik.de">jtuchel@objektfabrik.de</a>
                  wrote:<br>
                </div>
                <blockquote cite="mid:52C2D4F6.6090909@objektfabrik.de"
                  type="cite">Hi again, <br>
                  <br>
                  thinking a bit more about my X-editable plans, I dug a
                  bit deeper into JQAjax. Unfortunately, this gives me
                  more questions than answers ;-) <br>
                  <br>
                  Say I have an ajax callback using jquery like this: <br>
                  <br>
                  html anchor <br>
                  id: 'mylink'; <br>
                  onClick: (html jQuery&nbsp; ajax callback: [self
                  doSomething]); <br>
                  with: 'Click here'. <br>
                  <br>
                  <br>
                  This callback will always respond with an empty HTTP
                  response with status code 200, right? <br>
                  There are other callback methods on JQAjax, like
                  respond:, text: and so on. <br>
                  <br>
                  Is there any documentation on these? <br>
                  <br>
                  I am looking for a way to transport some value to a
                  server-side callback block and respond with one of
                  these two options: <br>
                  <br>
                  a) HTTP 200 and a JSON document with success
                  information and probably an error message <br>
                  b) HTTP 200 if the callback processed without errors,
                  or a different HTTP code and some error text in the
                  response's body if there is some error during
                  processing the callback <br>
                  <br>
                  Has anybody done this? Any pointers to more details? <br>
                  <br>
                  Thanks in advance and happy new year to all Seasiders!
                  <br>
                  <br>
                  Joachim <br>
                  <br>
                  <br>
                </blockquote>
                <br>
              </div>
              _______________________________________________<br>
              seaside mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
seaside mailing list
<a class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          <a class="moz-txt-link-freetext" href="mailto:jtuchel@objektfabrik.de">mailto:jtuchel@objektfabrik.de</a>
Fliederweg 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a class="moz-txt-link-freetext" href="http://www.objektfabrik.de">http://www.objektfabrik.de</a>
D-71640 Ludwigsburg                  <a class="moz-txt-link-freetext" href="http://joachimtuchel.wordpress.com">http://joachimtuchel.wordpress.com</a>
Telefon: +49 7141 56 10 86 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fax: +49 7141 56 10 86 1

</pre>
  </body>
</html>