Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • IBM Web Experience Factory wiki
  • All Wikis
  • All Forums
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
Community Articles Product Documentation Learning Center IBM Redbooks This category Web Experience Factory 8 Documentation WebSphere Portlet Factory 7 Documentation WebSphere Portlet Factory 7.0.1 Documentation Custom Search Scope...
Search
Community Articles > Web Experience Factory > Samples and Techniques for Web Experience Factory > Camera Builder Samples for the Multichannel Feature Pack for WEF 8.0
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

IBM contributorJonathan Booth
Contribution Summary:
  • Articles authored: 31
  • Articles edited: 53
  • Comments Posted: 13

Recent articles by this author

LJO Base Class sample builder for improving LJO model references

Background and motivation When implementing action code and logic in Web Experience Factory, there are three builders that are commonly used: The Action List builder . This provides pointandclick support for creating a sequence of actions. For example, you can easily assign a value to a ...

Editable Table Sample

Creating Editable Tables with Support for Adding and Deleting Rows This sample shows how to create an tabular input form for editing some repeating data. There are checkboxes for deleting rows, and a button for adding a new row at the bottom. Here is the initial view: Here's the edit form – any ...

Resourced Text Custom Builder

Resourced Text Builder Sample This sample builder lets you apply text from a resource bundle to any number of page locations in a model. This can let you use a single Resourced Text builder in place of a potentially large number of Text builders. The Resourced Text builder looks through all the ...

Text With Image Custom Builder

Text With Image custom builder This is an example of a simple “control” builder that adds a couple of elements to the specified page location. It also shows how a custom builder can be automatically applied to data fields using a Rich Data Definition library along with the Data Field Settings ...

Application Page Sample Builder

This sample builder provides new highlevel builder support for constructing various types of pages in Web Experience Factory (WEF). This builder creates a new page in a model and automates several common page design patterns that can be applied to that page. The builder's inputs are designed to ...

Community articleCamera Builder Samples for the Multichannel Feature Pack for WEF 8.0

Added by IBM contributor Jonathan Booth | Edited by IBM contributor Jonathan Booth on June 17, 2013 | Version 21
  • Edit
  • More Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: mobile, multi-channel, samples
ShowTable of Contents
HideTable of Contents
  • 1 Overview
  • 2 Note about sample package availability
  • 3 Prerequisites
  • 4 CameraTest Model
  • 5 CitizenReports Model
  • 6 CheckDeposit Model
  • 7 Notes on running the samples
  • 8 NOTE on File Upload and Security

Overview

This article describes three samples that illustrate the use of the Worklight Camera builder that's provided with the Multichannel Feature Pack for Web Experience Factory 8.0. The three samples are:

– CameraTest: A simple test model for verifying your configuration for using hybrid camera support.

– CitizenReports: An application for reporting issues such as graffiti or potholes to a city government. This is based on an earlier sample and article posted on developerWorks.

– CheckDeposit: A simple example of an application that captures two pictures (front and back of a check).

Note about sample package availability

The sample package has been temporarily removed from this page for updating. We expect to post an updated package before long.

Prerequisites

To use these samples, you should refer to the article “Getting Started and Enabling Worklight Support” which describes how to configure your environment for using IBM Worklight in combination with Web Experience Factory and the Camera builder. To use the camera support you must be running in the context of an installed hybrid app built with IBM Worklight, and that article describes all the steps involved in setting things up (there are quite a few). The final step in that article refers back to this sample and the CameraTest model. Once you have completed the configuration described in that article, you should import both of the archive files from the feature pack into your project, and you should import the attached sample archive.

CameraTest Model

This model is in the samples/fp80/camera_test folder. It is a very simple model intended just for verifying all the configuration requirements for using the Camera builder. It has two simple pages, one where the Camera builder is used, and one that shows the uploaded picture after taking a picture.

Screenshots of the CameraTest model running on a smartphone device:

CitizenReports Model

This is an application that might be part of a city government web site, and it lets users report issues they encounter such as graffiti or sign damage. When running from an installed hybrid app, they can take a picture of the issue and submit the photo along with other information. The submitted information is stored in a database table.

This model is an updated version of the sample that accompanies this article on developerWorks: http://www.ibm.com/developerworks/mobile/library/mo-aim1301-worklight-portal-4/index.html

This new version has been updated to use the Camera builder, which takes the place of hand-edited JavaScript and several other builders that were previously needed to implement the camera functionality. This version was also updated to use the new layouts and styling from the feature pack.

To create and populate the database table, open the CitizenReportsProvider model, then open the SQL Table Create builder and click Fetch Data Source Names. From the drop-down menu for SQL DataSource, select jdbc/CloudscapeForWEF. If this data source doesn't exist, it will offer to create it for you. Scroll down in the builder and click the Create Table button. This should create and populate the database table.

Screenshots of the CitizenReports model:

CheckDeposit Model

This is a very simple example of an application that lets the user take two pictures for the front and back of a check, such as you would see in a banking app for letting customers deposit checks. This application is intended just as an example of camera use, and it doesn't store the captured data at all.

Screenshots of the CheckDeposit model:

Notes on running the samples

To use the Camera builder with these samples, you will need to have your development environment configured for using Worklight with Web Experience Factory, as described in the “Getting Started and Enabling Worklight Support” article mentioned above.

To use these samples in your project, import the attached zip file into your project using the Import WebSphere Portlet Factory Archive command.

NOTE on File Upload and Security

The location in the WAR (under WEB-INF/) to which files are typically uploaded by default is by necessity a temporary location.

Your application should treat it as such and move the files to the ultimate location after verifying they're appropriate to the application (right file extension(s), appropriate content, etc).



The temporary file upload location in the WAR doesn't make sense for long term storage for multiple reasons, including but possibly not limited to:
- the fact that the WAR on disk may be wiped out and replaced on a redeploy
- Use of a multinode cluster with multiple copies of the WAR on disk(s).

For security reasons, you should not enable file upload directly into the servable content area of the deployed application, to prevent malicious content from being uploaded into a location then downloadable from a browser.
The initial temporary upload location should be located below the WEB-INF folder of the deployed application, specifically for holding temporary uploaded files until the application has validated them and relocated them to a more permanent location.

  • Edit
  • More Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (21)
collapsed Versions (21)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (21)Jun 17, 2013 2:14:03 PMJonathan Booth  IBM contributor
20Jun 17, 2013 1:36:50 PMJonathan Booth  IBM contributor
19Jun 17, 2013 1:20:41 PMJonathan Booth  IBM contributor
18Jun 4, 2013 4:45:13 PMMichael Burati  IBM contributor
17Jun 4, 2013 4:44:34 PMMichael Burati  IBM contributor
16Feb 28, 2013 10:44:40 AMKerry Thompson  IBM contributoradded tags
15Jan 24, 2013 8:55:18 PMJonathan Booth  IBM contributor
13Jan 17, 2013 3:52:19 PMJonathan Booth  IBM contributor
12Jan 17, 2013 3:45:37 PMJonathan Booth  IBM contributor
11Jan 17, 2013 3:37:15 PMJonathan Booth  IBM contributor
10Jan 17, 2013 3:36:53 PMJonathan Booth  IBM contributor
9Jan 17, 2013 3:35:07 PMJonathan Booth  IBM contributor
8Jan 17, 2013 3:34:35 PMJonathan Booth  IBM contributor
7Jan 17, 2013 3:32:12 PMJonathan Booth  IBM contributor
6Jan 17, 2013 3:31:23 PMJonathan Booth  IBM contributor
5Jan 17, 2013 3:30:48 PMJonathan Booth  IBM contributor
4Jan 17, 2013 3:28:47 PMJonathan Booth  IBM contributor
3Jan 17, 2013 3:27:34 PMJonathan Booth  IBM contributor
2Jan 17, 2013 3:26:52 PMJonathan Booth  IBM contributor
1Jan 17, 2013 1:36:23 PMJonathan Booth  IBM contributor
1Jan 17, 2013 3:14:57 PMJonathan Booth  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • BlogsIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkIBM Collaboration Solutions
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use