Component SCREENGRABBER

Overview

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!

Attribute summary

Typically used attributes

All attributes are

Positioning

Used inside: ADAPTIVEAREAITEM, BOX, PANE

Attribute details

actionListener

Binding to server side method that processes the events coming from this component.

The attribute value must be an expression.

#{methodBinding}Method binding

adapterbinding

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

attributemacro

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

Comment that can be asigned to any component. The comment is not operationally used.

Any textAny text

configinfo

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

Delay in ms which the client waits with exeucting the activity after being triggered by the response.

0Imediately (default)
10001000ms (1 second)
20002000ms (1 second)

grabtoclientid

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.

grabtype

Area that is grabbed.

panePane in which the SCREENGRABBER is placed.
dialogPopup- or window-dialog in which the SCREENGRABBER is placed.
windowWindow in which the SCREENGRABBER is placed

imagereduction

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;90Reduced to 400x300, 90% Quality
600;400;85Reduced to 600x400, 85% Quality

reference

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.

refOne reference
ref1;ref2Two references
ref1;ref2;ref3Three references

rendered

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.

trueComponent is rendered (default)
falseComponent is not rendered

stylevariant

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

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.