I do also get an exception when the editor are rendered firstly, see somewhere near the last line:

<option selected="selected" value="">Vælg en</option>
<option value="0">name0</option>
<option value="1">name0</option>
<option value="2">name1</option>
<option value="3">name2</option>
</select>
       </p>
       <br />
       <p>
       <label>emne</label><input value="" type="text" class="textfield" 
name="subject"/>
       </p>
       <br />
       <p>
       <label>indhold</label><div>
       <div class="yui-skin-sam">
<textarea cols="50" rows="10" name="content:editorArea" id="yuiSimpleEditor"></textarea> </div>
      </div>
       </p>
       <br />
       <a href="#" class="buttonFloat" onclick="var wcall=wicketSubmitFormById('form157', 
'?wicket:interface=:7:tab:panel:form:ajaxLink::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true', 'ajaxLink' ,null,null, function() 
{return Wicket.$$(this)&&Wicket.$$('form157')}.bind(this));;; return false;" id="ajaxLink158"><span>Send Post 
</span></a>
       </fieldset>
       </form>
</div>
</div>]]></component><component id="alternateContainer151" ><![CDATA[<div 
id="alternateContainer151">
</div>]]></component><evaluate><![CDATA[var Dom = YAHOO.util.Dom, myEditor = null, timer = null; myEditor = new YAHOO.widget.SimpleEditor('yuiSimpleEditor', { height: '300px', width: '522px', dompath: true, animate: true }); var update = function(ev) { if(timer) { clearTimeout(timer); } timer = setTimeout(function() { myEditor.saveHTML(); }, 200); } myEditor.on('editorKeyDown', update); myEditor.on('afterNodeChange', update); myEditor.render(); ]]></evaluate><evaluate encoding="wicket1"><![CDATA[var loader = new YAHOO.util.YUILoader({require: ['simpleeditor']^,loadOptional: true,onSuccess: function() {var Dom = YAHOO.util.Dom, myEditor = null, timer = null; myEditor = new YAHOO.widget.SimpleEditor('yuiSimpleEditor', { height: '300px', width: '522px', dompath: true, animate: true }); var update = function(ev) { if(timer) { clearTimeout(timer); } timer = setTimeout(function() { myEditor.saveHTML(); }, 200); } myEditor.on('editorKeyDown', update); myEditor.on('afterNodeChange', update); myEditor.render(); }}); loader.insert();]]></evaluate></ajax-response>
*INFO: *Response parsed. Now invoking steps...
*INFO: *
*INFO: *Initiating Ajax GET request on resources/org.wicketstuff.yui.YuiLoaderHeaderContributor/inc/2.4.1/yuiloader/yuiloader-beta-min.js
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (22492 characters)
*INFO: *Invoking post-call handler(s)...
*ERROR: *Exception evaluating javascript: TypeError: YAHOO.widget.SimpleEditor is not a constructor
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...
*INFO: *Couldn't set focus on  not on the page anymore


Nino Saturnino Martinez Vazquez Wael wrote:
Hi

I use the simple yui editor, and I have some trouble with it if it's used in ajax calls. I have an ajaxtabbed panel, and in one of the tabs I have the editor. So when the user clicks the tab the first time it's all good, however next time I suddenly have two editors, and the input from the last editor are used for the text area. If clicked 3+ times it's the same as two times. Im not sure why this is so?


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to