InfoCenter Home > 4.2.2.3.8.1.1b: Example: JSP .91 syntax: INSERT tag syntaxRegular syntax<insert bean=userProfile property=username></insert> <insert requestparm=company default="IBM Corporation"></insert> <insert requestattr=ceo default="Company CEO"></insert> <insert bean=userProfile property=lastconnectiondate.month></insert> In most cases, the value of the property attribute will be just the property name. However, you access a property of a property (sub-property) by specifying the full form of the property attribute. The full form also gives you the option to specify an index for indexed properties. The optional index can be a constant (such as 2) or an index like the one described in <REPEAT> tag. Some examples of using the full form of the property attribute: <insert bean=staffQuery property=address(currentAddressIndex)></insert> <insert bean=shoppingCart property=items(4).price></insert> <insert bean=fooBean property=foo(2).bat(3).boo.far></insert> Alternate syntax<insert> <img src=$(bean=productAds property=sale default=default.gif)> </insert> <insert> <a href="http://www.myserver.com/map/showmap.cgi?country=$(requestparm=country default=usa)&city$(requestparm=city default="Research Triangle Park") &email=$(bean=userInfo property=email)>Show map of city</a> </insert>
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|