a child can’t be visible if a parent isn’t already visible.
The same for onLoad. You can’t have the childs onload already called before the parents onload.
Just look at it in real live how can a child exists before the parent?
In java itself it is exactly the same. visibility is chained through the children.
We didn’t have a real defined order before this. But more and more people where depending of the order and we defined it now as it supposed to work.
There where problems in specific solutions that we get in our support system that where looking up things (with tab panels and foundsets) in the onshow of the child. But the parent wasn’t in an valid state yet because his onshow wasn’t called yet.
For example if the onshow of the parent would add or set a tab or set a foundset in a child (relationaless tab) and that tab’s onshow depends on the state the parent did set in it. How would that work? So before rc1 relationalless tabs (the parent setting stuff in its onshow) completely where broken.
Now it is clear and defined how it supposed to work.
Modules and events don’t have anything to do with it. At runtime there is no difference between een solution and a solution divided over modules. Everything is merged as it is one.
I agree with the onLoad. I assume, onLoad is called within the loading process. The loading of a child is forced by loading the parent. So the parent may receive onLoad first.
But I do not agree with the onShow. A child’s data should not depend on the parents data. If it does it breaks the order of responsibility. A child should be able to display its content independent of the parents state.
You said:
… and that tab’s onshow depends on the state the parent did set in it. How would that work?
Why shouldn’t it be possible for the child to assume a default state? The child does not know it is used by a parent which may set a state. The child could be implemented to be self sufficient. And it may offer a method to set or change this state. And this is the hook for the parent.
Read in the literature about events in capture phase and events in bubbling phase. The two different phases offer different hooks for the developers. You just eliminated one of them.
If you really don’t want to change it back: What about adding another event e.g. finishedLoading or loaded or aboutToShow which bubbles up the hierarchy (from child to parent)?
I’m still sure you need to offer a hook where the parent can finish initialization process as the last element in the queue and as the one with most information and most overview. Please give it a rethink.
will will not revert it. The way it is now is how it supposed to work. (for the onload and onshow events)
Maybe we could introduce in a new version something like an onShowed that is really called after everything is initialized. (for only the main form)
Make a feature request for this in our support system.
Thank you for the reply. I’m not happy with the current solution, as you can imagine. But I’d appreciate the onShowed event a lot. I’ll make it a feature request.
I got to know an event called “loaded”. But “afterXY” is ok, too. Maybe people at Servoy can find something similar in other languages and use these naming conventions.
BTW: I also noticed that onDataChange is not fired in the Webclient on comboBoxes, allthough, according to the Webfilter, onDataChange is a supported event.
Sadly, Mister Bakker is true about the OnDataChange event. Is there any improvement on the new 3.1 version for events that are available for WebClients?
Is Ajax or simply Javascript can be used to natively add more events for Servoy web users!? :roll:
I think, OnMouseOver would also be a great addition.
BTW: I also noticed that onDataChange is not fired in the Webclient on comboBoxes, allthough, according to the Webfilter, onDataChange is a supported event.
Sadly, Mister Bakker is true about the OnDataChange event.
onDataChange is for sure fired in webclient (after any action wich does a submit), it’s only not instantaneous as in smart client.
Servoy 3.2 will likely improve on this.
Thank you Jan for your reply. Actually you are right about the ondatachange event for text fields. But as soon I change my field to combobox (and attach a valuelist to it), then this event is not working anymore on WebClient. Any idea?
And I’m sorry if this question has been asked before.
Homer:
Thank you Jan for your reply. Actually you are right about the ondatachange event for text fields. But as soon I change my field to combobox (and attach a valuelist to it), then this event is not working anymore on WebClient. Any idea?
And I’m sorry if this question has been asked before.
I’m sorry to say we can’t reproduce the problem. Would you please send us a solution that demonstrates this problem so we can look into it? It can be uploaded to our support system: http://crm.servoy.com/servoy-webclient/ … oy_support