14.4.5 The add Tag The add tag adds (Web hosting servers)

14.4.5 The add Tag The add tag adds an element to the surrounding list. This tag can be used only inside the putListtag. The value can come from a direct assignment (value=”aValue”) or from a bean. One of valueor beanName must be specified. Table 14-6 lists the attributes for the add tag. Table 14-6. Attributes for the add tag Attribute name Description beanName The name of the bean used to retrieve the value. The bean is retrieved from the specified context, if any. Otherwise, the pageContext.findAttribute( )method is used. If beanProperty is specified, retrieve the value from the corresponding bean property. beanPropertyThe bean property name. If specified, the value is retrieved from this property. beanScope The scope used to search for the bean. If not specified, the pageContext.findAttribute( )method is used. The scope can be any JSP scope, “component”, or “template”. In the two latter cases, the bean is searched in the tile/component/template context. content The value is the same as the value attribute. This attribute was added for compatibility with the JSP template tags. direct How the content is handled: truemeans content is printed directly; false means content is included. false is the default. role If the user is in the specified role, the tag is taken into account; otherwise, the tag is ignored (skipped). The role isn’t taken into account if the add tag is used in a definition. type The content type: “string”, “page”, “template”, or “definition”. If the type attribute is not specified, content is untyped, unless it comes from a typed bean. value The value to be added. Can be a Stringor Object. 14.4.6 The get Tag The gettag retrieves content from the tile context and includes it in the page. Table 14-7 lists the attributes for the get tag. Table 14-7. Attributes for the get tag Attribute name Description flush trueor false. If true, the current page output stream is flushed before tile insertion. ignore If this attribute is set to true and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown. name The name of the content to get from the tile scope. This attribute is required. role If the user is in the specified role, the tag is taken into account; otherwise, the tag is
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply