Why Does the "<cm:getProperty>" Tag Display Single Value Results with Brackets Around the Result?
(Doc ID 972144.1)
Last updated on MARCH 07, 2025
Applies to:
Oracle WebLogic Portal - Version 8.1 to 10.3.0 [Release Weblogic Platform to AS10gR3]Information in this document applies to any platform.
Goal
Why does the "<cm:getProperty>" tag display single value results with brackets [] around the result?
The following is a sample scenario to help understand the question:
Assume the following in the WebLogic Portal (WLP) Repository:
- A content item of type image named ape
- Content item is a jpg image named Ape.jpg
- The image has a string property named description with a value of "Big Hairy Ape"
- A content selector named ape.sel
The following code is in a jsp within a portlet:
The jsp produces the following output:
Ape description = [Big Hairy Ape]
Ape description = [Big Hairy Ape]
Ape description = [Big Hairy Ape]
Ape description = Big Hairy Ape
Observe the difference between the two tags:
- <cm:getProperty id="node" name="description" resultId="description"/>
- <cm:getProperty id="node" name="description"/>
The only difference is the resultId attribute.
- Using the resultId attribute displays the property value with brackets [] around it. In this case the name of the property is description.
- Using just the id and name attributes displays the property value without the brackets.
NOTE: In the examples above related information represent a fictitious sample for clarity. Any similarity to actual environments, past or present, is purely coincidental and not intended in any manner.
Note : <cm> tags represent Content Management JSP tags
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |