RonaldBrinkerink
24 Aug 2009, 1:09 AM
Hi there,
I am getting an error when creating a UIView with an ShowActionbar set to true.
The error occurs on line 5299 where the class presumes the presence of a UIDocument. That is not there as I am only using UIViews in this case. I'm not sure why the test on UIODocument in editmode occurs, but probably to see whether or not the action should be shown on the web.
// private
5268 addActionsFromDxlSuccess : function(o){
5269 var arActions;
5270 var q = Ext.DomQuery;
5271 var response = o.responseXML;
5272 arActions = q.select('action', response);
5273
5274
5275 if (this.noteType == 'view' && this.getTarget() && this.useViewTitleFromDxl) {
5276 this.setViewName(response);
5277 }
5278
5279 var curLevelTitle = '';
5280 var isFirst = false;
5281
5282 for (var i = 0; i < arActions.length; i++) {
5283 var show = true;
5284 var action = arActions;
5285
5286 var title = q.selectValue('@title', action, "");
5287 var hidewhen = q.selectValue('@hide', action, null);
5288 var showinbar = q.selectValue('@showinbar', action, null);
5289 var iconOnly = q.select('@onlyiconinbar', action);
5290 var icon = q.selectNumber('@icon', action, null);
5291 var imageRef = q.selectValue('imageref/@name', action, null);
5292 var syscmd = q.selectValue('@systemcommand', action, null);
5293
5294
5295 if (hidewhen) {
5296 var arHide = hidewhen.split(' ');
5297 for (var h = 0; h < arHide.length; h++) {
5298 if (arHide[h] == 'web' ||
[I]5299 (arHide[h] == 'edit' && Ext.nd.currentUIDocument.editMode) ||
5300 (arHide[h] == 'read' && !Ext.nd.currentUIDocument.editMode)) {
5301 show = false;
5302 }
5303 }
5304 }
5305
The consequence of this errir is that there is no actinbar shown on the view.
It can be solved by checking the presence of the UIDocument but i'm not sure what consequences this has.
Any suggestions?
Regards Ronald
I am getting an error when creating a UIView with an ShowActionbar set to true.
The error occurs on line 5299 where the class presumes the presence of a UIDocument. That is not there as I am only using UIViews in this case. I'm not sure why the test on UIODocument in editmode occurs, but probably to see whether or not the action should be shown on the web.
// private
5268 addActionsFromDxlSuccess : function(o){
5269 var arActions;
5270 var q = Ext.DomQuery;
5271 var response = o.responseXML;
5272 arActions = q.select('action', response);
5273
5274
5275 if (this.noteType == 'view' && this.getTarget() && this.useViewTitleFromDxl) {
5276 this.setViewName(response);
5277 }
5278
5279 var curLevelTitle = '';
5280 var isFirst = false;
5281
5282 for (var i = 0; i < arActions.length; i++) {
5283 var show = true;
5284 var action = arActions;
5285
5286 var title = q.selectValue('@title', action, "");
5287 var hidewhen = q.selectValue('@hide', action, null);
5288 var showinbar = q.selectValue('@showinbar', action, null);
5289 var iconOnly = q.select('@onlyiconinbar', action);
5290 var icon = q.selectNumber('@icon', action, null);
5291 var imageRef = q.selectValue('imageref/@name', action, null);
5292 var syscmd = q.selectValue('@systemcommand', action, null);
5293
5294
5295 if (hidewhen) {
5296 var arHide = hidewhen.split(' ');
5297 for (var h = 0; h < arHide.length; h++) {
5298 if (arHide[h] == 'web' ||
[I]5299 (arHide[h] == 'edit' && Ext.nd.currentUIDocument.editMode) ||
5300 (arHide[h] == 'read' && !Ext.nd.currentUIDocument.editMode)) {
5301 show = false;
5302 }
5303 }
5304 }
5305
The consequence of this errir is that there is no actinbar shown on the view.
It can be solved by checking the presence of the UIDocument but i'm not sure what consequences this has.
Any suggestions?
Regards Ronald