09-18-2015 09:08 AM
var site = page.url.templateArgs.site;
var alfDestination = null;
var result = remote.call("/slingshot/doclib/container/"+site+"/documentLibrary");
if (result.status.code == status.STATUS_OK)
{
alfDestination = JSON.parse(result).container.nodeRef;
}
var date = new Date().toISOString();
var date1 = new Date().toISOString();
//Create the form control for the student
var studentFormWidget = [{
name : "alfresco/forms/controls/TextBox",
config : {
requirementConfig : {
initialValue : false
},
name : "prop_student_name",
label:"Student Name"
}
},
{ name : "alfresco/forms/controls/DateTextBox",
config : {
requirementConfig : {
initialValue : false
},
value : date,
name : "prop_studnet_dob",
label:"Date of Birth"
}
},
{
name : "alfresco/forms/controls/DateTextBox",
config : {
requirementConfig : {
initialValue : false
},
value : date1,
name : "prop_studnet_doj",
label:"Date of Join"
}
}
];
//Create the form here
var form = {
name: "alfresco/forms/Form",
config: {
showOkButton: true,
okButtonLabel: "Save",
showCancelButton: false,
cancelButtonLabel: "",
okButtonPublishTopic: "ALF_CRUD_CREATE",
okButtonPublishGlobal: true,
okButtonPublishPayload: {
url: "api/type/student%3AstudentFolder/formprocessor",
alf_destination:alfDestination
},
widgets: studentFormWidget
}
};
model.jsonModel = { widgets: [ form ], services: ["alfresco/services/CrudService"] };
<@processJsonModel group="share"/>
<webscript>
<shortname>CRUD Service to read create and read Student entry</shortname>
<family>Aikau Share</family>
<url>/studentCreate</url>
</webscript>
10-08-2015 07:26 AM
09-18-2015 10:31 AM
var d = nbew Date();
var fullYear = d.getYear() + 1900;
09-18-2015 12:17 PM
10-08-2015 07:26 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.