DynamicImage |
||||
|
Developer’s Guide Home
Installation and Configuration Components Index Calendar Chart Confirmation Data Table Date Chooser Drop Down Field Dynamic Image Folding Panel Graphic Text Hint Label Popup Layer Suggestion Field Tab Set Tabbed Pane Tree Table Two List Selection Focus Load Bundle Scroll Position Ajax Support Validation Framework Tag Reference |
Key FeaturesSpecifying the ImageTo add the DynamicImage component to a page, use the <q:dynamicImage> tag. The data of the image to be generated dynamically is defined by the model assigned through the data attribute of the <q:dynamicImage> tag. There are two ways to specify the data model:
In the following example, the data model is defined as a byte array: <q: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: <q: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. |
|||
| © 2008 TeamDev Ltd. | ||||