Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Create a set function in “Customizing Guides Using Flash Builder ”


Former Community Member

When I copy this code to my mxml.

<?xml version="1.0" encoding="utf-8"?>
<gc:Wrapper width="100%" height="100%"
    xmlns:gc="ga.controls.*" >

            Wrapper.instance.bindSetter("Services.employee.empName", empNameSetter);

            private function empNameSetter(value:Object):void
                var empName:String = value as String;  // cast to appropriate type
                if ( empName == "Tony Blue" ) {
                    // do something here


    <mx:VBox width="100%" height="100%">
        <gc:PanelContent width="100%" height="100%" />
            <gc:PreviousPanelButton label="Back" />
            <gc:NextPanelButton label="Forward" />
            <gc:SubmitButton label="Submit Data" />

then get a error "visit attribute 'empNameSetter' is undefined"

Who can help me,thanks.

2 Replies


Level 2

Hi Rowan,

I don't know whether or not you're still active, but for anyone else looking for a solution to a similar problem I'll break down the solution.

In this line :   Wrapper.instance.bindSetter("Services.employee.empName", empNameSetter);

You are calling the empNameSetter function but aren't passing an object.

private function empNameSetter(value:Object):void{

//code goes here


You should either pass an object to your function in the function call like so:
Wrapper.instance.bindSetter("Services.employee.empName", empNameSetter(ObjectGoesHere));


Modify your declaration not to take any parameters.


Former Community Member

Thank you very much!

I have solved this problem by anonymous function.



          //code gose here