2 Replies Latest reply on Apr 10, 2008 12:10 PM by pope on acid

    Why does CFC returns the wrong value?

    pope on acid Level 1
      (autologin.cfm sets the session.kntbazarplaatser variable to 'yes')'

      CFC Function:
      <cffunction name="checkPermission" access="public" returntype="boolean">
      <cfif isDefined('session.ktnbazarplaatser') and session.ktnbazarplaatser eq 'yes'>
      <cfset permis = true>
      <cfset permis = false>
      <cfreturn permis>

      COLDFUSION PAGE (returns the correct value):
      <cfif isDefined('session.isLoggedIn') and session.isLoggedIn eq 'yes'>
      <cfinvoke component="/components/ktnbazar" method="checkPermission" returnvariable="dees">
      return value = #dees#
      <cfset session.req = #CGI.PATH_INFO# >
      <cflocation url="autologin.cfm">

      FLEX (returns always 'false'):
      <mx:RemoteObject id="productService" destination="ColdFusion" source="components.ktnbazar" showBusyCursor="true">
      <mx:method name="checkPermission" result="permissionHandling(event)" fault="Alert.show(event.fault.message)"/>

      public function permissionHandling(permEvt:ResultEvent):Boolean
      if(permEvt.result == true)
      else if(permEvt.result == false)
      return permEvt as Boolean;