Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
jvx:reference [2020/06/15 08:16] cduncan [Starting an application] |
jvx:reference [2020/06/15 08:25] cduncan [Usage example] |
||
---|---|---|---|
Line 253: | Line 253: | ||
Now ''%%testLabel%%'' will be using the ''%%PostfixedLabel%%'' internally but with no indication to the user of the object that this is the case. This allows us to extend the functionality of a component completely transparently, especially in combination with functions that return a ''%%UI component%%'' and similar. | Now ''%%testLabel%%'' will be using the ''%%PostfixedLabel%%'' internally but with no indication to the user of the object that this is the case. This allows us to extend the functionality of a component completely transparently, especially in combination with functions that return a ''%%UI component%%'' and similar. | ||
- | ===== An Important Note About The Component Hierarchy ===== | + | ===== An Important Note About the Component Hierarchy ===== |
If we create a simple component extensions, like the ''%%BeepComponent%%'' above, it is important to note that there is one other layer of indirection in regards to the hierarchy on the technology layer. If we create a simple frame with the ''%%BeepComponent%%'' in it, one might expect the following hierarchy: | If we create a simple component extensions, like the ''%%BeepComponent%%'' above, it is important to note that there is one other layer of indirection in regards to the hierarchy on the technology layer. If we create a simple frame with the ''%%BeepComponent%%'' in it, one might expect the following hierarchy: | ||
Line 335: | Line 335: | ||
Which is easy enough, but let’s say we’d like to add logic to that wrapper. At that point, it becomes more complicated. We can’t use the same technique as the custom component from above because, in that case, the “overlaying panel” would simply not be displayed. However, there is a similar mechanism for containers: setting the UI resource container. | Which is easy enough, but let’s say we’d like to add logic to that wrapper. At that point, it becomes more complicated. We can’t use the same technique as the custom component from above because, in that case, the “overlaying panel” would simply not be displayed. However, there is a similar mechanism for containers: setting the UI resource container. | ||
- | The UI resource container is another special mechanism that works similar to setting the UI resource, but it works exactly the other way round. While setting the UI resource “hides” components from the technology in UI layer, setting the UI resource container hides components from the UI layer, while they are added in the technology. A little complicated, here is our example using this technique again: | + | The UI resource container is another special mechanism that works similar to setting the UI resource, but it works the other way round. While setting the UI resource “hides” components from the technology in UI layer, setting the UI resource container hides components from the UI layer, while they are added in the technology.. As it is a little complicated, here is our example using this technique again: |
<code java> | <code java> | ||
Line 665: | Line 665: | ||
By default, the data book holds one data page and only has multiple data pages if it is the detail in a master/detail relationship. | By default, the data book holds one data page and only has multiple data pages if it is the detail in a master/detail relationship. | ||
- | ===== Usage example ===== | + | ===== Usage Example ===== |
- | Here is a simple usage example of a ''%%MemDataBook%%'', an ''%%IDataBook%%'' implementation which does only operate in memory: | + | Here is a simple example of a ''%%MemDataBook%%'', an ''%%IDataBook%%'' implementation which only operates in memory: |
<code java> | <code java> |