Trace: • Temporary Values
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
jvx:client:gui:temporary_values [2020/06/08 15:00] cduncan Edited for English grammar (capitalization, punctuation, correct verb conjugation) |
jvx:client:gui:temporary_values [2021/02/01 12:47] (current) admin |
||
---|---|---|---|
Line 6: | Line 6: | ||
=== Instance Values === | === Instance Values === | ||
- | As an example, you could open a work-creen and add additional metadata like read-only or allowed users. To solve this problem, you could save the screen in a HashMap with metadata as values. This information should be saved in the application because the screen has access to the application. This makes things a little bit complicated. | + | As an example, you could open a work-screen and add additional metadata like read-only or allowed users. To solve this problem, you could save the screen in a HashMap with metadata as values. This information should be saved in the application because the screen has access to the application. This makes things a little bit complicated. |
To make everything easier, every UI resource (e.g., a component) has the methods: | To make everything easier, every UI resource (e.g., a component) has the methods: | ||
Line 19: | Line 19: | ||
</code> | </code> | ||
- | So it's super easy to add temporary information to any UI resource. We recommend to use constants as object names in order to find references easily. If you use hardcoded strings, it will be hard to find the usage in your whole application. | + | So, it's super easy to add temporary information to any UI resource. We recommend to use constants as object names in order to find references easily. If you use hardcoded strings, it will be hard to find the usage in your whole application. |
Here's a short example: | Here's a short example: | ||
Line 48: | Line 48: | ||
==== Global Values ==== | ==== Global Values ==== | ||
- | We have another alternative for above instance values. It's also possible to use our [[jvx:common:util:classes#the_object_cache|ObjectCache]], e.g., | + | We have another alternative for the above instance values. It's also possible to use our [[jvx:common:util:classes#the_object_cache|ObjectCache]], e.g., |
<code java> | <code java> |