The camera component allows JSF applications to access a mobile devices’ camera. The component renders a simple button that, when pressed, launches the native camera application on the device. Once a picture has been taken and accepted, the user is returned to the web application. Image data captured by the device is inserted in the calling form and data is submitted to the server via a standard JSF form post.

Value binding is achieved via a Map object so that other important camera image data can be stored along with the image file data. A typical camera component setup looks as follows:

<mobi:camera
    value="#{'#'}{myBean.map}"/>

When the containing form is submitted to the server the setter setMap() is called on the bean, making the camera image available to the application.

Device camera is only accessible if the application is running in an ICEmobile device container, otherwise the component will display a file upload input component.