0 Replies Latest reply on Mar 18, 2008 7:10 AM by pope on acid


    pope on acid
      I want a tabnavigator panel being displayed depending on a CFC function result. Can't get it to work.

      The CFC Function:
      <cffunction name="checkPermission" access="remote" returntype="boolean">
      <cfif isDefined('session.KTNBazarPlaatser') and session.KTNBazarPlaatser eq "yes">
      <cfset checkUp = True>
      <cfset checkUp = False>
      <cfreturn checkUp>

      The RemoteObject:
      <mx:RemoteObject id="productService" destination="ColdFusion" source="components.ktnbazar" showBusyCursor="true">
      <mx:method name="checkPermission" result="permissionHandler(event)" fault="Alert.show(event.fault.message)"/>

      The MXML Function:
      public function permissionHandler(event:ResultEvent):Boolean
      var permis:Boolean = event.result as Boolean;
      return permis;

      The TabNavigator Panel:
      <mx:Canvas label="{productService.checkPermission()}" name="contactPanel" enabled="{productService.checkPermission()}">

      (As test the label value is also the returned value and this displays: [object asyncToken]