cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Explorer - columns in browse.jsp

john85
Champ in-the-making
Champ in-the-making
Hi all,

Ive decided to customize my alfresco community to suite my company needs.Ive added an extra column in browse.jsp where it will display the document version. copied this code from document-details.jsp


    <%– Primary column for details view mode –%>
      <a:column id="modVersion1" primary="true" width="100" style="padding:2px;text-align:left">
         <f:facet name="header">
            <a:sortLink label="#{msg.version}" value="versionLabel" mode="case-insensitive" styleClass="header" />
         </f:facet>
       <h:outputText id="modVersion1-txt" value="#{r.versionLabel}"/>
      </a:column>


It will now display the document version but my problem now is displaying the author and workflow details. added this code below for author but the column will return no value.



      <a:column id="col3" style="text-align:left">
         <f:facet name="header">
            <a:sortLink label="#{msg.author}" value="author" styleClass="header" />
         </f:facet>
         <h:outputText id="author" value="#{r.author}" />
      </a:column>

What am i missing? just need some advise. Been researching on this but cant seem to find an easy answer.
tried the topic below: http://forums.alfresco.com/en/viewtopic.php?p=22016#22016
One topic says that you need to use [Property Resolver] which im currently googling now. Smiley Very Happy
Much appreciated for replies…

Thanks,
John
4 REPLIES 4

vinaxwater
Champ in-the-making
Champ in-the-making
Hi friend,
Property author not add for node in BrowseBean, view class BrowseBean.java in method queryBrowseNodes add this property

In BrowserBean.java:

node.addPropertyResolver('author', this.resolverAuthor);
In browse.jsp

value="#{r.author}"
Node: define param author and create method resolverAuthor the same other property in BrowseBean.java
Goodluck!

john85
Champ in-the-making
Champ in-the-making
Dear sir,

thank you for your reply.

Ive manage to display the author in the column but my problem now is how do i do that when im getting the values for workflow details? my idea is to display a column where the workflow status is displayed (i.e approved, rejected). i successfully manage to implement the task history pane based on the tutorial of (http://www.wowww.nl/wordpress/2007/09/14/creating-an-alfresco-task-history-the-java-style/). What i would like to do now is make a resolverWorkflowStatus but i cant seem to find the Prop workflow in contentModel. any ideas?


Thanks in advance…

John

vinaxwater
Champ in-the-making
Champ in-the-making
Dear friend,
if you manager workflow it's in WorkflowBean.java

In page jsp:

Get list tasks in process:
value="#{WorkflowBean.taskToDo}" var="r"

Get status:
value="#{r['bpm:status']}"
Note: bpm:status is param defined for workflow

Goodluck.

john85
Champ in-the-making
Champ in-the-making
Dear sir,

i did what you said and it works.. the only problem is it wont reflect status of individual contents. just like below.

ex. correct behavior

name………………………..created………………..status
document 1…………………………………………..Not-yet Completed
document 2…………………………………………..Completed

instead when document 1 status is completed all other document status will also display completed. All their status are the same.
im so close… ~_~


thanks
John