2 Replies Latest reply on Feb 24, 2006 11:14 AM by tim potter

    CMSAdminPortlet and custom Node Types that extend portalcms:

    tim potter Newbie

      First, let me say how great it is that you integrated Jackrabbit into JBoss Portal. Looks like a lot of work went into the integration and it works quite well.

      I'm trying to implement my own custom NodeType that extends your portalcms:file NodeType in order to add a few new eLearning specific properties. (I'm building a Portal-centric LMS/LCMS)

      Unfortunately, any nodes that use my extension NodeType do not show up in the CMSAdminPortlet. My portal version is 2.2 deployed in JBoss 4.0.3SP1, default config (download, extract, run).

      Is creating a new NodeType with supertype portalcms:file the correct approach for adding custom properties? Or, is there another way to add custom properties to a portalcms:file node? If not ...

      Is there a way to get the CMSAdminPortlet to show my custom nodes? The code FolderGetListCommand doesn't seem to handle extensions to portalcms:file. Can you recommend some changes I need to make to the code in order to support extension types.

      Many thanks for the great portal!

        • 1. Re: CMSAdminPortlet and custom Node Types that extend portal
          Roy Russo Master

          I will look at this tomorrow and create a jira feature request for it. I have had the idea of creating this feature for some time, as it will make the cms more flexible for end-users.

          The capability is there, but requires enhancements to the ui so admins can create the properties and the implementation to store/retrieve the custom types. So changes have to happen in several places for this to work.

          You're not going to want to play with the folder, file, or content types. Instead, if I understand correctly, you want something like every content type should have a new type called "foo" or "bar" as a child of it. Much like we already support "title" and "description" for content. Correct?

          • 2. Re: CMSAdminPortlet and custom Node Types that extend portal
            tim potter Newbie

            Sorry Roy, I'm not clear how to answer your question:

            You're not going to want to play with the folder, file, or content types. Instead, if I understand correctly, you want something like every content type should have a new type called "foo" or "bar" as a child of it. Much like we already support "title" and "description" for content. Correct?


            What I'm hoping for is the ability to define a new NodeType that has portalcms:file as its supertype with some additional properties. I like basing my type off of portalcms:file because it already defines title, description, and the jcr:content child, which can be edited with the nice HTML editor you provide. My code looks like:

            QName qname = new QName("http://www.xerceo.com/learn/jcr-1.0", "LearningObject");
            NodeTypeDef ntd = new NodeTypeDef();
            ntd.setName(qname);
            ntd.setOrderableChildNodes(false);
            ntd.setSupertypes(new QName[]{new QName("http://jboss.org/jcr/portalcms", "file")});
            // ... additional eLearning related properties here ...
            


            The UI should use the JSR-170 API to show all the properties for a LearningObject and if editable, then allow an end-user to change them.

            This weekend, I'm going to cook up my own content viewer and will send you the code.