[Seaside] JQDialog button problems
Malte Grunwald
malte.grunwald at googlemail.com
Tue Jan 24 08:06:49 UTC 2012
Hey everybody,
I have this problem for a while now and not found a solution until now.
I already brought this up, a few months ago, some people tried to help
me, but I did not found a solution.
I will use a JQDialog with multiple buttons, i.e. "cancel" and "confirm".
The cancel button should only close the window.
No problem so far.
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.
My problem is, I am not able to attach more than one method to a button.
Here my example dialog:
/(html div)
id: anIdString;
script: (((html jQuery id: anIdString) dialog)
title: (anIdString copyFrom: 4 to: anIdString size);
autoOpen: false;
modal: true;
width: anInteger;
height: 'auto';
resizable: false;
addButton: 'Close' do: html jQuery new dialog close);
with: [self dialogContent: html]/
This is a suggestion, Jan van de Sandt made. Thanks again.
/testButtons: html/
/^ OrderedCollection new/
//
/add: (Dictionary new/
/at: 'id' put: html nextId ;/
/at: 'text' put: 'Annuleer' ;/
//
/at: 'click' put: (html jQuery ajax script: [ :h | self actionCancel: h
]) asFunction ;/
/yourself) ;/
//
/add: (Dictionary new/
/at: 'id' put: html nextId ;/
/at: 'text' put: 'Ok' ;/
//
/at: 'click' put: (html jQuery ajax /
/serializeForm: (html jQuery id: self personDataFormId) ;/
//
/script: [ :s | self actionFinish: s ]) asFunction ;/
/yourself) ;/
/asArray
/
/(html div)
id: anIdString;
script: (((html jQuery id: anIdString) dialog)
title: (anIdString copyFrom: 4 to: anIdString size);
autoOpen: false;
modal: true;
width: anInteger;
height: 'auto';
resizable: false;
addButton: 'Close' do: html jQuery new dialog close);
buttons: (self testButtons: html);
with: [self dialogContent: html]/
/
/But this did not work for me.
Maybe somebody have an idea.
Thank you very much!
Kind regards
Malte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120124/b882c561/attachment-0001.htm
More information about the seaside
mailing list