Looked at it once more: We use three different trees for our data module nodes:

a) info.magnolia.module.data.trees.GenericDataAdminTree 
- the standard tree which will be setup for you when you create a new node type
- uses info.magnolia.module.data.trees.GenericDataAdminTreeConfig as config 
class
- supported node types 
        - dataFolder (if folders are allowed)
        - whatever types the tree is configured for (dataItem subtypes)
- there is no "Activate including subnodes..." menu item
- when you activate a data node, mgnl:contentNodes will not be activated
=> I think this behavior should be changed, since the Magnolia dialogs produce 
node structures with mgnl:contentNodes in them.

b) info.magnolia.module.data.trees.JCRAdminTree
- the tree used for the JCR Browser on the data repository
- no configuration class specified
- supported node types
        - dataFolder
        - dataItem
        - dataItemNode
        - since it does display mgnl:contentNode and mgnl:nodeData nodes, I 
assume they are supported via the super class of the tree...
- There is an "activate including subnodes.." menu item
- mgnl:contentNode nodes are not activated however
=> Did not find out yet why they are displayed but not activated.

c) info.magnolia.module.admininterface.AdminTreeMVCHandler with a configuration 
read from the config repository
- our configurable tree (see 
http://www.magnolia-cms.com/home/news/newsletter/newsletter-10.html#jump8)
- supported node types
        - whatever you configure
        - in our case: mgnl:contentNode _not_ supported/displayed
- "Activate with subnodes..." included in our case
- When activating with subnodes the mgnl:contentNode items are activated too
=> So the AdminTreeMVCHandler seems to activate the nodes even though they are 
not displayed in the tree.

I have not figured out yet, what _exactly_ makes the trees behave differently. 
But activation with our configurable tree seems to work.

-will

On 25.03.2010, at 15:30, Jan Haderka wrote:

> 
>> On top of it, I'm not so sure if adding mgnl:contentNode to the tree 
>> configuration will do the trick. The mgnl:contentNodes are clearly displayed 
>> in the data JCR browser but are still not activated... The node types a tree 
>> can display should not have any influence on the "Activate with subnodes..." 
>> command. It does not have one in the website tree for sure. There, 
>> mgnl:contentNodes are not displayed, but still they are activated. I think 
>> the problem must lay somewhere in the activation command itself. When I find 
>> the time, I'll have a look at it if nobody else has already located the 
>> problem.
> 
> Test it pls first. As for digging throught the code - be my guest ... to get 
> you started see GenericDataAdminTree.getCommandContext() method where the 
> itemTypes from allowed by the tree are passed in the activation command so it 
> can construct rules for incl/excl content during activation.
> 
> As for the unique set of types for the data - I believe the original 
> intention was to make them more free and flexible then those in website since 
> in data module you should be fully in control of the types w/o affecting or 
> being limited by those in website.
> Jan
> 
> 
> -will
> 
> On 25.03.2010, at 14:45, Jan Haderka wrote:
> 
>> 
>> Strike back: Why do you create subitems of mgnl:contentNode in your custom 
>> data type? :D
>> 
>> What you see is actually expected behavior. From the very beginning of the 
>> Data Module, it supports item type "dataItem" for the main type (and all 
>> custom types have this as a supertype) and "dataItemNode" for the child 
>> nodes. This is similar to mgnl:content/mgnl:contentNode system used in the 
>> website.
>> Now of course you might want to have some special sub item type (and indeed 
>> you have them for example when using hierarchical types). As long as such 
>> child items have dataItemNode as their supertype you don't need to do 
>> anything. If they are hierarchical subtyped you have defined, again you 
>> don't need to do anything since Magnolia will take care of the configuration 
>> for you. The only problem is when you bring in extra type programatically 
>> such as in your case. Then you need to change the _tree_ configuration to 
>> include such a type in the "itemTypes" property of the tree. See 
>> config:/modules/data/trees/company/itemTypes for example. Company type has 5 
>> subtypes and those need to be listed there along with the basic 
>> (dataItemNode) type.
>> 
>> HTH,
>> Jan
>> 
>> 
>> 
>> From: Will Scheidegger [mailto:[email protected]]
>> To: Magnolia User-List [mailto:[email protected]]
>> Sent: Thu, 25 Mar 2010 10:22:35 +0100
>> Subject: [magnolia-user] "Activate with subnodes..." in the data module
>> 
>> 
>> Dear Magnolians
>> 
>> I'm tripping over something that might be related to [MGNLDATA-97]. When I 
>> try to activate a whole data node structure (by selecting "Activate with 
>> subnodes..." on a dataFolder node) I do get all dataFolder nodes and all 
>> dataItem sub-type nodes activated (and of course the mgnl:nodeDatas), but no 
>> mgnl:contentNodes (used for instance on stuff like checkbox lists and so 
>> on). When I then select a single dataItem sub-type (i.e. one of the data 
>> nodes in the tree) and choose "Activate with subnodes..." it gets activated 
>> with the mgnl:contentNodes types. 
>> 
>> Now before I add a new issue to the JIRA: Has anyone seen similar 
>> (mis)behavior? 
>> 
>> Cheers,
>> -will
>> 
>> 
>> [MGNLDATA-97] = http://jira.magnolia-cms.com/browse/MGNLDATA-97
>> 
>> ----------------------------------------------------------------
>> For list details see
>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>> To unsubscribe, E-mail to: <[email protected]>
>> ----------------------------------------------------------------
>> ----------------------------------------------------------------
>> For list details see
>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>> To unsubscribe, E-mail to: <[email protected]>
>> ----------------------------------------------------------------
>> 
> 
> 
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> 


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