cancel
Showing results for 
Search instead for 
Did you mean: 

Improvement : space selector

jbaton
Champ in-the-making
Champ in-the-making
Hi,

Jira is NullPointerExceptionning so …


Adding a 'go to root'  link in space selector would be useful when a complex space structure is present, it would be useful to go to root directly instead of clicking 'go up' back to root (N times when deep inside the tree)


Jerome
1 REPLY 1

jbaton
Champ in-the-making
Champ in-the-making
I needed it too bad as I have too much rules to create.

The following will add to the space selector component a green arrow that allows to go to root (company home) in one click no matter how deep in spaces you are.

I has not been thoroughly tested yet, not sure what happens with the category selector. So do not use this in production before it gets validated.

Still got 50+ rules to create Smiley Sad


Please, could s.o. from the Alfresco staff stamp this code OK

In class org.alfresco.web.ui.repo.component.AbstractItemSelector, add this declaration


private static final String MSG_GO_ROOT = "go_root";

Then go to webclient.properties and add this line


go_root=Go to Root


Get back to the AbstractItemSelector class, look for the line


renderNodeLink(context, id, Application.getMessage(context, MSG_GO_UP), upImage, buf);

and just the line before, insert


renderNodeLink(context, null , Application.getMessage(context, MSG_GO_ROOT), upImage, buf);

To gavinc : at first I was looking for some way to find the root id using some method, thanks to your comment in the code, I tried to use null. So I say it again, you guys have your code well commented. Bravo !


There you are, I think I desserve a Tshirt for this major contribution Smiley Happy

Oh, ok, well, ok ——->[]

Jerome