<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
</head>
<body>
<div style="font-family:Helvetica,Arial;font-size:13px; ">Hi Esteban,</div>
<div style="font-family:Helvetica,Arial;font-size:13px; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ">i think you’re using VisualWorks, so BufferedValueHolders may be an option here. In a normal VisualWorks ApplicationModel you’d define each input’s aspect with an additional trigger like so: "name |
 trigger“ or „age | trigger“. The UIBuilder would then create BufferedValueHolders around the ValueModels for name and age. The #trigger is another ValueHolder that you control with your submit/cancel buttons: trigger value: true for submit and trigger value:
 false for cancel.</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ">All the trigger really does is submit the values to their actual ValueModels (on submit) or discard the changes on cancel. But in your case it would allow you to control the moment when the values are
 really submitted. </div>
<div style="font-family:Helvetica,Arial;font-size:13px; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ">ValueModels is something Seaside never really considered, there the getter/setter approach is preferred. But we use it in SeaBreeze pretty successfully. Especially because ValueHolders are used in VisualWorks
 UIs to communicate Changes back to the UI, which is super useful in Seaside, when you can have automatic Updates on the Website without a need to manually refresh the related elements.</div>
<div style="font-family:Helvetica,Arial;font-size:13px; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ">If not with ValueModels i’d still solve your problem not on a Seaside level but rather on some other abstraction level. Whatever „self“ is in your example, maybe you should consider getting/setting the
 values form someone else and have this object take care of the transaction stuff upon submit.</div>
<div style="font-family:Helvetica,Arial;font-size:13px; "><br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ">Kind Regards</div>
<div style="font-family:Helvetica,Arial;font-size:13px; ">Karsten</div>
<br>
<div class="gmail_signature">
<div>— </div>
<div><br>
<span style="white-space: pre-wrap; font-family: -apple-system; font-size: 14px;">Georg Heeg eK</span></div>
<div>
<div class="gmail_signature amz_quote_hidden" style="font-family: -apple-system; font-size: 14px;">
<pre style="white-space: pre-wrap; word-wrap: break-word;">Wallstraße 22
06366 Köthen

Tel.: 03496/214328
FAX: 03496/214712
Amtsgericht Dortmund HRA 12812</pre>
<div><br>
</div>
</div>
</div>
</div>
<br>
<p class="airmail_on">Am 20. Mai 2021 um 03:19:14, Esteban Maringolo (<a href="mailto:emaringolo@gmail.com">emaringolo@gmail.com</a>) schrieb:</p>
<blockquote type="cite" class="clean_bq"><span>
<div>
<div></div>
<div>Hi all,<br>
<br>
I have a situation where I want to execute _ALL_ the callbacks of the<br>
inputs in the form within a particular block (basically, a DB<br>
transaction).<br>
<br>
html form: [<br>
html textInput on: #name of: self.<br>
html textInput on: #age of: self.<br>
html submitButton<br>
]<br>
<br>
I want to execute the three callbacks within something else, or at<br>
least have the option to execute something before the first callback<br>
executes and ensure something gets executed after the last one is<br>
executed.<br>
<br>
I know it involves fiddling somehow with<br>
WACallbackProcessingActionContinuation, but it's not fully clear if I<br>
could do this.<br>
<br>
The hacky alternative would be to have a hidden field that does start<br>
the tx and the submit / cancel commits or cancels it.<br>
<br>
html form: [<br>
html hiddenInput callback: [self beginTransaction].<br>
html textInput on: #name of: self.<br>
html textInput on: #age of: self.<br>
html submitButton<br>
callback: [self commitTransaction];<br>
value: 'Submit'.<br>
]<br>
<br>
But in this case I'd have to keep the tx "outside" of the form, and<br>
I'd like to wrap everything in a single block.<br>
<br>
Is there a way to do this with Seaside?<br>
<br>
Thanks!<br>
<br>
Esteban A. Maringolo<br>
_______________________________________________<br>
seaside mailing list<br>
seaside@lists.squeakfoundation.org<br>
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>
</div>
</div>
</span></blockquote>
</body>
</html>