Tag Archive for 'flex-applications'

22
Apr

Invoking Java methods from Adobe Flex

 

How to invoke Java methods from Flex application?

  1. Add an mapping to the Java class to services-config.xml
  2. Map your RemoteObject (provided with Flex SDK) on the client side to the destination configured in services-config.xml
  3. Invoke the method in your Java class using the RemoteObject instance

What do you need to invoke a Java method from the client side application?

  1. Flex Builder
  2. Blaze DS

Isn’t that simple? Let’s get into details of implementing this.

Set up Blaze DS

Download and setup Blaze DS on your system fromhttp://labs.adobe.com/technologies/blazeds/

You will be downloading Blaze DS with integrated Tomcat server. You just have to start the server by executing startup.bat under tomcat/bin. Please note the port number in which the Tomcat server is running. The port number mentioned below might have to be replaced with yours, if required. Continue reading ‘Invoking Java methods from Adobe Flex’

29
Nov

Getting URL Parameters in Flex Actionscript

Get the full url with the host name and port in actionscript?

There are several methods to help with this:

getHostName()
getPort()
getProtocol() -such as http or https
getContext() -The path after the hostname but before the url parameters

29
Nov

Exception Handling with Flex

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);
}
}

Continue reading ‘Exception Handling with Flex’

28
Nov

Creating a simple image gallery with the Flex TileList control

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>

 Continue reading 'Creating a simple image gallery with the Flex TileList control'
07
May

Add FlexComponents to your mailing lists!

The new FlexComponents mailing list is now live. Whether you’re having an issue subclassing one of the base Flex Framework components, or you’re starting from scratch on top of the UIComponent class and want to know more about all those functions you can override, this is the place to go. Unlike the famous FlexCoders list, which covers all aspects of Flex (check it out, if you haven’t yet), the components list will only focus on custom components.

Adobe wants the community to go hog-wild with components. That’s why Ted started the list. I don’t doubt that Flex.org will be expanding soon to include all sorts of useful component information. If you’re interested in some of what the community is building already, check out the Flex Exchange. It just opened, so more and more components should be added in time.

I recently posted a very simple component there. It’s a specialized TextInput box that will grow or shrink to fit its text. This component is beyond simple to implement, but it worked well in my Regular Expression explorer and I’m sure that others can find uses for it too.



Get Adobe Flash playerPlugin by wpburn.com wordpress themes