Page parameters are accessible only to the current page and its embedded child pages. A page that is embedded in another page automatically inherits the parameters that are visible to its parent page. Conversely, parameters that are defined on an included page are not automatically visible to its parent pages.

Overriding Parameter Values

If you use a DSP tag such as dsp:include to pass page parameters to a page, these override values inherited from parameters of the same name.

A page can also override an inherited parameter’s value either by resetting it through dsp:setvalue, or by declaring a parameter of the same name with dsp:param.

To change the value of a parameter within a page, use dsp:setvalue. For example:

<dsp:setvalue param="price" beanvalue="member.discount"/>

Precedence of Parameter Values

A parameter’s value is always determined by its most proximate setting. In the following example, the value rendered by dsp:valueof tag varies according to the latest setting of the price parameter:

<dsp:importbean bean="/catalog/tools"/>
<dsp:setvalue param="price" beanvalue="hammers.KLDeluxe.price"/>

<p>KL Hammers now on sale!</p>
<p>KL Deluxe: <strike>
   $<dsp:valueof param="price"/>
</strike>&nbsp;&nbsp;

<dsp:setvalue param="price" beanvalue="hammers.KLDeluxe.discount_price"/>
This week: only $<dsp:valueof param="price"/>!

This might yield the following display:

This diagram described in preceding text

Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices