cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Categories

ivo_costa
Champ in-the-making
Champ in-the-making
Hi…

I'm looking for a way of using a custom Category (Name(code), Summary, Description) for classifying documents.
this is used to set 2 classification properties on a document.

Right now I think that I'd have to make 2 extentions to cm:category so I can manage to set 2 diferent "tables"
but I'm not sure if this is the best approach to this problem. I've read somewhere that I wouldn't be hable to create/edit these new categories. Also I'd have to create component generators to manage the properties on the documents since the standard generator for type d:category does not allow searches

I need some hints on how to implement this

a small example, so you can understand what I'm looking at:

a document of type "request" can have a classification
1 - Help request
2 - permission request
3 - vacation request
4 - meeting request
…

so we'd have a request type code…

in the real case this would be a list of more than 1000 codes that could be applied to a document.
I know that I could use a constraint, but the list constraint is much too simple and it doesn't allow to do searches on the list.

Now that I think of it… is it possible to create a constraint type???

Any ideias on how to deal with this problem will be appreciated

Thank you
Ivo Costa
14 REPLIES 14

norgan
Champ in-the-making
Champ in-the-making
hi ivo,
I am not quite sure yet, why you would want to extend cm:category. But two thoughts on that :
* Naming of Importfolders or files or parsing of extracted metadata might be usable to automate this process
* how about a type ahead control as used in liferay portal to assign tags (or in the current firefox in the address field)

You could work with the standard category mechanism and would just have to update the JPS for editing / choosing a category. As optional parameter, allow for a "starting" point in the category tree and maybe you would need an enhanced Category Manager with Import/Export, Copy & Paste, Treemoving etc. And best of all - publish it for the community to reuse  Smiley Very Happy

Norgan

ivo_costa
Champ in-the-making
Champ in-the-making
Hi Norlan,

and thanks for the answer…

unfortunately I'm talking about some highly strict classication rules (military style)… search from a starting point would certainly solve part of the problem, but unfortunately that would still allow the users to apply some of these new categories where they shouldn't be allowed to. But either way, thats a good starting point to think of more solutions. I could use the standard cm:category, but I would still need to find a way to filter the categories show for each property. A CustomGenerator might solve that part, but not prevent the users to use the categories else where like on a classifiable aspect.

think of this as some MS-Access form where there are fields that use values from some other specific tables.
As I sayd before using a constraint list is out of the question… a 1000 lines long dropdownbox would just be totally unusable


as for the rest of your post, I didn't get it very well Smiley Sad sorry


Thanks for your help, please if you have any other ideias, please share and I'll do my best to get some of them coded and shared as much as possible Smiley Wink

norgan
Champ in-the-making
Champ in-the-making
Hmm …
you need to restrict the visibility of categories in the assignment ? In terms of "nobody should know, that there is such a category" ? Or in terms of "only selected people may assign those".

in Liferay, this is solved by defining 1 .. n dictionaries and users having access to 1 or more of those. In our "solution speak", that would be several starting points beeing merged into one selection component.

Which part did you not understand ? The category management section ? I just refer to the rather simplistic way of managing categories in Alfresco. It is implemented as a tree, but besides add/delete, no other management function is available. Managing a complex tree is just inefficient with Alfresco Explorer. At least as far as I have seen sofar.

Norgan

ivo_costa
Champ in-the-making
Champ in-the-making
what I need is something more like…

Categories type 1 should be only applied to Property-1 of the document
Categories type 2 should be only applied to Property-2 of the document

and neither type 1 or 2 should be applied as a general category

In the current "simple" application (no workflow, simple catalog of documents application) they're using right now, this is achieved by openning a pop-up when selecting a property, that shows up a table similar to Access where you can apply filters. After selecting the classification, the id of the field is sent to the document property

hope this helps to further understand this situation

what I didn't understand was the type ahead part… anyway… I think that this should be implemented as a category/classification, but there might be other solutions that I still haven't figured out

One other possibility that I thought of, was to add a new table to the Alfresco schema, but I can't see anyway of making this… so it is excluded for now

It also crossed my mind to use associations… But I don't think that it makes any sense

I need to find a way of managing this extensive list (more then 1000 items) of possible classifications in a way that I can apply them to documents, without "overflowing" the users brain with information by providing a simple way to filter and search withing the possible categories for the given property.

I am my-self getting "overflowed" so I can imagine pretty well what will the users think


thanks once again
Ivo Costa

norgan
Champ in-the-making
Champ in-the-making
Hi Ivo,
I have not read and parsed your post yet, but here a link to a post, hinting that there is something like permissions, possible with the categories.

http://forums.alfresco.com/en/viewtopic.php?f=9&t=21405&p=70301&hilit=difference+tags#p70301
Regards, Norgan

ivo_costa
Champ in-the-making
Champ in-the-making
Ok… made a custom edit-category.jsp

only problem now is that alfresco is not getting my custom dialog and is using the original in its place

I'm doing this on a AMP file and using the following xml in faces-config.xml in a jar file:

<faces-config>
     <!– Categories screen action outcomes –>
   <navigation-rule>
      <from-view-id>/jsp/categories/*</from-view-id>
      <navigation-case>
         <from-outcome>addCategory</from-outcome>
         <to-view-id>/jsp/categories/new-category.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>editCategory</from-outcome>
         <to-view-id>/jsp/categories/custom-edit-category.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>deleteCategory</from-outcome>
         <to-view-id>/jsp/categories/delete-category.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>finish</from-outcome>
         <to-view-id>/jsp/categories/categories.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>cancel</from-outcome>
         <to-view-id>/jsp/categories/categories.jsp</to-view-id>
      </navigation-case>
   </navigation-rule>


    <managed-bean>
        <managed-bean-name>DocClassificationGenerator</managed-bean-name>
…
…
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I haven't the slightest ideia on why alfresco is not calling my new jsp

any help?

thanks

edit:

ok… found out that Tomcat was possibly keeping a copy of the interfaces on a work folder…
also found out that that the navigation rules that I set on the JAR's META-INF are not beeing used
also also found out that the managed-bean for EditCategoryBean is not beeing overriden by the one in the JAR file

strangely the managed beans and components that I created work great

HELP!

ivo_costa
Champ in-the-making
Champ in-the-making
New day new post…

changing the navigation beans does not work what ever I do…
although I have changed edit-category to custom-edit-category everywhere I could find, alfresco always loads the original edit-category.

any thoughts????


on the managed-bean override, I've read that I need to do this on web-inf/faces-config-custom.xml … but I can't find anyway of doing this using AMP files

thanks

ivo_costa
Champ in-the-making
Champ in-the-making
as requested by many families Smiley Tongue  :lol:

I've came to a alpha alpha solution by extending UICategorySelector… It turn's out that you can override  the method getRootChildren and return only the subcategory that contains all that you need.. I'm still using a custom category but only as a "root" to ease the pain of searching throught all other categories. so all I had to do was do a type check against what I was looking for.

after that all that is needed is a generator I can use in web-client-config.

The reason I didn't need any custom category apart from the root categories was that it turns out that the aspect used to give categories a description, also adds a title property… so you end up with name, title and description, and all you have to do is expose that title field in the interface and override the dialog bean…

and that's where I'm stuck right now :cry:

Regards
Ivo Costa

ivo_costa
Champ in-the-making
Champ in-the-making
Hi All

found out that you can change faces-config-custom throught AMP file by adding to file-mapping.properties

/WEB-INF=/WEB-INF‍

this way you can overwrite a few of those config files


unfortunatelly now I think that faces-config-custom can't override managed-beans as suggested in the wiki