Gyroscope (<b:gyroscope />) since 0.9.0

Gyroscope is a component targeted specifically at mobile device. If your smartphone or tablet PC has a motion and rotation sensor, you can send the values of the sensor to a Java bean. This results in a lot of AJAX calls, so be careful with your network capacity. We've set the default value how often the gyroscope reports back to the server to half a second. That's too slow for most real-world applications, so you can configure it yourself using the interval property.

Basic usage

Use the attributes alpha, beta and gamma to define the variables to contain the rotation angle of your mobile device. These attributes contain EL expression pointing to variables of your back-end bean. Every half a second these variables are updated. Like mentioned above, you can modify the update frequency using the interval attribute.

Alpha: 0 (rotation around z-axis - i.e. rotation while the smartphone lies flat on the table)

Beta: 0 (rotation around x-axis)

Gamma: 0 (rotation around y-axis)

Calls: 0

Attribute Default value Description
action (none) The button action, this can be method expression or a string outcome.
actionListener (alternative writing)
(none) A method expression that refers to a method with this signature: void methodName(Action-Event).
ajax false Whether the Button submits the form with AJAX.
alpha (none) Variable to store the alpha value of the gyroscope's rotation
beta (none) Variable to store the beta value of the gyroscope's rotation
disabled false Disables the input element, default is false.
gamma (none) Variable to store the gamma value of the gyroscope's rotation
id (none) Unique identifier of the component in a namingContainer.
interval 500 Specifies the delay (in milliseconds) between each slide.
oncomplete (none) JavaScript to be executed when ajax completes with success.
onrotation (none) A method binding expression referring to a method for handling a valuechangeevent.
process (none) Comma or space separated list of ids or search expressions denoting which values are to be sent to the server.
threshold 15 Specifies the sensitivity of the skae detector.
update (none) Component(s) to be updated with ajax.