Wednesday, December 10, 2008

Flex DocumentReference and LiveCycle 8.2

If you plan to use a DocumentReference to send a file to LiveCycle, such as an xml file, you need to ensure that you're using the latest adobe-remoting-provider.swc found xxx\LiveCycle8.2\LiveCycle_ES_SDK\misc\DataServices\Client-Libraries.

Previous versions of the DocumentReference allow for xml, but with 8.2, you need to send your document within the text property.

Look at "LCDS-325" at http://help.adobe.com/en_US/livecycle/8.2/lcds_releasenotes.html if you want more details or plan to fix this change on the LiveCycle side, but at the end of the day, it's easier to simply update your swc and text property.

Get current user for a workspace enabled flex application

Here is a sample code snippet if you have to pull user information or user credentials from the signed-in workspace user when a flex application is loaded as a process/form in workspace.

import lc.core.ISessionManager;
import lc.domain.SessionMap;
import mx.utils.ObjectUtil;

var session : SessionMap = SessionMap( Application.application.session );
var sessionManager : ISessionManager = ISessionManager( session.getObject( "lc.core.ISessionManager" ) );

trace( ObjectUtil.toString( sessionManager.authenticatedUser ) );

You'll see that authenticated user is mapped to lc.domain.User. You'll need the latest fds.swk and fds_rb.swc for this. Below is an example of what you'll get back.

(lc.domain::User)#0
address = (null)
description = (null)
displayName = "Super Administrator"
domain = (null)
email = ""
emailAliases = (null)
firstName = (null)
groups = (null)
initials = (null)
isOutOfOffice = false
lastName = (null)
locale = (null)
oid = "8D1446F6-A3DD-F4C2-378B-1B46089140AA"
session = (null)
telephone = ""
timezone = (null)
userid = "administrator"


Tuesday, November 11, 2008

MySQL Configuration with Adobe LiveCycle ES Turnkey

I just did a fresh install of the Adobe LiveCycle ES Update 1 Turnkey (8.2) and ran into an issue when trying to connect to the MySQL instance it installs using the basic MySQL GUI tools. If you receive "either the server service or the configuration file could not be found. startup variables and service section are therefore disabled" when opening the MySQL GUI Administrator tools, then check out the following steps:
  • Backup C:\Adobe\LiveCycle8.2\mysql\my.ini
  • Launch the MySQL Administrator
  • When prompted to sign in, hold the Ctrl key and click the "Skip" button that appears
  • Click on Startup Variables, and hit "Choose Option File" at the bottom and select C:\Adobe\LiveCycle8.2\mysql\my.ini
  • Then go back to the Server Control and make sure that "Config Filename" is correct under the "Configure Service" tab.

You should then be able to stop and start the services and connect with the correct password. You can normally pull your username password from C:\Adobe\LiveCycle8.2\jboss\server\all\deploy\adobe_ds.xml if you're not sure what it is after going through the generic install.

This however doesn't solve all my issues, as my "default" account doesn't have the same privileges as say the root account would, but then again, the root account doesn't seem to exist...

http://bugs.mysql.com/bug.php?id=24824

Tuesday, March 13, 2007

Issues with DataGrid Column Visibility

A friend of mine passed along an interesting problem regarding DataGrids. They had the need to hide certain columns and then dynamically load the data. When doing this as expected, such as dataGridName.dataProvider = yourArrayName, the hidden columns would not stay hidden. The workaround to this issue is to track the visibility of each DataGridColumn, set the column to visible, and then override it with the visibility status we stored.

View the example here and download the code here.

Definately not optimal, but it works... ;-)

Form Validation

Paul Rangel from Wheeler Street Design put together a simple form validator that works quite well. The only thing that you have to be aware of is the fact that you need to initialize the validators property after your form fields are added if you're using states.

Friday, March 09, 2007

Animator vs Animation

A friend of mine just passed me the following YouTube video. It's a great example of someone who is extremely talented and creative with Flash. It's worth a watch.

Enjoy!

Wednesday, February 21, 2007

Internal Build Error

I recently ran into an issue with Flex Builder where I was getting the "An internal build error has occurred. Please check the Error Log." error when trying to debug my project. Absolutely nothing worked including all the normal practices such as cleaning the project, recreating the workspace, manually deleting the bin folder, reinstalling Flex Builder, etc.

After performing all of these tasks I was still getting "Uncaught exception in compiler" in the error log, which by the way is the .log file in the .metadata folder of your workspace. After further analysis, I tied the issue back to a missing semi-colon after a variable declaration in my class such as:

public class SomeClass
{
      public var blah:Object
}

If you ever find yourself in this situation, start rolling back code and begin to do a detailed analysis for syntax errors that normally do not pose any problems.

Wednesday, February 14, 2007

Flex tree's with a context menu

Recently on the flexcoders list a question was posed regarding how to get the item that was 'right-clicked on' when dealing with a tree. There are a few steps to follow if you plan to implement a context menu that is dynamic based on individual tree items.

First, you need to use the itemRollOver event of the <mx:Tree> component to track the last item that was rolled over, and save it to a variable for later use. Then when the ContextMenuEvent.MENU_SELECT event is triggered, you will refer back to this variable as it holds a reference to the itemRenderer and therefore the data you need access to.

You can view an example here and view the code here...

Updated Flex Style Explorer v2.0.1

I just realized that Adobe Consulting released a new version of the Flex Style Explorer. The style explorer is great if you want to see what you can do with CSS in flex. It's also a good way to start working with styles, although you must keep in mind that this is just the beginning of how you can tweak the look and feel of your flex applications.

http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html

Friday, January 26, 2007

Flex Performance

Brandon Purcell from Adobe put together a great article discussing flex performance and optimization. This articles includes many tips and tricks, along with general best practices to increase client performance.

http://www.adobe.com/devnet/flex/articles/client_perf_print.html