cancel
Showing results for 
Search instead for 
Did you mean: 

Node type not available through BrowseBean?

davidpisaac
Champ in-the-making
Champ in-the-making
Hello-

I cannot seem to access a node's "type" property through the BrowseBean in a JSP through a richList.  That is:

<hSmiley SurprisedutputText id="col10-nodeinfo" value="#{NavigationBean.currentNode.type}" />

correctly shows a node's type, but:

<hSmiley SurprisedutputText id="col10-nodeinfo2" value="#{r.type}" />

where r is bound to a node in a richList displays nothing.  Aren't these both Node objects?  I can display name and ID, but not type or path.

I am trying to implement a custom action tied directly to an item in the browse page list based on the object type.  Since the link on the object's icon and name are not configurable Actions, I must perform this test in a modified browse JSP rather than through an Alfresco config with evaluator for an action.
4 REPLIES 4

davidpisaac
Champ in-the-making
Champ in-the-making
I think I just found the answer to my own question, but I'll leave this post for others.  BrowseBean.nodes apparently returns a list of lightweight MapNodes, that have some but not all properties of a Node populated.

dhalupa
Champ on-the-rise
Champ on-the-rise
If I may add, I think that all properties from Node are also present in TransientMapNode. The difference comes from the fact that TransientMapNode is implementing Map interface. Therefore, in the first case, JSF will call method getType() which will return Qname of node type, while in the second case JSF will not invoke getType() method, but rather, get("type") method of Map interface which will return null.

kevinr
Star Contributor
Star Contributor
If I may add, I think that all properties from Node are also present in TransientMapNode. The difference comes from the fact that TransientMapNode is implementing Map interface. Therefore, in the first case, JSF will call method getType() which will return Qname of node type, while in the second case JSF will not invoke getType() method, but rather, get("type") method of Map interface which will return null.

You are correct.

Kevin

gilles
Champ in-the-making
Champ in-the-making
Did you suceed in getting the type of your beans in the richlist?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.