02-24-2017 03:34 AM
Hello,
visibility config is working fine with my textBoxes
**********************************
this.textBox = new TextBox({
label: "label",
fieldId : "textBoxId",
visibilityConfig: {
initialValue: false,
rules: [
{
targetId: "statutId",
is: ["Rejeté Illisible"]
}
]
}
});
********************************
But it's not working with my alfButton
*****************************************
var btnIllisible = new AlfButton({
visibilityConfig: {
rules: [
{
targetId: "statutId",
is: ["En cours", "Rejeté Inexploitable" ],
}
]
},
label: "label",
onClick: lang.hitch(this, '_onIllisible'),
});
********************************************
Do the alfButtons use different mechanics ?
03-14-2017 10:46 AM
I used another technique to do it, implemented a method that create the button depending on my variable
createButton : function com_documentFormEditPropertiesBuilding__createButton(btnLabel, btnOnClick, btnNode ){
var btn = new AlfButton({
label: btnLabel,
onClick: lang.hitch(this, btnOnClick),
});
btn.placeAt(btnNode);
return(btn);
},
Method :
name of the button = this.createButton("label of the button in i18N", name of the method to call on click, where I place the button in my template);
Exemple :
btnSave = this.createButton("com.formEditProperties.valider",'_onPublish', this.btnSaveNode);
03-14-2017 10:46 AM
I used another technique to do it, implemented a method that create the button depending on my variable
createButton : function com_documentFormEditPropertiesBuilding__createButton(btnLabel, btnOnClick, btnNode ){
var btn = new AlfButton({
label: btnLabel,
onClick: lang.hitch(this, btnOnClick),
});
btn.placeAt(btnNode);
return(btn);
},
Method :
name of the button = this.createButton("label of the button in i18N", name of the method to call on click, where I place the button in my template);
Exemple :
btnSave = this.createButton("com.formEditProperties.valider",'_onPublish', this.btnSaveNode);
Explore our Alfresco products with the links below. Use labels to filter content by product module.