DynamicImage |
||||
Developer’s Guide Home
Installation and Configuration Common Concepts Components Index Border Layout Panel Calendar Chart Command Button Command Link Composite Filter Confirmation Data Table Date Chooser Day Table Drop Down Field Dynamic Image Folding Panel For Each Graphic Text Hint Label Input Text Input Textarea Layered Pane Level Indicator Popup Layer Popup Menu Select Boolean Checkbox Select Many Checkbox Select One Radio Spinner Suggestion Field Tabbed Pane Tab Set Tree Table Two List Selection Window Focus Load Bundle Scroll Position Ajax Framework Validation Framework Tag Reference API Reference |
Key FeaturesSpecifying the ImageTo add the DynamicImage component to a page, use the <o:dynamicImage> tag. The data of the image to be generated dynamically is defined by the model assigned through the data attribute of the <o:dynamicImage> tag. There are two ways to specify the data model:
In the following example, the data model is defined as a byte array: <o:dynamicImage data="#{DynamicImageData.testImageData}"/>
Note that the DynamicImage component does not specifically process the image data. It serves this data to the client's browser with the appropriate content type, so the the only restriction on the file type is that it should be supported by the client's browser.
Customizing the AppearanceYou can specify the width and height of the DynamicImage component in pixels using the width and height integer attributes. The "alt" text that is shown if images are not loaded by the browser can be specified by the alt attribute. The example below shows the use of the appearance-related attributes: <o:dynamicImage data="#{DynamicImageData.testData}" width="100" height="200" alt="Test DynamicImage"/> You can also specify a style for the DynamicImage component by using the style and styleClass attributes. Client-Side EventsThe DynamicImage component supports a set of standard client-side events such as onclick, ondblclick, onmousedown, onmouseover, onmouseup, onmouseout, onmousemove, onkeydown, onkeyup, onkeypress. Known Issues
|
|||
© 2010 TeamDev Ltd. | ![]() |