cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a list of contents with attributes as a table?

thierrycoq
Champ in-the-making
Champ in-the-making
Hello,

I'm new to Alfresco, and I have followed the tutorials. I've been able to create a new content class and to add attributes to it, and to have it shown on the web client.

However, I wish to display directly the attributes of the objects, preferably as a table if several objects are in the folder. I especially don't want the users to have to click on each object to display the attributes.

Is there a way to do that by simple web client configuration?

Thanks,
Thierry
6 REPLIES 6

thierrycoq
Champ in-the-making
Champ in-the-making
I looked into the web-client-config-custom.xml file where I tried to add a configurator like this :

   <config evaluator="node-type" condition="content">
      <property-sheet>
         <show-property name="RES:MyAttribute" show-in-view-mode="true" display-label="My Own Attribute"
          ignore-if-missing="false"/>
      </property-sheet>
   </config>

This works in the property view, but not in the detail view.

thierrycoq
Champ in-the-making
Champ in-the-making
I decided to check the browse.jsp file in the Tomcat directory.

The "detail" view for contents is clearly described, so I added another column before the action column, with code such as this:

<%– T. Coq, added a column to show a property–%>
<a:column id="col19" style="text-align:left" rendered="#{BrowseBean.browseViewMode == 'details' || BrowseBean.browseViewMode == 'icons'}">
<f:facet name="header">
<a:sortLink id="col19-sort" label="Mon Attribut" value="modified" styleClass="header"/>
</f:facet>
<hSmiley SurprisedutputText id="col19-txt" value="#{r.MyAttribute}">
</hSmiley SurprisedutputText>
</a:column>

I now have the additional column. I'm only missing now the value. I suppose I still have to work on the value = "#r."… something.

Does somebody know about an easier way to do it?

TIA
Thierry

kevinr
Star Contributor
Star Contributor
Change this:
<hSmiley SurprisedutputText id="col19-txt" value="#{r.MyAttribute}">

To this:
<hSmiley SurprisedutputText id="col19-txt" value="#{r['RES:MyAttribute']}">

Thanks,

Kevin

thierrycoq
Champ in-the-making
Champ in-the-making
Kevin,

thanks for the help. I'm now able to show a customized table with attributes.

Is there a means to show different columns depending on the class (or aspect) of the objects in the list?

In other words, is it possible to customize the browse.jsp depending on the objects, (or maybe the folder) being displayed?

Thanks again,
Thierry

sebu
Champ in-the-making
Champ in-the-making
Is there a means to show different columns depending on the class (or aspect) of the objects in the list?

In other words, is it possible to customize the browse.jsp depending on the objects, (or maybe the folder) being displayed?

Is there a solution?

Another question: is it possible to add custom columns without modifying alfresco source file browse.jsp?

This would make management of future upgrades much easier!

kevinr
Star Contributor
Star Contributor
No unfortunately not Smiley Sad It's something we've always wanted to do, but it's never been high enough priority to get done. In the future I expect our web UI will be based more around templates which can be easy customised/replaced.

Thanks,

Kevin