Purpose
you want to load a picture (image) but in case the server does not have this image, you want to bring up a "fallback" image.
Implementation
Using Design Studio SDK, this component is accepting 2 parameters - picture and fallback picture. by Ajax Request the component is checking the requested picture and displaying fallback in case the requested picture is not available.
Available Properties
| Property Name | Description |
|---|---|
| picture | the picture (image) to display in normal case |
| falbackPicture | the picture (image) to display in case the requested normal case image is not returned from server (response status == 404) |
Scripting Functions
| Scripts | Short Description |
|---|---|
| setPicture(...) | Setter for the "normal case" picture |
| setFallbackPicture(...) | Setter for the fallback picture |
Example Application
An Application with example can be downloaded at the BIAPP Repository:
- DesignStudioBiAppRepository/SDK_FALLBACK_PICTURE at master · KarolKalisz/DesignStudioBiAppRepository · GitHub
- or as ZIP: Release Adding Example Application for Fallback Picture Component · KarolKalisz/DesignStudioBiAppRepository · GitHub
Releases
Source Code & Licensing
This component is for free use. It is under the Open Source Apache Version 2.0 License.
Important MaintenanceNotice (... as I am SAP Employee)
The component is NOT delivered under SAP maintenance license.
You cannot claim any Support on this component from SAP!
The components are created on "private" basis - you can use them as is. I can modify, correct or improve - but there is no obligation to do it. Of course I will try to correct bugs or improve the component as long I can.
Have Fun!
P.S.
This is a "requirement engineering" response to Design Studio - Display a dummy image when searched photo does not exist ;-)
