Using Forms in Share

6,912 views

Published on

The "Using Forms in Share" session follows on from the "Forms Service Deep Dive" session. We will discuss each area of Share that uses Forms and demonstrate how each of those areas (Metadata, Datalists, Workflow & Advanced Search) can be configured and customized. The session will also show how to integrate forms in your own custom applications and/or pages.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,912
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
152
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Using Forms in Share

  1. 1. Alfresco Forms Part 1: Forms in Share<br />1<br />Gavin Cornwell<br />Services Team Lead, Alfresco<br />twitter: @gcornwell<br />
  2. 2. Agenda<br />2<br /><ul><li>Where Forms Are Used
  3. 3. Configuration
  4. 4. Demo</li></ul>Metadata<br />Advanced Search<br />Workflow<br />Datalists<br /><ul><li>Q & A</li></li></ul><li>Where Forms Are Used<br />3<br />Metadata<br />
  5. 5. Where Forms Are Used<br />4<br />Advanced Search<br />
  6. 6. Where Forms Are Used<br />5<br />Workflow<br />
  7. 7. Where Forms Are Used<br />6<br />Datalists<br />
  8. 8. Configuration<br />7<br /><config><br /> <forms><br /> <default-controls><br /> ...<br /> </default-controls><br /> <constraint-handlers><br /> ...<br /> </constraint-handlers><br /> <dependencies><br /> ...<br /> </dependencies><br /> </forms><br /></config><br />Global Defaults – form-config.xml<br />
  9. 9. Configuration<br />8<br /><default-controls><br /> <type name="text" <br /> template="/org.../textfield.ftl" /><br /> <type name=”datetime" <br /> template="/org.../date.ftl”><br /><control-param name="showTime"> true </control-param><br /></type><br /> ...<br /></default-controls><br />Default Controls<br />
  10. 10. Configuration<br />9<br /><constraint-handlers><br /> <constraint type="MANDATORY" <br /> validation-handler="...mandatory" event="keyup" /><br /> <constraint type="NUMBER" validation-handler=”...number" event="keyup" /><br /> ...<br /></constraint-handlers><br />Default Constraint Handlers<br />
  11. 11. Configuration<br />10<br /><dependencies><br /> <csssrc=” /accordion/accordion.css" /><br /> <jssrc=“/accordion/accordion-min.js" /><br /> ...<br /></dependencies><br />Dependencies<br />
  12. 12. Configuration<br />11<br /><config evaluator=“” condition=“”><br /> <forms><br /> <form [id=“”]><br /> <field-visibility><br /> ...<br /> </field-visibility><br /> <edit|create|view-form template=“” /><br /> <appearance><br /> ...<br /> </appearance><br /> </form><br /> </forms><br /></config><br />Form – share-form-config.xml<br />
  13. 13. Configuration<br />12<br />Creating nodes<br /> <config evaluator="model-type" condition="cm:content"><br />Editing nodes<br /> <config evaluator="node-type" condition="cm:content"><br />Starting workflow<br /> <config evaluator="string-compare" condition="jbpm$wf:adhoc"><br />Editing tasks<br /> <config evaluator="task-type" condition="wf:adhocTask"><br />Evaluators<br />
  14. 14. Configuration<br />13<br /><show id="cm:name" /><br /><hide id=“cm:author” /><br /><show id="cm:created" for-mode="view" /><br />Visibility<br />
  15. 15. Configuration<br />14<br /><field id="cm:title” label=“” label-id=“” description=“” description-id=“” help=“” help-id=“” set=“” read-only=“” mandatory=“”><br /> <control template="/.../textfield.ftl”><br /> <control-param ... /><br /> </control><br /> <constraint-handlers><br /> <constraint ... /><br /> </constraint-handlers><br /></field><br />Field Appearance<br />
  16. 16. Configuration<br />15<br /><set id=“info” label=“” label-id=“” template=“” parent=“” appearance=“|fieldset|panel|bordered-panel|title|whitespace” /><br />Set Appearance<br />
  17. 17. Demos<br />16<br />Metadata<br />Advanced Search<br />Workflow<br />Datalists<br />
  18. 18. Q & A<br />17<br />
  19. 19. Learn More<br />18<br />Alfresco Forms Part 2: Deep Dive (tomorrow)<br />wiki.alfresco.com/wiki/Forms<br />blogs.alfresco.com/wp/gavinc/<br />
  20. 20. Appendix – Demo Config - cm:content<br />19<br /><config evaluator="node-type" condition="cm:content"><br /><forms><br /><form><br /><field-visibility><br /><hide id="cm:author" /><br /></field-visibility><br /><edit-form template="/devcon/2-column-edit-form.ftl" /><br /><appearance><br /><set id="dublin-core" label-id="set.label.dublincore” appearance="panel" /><br /><field id="cm:publisher" set="dublin-core" /><br /><field id="cm:contributor" set="dublin-core" /><br /><field id="cm:type" set="dublin-core" /><br /><field id="cm:identifier" set="dublin-core" /><br /><field id="cm:dcsource" set="dublin-core" /><br /><field id="cm:coverage" set="dublin-core" /><br /><field id="cm:rights" set="dublin-core" /><br /><field id="cm:subject" set="dublin-core" /><br /></appearance><br /></form><br /> </forms><br /></config><br />
  21. 21. Appendix – Demo Config - Model<br />20<br /><type name="devcon:session"><br /> <title>Devcon Session</title><br /> <parent>cm:content</parent><br /> <properties><br /> <property name="devcon:code"><br /> <title>Code</title><br /> <description>Unique code for the session</description><br /> <type>d:text</type><br /> <mandatory>true</mandatory><br /> </property><br /> <property name="devcon:duration"><br /> <title>Duration</title><br /> <description>Session duration in minutes</description><br /> <type>d:int</type><br /> <mandatory>true</mandatory><br /> </property><br /> <property name="devcon:when"><br /> <title>When</title><br /> <description>The date and time of the session</description><br /> <type>d:datetime</type><br /> </property><br /> <property name="devcon:rating"><br /> <title>Rating</title><br /> <description>The feedback rating of the session</description><br /> <type>d:int</type><br /> </property><br /> <property name="devcon:level"><br /> <title>Level</title><br /> <description>Difficulty level of the session</description><br /> <type>d:text</type><br /> <mandatory>true</mandatory><br /> <constraints><br /> <constraint ref="devcon:level" /><br /> </constraints><br /> </property><br /> <property name="devcon:abstract"><br /> <title>Abstract</title><br /> <description>Short abstract describing the session</description><br /> <type>d:text</type><br /> </property><br /> </properties><br /><associations><br /> <association name="devcon:presenter"><br /> <title>Presenter</title><br /> <source><br /> <mandatory>false</mandatory><br /> <many>true</many><br /> </source><br /> <target><br /> <class>cm:person</class><br /> <mandatory>true</mandatory><br /> <many>false</many><br /> </target><br /> </association><br /> <association name="devcon:prerequisites"><br /> <title>Prerequisites</title><br /> <source><br /> <mandatory>false</mandatory><br /> <many>true</many><br /> </source><br /> <target><br /> <class>devcon:session</class><br /> <mandatory>false</mandatory><br /> <many>true</many><br /> </target><br /> </association><br /> </associations><br /> <mandatory-aspects><br /> <aspect>devcon:approvable</aspect><br /> </mandatory-aspects><br /></type><br />
  22. 22. Appendix – Demo Config – Custom Type<br />21<br /><config evaluator="node-type" condition="devcon:session"><br /> <forms><br /> <form><br /> <field-visibility><br /> <show id="devcon:code" /><br /> <show id="cm:name" /><br /> <show id="devcon:abstract" /><br /> <show id="devcon:presenter" /><br /> <show id="devcon:when" /><br /> <show id="devcon:duration" /><br /> <show id="devcon:level" /><br /> <show id="devcon:prerequisites" /><br /> <show id="devcon:approved" /><br /> <show id="devcon:rating" /><br /> </field-visibility><br /> <appearance><br /> <field id="devcon:abstract"><br /> <control template="/org/alfresco/components/form/controls/richtext.ftl" /><br /> </field><br /> <field id="devcon:prerequisites"><br /> <control><br /> <control-param name="startLocation">{doclib}</control-param><br /> </control><br /> </field><br /> </appearance><br /> </form><br /> <form id="doclib-simple-metadata"><br /> <field-visibility><br /> <show id="devcon:code" /><br /> <show id="cm:name" /><br /> <show id="devcon:abstract" /><br /> <show id="devcon:when" /><br /> </field-visibility><br /> <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" /><br /> </form><br /> </forms><br /></config><br />
  23. 23. Appendix – Demo Config - Search<br />22<br /><config evaluator="model-type" condition="cm:content"><br /><forms><br /><form id="search"><br /><field-visibility><br /> <hide id=“mimetype” /><br /><show id="cm:creator" /><br /></field-visibility><br /> <appearance><br /> <field id="cm:creator"><br /><control><br /> <control-param name="forceEditable">true</control-param><br /> </control><br /> </field><br /> </appearance><br /> </form><br /> </forms><br /></config><br />
  24. 24. Appendix – Demo Config – Search cont…<br />23<br /><config evaluator="string-compare" condition="AdvancedSearch"><br /> <advanced-search><br /> <forms><br /> <form labelId="search.form.label.devcon" descriptionId="search.form.desc.devcon">devcon:session</form><br /> </forms><br /> </advanced-search><br /></config><br /><config evaluator="model-type" condition="devcon:session"><br /> <forms><br /> <form id="search"><br /> <field-visibility><br /> <show id="cm:name" /><br /> <show id="devcon:code" /><br /> <show id="devcon:when" /><br /> <show id="devcon:duration" /><br /> <show id="devcon:level" /><br /> </field-visibility><br /> <appearance><br /> <field id="devcon:when"><br /> <control template="/org/alfresco/components/form/controls/daterange.ftl" /><br /> </field><br /> <field id="devcon:duration"><br /> <control template="/org/alfresco/components/form/controls/numberrange.ftl" /><br /> </field><br /> <field id="devcon:level"><br /> <control template="/org/alfresco/components/form/controls/selectmany.ftl" /><br /> </field><br /> </appearance><br /> </form><br /> </forms><br /></config><br />
  25. 25. Appendix – Demo Config – Model<br />24<br /><types><br /> <type name="dw:submitDevconReviewTask"><br /> <parent>wf:submitReviewTask</parent><br /> <properties><br /> <property name="dw:venue"><br /> <type>d:text</type><br /> <default>Both</default><br /> <constraints><br /> <constraint type="LIST"><br /> <parameter name="allowedValues"><br /> <list><br /> <value>Both</value><br /> <value>Paris</value><br /> <value>New York</value><br /> </list><br /> </parameter><br /> </constraint><br /> </constraints><br /> </property><br /> </properties><br /> </type><br /></types><br />
  26. 26. Appendix – Demo Config – Start Workflow<br />25<br /><config evaluator="string-compare" condition="jbpm$dw:devconapproval"><br /> <forms><br /> <form><br /> <field-visibility><br /> <show id="bpm:workflowDescription" /><br /> <show id="bpm:workflowDueDate" /><br /> <show id="bpm:workflowPriority" /><br /> <show id="dw:venue" /><br /> <show id="bpm:assignee" /><br /> <show id="packageItems" /><br /> </field-visibility><br /> <appearance><br /> <set id="" appearance="title" label-id="workflow.set.general" /><br /> <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" /><br /> <set id="assignee" appearance="title" label-id="workflow.set.assignee" /><br /> <set id="items" appearance="title" label-id="workflow.set.items" /><br /> <field id="bpm:workflowDescription" label-id="workflow.field.message"><br /> <control template="/org/alfresco/components/form/controls/textarea.ftl"><br /> <control-param name="style">width: 95%</control-param><br /> </control><br /> </field><br /> <field id="dw:venue" set="info" /><br /> <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info" /><br /> <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info"><br /> <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" /><br /> </field><br /> <field id="bpm:assignee" label-id="workflow.field.reviewer" set="assignee" /><br /> <field id="packageItems" set="items" /><br /> </appearance><br /> </form><br /> </forms><br /></config><br />
  27. 27. Appendix – Demo Config – Workflow<br />26<br /><config evaluator="task-type" condition="dw:submitDevconReviewTask"><br /> <forms><br /> <form id="workflow-details"><br /> <field-visibility><br /> <show id="dw:venue" /><br /> <show id="packageItems" /><br /> </field-visibility><br /> <appearance><br /> <set id="" appearance="title" label-id="workflow.set.workflow.more_info" /><br /> <set id="items" appearance="title" label-id="workflow.set.items" /><br /> <field id="packageItems" set="items" /><br /> </appearance><br /> </form><br /> <form><br /> <field-visibility><br /> <show id="message" /><br /> <show id="taskOwner" /><br /> <show id="bpm:workflowPriority" /><br /> <show id="bpm:workflowDueDate" /><br /> <show id="bpm:taskId" /><br /> <show id="dw:venue" /><br /> <show id="bpm:status" /><br /> <show id="packageItems" /><br /> </field-visibility><br /> <appearance><br /> <set id="" appearance="title" label-id="workflow.set.task.info" /><br /> <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" /><br /> <set id="progress" appearance="title" label-id="workflow.set.task.progress" /><br /> <set id="items" appearance="title" label-id="workflow.set.items" /><br /> <field id="message"><br /> <control template="/org/alfresco/components/form/controls/info.ftl" /><br /> </field><br /> <field id="taskOwner" set="info" /><br /> <field id="dw:venue" set="info" /><br /> <field id="bpm:taskId" set="info"><br /> <control template="/org/alfresco/components/form/controls/info.ftl" /><br /> </field><br /> <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true"><br /> <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" /><br /> </field><br /> <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due"><br /> <control template="/org/alfresco/components/form/controls/info.ftl" /><br /> </field><br /> <field id="bpm:status" set="progress" /><br /> <field id="packageItems" set="items" /><br /> </appearance><br /> </form><br /> </forms><br /></config><br />
  28. 28. Appendix – Demo Config – Datalist - Model<br />27<br /><type name="devcon:sessionFeedbackList"><br /> <title>Devcon Session Feedback</title><br /> <description>A list of feedback from attendees on the quality of the sessions.</description><br /> <parent>dl:dataListItem</parent><br /> <properties><br /> <property name="devcon:attendeeFirstName"><br /> <title>Attendee First Name</title><br /> <type>d:text</type><br /> <mandatory>true</mandatory><br /> </property><br /> <property name="devcon:attendeeLastName"><br /> <title>Attendee Last Name</title><br /> <type>d:text</type><br /> <mandatory>false</mandatory><br /> </property><br /> <property name="devcon:feedback"><br /> <title>Feedback</title><br /> <type>d:text</type><br /> <mandatory>true</mandatory><br /> </property><br /> <property name="devcon:score"><br /> <title>Score</title><br /> <type>d:int</type><br /> <constraints><br /> <constraint ref="devcon:score" /><br /> </constraints><br /> </property><br /> </properties><br /></type><br />
  29. 29. Appendix – Demo Config – Datalist - Create<br />28<br /><config evaluator="model-type" condition="devcon:sessionFeedbackList"><br /> <forms><br /> <form><br /> <field-visibility><br /> <show id="devcon:attendeeFirstName" /><br /> <show id="devcon:attendeeLastName" /><br /> <show id="devcon:feedback" /><br /> <show id="devcon:score" /><br /> </field-visibility><br /> <create-form template="../data-lists/forms/dataitem.ftl" /><br /> <appearance><br /> <field id="devcon:feedback"><br /> <control template="/org/alfresco/components/form/controls/textarea.ftl"><br /> <control-param name="rows">6</control-param><br /> </control><br /> </field><br /> </appearance><br /> </form><br /> </forms><br /></config><br />
  30. 30. Appendix – Demo Config – Datalist - Edit<br />29<br /><config evaluator="node-type" condition="devcon:sessionFeedbackList"><br /> <forms><br /> <form><br /> <field-visibility><br /> <show id="devcon:attendeeFirstName" /><br /> <show id="devcon:attendeeLastName" /><br /> <show id="devcon:feedback" /><br /> <show id="devcon:score" /><br /> </field-visibility><br /> <edit-form template="../data-lists/forms/dataitem.ftl" /><br /> <appearance><br /> <field id="devcon:feedback"><br /> <control template="/org/alfresco/components/form/controls/textarea.ftl"><br /> <control-param name="rows">6</control-param><br /> </control><br /> </field><br /> </appearance><br /> </form><br /> </forms><br /></config><br />
  31. 31. Working Example<br />30<br /><ul><li>The working example will be made available in the next few weeks on my blog at http://blogs.alfresco.com/wp/gavinc
  32. 32. In the meantime have a look at the FDK for more examples</li>

×