HTML/CSS Service

Showcase

2 comments0 views
1 Star2 Stars

Exception Handling with Flex

Category: Flex Examples, flex tutorials    |    16,975 views    |    2 Comments

A common hurdle a developer may face is dealing with exceptions in BlazeDS. When an exception is thrown in Java, how do we handle this in flex? Here is a simple and flexible approach inspired by Scott Morgan.

1. Create a Java Class that extends RuntimeException.

package com.flexpasta.exception;
public class FlexException extends RuntimeException
{
public FlexException(String message)
{
super(message);
}
}

Read more…

Share/Save/Bookmark

 

Creating a simple image gallery with the Flex TileList control

Category: Flex Examples    |    19,172 views    |    2 Comments

Flex Photo gallery in Flex using the TileList control, Image control, and the PopUpManager class.

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"layout="vertical"verticalAlign="middle"

backgroundColor="white">
<mx:Style>

Read more…

Share/Save/Bookmark

 

Data Push from Servers to Client

Category: Learn Flex, flex tutorials    |    702 views    |    1 Comment

To push data from server to client, you use the Flex.data.DataServiceTransactions Java class. The object is used on the server-side to push changes to managed code stored on clients that have the AutoSyncEnabled property of the DataService component set to true.

The Data Management Service creates an instance of the DataServiceTransaction class when you make changes to a sync method. With the instance, you can call the getcurrentDataServiceTransaction(), deleteitem(), and createitem() methods to trigger additional changes. If the current transaction is rolled back, these changes are not pushed to clients.

Note that when you compile code that uses the FDS Java APIs, you must include the messaging JAR and flex-messaging-common.jar files in your class path.

Share/Save/Bookmark