[Seaside] JQDialog close and confirm

Paul DeBruicker pdebruic at gmail.com
Mon Nov 28 19:37:43 UTC 2011


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,
> 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,
>>
>> 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 
>> <malte.grunwald at googlemail.com 
>> <mailto:malte.grunwald at googlemail.com>> wrote:
>>
>>     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
>>     seaside at lists.squeakfoundation.org
>>     <mailto:seaside at lists.squeakfoundation.org>
>>     http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111128/01c12e75/attachment.htm


More information about the seaside mailing list