How to show the recurreneRule from database in the pop-up recurrencePanel

In the Calendar Click event add code to get the rule and create and object of recurence Panel. Then set the recurrenceRule variable in recurrencePanel

Ex:
_recurrencePanel = new RecurrencePanel();
_recurrencePanel.recurrenceRule = new RRule(cal.selectedItems[0].item.@rrules);

Get and Set function declaration

Flex script has Get and Set functions that can encapsulate property access behind function calls, but without changing the property access syntax.

This tells ActionScript that the functions are for property access. While the code looks quite different than just using a public property, the usage is exactly the same.

Ex:

public class HelloWorld
{
private var _strValue:String;

public function get strValue():String
{
return this._strValue;
}

public function set strValue( value:String ):void
{
this._strValue = value;
}
}

TextInput focus in and out events

We can use focusIn and focusOut events for getting values on or out of focus.

Ex: mx:TextInput id="summaryTxt" width="100%" focusOut="summaryTxt_focusOutHandler(event)"

How to change the Calendar mode to Month view

In the IBM ILOG Calendar, the default is Week View. We can change it by adding the following code in the init() function.

cal.mode = Calendar.MONTH_MODE; //cal is the id of the ilog calendar object

Get recurring event id while editing

In the ITEM_EDIT_END event, use the below code to get the recurring event id.
var eventId:int = cal.selectedItems[0].item.@eventId.toString();
trace(eventId);

Convert Object to XML

private function convertobjectToXML(obj:Object):XML
{
var qName:QName = new QName("list");
var xmlDocument:XMLDocument = new XMLDocument();
var simpleXMLEncoder:SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);
var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName, xmlDocument);
var xml:XML = new XML(xmlDocument.toString());
trace(xml);
return xml;
}

Convet AMF Object to XML

var result:Object;
var listCollection:ArrayCollection = new ArrayCollection(result as Array);

var mainXML:XML = list //root xml tag
for(var i:int=0; i < listCollection.length; i++)
{
if(listCollection[i]['event_id'] != null){
var myXML:XML = event //child xml attribute
myXML.@id=listCollection[i]['event_id'];
myXML.@s=listCollection[i]['start'];
myXML.@e=listCollection[i]['end'];
mainXML.appendChild(myXML);
}

You will get the xml data in the mainXML variable

How to use Alert.show method

mx:Script
private function showAlert():void{
Alert.show('message','title',flags,parent,clickListener,iconClass,defaultButton);
}
mx:Script close

flags - mx.controls.Alert.OK — OK button
mx.controls.Alert.YES — Yes button
mx.controls.Alert.NO — No button
mx.controls.Alert.CANCEL — Cancel button
parent - parent object
clickListener - listener function name for flags

Get event id for editing event data in the Database

you can get the event id set in the dataProvider in editItemEnd function using the below script.
trace(event.item.id);
private function itemEditEnd(event:CalendarEvent):void {

if (event.item is IRecurrenceInstance) {
//code for recurring event
}else{
trace(event.item.id);
}

}

Client.Error.DeliveryInDoubt / Channel disconnected before an acknowledgement was received

It's because of the error in the ZEND_AMF Script.

To solve this problem make sure that:

* Your Adobe Flex function parameters and PHP function parameters are of the same number.
* The parameters of your Adobe Flex function are in the same order with its PHP function counterpart.
* All the Adobe Flex function parameters are of the same data type with their PHP function parameters counterpart.
* You assign a default value to the optional parameters in the PHP function.
* You pass a value to the parameters that are not optional.
* Finally, your SQL statements should be syntactically correct.