AnsweredAssumed Answered

Extract Edit Category tool

Question asked by mesa2e on May 2, 2008
Latest reply on May 5, 2008 by dgenard
Hi,

I need to extract Categorizing tool from the view details panel to the Content Items panel, so..in the actions group.
I copy the following code from document_details.jsp to browse.jsp:

<div style="padding:4px"></div>

<h:panelGroup id="category-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write">
<a:actionLink id="titleLink3b" value="#{msg.change_category}" showLink="false" image="/images/icons/Change_details.gif"
action="editCategories" actionListener="#{DocumentDetailsBean.setupCategoriesForEdit}" />
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.category}" id="category-panel" facetsId="category-panel-facets" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" rendered="#{DocumentDetailsBean.categorised}"
expanded='#{DocumentDetailsBean.panels["category-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<h:outputText id="category-overview" value="#{DocumentDetailsBean.categoriesOverviewHTML}"
escape="false" />
</a:panel>
<a:panel label="#{msg.category}" id="no-category-panel" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
rendered="#{DocumentDetailsBean.categorised == false}"
expanded='#{DocumentDetailsBean.panels["category-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<h:outputText id="no-category-msg" value="#{msg.not_in_category}<br/><br/>"
escape="false"/>
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="eval_cat">
<a:actionLink id="make-classifiable" value="#{msg.allow_categorization}"
action="#{DocumentDetailsBean.applyClassifiable}"
rendered="#{DocumentDetailsBean.locked == false}" />
</r:permissionEvaluator>
</a:panel>


The application returns the following error:

javax.faces.el.EvaluationException: Cannot get value for expression '#{DocumentDetailsBean.categorised}'
caused by:
javax.faces.el.EvaluationException: Exception getting value of property categorised of base of type : org.alfresco.web.bean.DocumentDetailsBean
caused by:
javax.faces.el.EvaluationException: Bean: org.alfresco.web.bean.DocumentDetailsBean, property: categorised
caused by:
java.lang.reflect.InvocationTargetException
caused by:
java.lang.NullPointerException

Any ideas?

Thanks and regards,
Elena.

Outcomes