AnsweredAssumed Answered

Taglibs and browse.jsp extension

Question asked by sergi.l on Jun 19, 2009
Latest reply on Jul 4, 2009 by tara_b
Hi all!

I need to extend the browse.jsp to change the way some special content is opened.
This is a common page for all the spaces and content, so I need to be able to identify when the content of my own type is shown.

Easily, I got the way to identify the parent space containing the current spaces and content, using:
<c:set value="${NavigationBean.currentNode.type}" var="tipoExp"/>
<c:set value="${tipoExp == '{http://www.sos.com/model/content/1.0}mySpace'}" var="folderMySpace"/>

On the other hand, through the "r" variable i can retrieve the properties of the spaces that are drawn in the JSP: ${r.type}
Because of:
<%– Spaces List –%>
<a:richList id="spacesList" binding="#{BrowseBean.spacesRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeSpaces}"
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
value="#{BrowseBean.nodes}" var="r">


But in the bottom part of the JSP, after this tag:
<%– Content list –%>
<a:richList id="contentRichList" binding="#{BrowseBean.contentRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeContent}"
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
value="#{BrowseBean.content}" var="r">

"r" variable is still refering to the space object!! ${r.name} will show the last space's name that has been drawn instead of the content name. Although, the following tags use correctly this variable:
<a:actionLink id="col10-act1" value="#{r.name}" href="#{r.url}" target="new" image="#{r.fileType16}" showLink="false" styleClass="inlineAction" />

Please, how can I identify each content type of the documents that are rendered??
I would need to specify an actionLink or another according to the document's type.

Many thanks!

Outcomes