Hello Community,
I just shifted from ColdFusion 9 to Lucee 5.3.8.206. I’am in the process of shifting all my apps. During this shifting I am facing some issues so a request to the community to help me out.
Recently I am facing the Related Select or Dependent Select problem. The CFSELECT in Lucee does not support BIND attribute. Any Idea how to overcome this problem.
My CFC
<cffunction name="GetRoles" access="remote" returnType="any">
<cfquery name="lstRoles" datasource="#request.dsn#">
SELECT '' AS role_id, '--- ALL ---' AS role_name
UNION ALL
SELECT role_id, role_name
FROM SUS_INDX_ROLE
ORDER BY role_id ASC
</cfquery>
<cfreturn lstRoles>
</cffunction>
<cffunction name="getSubRoles" access="remote" returnType="any">
<cfargument name="SUS_INDX_ROLE" type="any" required="true">
<cfif ARGUMENTS.SUS_INDX_ROLE EQ "">
<cfelse>
<cfquery name="LstSubRoles" datasource="#request.dsn#">
SELECT Sub_Role_Id, Role_id, Sub_Role_Name
FROM SUS_INDX_SUB_ROLE
WHERE Role_id = #ARGUMENTS.SUS_INDX_ROLE#
ORDER BY Role_id
</cfquery>
</cfif>
<cfreturn LstSubRoles>
</cffunction>
My Form
Select Role (Optional):
<div class="control-group">
<label class="control-label" for="title_id">Select Sub Role:</label>
<div class="controls">
<cfselect name="SelSubRole" bind="cfc:Places.getSubRoles({SelRole})"
display="Sub_Role_name" value="Sub_role_Id" bindOnLeoad="true"/>
</div>
</div>
Regards