Note that there are some explanatory texts on larger screens.

plurals
  1. POJeditable Problem in castle monorail
    primarykey
    data
    text
    <p>I am trying to use Jeditables (http://www.appelsiini.net/projects/jeditable) in my first castle monorail mvc application</p> <p>I managed to have the textbox appearing and to the the ajax call, my problem is now that after the ajax call the edited text returs is not changes and i can t get the response after the call</p> <p>this is my page</p> <pre><code>&lt;head&gt; &lt;link href="../../Styles/Main.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="../../JavaScript/jQuery1.4.2.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../../JavaScript/EditInLine.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('.editable').editable('/Home/Save', { id : 'editableId', name : 'editableText', type : 'textarea', cancel : 'Cancel', submit : 'OK', indicator : '&lt;img src="img/indicator.gif"&gt;', tooltip : 'Click to edit...', width : '200', style : 'display: inline', callbac : function(value, settings) { alert(value); return value; } }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;label id='1' class='editable '&gt;Some text&lt;/label&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and this my controller</p> <pre><code>using Castle.MonoRail.Framework; using System; using EditInLine.Model.Interfaces; using EditInLine.Model; namespace EditInLine.Controllers { [Layout("Default"), Rescue("Default")] public class HomeController : SmartDispatcherController { private EditableElement editableElement; private EditableElement EditableElement { get { if (Session["EditableElement"] == null) { Session["EditableElement"] = new EditableElement { Id = 1, Text = "Some text", CssClass = "editable" }; } return (EditableElement)Session["EditableElement"]; } } public void Index() { PropertyBag["IsAdmin"] = true; PropertyBag["element"] = EditableElement; } public void Save() { var elementId = Convert.ToInt32(Request.Form["editableId"]); var text = Request.Form["editableText"]; var element = new EditableElement { Id = elementId, CssClass = "editable", Text = text }; Session["EditableElement"] = element; } } } </code></pre> <p>thanks for you help</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload