I want to make the property readOnly with the help of aspect in JS(since I want to display a button beside the property dynamically that's why this approach)
Tried the below code:
lang.setObject("customOpenEntryTemplate", function(repository, items, callback, teamspace, resultSet, parameterMap) {
console.log("inside customOpenET");
if(items.length==1){
var item = items[0];
repository.retrieveItem(null, lang.hitch(this,function(item){
this.entryTemp=item;
var acid = new AddContentItemDialog();
acid.showUsingTemplateItem(repository, null, true, false, callback, teamspace, this.entryTemp);
aspect.after(acid.addContentItemPropertiesPane, "onCompleteRendering", function(){
console.log("===Inside onLoad===");
isonLoad=true;
if(query(".defaultSpan").length == 0){
var propJSON = acid.addContentItemPropertiesPane.getPropertiesJSON(true, true, true);
console.log("onLoadPropJSON: "+JSON.stringify(propJSON));
var commProps = acid.addContentItemPropertiesPane._commonProperties;
var propsFieldEdited = commProps._view.properties;
array.forEach(propsFieldEdited, function(prop, i){
var name = prop.controller.id;
console.log("name: "+name);
if(name ==='strsAutoDeter' || name ==='DocumentTitle'){
console.log("Inside: ");
try {
var node = prop.domNode;
console.log("POC1: name="+name);
prop.readOnly=true;
Even I had tried-
- this.set("readOnly", true)
- this._view.set("readOnly", true);
Any suggestion how we can achieve this?
similar type of question asked in stackOverflow-
https://stackoverflow.com/questions/47201583/make-properties-readonly-in-addcontentitempropertiespane
but not getting the result.
#IBMContentNavigator(ICN)#Support#SupportMigration