The <ps:getRestrictedPropertyValues> tag returns a list of restricted values (for example, a list of languages from a "PreferredLanguage" property) for a specific property definition, converted into Strings. These values will be returned as an array of Strings.
Note: All Property Sets tags send results to the same file. If you are checking for results, include this import directive at the top of the page: <%@ page import="com.bea.p13n.property.servlets.jsp.taglib.PropertySetTag- Constants" %>
<tagName attribute="value" />
propertySetName
Required (String) - The name of the property set containing the property.
propertySetType
Required (String) - Type of property set containing the property.
propertyName
Required (String) - The name of the property from which to retrieve the restricted values.
id
Required (String) - The identifier of the variable to hold the list of allowed values for the property, as a String array.
result
Optional (String) - The identifier of an Integer variable that will be created and initialized with the result of the operation.
Possible values:
This example shows how to retrieve and print a list of languages from a "PreferredLanguage" property.
<%@ page import= "com.bea.p13n.property.servlets.jsp.taglib.PropertySetTagConstants"%> <p>Possible values for PreferredLanguage: <ps:getRestrictedPropertyValues propertySetName="Demographics"
propertySetType="USER" propertyName="PreferredLanguage"
id="values" result="myResult"/> <ul> <% if (myResult.intValue() == PropertySetTagConstants.PROPERTY_SEARCH_OK) { for ( int i=0; i<values.length; i++ ) { %> <li><%=values[i]%><% } }%> </ul>