Oracle Fusion Middleware JSP Tag Java API Reference for Oracle WebLogic Portal
10g Release 3 (10.3.2)
E14256-03

Content Presenter Display Template Support Functions
Function determineBestTitleForNode

String determineBestTitleForNode(javax.servlet.http.HttpServletRequest request, com.bea.content.Node node)
Description

This is a utility method that can be used to determine the best title to use for a given node. The properties of the node are iterated over, and if property a with the name "title" is found, the value of that property will be used. If not, a property with the name "name" will be used. If neither of these are found, then we check a couple of other property name possibilities to guess the best title. If there is a binary, we will use the the file name of the first binary property whose MIME type starts with "application/", if not then we will choose any property whose name that contains the word "title" or "name" (internationalized strings), if not then we will use the name of the file of the first binary property we can find, regardless of MIME type. If all else fails, the name of the node itself will be returned. Since this logic is subjective, we encourage editing of this method (source supplied in /{yourwebapp}/src/public/com/bea/content/ui/jsp/ContentPresenterUtils.java) to tailor it to customer-specific needs, rules, or conventions. If any exceptions are encountered, an empty String ("") will be returned. The string values of "title" and "name" are internationalized, and can be found in com/bea/content/ui/jsp/ContentPresenterUtils.properties within the message bundle jar. Localized .properties files can be created with translations.

Examples

The output of this function call can be displayed using Expression Language

${templates:determineBestTitleForNode(pageContext.request, node)}


Function Information
Function Classcom.bea.content.ui.jsp.ContentPresenterUtils
Function Signature String determineBestTitleForNode(javax.servlet.http.HttpServletRequest request, com.bea.content.Node node)
Display NameNone


Oracle Fusion Middleware JSP Tag Java API Reference for Oracle WebLogic Portal
10g Release 3 (10.3.2)
E14256-03

Copyright © 2010, Oracle. All rights reserved.