Mar
13
2010
The Modeler in LiveCycle ES2 ships with several built-in validation classes, which you can apply to the models properties using the Styles definition. Obviously these standard classes don’t cover all use cases, especially not validation behavior that is specific to a non-US region for example. One of the cool things about Fiber models is that you can extend them using custom ActionScript code, so that you can use your custom validation classes in your projects (I plan to write another article on working with custom methods in your model by overwriting the generated value objects).
So, you can add and apply your own validation classes to the model. You just need to refer to your custom class in the Style validation annotation of the property. First, copy the validation class itself into the correct folder of your Workbench project. That’s also the trickiest part within the LiveCycle Modeler (compared to doing this for the Flash Builder modeler). The FB modeler generates the code into your Flex project folder and you can easily find it, but Workbench doesn’t generate the code in the directory where all your other projects are located (on Vista/Win7 that is C:\Users\username\Workbench ES2\). I am not exactly sure why, but I think because the model generated classes are mostly temp files that don’t have to be checked into the server (downside is that you need to backup modifications of custom classes yourself).
That ‘temp’ folder that stores all model generated classes is much deeper on your disk drive. On my system it’s C:\Users\username\AppData\Roaming\Adobe\LiveCycle\ES2\Guides\generated\. Here you find subfolders structured per LiveCycle application. For your project, find the folder where the generated myModel.as and myModel.swf files are located. Consider this folder the ‘root’ that is used by the compiler, so this is where yoy copy your custom validator classes to.
The last step is to define the style validation annotations within the property. Basically you’d define your property like this:
<property type=”string”>
<style>
<validation>
<annotation name=”ActionScriptValidator”>
<item name=”ValidatorClass”>mx.validators.SocialSecurityValidator</item>
<item name=”allowedFormatChars”>”-()”</item>
</annotation>
</validation>
</style>
</property>
The ValidatorClass item defines the class path, and in this case the ‘allowedFormatChars’ is one of the parameters that is used by that class. Now make sure that Workbench recompiles your class (just move an entity a few pixels, save and the recompile will hapen). Now your custom validator class is compiled into the model itself and you are ready to use the related properties within your guide!
ps: Workbench will inform you on compilation errors if you made errors in your class.
May
12
2009
As many people know, e-Invoicing is gaining a lot of traction these days in order to save money. In general many of the solutions use PDF as the format for the electronic invoice. But there is PDF and PDF. We have created a sample electronic Invoice in PDF format that is more then just a digital invoice, and also focuses on the experience of the recipient in addition to the ability to exchange structured data. Have a look at a video that includes a demo. If you would like to download the sample and play with it yourself, here it is.
Apr
15
2009
A while ago the Adobe Benelux presales team had the pleasure to attend a presentation by Logica, who explained the Form-O-Matic solution. This is a framework which is orginaly built as add-on for SAP Interactive Forms by Adobe, but can be used as well within the standalone LiveCycle Designer on xdp forms. With this framework, you can produce interactive forms in an instant with a minimum of technical know-how.
Logica’s Form-O-Matic is a solution which:
- is smart, because it provides a fast way of developing interactive forms which decrease the likelihood of errors and reduce costs.
- is uniforn, fast and controllable. This is thanks to a unique development method based on the inputting of standard parameters. Doing so the development time is reduced by more than 50%.
- is simple and optimised. Form-O-Matic can be adapted very rapidly to your organisation’s requirements, for example in terms of the house style and design of the form and the naming of each parameter.
- provides simple error detection. By using the debug mode in Form-O-Matic, a single parameter enables all dynamic actions to be displayed in text on a separate screen.
We have seen Form-O-Matic in action, and it can shorten the lead time for development of Interactive Forms, and provide error detection. It reduces the aftercare of the Form, and it is quickly to implement, and easy to use and maintain.
See also the following factsheet about Logica’s Form-O-Matic.
For more information you can reply on this post, or contact Logica directly through erp.nl@logica.com
Jun
20
2008
Disease:
When signing a pdf document in Acrobat/Reader on Vista using the Belgian eid card, it is possible that the signing process is interrupted, and that the Acrobat/Reader gets closed.
Prescription:
The actual cause of this problem is not at all related to the Acrobat/Reader software installed.
Vista uses DEP (Data Execution Protection) which, in combination with the current Belgian eid middleware 2.6, causes the signing process to stop. Also Acrobat/Reader is then stopped.
A workaround is to disable the DEP mechanism. This can be done following
http://www.vistax64.com/tutorials/120778-dep-enable-disable.html
A new version of the Belgian eid card middleware has been tested and works well on Vista (with DEP enabled). This version will be made available on http://eid.belgium.be probably in fall 2008.
Tip to stay healthy:
In the mean time testing other middleware can help as well to see if this works. The quickest workaround is to disable DEP, and upgrade to the new Belgian eid card middleware as soon as it becomes available.
Jun
03
2008
Disease:
What if you would like to present your customers with a more graphical view on tabular data, and generate documents that include pie-charts, bar-charts, etcetera.
Prescription:
LiveCycle ES offers various ways to include charts in the generated forms & documents. This time I would like to highlight one alternative in particular. You can make use of Google Chart to call for the right charts. Google Chart makes use of a REST API. It’s a bit like a webservice, but uses simple URL’s to call remote functionality. If you use LiveCycle Designer ES, you can build the right URL and call the Google Service from for instance an initialize event within the page. When the document is rendered, the resulting image is automatically included in your result. A very simple example of a URL for Google Chart is http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World
Now it is also possible include charts such as the one below in your template design.

A full sample including the chart above can be downloaded here.
Tip to stay healthy:
I have created a sample for you that you can use yourself. The sample is also used for another post regarding organizing XML data in multiple columns, but since this is good data, a chart is right in context there. Download the package (including an xdp and 2 sample xml files) here. This works stand-alone, but also when using the Output service in your LiveCycle Workbench ES. Please send me your results when you create some exciting charts in your templates.
Jun
02
2008
Disease:
Let’s say you are a financial organization and you want to inform your customers about the value of their investment over the next 20 or 30 years in a simple one-page overview. When dealing with XML data the Table assistant is often used to make sure that the data rows are displayed in a nice manner. However, when you are dealing with 20 or 30 rows, the table grows bigger, and uses multiple pages. Here is an example of XML data that you might want to display in a consolidated way.
Prescription:
Besides the Table assistant to organize your XML data rows in a nice matter, Adobe LiveCycle Designer offers other features to handle this kind of data, and display it in a different way. Within the Object Library there is an object called “Content Area”, that offers a lot of flexibity to handle the challenge described above. The result of using Content Area’s look like this:

A sample document of the result can be downloaded here.
Tip to stay healthy:
I have created a template where I have used the technique above to populate 3 columns with data from an XML file. I have prepared a document package that is downloadable that includes the following documents:
- LiveCycle Designer template (You need LiveCycle Designer 8.x)
- 2 XML sample files you can use for previewing (So you can see the different behaviour of the form)
Jun
01
2008
Disease:
From scratch you have created your first PDF Form using Adobe LiveCycle Designer and you have defined an area where you on the fly want to render new form elements (for example an Add button to allow multiple lines of products to be added to an order form by the end user).
You looked at other form examples and learned that you can use scripts like form.subform.instanceManager.addInstance() to create new instances of subforms on the page. However, when you Preview the form the new instance is not added to the page.
Prescription:
The most common mistake – I’ve been there myself – is that newbies forget to save the form as an Adobe Dynamic XML Form.
Tip to stay healthy:
There is a good collection of form samples available from the Adobe LiveCycle Designer Help menu. They are all located in the LiveCycle Designer ES installation folder in the directory \EN\Samples\. Once you get more into scripting your forms you definitely should also check the LiveCycle Designer Scripting Samples that are available at www.adobe.com/devnet/livecycle/designer_scripting_samples.html.