Class Object_


@Bean(typeName="object") public class Object_ extends HtmlElementMixed
DTO for an HTML <object> element.

The object element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin. It is commonly used to embed multimedia content such as Flash applications, PDFs, images, videos, or other HTML documents. While historically used for plugins, modern web development often prefers more specific elements like img, video, audio, or iframe when appropriate.

Examples:

// PDF document Object_ pdf = object() .data("/documents/manual.pdf") .type("application/pdf") .width("600") .height("800") .children(p("Your browser doesn't support PDF viewing.")); // SVG image Object_ svg = object() .data("/images/diagram.svg") .type("image/svg+xml") .width("400") .height("300"); // Embedded HTML page Object_ html = object() .data("/external/page.html") .type("text/html") .width("100%") .height("500"); // Flash content (legacy) Object_ flash = object() .data("/media/animation.swf") .type("application/x-shockwave-flash") .width("800") .height("600") .children( param().name("quality").value("high"), param().name("bgcolor").value("#ffffff"), p("Flash is not supported by your browser.") ); // Image with fallback Object_ image = object() .data("/images/photo.jpg") .type("image/jpeg") .width("640") .height("480") .children(img().src("/images/fallback.jpg").alt("Photo")); // With usemap for image map Object_ mapped = object() .data("/images/map.jpg") .type("image/jpeg") .usemap("#imagemap");

The following convenience methods are provided for constructing instances of this bean:

See Also: