(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>

<cfelse>

<cfset permis = false>

</cfif>

<cfreturn permis>

</cffunction>


COLDFUSION PAGE (returns the correct value):


<cfif isDefined(‘session.isLoggedIn’) and
session.isLoggedIn eq ‘yes’>

<cfinvoke component=”/components/ktnbazar”
method=”checkPermission” returnvariable=”dees”>

<cfform>

<cfoutput>

return value = #dees#

</cfoutput>

</cfform>

<cfelse>

<cfset session.req = #CGI.PATH_INFO# >

<cflocation url=”autologin.cfm”>

</cfif>


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)”/>

</mx:RemoteObject>

public function
permissionHandling(permEvt:ResultEvent):Boolean

{

if(permEvt.result == true)

{

this.currentState=’DetailsContact’;

}

else if(permEvt.result == false)

{

this.currentState=’DetailsNoContact’;

}

return permEvt as Boolean;

}

|||
probably you need to check for permEvt.result.permis?
|||
Also always returns ‘false’.

Related posts:

  1. Why does CFC returns the wrong value?
  2. FLEX &amp; Session Variables: a BUG?.
  3. session not defined.
  4. session max from query
  5. sessions aren’t working :(

Related posts brought to you by Yet Another Related Posts Plugin.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2012 free icons download Suffusion theme by Sayontan Sinha

Featuring Recent Posts WordPress Widget development by YD