|
|
|
Change By:
|
Tobias Mattsson
(15/Jan/15 10:21 AM)
|
Description:
|
It's not
In methods annotated with @DialogFactory its
possible to
decide wether to
add
tabs
a tab
based on
some criteria in paragraphs
custom logic. You can also do post processing of the dialog as a final step after everything has been added
and
modify it as you please.
In classes annotated with
@DialogFactory
and
classes
. This
for templates, areas and components this
is
not possible since they
only
available on
have
@
DialogFactory
TabFactory annotated
methods
in templates
that are called to add tabs
.
What
These methods are always called and there
's
needed is some
no
way to
get access to
decide that
the
DialogBuilder and use it
tab shouldn't be added. There's also no way
to
add tabs
do post processing
.
This can be done with a
A post create
callback
either before or after blossom builds the dialog
should be added that allows for adding tabs conditionally, removing tabs added
by
calling its
@TabFactory methods
or do arbitrary changes to the dialog
.
Calling it afterwards has the extra benefit that it can remove and customize what has been added already. If done afterwards it
The annotation used to denote callback methods
should be
@PostCreate.
The callback should get access to:
* Item that is being used by
the
very last step even after sorting of tabs are done according
UI * Node that is being edited / created * DialogCreationContext used by Blossom for this dialog * DialogBuilder used by Blossom
to
allow for easy operation on
the
order in
dialog * ConfiguredFormDialogDefinition to directly modify
the
@TabOrder annotation.
definition
* UiConfig to create new fields etc
The callbacks
* DamConfig to create new DAM fields (only if DAM is present)
Requirements on invocation order:
* A callback declared
in a class
hierarchy should
must
be invoked
from
after all @TabFactory methods declared in that class have been invoked. * To allow for extension and customization of these classes invocations must be performed one class at a time starting with
the topmost super class
first
and then down the class hierarchy to the lowest level subclass.
Taking overridden methods into account.
*
Multiple callbacks on the same class should work although their order of invocation can not be guaranteed.
* Overriding methods that don't repeat the @PostCreate will not be invoked (and neither will the method it overrides obviously). * An overriding method should be invoked in place of the overridden method. I.e: a method defined in a base class that overrides a method in a super class should be invoked when the super class is processed. * Callbacks should be called after @TabFactory methods in the same class and before @TabFactory methods in an inheriting class.
It is an error to use @PostCreate on static methods. It is an error to use @PostCreate and @TabBuilder on the same method.
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------