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 ?
Solved! Go to Solution.
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);
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);
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.