Magnolia

TreeHandlerManager should set properties recursively to allow flexible tree configurations

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 4.1.1
  • Fix Version/s: 4.2
  • Component/s: admininterface
  • Security Level: Public
  • Description:
    Hide

    The way trees are configured at this time is not very flexible: It's all hardcoded in configuration classes. And all you can to is select the configuration class, choose the starting path of the tree and switch between tree and browse mode.

    Instead of simply selecting a configuration class by setting the configurationClass value it would be much better to have a ConfigurableTreeConfiguration class which reads its configuration at runtime from the config tree. So instead of providing a configurationClass nodeData one would provide a configuration contentNode which contains all the trees configuration info.

    When I tried to do this, I noticed however that this contentNode was never turned into a bean. This is because the TreeHandlerManager does not set the properties recursively. The attached patch fixes this problem.

    In a later step, I will provide a first version of the ConfigurableTreeConfiguration too.

    Show
    The way trees are configured at this time is not very flexible: It's all hardcoded in configuration classes. And all you can to is select the configuration class, choose the starting path of the tree and switch between tree and browse mode. Instead of simply selecting a configuration class by setting the configurationClass value it would be much better to have a ConfigurableTreeConfiguration class which reads its configuration at runtime from the config tree. So instead of providing a configurationClass nodeData one would provide a configuration contentNode which contains all the trees configuration info. When I tried to do this, I noticed however that this contentNode was never turned into a bean. This is because the TreeHandlerManager does not set the properties recursively. The attached patch fixes this problem. In a later step, I will provide a first version of the ConfigurableTreeConfiguration too.
  1. TreeHandlerManager.recursive.patch
    (0.7 kB)
    Will Scheidegger
    25/Sep/09 6:23 PM

Activity

Hide
Philipp Bärfuss added a comment - 02/Oct/09 11:25 AM

We have not yet moved to supporting content2bean for trees and dialogs because this will be changed in the 5.0 version completely. But this minimal patch won't hurt in my opinion.

Thanks!

Show
Philipp Bärfuss added a comment - 02/Oct/09 11:25 AM We have not yet moved to supporting content2bean for trees and dialogs because this will be changed in the 5.0 version completely. But this minimal patch won't hurt in my opinion. Thanks!
Hide
Philipp Bärfuss added a comment - 13/Oct/09 3:44 PM

Will Scheidegger has published a configuration class which can be used once the patch has been applied:

--> http://www.fastforward.ch/web/ff/dokumentation/entwickler/magnolia_configurable_tree.html

Thanks!

Show
Philipp Bärfuss added a comment - 13/Oct/09 3:44 PM Will Scheidegger has published a configuration class which can be used once the patch has been applied: --> http://www.fastforward.ch/web/ff/dokumentation/entwickler/magnolia_configurable_tree.html Thanks!
Hide
Grégory Joseph added a comment - 13/Nov/09 6:31 PM

Patch applied, thanks Will !
Also updated javadoc of AdminTreeMVCHandler to reflect this; setConfiguration() isn't deprecated anymore.

Show
Grégory Joseph added a comment - 13/Nov/09 6:31 PM Patch applied, thanks Will ! Also updated javadoc of AdminTreeMVCHandler to reflect this; setConfiguration() isn't deprecated anymore.
Hide
Hudson CI server added a comment - 13/Nov/09 6:40 PM

Integrated in magnolia_main-trunk #1126
applied patch - TreeHandlerManager now sets properties of the AdminTreeMVCHandler recursively, allowing the TreeConfiguration to be setup via content2bean

Show
Hudson CI server added a comment - 13/Nov/09 6:40 PM Integrated in magnolia_main-trunk #1126 applied patch - TreeHandlerManager now sets properties of the AdminTreeMVCHandler recursively, allowing the TreeConfiguration to be setup via content2bean

People

Dates

  • Created:
    25/Sep/09 6:23 PM
    Updated:
    13/Nov/09 6:40 PM
    Resolved:
    13/Nov/09 6:31 PM

Time Tracking

Estimated:
5m
Original Estimate - 5m
Remaining:
5m
Remaining Estimate - 5m
Logged:
Not Specified
Time Spent - Not Specified