Print  
Gray star Gray star Gray star Gray star Gray star --Not rated--
189 Visits 1 Comment
Created
Leah Norris Leah Norris
Kablink Component
  • Teaming

I'm wondering if there is a way to update pre-existing folders with changes that I have made to a folder template.  I adjusted the visible columns on the File Folder template through Site Administration, and I would like to apply this globally to all File Folders that already exist(hundreds of them!). 

 

Thank you in advance.

Workflow
Process State Action
Discussion workflow Active
This entry is currently active
Attachments(0)
Entry History
Tags
 
Replies
Thumbnail Image
Peter Hurley (Novell) Peter Hurley (Novell)

Unfortunately, the templates are only used at the time the folder is created. After the folder exists, there is no connection between the two.

However, it is probably possible to add a custom jsp onto the folder "view" that could override the list of columns and set them to what you want. There is a "bean" called ssFolderColumns that controls the columns that are shown. All you need to do is have your custom jsp reset this bean to contain the list of columns that you want.

For example, if you wrote a custom jsp named "mycolumns.jsp" and put that in the "custom_jsps" directory, then you added that custom jsp to the "view" part of the folder definition using the "Form and View Definition" facility, you could then control what columns are shown. You have to add this custom jsp above the "folder list" element in the definition. An example of what would be in this custom jsp would be:

 

<%@ include file="/WEB-INF/jsp/definition_elements/init.jsp" %>
<jsp:useBean id="ssUserFolderProperties" type="java.util.Map" scope="request" />
<jsp:useBean id="ssBinder" type="org.kablink.teaming.domain.Binder" scope="request" />
<%
Map ssFolderColumns = (Map) ssUserFolderProperties.get("userFolderColumns");
if (ssFolderColumns == null) ssFolderColumns = (Map)ssBinder.getProperty("folderColumns");
if (ssFolderColumns == null) {
ssFolderColumns = new java.util.HashMap();
ssFolderColumns.put("title", "title");
ssFolderColumns.put("comments", "comments");
ssFolderColumns.put("size", "size");
ssFolderColumns.put("state", "state");
ssFolderColumns.put("author", "author");
ssFolderColumns.put("date", "date");
}
%>
<c:set var="ssFolderColumns" value="<%= ssFolderColumns %>" scope="request"/>

 

You will notice that this initializes the columns to be the title, the number of comments on the entry, the size of the file, the workflow state, the author and the date. Other elements from the entries can be shown in a column by adding an item into the ssFolderColumns map using the "data name" of the element.

 

Skip Footer Toolbar