EXT使用常用エラー記録

1389 ワード

1、elエラー

<script language="JavaScript" type="text/javascript">

	Ext.onReady(function() {
		Ext.QuickTips.init();
		Ext.ux.ScriptLoader(
				"sscms/smim/scripts/personnelRoster/PersonnelRoster.js");

		var config = {};
		var _personnelRoster = new PersonnelRoster(this, config);
		
	    var _personnelRoster_panel_${uuid} = new Ext.Panel({
	        el:'_personnelRoster_panel_${uuid}',//  el  div id     
	        bodyBorder:false,
	        layout:'border',
	        frame : false,
			plain : true,
	        items : [_personnelRoster]
	    });
	    _personnelRoster_panel_${uuid}.render();	
	});
	
</script>

<div id='_personnelRoster_panel_${uuid}' ></div>

通常はel指定のDIV層のIDが見つからず、書き間違えた可能性が高いです!
2、HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy

NormalRosterPanel = function(parent){
//Ext.apply(this, config);
	this.parent=parent;
	var sm = new Ext.grid.RowSelectionModel({
		singleSelect : true
	});
}

この問題は、スライド(slidecard)形式で作成されたオブジェクトではなく、ページが使用するページを含む形式なので、中でthisを使用する場合、使用するオブジェクトが異なると言うので、this.parent=parentを追加しました