bileni

Importing a LiveCycle ES process into LiveCycle ES2

August 3rd, 2010

By Bilen Imam – Consultant

LiveCycle ES2 has been out for a bit now and there have been many vast improvements to software that have caused a few programmers let out a sigh of relief. Just to name a few of my favorite new features:

  • Assign Multiple Tasks
  • Action profiles
  • Able to invoke a process using the REST pattern
  • Integration of the Adobe Data Model

These are just a few of the improvements that have made developing in LiveCycle easier.

However I have noticed a slight little irritation. In my excitment, I proceeded to create archives of the processes that I had in my LiveCycle ES server and imported them to the newer LiveCycle ES2 (to be able to do this you must make sure to have selected the option when installing LiveCycle ES2). The import worked fine, my processes were available to invoke….however I could not fetch my process to alter it and take advantage of the new features! Unfortunately simply importing the LCA does not allow you to change the processes. Luckily there is a detailed document out there that describes what to do;

http://help.adobe.com/en_US/livecycle/9.0/leverage_legacy_solutions.pdf

Theres also a video that you can watch from here
http://my.adobe.acrobat.com/p73132900/

bileni

Having your PDF connect to a webservice without databinding

July 16th, 2010

By Bilen Imam – Consultant

One of the most powerful features of PDFs is the ability to make webservice calls to pull in information as well to send information to some back end system.

Traditional, this is done through creating a data connection through the Data View palette and binding the request and response nodes to fields on the form.

dataConnection

However, using databinding can be a little restrictive in the fact that you have to actually bind to atleast one field for each webservice. This could potential result in you having alot of hidden fields on your form. However, there is a way to create a webservice without having to bind to a field. The alternative allows you to make a webservice call and have the results stored in a variable instead, all done through scripting. An added bonus is that you also have the ability to create webservice calls dynamically.

First things first, you have to know the address of the webservice. You may have made it through some other server, but if you had created it using LiveCycle (i.e. a webservice endpoint), you can either hard code the address in (in which case skip to the Note), or you can dynamically establish the location of the server. However, the following instructing on how to dynamically establish the server address will only work if you are rendering the form from Workspace;

var server = event.target.URL;

Once you open the form in WORKSPACE, the server will contain an address. This address will contain the address of the server, it’ll be in a format of;

http://lcserver:8080/workspace/tksdfjh

So what you’ll have to do is to strip out the first part of the address;
myServer = server.substring(0,server.indexOf(”/”,8));

And you just tack on the endpoint to the server;
var myUrl = myServer + “/soap/services/myWebService?wsdl”;

Again, this makes it pretty handy if your webservice resides in a test server and a production server (as an example) and you’re transferring the form between servers and you don’t want to have to keep changing the address.

******
Note: if your webservice is not on the LiveCycle server, and the address is the same no matter where you use the form, you can start from here
******

And then once you have the address you make a connection to it

var connection = Net.SOAP.connect(myUrl);

Now once you have this connection, you can call the methods of the service using the dot notation;

var result = connection.myMethod({”paramenter1″: value, “parameter2″:value2});

Note the way that the parameters are passed in.

Now that you get the result back, you have to know what type of data is coming back (i.e., is it a complex or simple object). But you now have the ability to manipulate that object anyway you wish, without having make a binding.

oliverm

Flex Camp Roundup

June 25th, 2010

June 25, 2010

On June 10th, 2010 we hosted the third Toronto Flex Camp. Ed Van Beilen and myself are co-managers of the Toronto Flex User Group, which is in its fourth year and sporting over 1000 members in the GTA.

Unlike previous camps, this year’s event included hands-on sessions and spanned a full afternoon and evening. We were fortunate enough to have two Adobe representatives (Lee Brimelow and Renaun Erickson) lead several sessions, including the keynote. We also had a few people from our local Flex User Group step up and present: Jason Broughton, Andrew Rybak, Clement Wong and Derek Santos.

In presenting this event, we learned a few lessons and gathered some interesting statistics that I’d like to share.

Significantly, this is the first time we’ve charged for entry into a Toronto Flex Camp. To our delight, we did not receive a single complaint about the $25 CAD entry fee. By charging this nominal fee, we were able to increase the quality of the venues and catered fare.

Financially, we did a bit better than break even. This small surplus will be used to offset the costs of future regular meetings, which New Toronto Group has traditionally absorbed.

The Numbers

Of the 120 people who registered on the site, 112 completed the payment process.

Of the 112 paid registrants, 83 showed up, and we had 2 additional registrations at the door (despite our pleas that people register in advance) for a total of 85 attendees (76%).

Out of the 85 attendees, 61% filled out the survey and qualified to be in the prize draw.

Speaking of the survey, here’s how you rated the event:

  • Quality of the presentations: 82%

  • Usefulness of the event: 76%

  • Overall quality of the event: 83%

  • Would attend another Flex Camp: 94%

Looks like we did fairly well with the new format. That last number is probably the most important for us as we look at the feasibility of future Flex Camps.

Your Feedback

Everyone seemed pleased with the venue and location, but we definitely needed more signage to direct people to the various venues. Thanks again to Brian Lesser and the folks at Ryerson for their invaluable help.

You also gave us some valuable feedback about the sessions themselves.

Foremost in the comments we received was to have more sessions, especially hands-on. Of course, the challenge is to find enough session leaders, so we may be pushing the local Flex community to help out more in the future.

Many of you also asked that the sessions be shorter in duration, perhaps limited to an hour. No argument here; just a matter of getting enough speakers to fill all those hours;)

We seem to have struck a good balance between introductory and advanced topics. Like in politics, you know you’ve done the right thing if an equal number of people on both sides complain. In our case, we had just as many people comment that they wanted more fundamental topics as those that wanted more advanced ones.

Looking Forward

One surprise we had in the Management Session (led by Andrew and me) was the intense interest in mobile. In fact, about three slides into our RIA presentation we decided to completely change gears and focus the discussion on the upcoming Flash/mobile releases. No doubt that there will be more mobile content in future meetings.

Overall, Flex Camp 3 Toronto was a great success and we look forward to doing another one in the future. Please check the Toronto Flex User Group website for Fall meeting announcements and job postings at http://www.torontoflex.org. And if you’d like to lead a future session or have an idea for a meeting topic, please contact Ed or me via the link on the site.

Finally, thanks to all who attended and gave us such encouraging feedback.

See you in the Fall!

June 25, 2010

Flex Camp Roundup

On June 10th, 2010 we hosted the third Toronto Flex Camp. Ed Van Beilen and myself are co-managers of the Toronto Flex User Group, which is in its fourth year and sporting over 1000 members in the GTA.

Unlike previous camps, this year’s event included hands-on sessions and spanned a full afternoon and evening. We were fortunate enough to have two Adobe representatives (Lee Brimelow and Renaun Erickson) lead several sessions, including the keynote. We also had a few people from our local Flex User Group step up and present: Jason Broughton, Andrew Rybak, Clement Wong and Derek Santos.

In presenting this event, we learned a few lessons and gathered some interesting statistics that I’d like to share.

Significantly, this is the first time we’ve charged for entry into a Toronto Flex Camp. To our delight, we did not receive a single complaint about the $25 CAD entry fee. By charging this nominal fee, we were able to increase the quality of the venues and catered fare.

Financially, we did a bit better than break even. This small surplus will be used to offset the costs of future regular meetings, which New Toronto Group has traditionally absorbed.

The Numbers

Of the 120 people who registered on the site, 112 completed the payment process.

Of the 112 paid registrants, 83 showed up, and we had 2 additional registrations at the door (despite our pleas that people register in advance) for a total of 85 attendees (76%).

Out of the 85 attendees, 61% filled out the survey and qualified to be in the prize draw.

Speaking of the survey, here’s how you rated the event:

  • Quality of the presentations: 82%

  • Usefulness of the event: 76%

  • Overall quality of the event: 83%

  • Would attend another Flex Camp: 94%

Looks like we did fairly well with the new format. That last number is probably the most important for us as we look at the feasibility of future Flex Camps.

Your Feedback

Everyone seemed pleased with the venue and location, but we definitely needed more signage to direct people to the various venues. Thanks again to Brian Lesser and the folks at Ryerson for their invaluable help.

You also gave us some valuable feedback about the sessions themselves.

Foremost in the comments we received was to have more sessions, especially hands-on. Of course, the challenge is to find enough session leaders, so we may be pushing the local Flex community to help out more in the future.

Many of you also asked that the sessions be shorter in duration, perhaps limited to an hour. No argument here; just a matter of getting enough speakers to fill all those hours;)

We seem to have struck a good balance between introductory and advanced topics. Like in politics, you know you’ve done the right thing if an equal number of people on both sides complain. In our case, we had just as many people comment that they wanted more fundamental topics as those that wanted more advanced ones.

Looking Forward

One surprise we had in the Management Session (led by Andrew and me) was the intense interest in mobile. In fact, about three slides into our RIA presentation we decided to completely change gears and focus the discussion on the upcoming Flash/mobile releases. No doubt that there will be more mobile content in future meetings.

Overall, Flex Camp 3 Toronto was a great success and we look forward to doing another one in the future. Please check the Toronto Flex User Group website for Fall meeting announcements and job postings at http://www.torontoflex.org. And if you’d like to lead a future session or have an idea for a meeting topic, please contact Ed or me via the link on the site.

Finally, thanks to all who attended and gave us such encouraging feedback.

See you in the Fall!

Tim

iPad Video

May 27th, 2010

The iPad is coming to Canada tomorrow. So what are you going to watch on it? The chances are good that whatever it is, the video portion will be delivered by a company called Brightcove. Brightcove has already helped some of the largest content providers in the US, such as The New York Times, to provide streaming video to consumers of its media offerings. In Canada, Rogers Communications is among a growing list of companies that utilize its services; check out http://video.citytv.com to see BrightCove in action. Another happy customer is the well-known broadcaster TVO.

Recently Brightcove announced suppport for WebM, a new open source video web media project and new open video standard. This standard is supported both by Adobe’s flash and by the new HTML5 that is just beginning to appear. Brightcove’s approach to video content is to allow one piece of source content to be consumed by multiple devices, including the iPad, and has a multitude of features that permit the insertion of advertising support for broadcast streaming video.

NTG is quite excited about the new world of mobile publishing and video. If you’d like to talk more about it give us a shout at Contact Us.

oliverm

Flex Camp 3 Toronto

May 17th, 2010

Flex Camp 3 Toronto is an afternoon/evening event for RIA developers and anyone else interested in Adobe Flex. We’ve engaged some world-class presenters for this event, including Adobe’s Lee Brimelow and Renaun Erickson.

Whether you’re just starting out or a seasoned pro, there will be hands-on as well as lecture-style demonstrations that are designed to engage you.

Please note that we will be charging a modest $25 CAD fee (includes GST) to offset the costs of food and first-class venues. We’ll also be giving away copies of FDT Pure to every attendee, as well as a chance to win a full license to Flash Builder 4 Premium!

The event is filling up quickly. If you’re interested in attending, we recommend that you sign up soon!

Head over to http://www.torontoflex.org to register.

bileni

Checking the Digital Signature on a PDF form

May 14th, 2010

By Bilen Imam – Consultant

When designing a form using LiveCycle Designer, you have the ability to insert a digital signature field. This in turn enables the user to insert a digital signature into the form. This provides assurances that the form has not been altered since the document has been signed, and allows Acrobat Reader to verify the identity of the person signing the form.

However, you may sometimes need to verify the signature before the form is sent to be processed (say through a electronic submission to a LiveCycle server). You may want to check if the form has been signed at all, or check the validity of the signature. To do this with Javascript you need to first access the field.

var digSig = event.target.getField("form1[0].#subform[0].Submit[0].Signature[0]");

It is important to use the fully qualified path to the field. This can be accomplished by using the ctrl+click feature of Designer.

Once that is done, you can use the variable to check the status of the signature field;

var status = digSig.signatureInfo().status;

The possible values you can get are

-1: not a signature field
0: signature is blank
1: unknown status
2: signature is invalid
3: signature is valid, identity of signer could not be verified
4: signature and identity of signer are both valid

Derek Santos

Hello World with the BlackBerry Mobile Platform

May 1st, 2010

By Derek Santos – Consultant

The Mobile Market is extremely competitive these days, and it’s important for customers to deploy their applications across multiple mobile platforms. The BlackBerry platform, like Android, is Java based. This lends itself nicely to existing Java and/or Android developers.  In this article, we’ll take a look at creating a HelloWorld application using the BlackBerry Mobile Platform.

Downloading and installing the necessary tools

First, you will need to download the BlackBerry Eclipse Plug-in here.

It is important to note that versions of the BlackBerry platform 4.x and earlier are considered legacy and use what’s called the “BlackBerry JDE(Java Development Environment)”. Versions 5.0 and later now use the BlackBerry Eclipse Plug-in. This article assumes you have Eclipse 3.5 installed.

Once you’ve downloaded the installer, simply run it and point it to your existing eclipse installation.

Creating your first BlackBerry project

To create your project, go to New -> Project.

Then select BlackBerry Project.
BlackBerry Project Selection

Click “Next”. Give your project a name then click “Finish”.

Configuring your project

You now have a BlackBerry project setup. You should notice that an application descriptor file was created for you. This descriptor file contains the Meta information about your project. It can be found under the root of your project.
BlackBerry Application Descriptor

Open this file and enter in information about your project.

BlackBerry Descriptor Configuration

Creating your main application class

Now that your project is configured, you’ll want to create a new Java class and have it extend UIApplication. The UIApplication class is your main entry point into the application. This class will also have your static main() function.

BlackBerry Descriptor Configuration

Once you’ve created your class, add the code to your static main() method as shown below. The enterEventDispatcher() method indicates that your main application thread will execute any drawing and event-handling code.

public static void main(String[] args) {
    HelloWorld application = new HelloWorld();
    application.enterEventDispatcher();
}

At this point, you will have an empty BlackBerry Application.

Creating your applications main screen

BlackBerry applications draw screens on a stack. To initialize this stack, we need to create a class that extends the “MainScreen” class. Create a new Java class and configure it as seen below.

BlackBerry Descriptor Configuration

After creating the class, create a default constructor and add the following code to it.

public SampleMainScreen() {
    super();
    long options = LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH;
   
    LabelField title = new LabelField("HelloWorld Sample", options);
    setTitle(title);

    RichTextField richTextField = new RichTextField("Hello World!");
    add(richTextField);
}

Now that you’ve created your main screen, you are ready to add it to your application.

Adding your main screen to the application

To have your application display your main screen, you need to “push” the screen onto the applications stack. To do this, add this line of code to the HelloWorld applications constructor. Also make sure you are calling super().

public HelloWorld() {
    super();
    pushScreen(new SampleMainScreen());
}

Running your application

To run your BlackBerry application, simply click the Run dropdown, go to Run As -> BlackBerry Simulator.

Run As BlackBerry Simulator

The first run will take some time as the Simulator initializes. Once the Simulator is loaded up, you need to navigate to the application. You can do this by click the BlackBerry menu button then going to Downloads -> My First Application.

BlackBerry Downloads Folder

Once you click on “My First Application”, your should see “HelloWorld” printed on the screen.

Conclusion

This concludes creating a simple application using the BlackBerry Mobile Platform. For further reading, please see the BlackBerry Developer Zone.

Thanks for reading!

alaint

Open Source Media Framework (OSMF) Helloworld example in Flex 4

April 21st, 2010

By Alain Thibodeau – Consultant

If you have ever built a video player from scratch you know the hard work that is involved. The Open Source Media Framework helps developers to create video players using best practices and avoid solving the same problems over and over, saving time and money. You can learn more about OSMF at this website.

OSMF ships with Flex 4

OSMF comes with Flex 4.  This is great, but the included version is an earlier version of OSMF. At this writing, the version of OSMF is v0.93 sprint 10. This version includes several changes since the version that ships with Flex 4. You’ll need to remove the osmf.swc from the Flex 4 SDK and add the proper osmf.swc in your project libs folder. Download the latest OSMF files here.

Making the example work in Flex 4:

1. Make the HelloWorld.as extend UIComponent instead of Sprite.
2. Create a project MXML file and create an instance of the HelloWorld class in either AS3 or in MXML. I show both ways below, but I’ve commented out the MXML way of doing it.

Example code: main.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:Application
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:local="*"
    minWidth="955"
    minHeight="600"
    creationComplete="init(event)"
    >
    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;
            public var helloWorld:HelloWorld
           
            protected function init( event:FlexEvent ):void {
                helloWorld = new HelloWorld();
                addElement( helloWorld );
            }
        ]]>
    </fx:Script>
    <!--<local:HelloWorld />-->
</s:Application>

Example code: HelloWorld.as

/*****************************************************
 *
 *  Copyright 2009 Adobe Systems Incorporated.  All Rights Reserved.
 *
 *****************************************************
 *  The contents of this file are subject to the Mozilla Public License
 *  Version 1.1 (the "License"); you may not use this file except in
 *  compliance with the License. You may obtain a copy of the License at
 *  http://www.mozilla.org/MPL/
 *
 *  Software distributed under the License is distributed on an "AS IS"
 *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 *  License for the specific language governing rights and limitations
 *  under the License.
 *
 *
 *  The Initial Developer of the Original Code is Adobe Systems Incorporated.
 *  Portions created by Adobe Systems Incorporated are Copyright (C) 2009 Adobe Systems
 *  Incorporated. All Rights Reserved.
 *
 *****************************************************/
package {
    import flash.display.Sprite;
   
    import mx.core.UIComponent;
   
    import org.osmf.containers.MediaContainer;
    import org.osmf.elements.VideoElement;
    import org.osmf.media.MediaPlayer;
    import org.osmf.media.URLResource;
    /**
     * The simplest OSMF application possible.
     *
     * The metadata sets the SWF size to match that of the video.
     **/
    [SWF( width="640", height="352" )]
    public class HelloWorld extends UIComponent {
        public function HelloWorld() {
            // Create the container class that displays the media.
            var container:MediaContainer = new MediaContainer();
            addChild( container );
           
            // Create the resource to play.
            var resource:URLResource = new URLResource( "http://mediapm.edgesuite.net/strobe/content/test/AFaerysTale_sylviaApostol_640_500_short.flv" );
           
            // Create the MediaElement and add it to our container class.
            var videoElement:VideoElement = new VideoElement( resource );
            container.addMediaElement( videoElement );
           
            // Set the MediaElement on a MediaPlayer.  Because autoPlay
            // defaults to true, playback begins immediately.
            var mediaPlayer:MediaPlayer = new MediaPlayer();
            mediaPlayer.media = videoElement;
        }
    }
}
alaint

Let’s not forget about the projector!

April 16th, 2010

By Alain Thibodeau – Consultant

No, I am not talking about the projector for your next meeting, but the Flash projector. A Flash projector allows a user to view the flash content on their local computer instead of in a browser. It seems that with the coming of Flex and Air, the Flash projector has taken the back seat. But, there are some times when creating a projector is a good option. Projectors are platform dependent and can be published from the Flash IDE for PC or MAC.

In the Flash IDE you specify to export a projector in the publish settings and click publish.

export

If you don’t have the Flash IDE and work in Flex, you can also create a projector. Assuming you have the flash player installed on your computer, double click on your SWF file then select the file menu and Create Projector. Give your projector a filename and click the save button.

export2

Projector options are set using fscommand and allow you to create full screen projectors and adjust scaling for example. You can use fscommands in your Flex or Flash code. For more information about fscommand and what it can do, read up on the docs here.

Derek Santos

Quality Assurance & Testing with Flex 4

April 15th, 2010

By Derek Santos – Consultant

Quality is becoming more and more of a concern for Rich Internet Applications. As these applications become more popular and equally more complex, it is important to take quality concerns just as seriously. With Flex 4, it has become easier to adopt a workflow that can produce applications at a level of quality that end users and stakeholders can expect. In particular, FlexUnit 4 is great tool that is well suited to Test Driven Development.

The slides available below are from a presentation I have delivered at the Toronto Flex User Group. The slides cover Quality Assurance in general, but also which tools are suited to the job. FlexUnit 4, Ant, CruiseControl, FlexCover and FlexPMD make a great combination and when integrated together can result in a highly productive and quality driven workflow.

You can download the slides and source code below.

QA & Testing Slides
Source Code