Fix those problems first and see how it goes.
HTH
Hello,I am new to FW/1 and I am trying to set up a new tool that allows the user to do three things:
1. lists all the "brands" in a sql table2. edit current brand entries3. create new brand entries that are saved away to the table. (currently doing, not complete)
I have three view pages at the moment (default.cfm (lists the brands), edit.cfm (allows you to edit the brands) and error.cfm).My cfc in the DAO section is:<cfcomponent output="true" hint="the DAO cfc that gets all the brands in the given table."><cffunction name="getBrands" returntype="query" access="public"><cfquery datasource="tester" name="local.qry">SELECT BrandName AS brandName,Slug AS slug,BrandId AS brandIdFROM tblBrandORDER BY brandId</cfquery><!--- <cfdump var="#local.qry#"abort="true" /> ---><cfreturn local.qry /></cffunction><cffunction name="updateBrands" returntype="boolean" access="public"><cfargument name="brandName" type="string" required="false"><cfargument name="slug" type="string" required="false"><cfargument name="brandId" type="int" required="true"><cfquery datasource="tester" name="local.qry">UPDATE tblBrandSET BrandName=<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.brandName#" />,Slug=<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.slug#" />WHERE BrandId=<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.brandId#" />SELECT @@ROWCOUNT AS rows_affected</cfquery><cfreturn local.qry.rows_affected gt 0 /></cffunction></cfcomponent>and the controllers/main.cfc is:component output="false" accessors="true"{ property name="brandsService";public void function default (required any rc){ rc.qBrands = getBrandsService().getBrands();rc.uBrands = getBrandsService().updateBrands();rc.cBrands = getBrandsService().createBrands();}}and the model/service is:component output="false" accessors="true" {property name="brandsDAO";public query function getBrands (){ var qry = getBrandsDAO().getBrands();return qry;}public boolean function updateBrands (brandName,brandId,slug){ var qry = getBrandsDAO().updateBrands(brandName,brandId,slug);return qry;}}This doesn't work and I don't understand why.. the error says: variable [BRANDNAME] doesn't existBut the brand name has be to passed in via the cfm page... Help me please!!Thanks,Caroline--
--
FW/1 on RIAForge: http://fw1.riaforge.org/
FW/1 on github: http://github.com/seancorfield/fw1
FW/1 on Google Groups: http://groups.google.com/group/framework-one
---
You received this message because you are subscribed to the Google Groups "framework-one" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-on...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<cfif StructKeyexists(form, 'Submit') AND value="Update">
The top part handling what to do and what to call when update is called. I'm not sure if this is allowed using FW/1 but it's returning this error..invalid assignment left-hand side (railo.transformer.bytecode.op.OpBool)
--