Hi Malte,<div><br></div><div>I tried modifying the JQDialogFunctionalTest>>#renderOpenWindowOn: to add an extra button. The relevant modifications are:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html jQuery new dialog</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>title: 'Vegetables';</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>autoOpen: false;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>addButton: 'Close' do: html jQuery new dialog close;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>addButton: 'Ok' do: (html jQuery ajax script: [:s | self halt ])</div><div><br></div><div>where you'd substitute the action associated with 'OK' to your requirements. The dialog sample is viewable from: <a href="http://localhost:8080/javascript/jquery-ui/dialogwidget">http://localhost:8080/javascript/jquery-ui/dialogwidget</a></div>
<div><br></div><div>I think the JQDialog>>#buttons: comment is misleading as IIUC it should take a dictionary not an array.</div><div><br></div><div>Your code could be modified to something like (untested):</div><div>
<br></div><div><div>testButtons: html</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Dictionary new</div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>at: 'Annuleer' put: (html jQuery ajax script: [ :h | self actionCancel: h ]);</div>
<div> at: 'Ok' put: (html jQuery ajax </div><div> serializeForm: (html jQuery id: self personDataFormId) ;</div><div> script: [ :s | self actionFinish: s ]);</div><div> yourself</div>
</div><div><br></div><div>Hope this helps</div><div><br></div><div>Nick</div><div><br></div><div><br><div class="gmail_quote">On 24 January 2012 08:06, Malte Grunwald <span dir="ltr"><<a href="mailto:malte.grunwald@googlemail.com">malte.grunwald@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hey everybody,<br>
<br>
I have this problem for a while now and not found a solution until
now.<br>
I already brought this up, a few months ago, some people tried to
help me, but I did not found a solution.<br>
<br>
I will use a JQDialog with multiple buttons, i.e. "cancel" and
"confirm".<br>
The cancel button should only close the window. <br>
No problem so far.<br>
But now the tricky part, the "confirm" button should serialize a
form, send an ajax request to update a div container and then close
the window.<br>
<br>
My problem is, I am not able to attach more than one method to a
button.<br>
<br>
Here my example dialog:<br>
<br>
<small><i>(html div)<br>
id: anIdString;<br>
script: (((html jQuery id: anIdString) dialog)<br>
title: (anIdString copyFrom: 4 to:
anIdString size);<br>
autoOpen: false;<br>
modal: true;<br>
width: anInteger;<br>
height: 'auto';<br>
resizable: false;<br>
addButton: 'Close' do: html jQuery new
dialog close);<br>
with: [self dialogContent: html]</i></small><br>
<br>
This is a suggestion, Jan van de Sandt made. Thanks again.<br>
<br>
<div><i><small>testButtons: html</small></i><br>
</div>
<div><span style="white-space:pre-wrap"> </span><i><small>^
OrderedCollection new</small></i></div>
<i><small>
</small></i>
<div><i><small><span style="white-space:pre-wrap">
</span>add: (Dictionary new</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>at: 'id' put: html nextId ;</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>at: 'text' put: 'Annuleer' ;</small></i></div>
<i><small>
</small></i>
<div><i><small><span style="white-space:pre-wrap">
</span>at: 'click' put: (html jQuery ajax script: [ :h | self
actionCancel: h ]) asFunction ;</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>yourself) ;</small></i></div>
<i><small>
</small></i>
<div><i><small><span style="white-space:pre-wrap"> </span>add: (Dictionary new</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>at: 'id' put: html nextId ;</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>at: 'text' put: 'Ok' ;</small></i></div>
<i><small>
</small></i>
<div><i><small><span style="white-space:pre-wrap">
</span>at: 'click' put: (html jQuery ajax </small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>serializeForm: (html jQuery id: self personDataFormId)
;</small></i></div>
<i><small>
</small></i>
<div><i><small><span style="white-space:pre-wrap">
</span>script: [ :s | self actionFinish: s ]) asFunction ;</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>yourself) ;</small></i></div>
<div><i><small><span style="white-space:pre-wrap">
</span>asArray<br>
<br>
<br>
</small></i><br>
<small><i>(html div)<br>
id: anIdString;<br>
script: (((html jQuery id: anIdString) dialog)<br>
title: (anIdString copyFrom: 4 to:
anIdString size);<br>
autoOpen: false;<br>
modal: true;<br>
width: anInteger;<br>
height: 'auto';<br>
resizable: false;<br>
addButton: 'Close' do: html jQuery new
dialog close);<br>
buttons: (self testButtons: html);<br>
with: [self dialogContent: html]</i></small><br>
<i><small><br>
<br>
</small></i><small><big><big><small>But this did not work for
me.<br>
Maybe somebody have an idea.<br>
<br>
Thank you very much!<br>
<br>
Kind regards <br><span class="HOEnZb"><font color="#888888">
<br>
Malte</font></span></small><br>
</big></big></small></div>
<br>
</div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div></div>