Posts in Category "Uncategorized"

Action Builder, Part 3: Results

Now that we’ve covered the basics of Action Builder and Conditions, lets take a look at Results.

Once all the conditions of for an Action have been met, all the Results are processed, one after the other in the order they are specified. We’ve tried to add Result types that cover a lot of the script we see in forms, and a lot of the questions we see posted to places like the LiveCycle Designer ES forum.

Here is a list of the Results currently available:

200908251412

Many of these are self-explanatory, but a couple warrant a deeper look.

Set the Value of a Field



You can use this result to set a field to a particular value, or, for some types of fields, to special values. When you choose this result row type, you’re prompted to select an object. The options you get for the value you can assign are based on the type of object, and some of them are particularly useful.

When setting the value of a Numeric field, you can specify a numeric value, but you can also specify that you want the value set to the current page number, or the number of pages in the form. When setting a Date/Time field, you can specify a particular date, or you can specify that you want it set to today’s date.

For a Drop-Down List with values specified, you’re able to select the value from a list:

200908251420

Call a Script Object Function



This is a great way to extend what’s possible with Actions without having to write script. A developer can supply a script object that can be dropped into a form, and then called using the Call a Script Object result.

So let’s say I have a Script Object that translates English text into Pig Latin. I want to make it easy for any form designer to use this script. What do I do?

Make it a Script Fragment. A user can then drag that script fragment into the hierarchy to add it to the form, and reference it from an Action.

Here’s what the Result row looks like for a call into a function called fTranslate in a script object called MyUsefulScripts:

200908251442

The parameters you type in here are passed through to the function verbatim. The result can either be ignored, or assigned to a field. In this case we’re taking the result and assigning it to a text field.

The end result?

200908251439

Without the form designer having to write any script by hand, they can use the script in the Script Object to translate text into pig latin.

Note to self, find more compelling demo…

Action Builder, Part 1

What is Action Builder? Action Builder is a new feature coming in the next version of LiveCycle Designer, the LiveCycle form design tool. Action Builder is a tool for building interactivity into dynamic forms that doesn’t require you to write script.

Building interactive forms is nothing new, but it wasn’t an easy task. Most common forms of interactivity required that you write script either in FormCalc or JavaScript. Action Builder writes and maintains this script for you.

Let’s take a look at the UI.

Actionsdialogsimple-1



On the left side is a list of all the Actions defined in your form, and on the right is a list of the Conditions and Results that make up the selected Action. Each Action can have multiple conditions (which can be combined in various ways – more on this in a future post), and can have multiple results.

A new condition row starts out asking you to choose an object that the condition will be based on:

200907310717

Most objects have conditions available. Once you choose one, you’re given the conditions available for that object:

200907310718-1

I picked a button, which only has one condition (“is clicked”) so there aren’t any options to choose. The conditions for this Action will be met when the button is clicked, and when the conditions are met, all of the results defined for the Action execute, in the order they are listed.

When you create a new Result row, you’re prompted to choose the type of result you want this row to be:

200907310719

I’ll choose “Go to a Web Page”, and the row changes into the parameters for that result:

200907310720

The completed Action is given the automatically generated name “Button1.click”, which you can rename. This new action will launch a web page when I click a button on my form.

200907310721

Not exactly rocket science, but even this simple activity required writing script in earlier versions of Designer.

Action Builder is designed to be flexible enough that even if we didn’t specifically think of something you might want to do with it, there’s still a pretty good chance it’s possible. We’re looking forward to seeing what you build with it – and what you wish you could build with it, so we can extend it in future versions.

HTTP POST Update

I haven’t posted in a little while, but I’m going to try to get back into it. Famous last words, I know, but I’ll start with a post with some real content in it.

Quite a few people have commented on an entry I posted back over a year ago, where I talk about the data format that’s POSTed from a form to an HTTP server.  The data format is supposed to look something like this:

TextField1=test1&TextField2=test2&RichTextField=&ListBox1=&RadioButtonList=

However, some of you said that you were getting data that looked like this:

TextField1=test1TextField2=test2RichTextField=ListBox1=RadioButtonList=

This was actually a bug in Acrobat 8.0, and is fixed in the 8.1 update. If you’re running Acrobat 8.0, allow the Adobe Updater to install Acrobat 8.1 and you’ll get the data in the correct format.


LiveCycle Designer 8

Acrobat 8 has been announced, and we’re in the Acrobat 8 Professional box so we share a little bit of that spotlight.

There’s a lot to talk about with version 8.  One of the big new features is a new type of form designed for users who need to take an existing form (either scanned or generated in some other program) and make it an interactive, fillable form while preserving the exact look of the original form.  Just what you’d expect from PDF.  We’ll be talking about this more once more infomation on the product has been released.

On a related note, it’s great to see Breeze getting the spotlight through it’s rebranding as Acrobat Connect.  Breeze is the best collaboration tool I’ve used.

MAX

I’m not going to MAX this year.  I went last year, though, and had a great time. 

Last year’s MAX experience for me was mostly about discovering that the Flash player has become a serious virtual machine and runtime for even CPU-intensive applications, thanks to its ability to compile ActionScript down to native code.  There’s even a Commodore 64 emulator for Flash Player 9

And it was about discovering Flex and Flex Builder, the Eclipse-based IDE that you use to build Flex apps.  I had no experience with Flex before MAX; now it’s near the top of my “things to dive into more deeply” list.

Last year, MAX happened just before the Adobe / Macromedia merger was finalized, so there wasn’t any official Adobe sessions; this year, MAX has a track for Adobe LiveCycle Technologies.

This year Flash and Flex folks will have the opportunity to discover LiveCycle the way we LiveCycle folks had the opportunity last year to discover Flash and Flex.

If you’re in that boat, don’t miss Matt Butler’s session on Adobe’s Core LiveCycle Architecture and Hands On Deployment, and Sanga Viswanathan’s session, LiveCycle 8: What’s Coming

Flex 2 is Done!

This is very cool. Flex is the best way to create a rich Internet application. I love the Flex Builder IDE, and the fact that Flex’s MXML markup makes it really easy to create a rich UI with a lot of the interactivity that you have to work really hard to get out of AJAX, and with a responsiveness that you just cant get anywhere else.

It can seem like we have two products competing for the same sort of market, in that we have Form Designer and PDF forms, and then we have Flex Builder and RIA’s. But these are really two different things, and serve different purposes.

It comes down to the difference between a “Dynamic Document” and a “Rich Internet Appplication”.

With Flex, the focus is on the application. The application loads, and then maybe fetches some data, or maybe lets you create some data; but what matters is the application.

With PDF Forms, the document is the focus. You can sign the document, encrypt it, run validations on the data it contains, and so on, but it all revolves around the document.

You wouldn’t build a shopping cart with Form Designer, but you wouldn’t create an invoice with Flex. Each tool has its place.

There’s going to be some real power around the combination of these two.

Submit to PHP

A common request in the comments on the HTTP Submit post is how to retrieve the values from PHP, so I’ve created a simple sample just to demonstrate that clearly.

PHP Submit Sample

This sample has a couple of text fields which, when submitted using either of the buttons on the form, echoes the text back to you by the PHP code on the server. The server code is also included in the form.

No Really, Scripting

I trust you’re back, and you’ve installed Designer. Welcome back.

If you haven’t got a Form Designer to install, you can find a free Tryout version over here.

All I wanted to mention today is one tip regarding scripting.

Often I fire up Designer to try something out, and today I was having trouble. I added a button to my form, added a text field, and added some script that would run when the button was clicked. But when I previewed the form and clicked the button, nothing happened.

When I saved the form as an XDP file, however, and then previewed and clicked the button, it worked fine.

This was a new computer I was trying this on, and I’d forgotten an important setting. In the Options dialog, the first option on the first page of options is “Default file type for new forms”.

fileoptions.png

If this is set to the default of “Static PDF Form File”, then your scripts won’t run. If you plan to be doing any scripting in Designer, then set this to “Dynamic PDF Form File”.

The XFA forms that Designer creates don’t work in old versions of Acrobat Reader, which is why this option is off by default. But if you’re developing interactive forms, you’ll probably want your users using a recent version of Reader, and having this option set to static forms by default means whenever you create a new form, none of the scripts you’re writing will work until you actually save it to disk as an XDP file or interactive form.