[ 
http://jira.magnolia-cms.com/browse/BLOSSOM-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=29951#action_29951
 ] 

Danilo Ghirardelli commented on BLOSSOM-15:
-------------------------------------------

I did a quick test and maybe this would be easy using an hidden (and 
undocumented) Magnolia feature, the "reference".
For instance, if in the TabBuilder constructor you create the new tab like this:

        this.tab = new DialogTab();
        try {
            this.tab.init(getRequest(), getResponse(), null, fakeConfigNode);
        }
        catch (RepositoryException e) {
            // ignore
        }
        this.tab.setLabel(label);
        context.getDialog().add(tab);

you can pass a "fakeConfigNode" to the init method. If that node has only a 
property named "reference" with the path (in config repo) of the "parent" tab, 
everything works just like asked in the issue 
(DialogControlImpl.initializeConfig takes care of everything). The problem is 
just to create a temporary content with a single property with the value 
provided by the annotation.
The same idea is also appliable at dialog level.


> Add "inheritance" to reuse parts of repo dialog configuration in Blossom 
> configured dialogs.
> --------------------------------------------------------------------------------------------
>
>                 Key: BLOSSOM-15
>                 URL: http://jira.magnolia-cms.com/browse/BLOSSOM-15
>             Project: Magnolia Blossom Module
>          Issue Type: New Feature
>    Affects Versions: 1.1
>            Reporter: Danilo Ghirardelli
>            Assignee: Tobias Mattsson
>
> Add the possibility to re-use dialogs configured in repo as prototypes for 
> Blossom configured dialogs.
> Sometimes there are just a couple of controls that you really need/like to 
> configure through Blossom, and many that just fit well in the repo (so it's 
> quicker to change live label/descriptions and such, or simply are already 
> there). 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, or 
> simply a repo-configured tab is shared among many dialogs. 
> @DialogFactory(value="my-dialog", prototype="some-other-dialog")
> @Paragraph(value="my-paragraph", prototype="some-other-dialog")
> When my-dialog (or the dialog for my-paragraph) is created it will include 
> all the tabs and controls of some-other-dialog. That way you could configure 
> some parts of your dialog in the repository, under a different dialog name.
> A @TabFactory("Content") method would not create a new tab if one with the 
> label "Content" already exists, instead it would add/remove/edit controls in 
> it.
> It would be nice to have also the same pattern on @TabFactory, like 
> @TabFactory(value="Content", 
> prototype="/config/modules/myModule/dialogs/dialog/tab/title") so a tab can 
> inherit directly from some repo configured tab, overriding the DialogFactory 
> prototype, if any.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to