PDA

View Full Version : 3.1 and Coldfusion



KenCaldwell
8 May 2013, 9:44 PM
Hi All,

Having problems combining cfgrid and a combo.
Initially the combo would not load. i got a typeerro f undefined. After some research it would appear that Coldfusion does not load extbase file. So I manually included the ext-all and ext-base files. The combo now loads but another typeerror g undefined occurs.

Hopeing someone can help.

Here is the code

JS Code


<script type="text/javascript" src="/cfide/scripts/ajax/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/cfide/scripts/ajax/ext/ext-all.js"></script>

<script language="javascript">
<!--
init = function(){
var comboStore = new Ext.data.Store({
url: 'components/granting_body.cfc?method=getInterests',
reader: new Ext.data.ArrayReader({
fields: ['INTEREST'],
root: 'DATA',
idIndex: 0
}),
autoLoad: true
});
var combo = new Ext.form.ComboBox({
mode: 'local',
store: comboStore,
displayField: 'INTEREST',
valueField: 'INTEREST'
});

var tb = new Ext.Toolbar('toolbar');
tb.buttonAlign = 'right';
tb.render('toolbar');

tb.add(combo);
tb.doLayout();
}
//-->
</script>


CF/HTML Code


<div align="center">
<div id="toolbar" style="width:600"></div>
</div>

<input type="button" value="Click Me" onClick="loadStore();">
<cfform name="form01">
<cfgrid
name="grdGrantingBodies"
bind="cfc:#request.componentPath#.granting_body.getMasterQuery({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection}, '')"
format="html"
width="600"
pageSize="1"
selectmode="browse">
<cfgridcolumn name="GBName" display="yes" header="" />
</cfgrid>
</cfform>
<cfset ajaxOnLoad("init")>