The component SCREENGRABBER is an invisible component that generates a screenshot and sends this screenshot as PNG file to the server side.
It internally is based on the framework "html2canvas" (https://github.com/niklasvh/html2canvas) which does an amazing job to transfer a DOM tree into a canvas-drawing. But: it is not perfect and not all HTML-/CSS-features are recognized in a proper way. So: please test the component within you scenario first!
Typically used attributes
All attributes are
Used inside: ADAPTIVEAREAITEM, BOX, PANE
Binding to server side method that processes the events coming from this component.
The attribute value must be an expression.
#{methodBinding} | Method binding |
Special binding to component adapter object instance on server side. The component adapter must be an instance of IComponentAdapterBinding. For some components (e.g. FIXGRID) there is an extended interface (e.g. IFIXGRIDComponentAdapterBinding).
The attribute value must be an expression.
#{tobedefined} | Binding to IComponentAdapter instance |
Name of macro that is used for generating certain attributes of this component. Please pay attention: the value of this attribute is read one time for each control and cannot be changed afterwards.
The attribute value must not be changed once the component is created.
Comment that can be asigned to any component. The comment is not operationally used.
Any text | Any text |
Configuration information that is attached to this component. This information is not functionally used by CaptainCasa, but may be used for any application specific purpose.
Delay in ms which the client waits with exeucting the activity after being triggered by the response.
0 | Imediately (default) |
1000 | 1000ms (1 second) |
2000 | 2000ms (1 second) |
If set to a certain id, then the screen grabbing result is not sent to the server side, but is stored to on client side with the corresponding id. The image is available by speicifying /clientimagestore:yourId in the IMAGE attribute of the IMAGE component.
Area that is grabbed.
pane | Pane in which the SCREENGRABBER is placed. |
dialog | Popup- or window-dialog in which the SCREENGRABBER is placed. |
window | Window in which the SCREENGRABBER is placed |
Images (png,gif,jpg) can be reduced before being uploaded. This parameter defines the reduction. The definition is a semicolon separated string out of the width, the height and the quality of conversion.
400;300;90 | Reduced to 400x300, 90% Quality |
600;400;85 | Reduced to 600x400, 85% Quality |
Reference to an outside object that is the content behind the component. E.g. a field is representing a certain field of a database table: in this case you could define the value table;column. The reference plays a siginficant role within the attributemacro management.
The attribute value must not be changed once the component is created.
ref | One reference |
ref1;ref2 | Two references |
ref1;ref2;ref3 | Three references |
Flag that indicated if this component is rendered at all. If set to false then the component is not rendered - there is no component data sent to the client.
The attribute value must be an expression.
true | Component is rendered (default) |
false | Component is not rendered |
In CaptainCasa you can define styles definitions for components. A style definition is a definition of a set of default attribute values that are applied to the component. In case you want to differenciate between different usage types of the component you can apply multiple styles - and use the stylevariant attribute to select between.
Trigger value: if the value changes then the component's activity is executed on client side. Use class Trigger on server side for implementations of this property.
The attribute value must be an expression.