Issue on JS subforms
omnislist at dataweaver.com
Sun Jul 22 16:35:34 EDT 2018
I’m a bit late coming to this one but I noticed you refer to communication between subforms.
I use a technique called a ‘data observer object’ which I believe was used by Doug Kuyvenhoven years ago and might be useful for inter-subform messaging in this case.
a) You instantiate an object class at the topmost remote form level.
b) All the subforms register an interest with that object class, stating who they are, what message or event they are interested in and what public method within them to execute. These details are stored in a list variable in the object class.
(i) $cinst.$ref of the subform
(ii) 'LoadClient' or 'UpdateClient' or ‘DeleteClient'
c) When one of the subforms performs an event, it ‘notifies’ the data observer object of the event, along with a row variable containing the data just affected.
i.e., it sends 2 parameters to the data observer:
d) The data observer, goes through the list of subforms that expressed an interest in the ‘UpdateClient’ event and calls the method in each subform, passing ivClientRow to it.
I don’t think I’ll be able follow up on this conversation this week as I’m on holiday now and trying to avoid reading any emails(!). But I hope this helps and if you want to follow up, please email me privately next week.
I can also talk about the technique at Euromnis this year, so feel free to book your place and let’s get together in Germany!!
> On 12 Jul 2018, at 11:42, Sten-Erik Björling <s-e.bjorling at enviro.se> wrote:
> Dear Michael,
> Many thanks for this, very useful. My challenge though covers the use of JS subforms within other JS subforms - and even JS subforms in deeper levels. I am evaluating an approach that uses paged panes as “coordinate placeholders” since they can be resized when the user change the browser window size and then use these coordinates to move a “1st level” subform to the right place. Will be somewhat interesting…
> Take care, all the best… And thanks for the tip…
>> On 11 Jul 2018, at 10:06, Michael Monschau <michael at brainydata.co.uk> wrote:
>> Dear Stene,
>> Our JS-OWrite document manager example uses a subform with multiple classes. We have a tab control that assigns the $classname when a different tab is clicked. This has two consequences. The one subform field can instantiate and maintain multiple form instances and the subform data is only downloaded the first time it is needed (if it is never needed the data is not downloaded).
>> As it is a simple matter of assigning the $classname on the client, I can see that this approach would make it possible to be very flexible about which subforms appear where on screen, if one was to use multiple subform fields within different fixed areas of the main form. For example, a navigation list on the left and content on the right. Another user could choose to display them the other way around.
>> Michael Monschau (Director)
>> Brainy Data Limited
> Sten-Erik Björling
> Enviro Data
> Kyrkogatan 5A 2 tr
> SE-972 32 Luleå
> E-Mail: s-e.bjorling at enviro.se
> Mobile: +46-70-655 11 72
> Wire: @stenerikbjorling
> Skype: stenerikbjorling
> iChat: stene at mac.com
> FaceTime: stene at mac.com
> Hotmail / Messenger: stenerikbjorling at hotmail.com
> GMail: stenerikbjorling at gmail.com
> LTC: Lc4p9XbeJoYPfj1YJy4DNiGM54zcz38ZWN
> This email and any files transmitted with it are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, please note that any use, distribution, or reproduction of the contents of this email is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by return email and destroy all copies of the original message including any attachments thereto. Thank you.
> Please note that we take reasonable precautions to prevent the transmission of viruses; however, we cannot guarantee that this email or its attachments are free from viruses. We only send and receive emails on the basis that we are not be liable for any loss or damage resulting from the opening of this message and/or attachments.
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en