cancel
Showing results for 
Search instead for 
Did you mean: 

form.get.js in Alfresco 3.4

marco_altieri
Star Contributor
Star Contributor
Hi all,

in Alfresco 3.3 the share webscript described in form.get.desc.xml that manages the rendering of a form had the javascript form.get.js
This javascript was responsible for a lot of preprocessing: it was the "controller" of the MVC.
It is well described here:
http://wiki.alfresco.com/wiki/3.3_Forms_Developer_Guide#Execution

Alfresco 3.4 does not have the form.get.js script anymore. Where is this "controller" that substitutes the old form.get.js script ?

With 3.3 it was possible to decide which configuration to use for the rendering of a form using the query string parameter: formId.
For example with the following link:
http://hostname/share/page/site/sitename/edit-metadata?nodeRef=workspace://SpacesStore/0cff3186-48bf...
I was able to specify that the form engine should use the form configured in the share-config-custom.xml with the id "my-form".

On 3.4 the formId is ignored. Is this a bug? How can I specify this id?

Regards,
Marco
2 REPLIES 2

marco_altieri
Star Contributor
Star Contributor
I found the "controller". The webscript is now Java backed.

All the story here:
http://fisheye.alfresco.com/browse/alfresco_open_mirror/alfresco/HEAD/root/projects/web-framework-co...

marco_altieri
Star Contributor
Star Contributor
To use the formId attribute you need to add it in the "template instance" description file: WEB-INF/alfresco/site-data/templates-instances/edit-metadata.xml

      <!– edit-metadata: normal & repository –>
      <component>
         <region-id>edit-metadata</region-id>
         <url>/components/form</url>
         <properties>
            <itemKind>node</itemKind>
            <itemId>{nodeRef}</itemId>
            <formId>{formId}</formId>
            <mode>edit</mode>
            <submitType>json</submitType>
            <showCaption>true</showCaption>
            <showCancelButton>true</showCancelButton>
         </properties>
      </component>