Hi all,
I started using Blossom, and I have a question about dialog
configuration: is there any easy way to mix the configuration by
annotation with the one of the standard dialog in the config repo?
Usually I have just a couple of controls that I really need/like to
configure through Blossom (and it's really a wonderful lovely feature!),
and many that just fit well in the repo (so it's quicker to change live
label/descriptions and such). Sometimes also all the blossom controls
are in a single dialog tab, and all the other tabs of the dialog could
have been loaded from the repo.
As a side problem, some controls do most of their self configuration in
the init method (yep! :-), so setting config values after getting the
control from the factory is just pointless. I'm talking about
SelectMedia of media module or even simply having a DialogSelect taking
options from a path/repo (using Blossom, obviously), because setting
those config values after init would do nothing, and the tabBuilder
method will fill with code that loads options from the repo and set them
just like what DialogSelect does internally.
My solution for both problem until now is to do this:
Content configNode =
MgnlContext.getHierarchyManager(ContentRepository.CONFIG).getContent(
"/modules/myModule/dialogs/myParagraph/tabMy/myDialog", false,
ItemType.CONTENTNODE);
DialogSelect select =
DialogFactory.getDialogSelectInstance(dialogContext.getRequest(),
dialogContext.getResponse(),
dialogContext.getWebsiteNode(), configNode);
I load a config node and pass it to the factory instead of the Blossom
provided config node. I don't know why but this solution doesn't feel
"right" to me, so I'm asking for advice.
Is there a better way to have the same result (a control configured with
a repo config in a Blossom context)? Would it be possible to do the same
with some annotations?
And the last problem: how to do the same with an entire tab? The tab is
passed already initialized to the @TabFactory paragraph methods, and
DialogBuilder has no other way to add a tab than using the label.
I'd like to hear your thoughts about this topic. Thank you.
Regards, Danilo.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------