private String fullName_;
private String dirPath;
public UIGadgetEditor(InitParams initParams) throws Exception {
Param param = initParams.getParam("SampleGadget");
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
String sample = (String) param.getMapGroovyObject(context);
addUIFormInput(new UIFormStringInput(FIELD_NAME, FIELD_NAME, null).addValidator(MandatoryValidator.class)
.addValidator(StringLengthValidator.class, 2, 50).addValidator(ResourceValidator.class)
.addValidator(ExpressionValidator.class, "^[\\p{L}][\\p{L}._\\-\\d]+$", "UIGadgetEditor.msg.Invalid"));
addUIFormInput(new UIFormTextAreaInput(FIELD_SOURCE, FIELD_SOURCE, sample).addValidator(MandatoryValidator.class)
.addValidator(GadgetSpecValidator.class));