Implement a class that allows to load another
jfcml-file that is displayed as a child-panel. This
panel should allow lazy-loading, so that the file is
parsed by the time addNotify is called the first time
on the panel.
I like the JFCMLPanel concept, but I would like to discuss
how to implement the lazy-loading. The JFCMLPanel class
must provide this ability itself, or it becomes difficult to
register as a variable. Variables are registered when
attributes are applied, and this leads to the implicit
requirement that the target Object must be available when
the TagHandler returns from the handleElement() call;
otherwise JFCML will silently discard the all the attributes.
Therefore, JFCML would need to immediately instantiate the
JFCMLPanel during handleElement. Attributes could still be
applied normally, and the JFCMLPanel would invisibly load
the panel whenever it decides to, so long as it is available
before it is used.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The JFCMLPanel should be no extra construct in the core
classes, but a standalone JPanel subclass that creates an
own WindowContext in it's addNotify()-Method. This way, the
jfcml-file-parsing should occur the first time, the panel is
added to a parent, so JFCMLPanels stored in variables would
be lazy-loading. If the panel is added to a component
hierarchy directly, it's a different matter. In this case
there need to be a different implementation. Maybe using
ComponentListeners or such would do the trick, but this
needs to be evaluated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1118529
I like the JFCMLPanel concept, but I would like to discuss
how to implement the lazy-loading. The JFCMLPanel class
must provide this ability itself, or it becomes difficult to
register as a variable. Variables are registered when
attributes are applied, and this leads to the implicit
requirement that the target Object must be available when
the TagHandler returns from the handleElement() call;
otherwise JFCML will silently discard the all the attributes.
Therefore, JFCML would need to immediately instantiate the
JFCMLPanel during handleElement. Attributes could still be
applied normally, and the JFCMLPanel would invisibly load
the panel whenever it decides to, so long as it is available
before it is used.
Logged In: YES
user_id=14631
The JFCMLPanel should be no extra construct in the core
classes, but a standalone JPanel subclass that creates an
own WindowContext in it's addNotify()-Method. This way, the
jfcml-file-parsing should occur the first time, the panel is
added to a parent, so JFCMLPanels stored in variables would
be lazy-loading. If the panel is added to a component
hierarchy directly, it's a different matter. In this case
there need to be a different implementation. Maybe using
ComponentListeners or such would do the trick, but this
needs to be evaluated.