You can specify to display a component property with the dsp:valueof
tag. To insert the <dsp:valueof>
tag:
In the Available Page Values Editor (visible in the Dynamic Element Editor panel), go to the Imported Beans tab and expand the desired component to list its properties.
Select the property to display and click Insert.
The
dsp:valueof
tag appears in the Text Editor.To include a default value, remove the final back slash, add an end tag (
</dsp:valueof>
), and insert your default value between that start tag and end tag.
For example:
<%@ taglib uri=http://www.atg.com/taglibs/daf/dspjspTaglib1_0 prefix="dsp" %> <dsp:page> <dsp:importbean bean="/samples/Student_01"/> <html> <body> Name: <dsp:valueof bean="Student_01.name"/><p> Age: <dsp:valueof bean="Student_01.age"/><p> </body> </html> </dsp:page>
Note: Because the component /samples/Student_01
is imported, the inserted dsp:valueof tag
includes only the component and property names and excludes the pathname.