Hey everyone,
I am actually playing around with the JQDialog, now i have a problem. Beside my close button, i want to create a confirm button, which serializes a form and then closes the dialog, like it is in every normal Desktopapplication. Is there any possibility to combine this two actions? Thank you very much. Kind Regards Malte _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
Sure. I use this a lot. For example you can set the buttons of a JQuery dialog this: ^ 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
In the #actionFinish: method I check the form ans show an error message or close the dialog. Jan. On Fri, Nov 25, 2011 at 12:55 PM, Malte Grunwald <[hidden email]> wrote: Hey everyone, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thank you so far for your quick respond,
but do you maybe have another example? Which method calls your example-method? I tried it with JQDialog<<buttons: but it did not work, am i missing something? Thank you very much. Kind Regards Malte Grunwald Am 25.11.2011 13:48, schrieb Jan van de Sandt: Hi, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
You could use:
MyComponent>>#addDialogButtonsOn:html html script: ((html jQuery id: 'myDialog') dialog buttons:(self dialogButtonsOn:html)). MyComponent>> #dialogButtonsOn: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
On 11-11-28 05:56 AM, Malte Grunwald wrote: Thank you so far for your quick respond, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Malte,
Try this: renderContentOn:html html div id:'myDialog'; script:(html jQuery new dialog buttons: (self test: html)). With #test: being the same as what you described in your email below. My #addDialogButtonsOn:html was meant to be sent from a render method and not as part of the creation of the dialog box itself. Sorry for not being more specifc. Paul On 11-12-01 01:40 AM, Malte Grunwald wrote: Hello Paul, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Malte,
I don't know what you should check next. It seems like because there are three buttons in your dialog in the screenshot but only two in the #test:html method you sent earlier there might be other things going on. I think that you should create a very simple example component that only displays an empty dialog. Ignore the rest of your application. Start from scratch. Then work to get only one button displayed properly in the one empty dialog. Then attempt to get another button to display. If you cannot get one working post the code of your simple example component so other people can attempt diagnose what's going on. Do you get any errors/warnings in Firebug? Does the javascript that Seaside outputs look like its well formed and matches whats expected by jQuery as described here: http://jqueryui.com/demos/dialog/#option-buttons ? Also, other people on the Seaside list may have better ideas so please keep this discussion on the list. On 11-12-02 04:25 AM, Malte Grunwald wrote: Hello Paul, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Jan van de Sandt
Hello everyone,
I have the problem i try to use buttons in JQDialog. I tried it the way Jan showed me, but it does not work. The buttons will be created, but with the label 0,1,2... depending on the size of my button Array. (Picture in the attachment, size of my button array is three in this case) The buttons have no functionality. And I really do not have any idea what I am doing wrong. Even starting from the scratch by creating a new component did not help. I tried now in Dolphin and Pharo and i still do not know what am I missing. Maybe anybody had the same problem. Regards Malte Am 25.11.2011 13:48, schrieb Jan van de Sandt: Hi, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside Dialog.jpg (59K) Download Attachment |
Free forum by Nabble | Edit this page |