Exploring Flex

Archive for June 11th, 2009

Secure operations in a CFC

Posted by hneelu on June 11, 2009

Create an Application.cfm file and place it in folder called ‘SecureCF’

<cfapplication name=”authTest” />
<cfif isDefined(“cflogin”)>
<cfif cflogin.name eq “admin” and
cflogin.password eq “admin”>

<cfloginuser name=”#cflogin.name#”
roles=”admin” /></cfif></cfif>

In the same folder, add the required CFC file.

Modify the required operation as follows:

<cffunction name=”sayHelloArray” access=”remote” returnType=”array” roles=”admin”>

You can add any number of roles in the CFM file and use them accordingly.

NOTE: Only one role per operation is allowed.


Posted in coldfusion | Tagged: , | 1 Comment »

Flash Builder 4 – Data Centric Development (DCD) Configure Return Type

Posted by hneelu on June 11, 2009

We have covered the first wizard, Service Wizard. This wizard has lead to the successful creating of a service. We can see the service and its operation in the Data/Services view.
Example: I have imported a php file called MovieService** (code added at the bottom).

To make this service useful I need to go through another wizard Configure Return Type.
This feature  provides GUI which enables user to test an operation of an existing service and view the returned data. User can also create appropriate entities/ custom data types which can later be used in their flex application. It enables code hinting, setting of datagrid columns on binding data to the operation etc.

The types of services which will be supported are:
1. Remote Object Service (AMF)
2. HTTP Service
3. Web Service

Read the rest of this entry »

Posted in DCD, Flash Builder, wizards | Tagged: , | 7 Comments »