I have extended the granite UI to create a user picker metadata schema field. It works fine the first time but when i go back to the metadata schema editor and edit it, the custom user picker changes back to text field. Not sure why it is happening. Any ideas?
I have followed these steps to create new metadata schema field.
1. In CRXDe Lite, create the following path under /apps/dam:
/apps/dam/gui/coral/components/admin 2. Navigate to /libs/dam/gui/coral/components/admin, and copy the schemaforms folder into the path created above 3. In open this folder your local apps directly, and navigate to formbuilder. Open the builditems.jsp.
4. At line 66 of the builditems.jsp, added the code snippet to render a new field.
5. Navigate back to /apps/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields. Create a directory called customfield. From the textfield directory (also in this formfields directory), copy over the textfield.jsp. Rename this coustomfield.jsp.
6. Replace the resourceType calls to refer to a customfield.
Also worthy of note, is that /libs/dam/gui/components/admin/schemaforms/formbuilder/view.jsp hard-codes "field" to whatever the metaType is when redrawing (second time in the metadata schema editor). So, once the metaType is added and it is same name as your customfield resource (.jsp) name, it seems to work as expected. At least that was my experience.
AFAIK metadata schema editor use conf folder to see the changes. Can you make your changes in /libs only rather than /apps & see it works. If that works then I can guide for next steps of actual fix rather than updating the /libs directly.