Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.ui.jsp
Class ContentPresenterUtils

    java.lang.Object
      com.bea.content.ui.jsp.ContentPresenterUtils

    public class ContentPresenterUtils

extends Object

Constructor Summary
`ContentPresenterUtils()`

Method Summary
`static String` | `determineBestTitleForNode(javax.servlet.http.HttpServletRequest request, Node node)` This is a utility method that can be used to determine the best title to use for a given node.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContentPresenterUtils

    public ContentPresenterUtils()

Method Detail

### determineBestTitleForNode

    public static String determineBestTitleForNode(javax.servlet.http.HttpServletRequest request,
                                                   Node node)

  This is a utility method that can be used to determine the best title to use for a given node. How this is done is the node's properties are iterated over, and if 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 properties to guess the best title. If there's a binary, we'll use the the file name of the first binary property who's MIME type starts with 'application/', if not then we'll choose any property that contains the word 'title' or 'name' (internationalized strings), if not then we'll use the name of the file of the first binary property we can find, regardless of MIME type. If all else fails, the node's name will be returned. Since this logic is subjective, we encourage editing of this method to tailor it to customer specific needs, rules, or conventions. If any exceptions are encountered, an empty String ("") will be returned. One other thing to note, the values of 'title' and 'name' are i18n'd, and can be found in com/bea/content/ui/jsp/ContentPresenterUtils.properties within the message bundle jar.

  Parameters
    `request` - - The request, used for localization
    `node` - - The Node we want to determine the best title for
  Returns
    The best determined title for the node

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.