[Seaside] script: [...] value parameter
Annick Fron
list at afceurope.com
Fri Oct 21 18:25:58 UTC 2022
Hi,
I do that constantly, here is an example :
(html textInput)
tbsFormControl;
class: 'ml-3';
value: (aDate ifNotNil: [AdminDateTimePolicy printSlash: aDate]);
pattern: Bootstrap.ResultsRegexPattern forDateSlash;
placeholder: (#ddmmyyyySlash << #myadmin >> 'dd/mm/yyyy') asString;
onChange: (html jqueryInputCallback: outputBlock);
script: ((html jQuery new datepicker)
optionAt: 'regional' put: #fr;
dateFormat: 'dd/mm/yy';
onSelect: (html jQuery ajax serializeThis callback: outputBlock
value: html jQuery this value))
Don’ forget the serializeThis
WARenderer>>jqueryInputCallback: aBlock
^(self jQuery ajax callback: aBlock
value: self jQuery this value)
Annick
> Le 21 oct. 2022 à 19:48, Bob Nemec <bobn at rogers.com> a écrit :
>
> Cross posted from Seaside Discord channel...
>
> I would like to have an 'html ajax script: [...]' method that has a callback:value: pattern.
>
> Something like...
> html ajax script: [:script :value | ...] value: (html jQuery this propertyAt: 'id')
>
> Then in the script block 'value' would get the id of 'this', which in an ajax callback is undefined.
> This would allow server code to use browser information to build the script.
>
> Anyone done this?
>
>
> Bob Nemec
>
> _______________________________________________
> 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/20221021/72e96c58/attachment.html>
More information about the seaside
mailing list