Could you describe in more the detail the problems you're having with
the select control. You should be able to create it from scratch or read
it configured from the repository and then modify it as you like.

My point is that there seems to be a discrepancy between the standard Magnolia paradygm for dialogs and the Blossom one... Magnolia expects to have a configuration node (already written and stable) to pass to the control, and the control uses it to initialize internally. Blossom guidelines first create the control and then change all the configuration needed. I'm not saying this is a critical problem, it's more an "attention point" for some controls, that may have some drawbacks. Is there any simple way to create a temporary content node with a few properties set and pass it to the control contructor (instead of setting everything afterwards)? I didn't find an answer, maybe in Magnolia tests there is something to mock a content, but I don't know if this will cover everything correctly. Maybe a factory of content nodes based on an existing (empty) one, those nodes can be used to add properties and never saved. Something like this would help solve BLOSSOM-15, 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 extended annotation.

Regards, Danilo.


----------------------------------------------------------------
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