<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Loftux AB &#187; forms</title>
	<atom:link href="http://loftux.com/tag/forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://loftux.com</link>
	<description>Dokumenthantering och informationshantering med öppen källkod</description>
	<lastBuildDate>Fri, 04 May 2012 11:11:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Select metadata edit form based on aspect</title>
		<link>http://loftux.com/2012/05/04/select-metadata-edit-form-based-on-aspect/</link>
		<comments>http://loftux.com/2012/05/04/select-metadata-edit-form-based-on-aspect/#comments</comments>
		<pubDate>Fri, 04 May 2012 11:11:20 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[surf]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=877</guid>
		<description><![CDATA[<p>For a client I needed to come up with a solution to use a specific metadata edit form when the document had a certain aspect applied. Reason was that that if it had this aspect, you should only be allowed to edit this subset of metadata, not the default name, title etc (sort of a [...]]]></description>
			<content:encoded><![CDATA[<p>For a client I needed to come up with a solution to use a specific metadata edit form when the document had a certain aspect applied. Reason was that that if it had this aspect, you should only be allowed to edit this subset of metadata, not the default name, title etc (sort of a lockdown). Out of the box you can only configure different forms based on document type so I needed to find a way to see if the document had the aspect applied, and if so show a special form.</p>
<p>In Share, when I need to alter default functionality I start with looking into the page I need to change, and then find out how this page is called, and if I can add parameters or need to change javascript. In this case it is page/site/{site}/edit-metadata that I somehow need to tell to use a different form. This page use template-instances/edit-metadata.xml, and in there is a form component</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- Edit Metadata Form --&gt;
&lt;component&gt;
  &lt;region-id&gt;edit-metadata&lt;/region-id&gt;
  &lt;url&gt;/components/form&lt;/url&gt;
  &lt;properties&gt;
    &lt;itemKind&gt;node&lt;/itemKind&gt;
    &lt;itemId&gt;{nodeRef}&lt;/itemId&gt;
    &lt;mode&gt;edit&lt;/mode&gt;
    &lt;submitType&gt;json&lt;/submitType&gt;
    &lt;showCaption&gt;true&lt;/showCaption&gt;
    &lt;showCancelButton&gt;true&lt;/showCancelButton&gt;
  &lt;/properties&gt;
&lt;/component&gt;
</pre>
<p>The form is rendered using the webscript /components/form, now I need to find out if there is a way to pass in a form id. I then look in folder site-webscripts/org/alfresco/components/form/ to find out how the form generation works, form.get.html.ftl includes form.lib.ftl and in there I can see that you can pass formId as an argument. I can now either alter template-instances/edit-metadata.xml, or use the new Surf extensibility functionality (from version 4.0). With a surf extension i add to site-data/extension a file called myextension.xml with content</p>
<pre class="brush: xml; title: ; notranslate">
&lt;extension&gt;
	&lt;modules&gt;
		&lt;module&gt;
			&lt;id&gt;ReplaceForm&lt;/id&gt;
			&lt;description&gt;Show edit metadata for specific form&lt;/description&gt;
			&lt;components&gt;
				&lt;component&gt;
					&lt;scope&gt;template&lt;/scope&gt;
					&lt;region-id&gt;edit-metadata&lt;/region-id&gt;
					&lt;source-id&gt;edit-metadata&lt;/source-id&gt;
					&lt;sub-components&gt;
						&lt;sub-component id=&quot;default&quot;&gt;
							&lt;evaluations&gt;
								&lt;evaluation id=&quot;hide&quot;&gt;
									&lt;render&gt;false&lt;/render&gt;
								&lt;/evaluation&gt;
							&lt;/evaluations&gt;
						&lt;/sub-component&gt;
						&lt;sub-component id=&quot;edit-metadata-new&quot; index=&quot;25&quot;&gt;
							&lt;url&gt;/components/form&lt;/url&gt;
							&lt;properties&gt;
								&lt;itemKind&gt;node&lt;/itemKind&gt;
								&lt;itemId&gt;{nodeRef}&lt;/itemId&gt;
								&lt;formId&gt;{formId}&lt;/formId&gt;
								&lt;mode&gt;edit&lt;/mode&gt;
								&lt;submitType&gt;json&lt;/submitType&gt;
								&lt;showCaption&gt;true&lt;/showCaption&gt;
								&lt;showCancelButton&gt;true&lt;/showCancelButton&gt;
							&lt;/properties&gt;
						&lt;/sub-component&gt;
					&lt;/sub-components&gt;
				&lt;/component&gt;
			&lt;/components&gt;
		&lt;/module&gt;
	&lt;/modules&gt;
&lt;/extension&gt;
</pre>
<p>I will not go into details about surf extension, instead watch the Alfresco <a href="http://www2.alfresco.com/TTL_Episode54" target="_blank">Webinar</a> about Surf extension with David Draper and read the <a href="http://www.slideshare.net/alfresco/tech-talk-live-on-share-extensibility" target="_blank">slides</a>. What happens when this customization is applied is that the default component is replaced by one that can take formId as url parameter. You can easily test this (when above extension is applied) by navigating to page edit-metadata and in the end of the url add &#038;formId=doclib-simple-metadata. You will se the form that is normally just used for the popup edit metadata dialog in the full page edit.</p>
<p>So now I need a way to call this page with the formId parameter. The edit-metadata page is opened using a document library action, so I need to append the formId parameter if (and only then) the aspect in question is used. From version 4.0 this is in configuration that you can easily alter. The default config for actions is found in share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml. From there I came up with this config that you can put in share-config-custom.xml</p>
<pre class="brush: xml; title: ; notranslate">
  &lt;config evaluator=&quot;string-compare&quot; condition=&quot;DocLibActions&quot;&gt;
    &lt;!-- Action definitions --&gt;
    &lt;actions&gt;
      &lt;action id=&quot;document-edit-metadata&quot; type=&quot;pagelink&quot; label=&quot;actions.document.edit-metadata&quot;&gt;
        &lt;param name=&quot;page&quot;&gt;edit-metadata?nodeRef={node.nodeRef}&lt;/param&gt;
        &lt;permissions&gt;
          &lt;permission allow=&quot;true&quot;&gt;Write&lt;/permission&gt;
        &lt;/permissions&gt;
        &lt;evaluator negate=&quot;true&quot;&gt;evaluator.doclib.action.isLocked&lt;/evaluator&gt;
        &lt;override&gt;document-edit-properties&lt;/override&gt;
      &lt;/action&gt;
      &lt;action id=&quot;document-edit-metadata-diarie&quot; type=&quot;pagelink&quot; label=&quot;actions.document.edit-metadata&quot;&gt;
        &lt;param name=&quot;page&quot;&gt;&lt;![CDATA[edit-metadata?nodeRef={node.nodeRef}&amp;formId=diarie]]&gt;&lt;/param&gt;
        &lt;permissions&gt;
          &lt;permission allow=&quot;true&quot;&gt;Write&lt;/permission&gt;
        &lt;/permissions&gt;
        &lt;evaluator&gt;evaluator.isDiarieNotLocked&lt;/evaluator&gt;
        &lt;override&gt;document-edit-metadata&lt;/override&gt;
        &lt;override&gt;document-edit-properties&lt;/override&gt;
      &lt;/action&gt;
    &lt;/actions&gt;

    &lt;!-- Action Group definitions --&gt;
    &lt;actionGroups&gt;
      &lt;actionGroup id=&quot;document-browse&quot;&gt;
        &lt;action index=&quot;130&quot; id=&quot;document-edit-metadata&quot; /&gt;
        &lt;action index=&quot;130&quot; id=&quot;document-edit-metadata-diarie&quot; /&gt;
      &lt;/actionGroup&gt;
      &lt;actionGroup id=&quot;document-details&quot;&gt;
        &lt;action index=&quot;120&quot; id=&quot;document-edit-metadata-diarie&quot; /&gt;
      &lt;/actionGroup&gt;
    &lt;/actionGroups&gt;
  &lt;/config&gt;
</pre>
<p>It does two things, first I replace the popup metadata edit in browse mode, I want the full page. So that is why the default config for action &#8216;document-edit-metadata&#8217; is added. I cannot only add this action to Action group definitions, because then you will see both, that is why I redefine the action, but now with an override to hide document-edit-properties if used. Next is to add my new action &#8216;document-edit-metadata-diarie&#8217; that has the formId parameter. Note that it needs enclose the parameter in CDATA to be valid xml. If the evaluator returns true, then use this one and override the others. So next we need to define the evaluator.isDiarieNotLocked. Default evaluators can be found in share/WEB-INF/classes/alfresco/slingshot-documentlibrary-context.xml. Put yours in a mycustom-context.xml file in the class-path.</p>
<pre class="brush: xml; title: ; notranslate">
  &lt;bean id=&quot;evaluator.hasdiariefordaspect&quot; parent=&quot;evaluator.doclib.action.hasAspect&quot;&gt;
    &lt;property name=&quot;aspects&quot;&gt;
      &lt;list&gt;
        &lt;value&gt;lx:diarieFord&lt;/value&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean id=&quot;evaluator.isNotLocked&quot; parent=&quot;evaluator.doclib.action.chainedMatchOne&quot;&gt;
    &lt;property name=&quot;evaluators&quot;&gt;
      &lt;list&gt;
        &lt;ref bean=&quot;evaluator.doclib.action.notEditable&quot; /&gt;
      &lt;/list&gt;
    &lt;/property&gt;
    &lt;property name=&quot;negateOutput&quot; value=&quot;true&quot; /&gt;
  &lt;/bean&gt;
  &lt;bean id=&quot;evaluator.isDiarieNotLocked&quot; parent=&quot;evaluator.doclib.action.chainedMatchAll&quot;&gt;
    &lt;property name=&quot;evaluators&quot;&gt;
      &lt;list&gt;
        &lt;ref bean=&quot;evaluator.hasdiariefordaspect&quot; /&gt;
        &lt;ref bean=&quot;evaluator.isNotLocked&quot; /&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
</pre>
<p>So my evaluators does this, evaluator.hasdiariefordaspect checks that is has the required aspect, evaluator.isNotLocked evaluates if it can be edited and is not locked (this one propbably can be defined in a smarter way, but it works), then finally put together in evaluator.isDiarieNotLocked where we need both previous evaluators to be true. If you want to learn more about Share Document library extension read Mike Hatfields <a href="http://blogs.alfresco.com/wp/mikeh/" target="_blank">blog</a>.</p>
<p>And finally we have customized Share to use a specific form for edit metadata when the document has the selected aspect applied. With only configuration files!</p>
<p>Note that my approach lets user with a bit of knowledge add whatever form id they want in the url, and thus potentially edit hidden metadata. In this use case it was not considered an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2012/05/04/select-metadata-edit-form-based-on-aspect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Alfresco multilingual properties &#8211; feature or bug?</title>
		<link>http://loftux.com/2011/10/30/alfresco-multilingual-properties-feature-or-bug/</link>
		<comments>http://loftux.com/2011/10/30/alfresco-multilingual-properties-feature-or-bug/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 13:02:41 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[I18N]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=796</guid>
		<description><![CDATA[<p>Many of you that use Alfresco is probably not aware of that Alfresco has built in support for multilingual properties. Out of the box Alfresco use this for Title and Description, but only for those two. What this means for documents is that if you are logged into Share as a user with en_US locale [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you that use Alfresco is probably not aware of that Alfresco has built in support for multilingual properties. Out of the box Alfresco use this for Title and Description, but only for those two. What this means for documents is that if you are logged into Share as a user with en_US locale preferences and create a document with title &#8220;My English Title&#8221; and description &#8220;My English description&#8221;, then a user with sv_SE (as in swedish) updates the properties to title &#8220;My Swedish Title&#8221; and description &#8220;My Swedish description&#8221;, any user with en_US will still see the original text, sv_SE user will see the &#8220;translated&#8221; Swedish text. For this to happen you do not need to have that language pack installed. To test this I recommend Firefox with the plugin Quick Locale Switcher.</p>
<p>This is a very nice feature, that just works. But there are some problems with this. First there is no indication in Share forms that this happens, there should at least be visual indication that it is. Second problem is that the title and description properties are not just used for documents, they are user for many other components in Alfresco. I have done some testing, and I have found that Site name and description, Blog posts title, Discussion topic title, Data List name and description, and Data List entry name and description will show different texts depending on locale if it has been edited with different locale. Again this only happens if edited with a different locale, probably not happening so many times that a Discussion is edited with different locales, but that Site Managers from different countries change Site title and description is not unlikely.</p>
<p>It was a client of mine that first noticed this behavior, and I filed a bug <a href="https://issues.alfresco.com/jira/browse/ALF-3756" target="_blank">ALF-3756</a> in July 2010. My initial reaction was that users should not see different things, and that is was because user user different browsers, and that this should be fixed. As it turns out, it is not because of different browsers, it is because of different locale preference set in different browsers. It was recently fixed in HEAD, so happily testing this out, nothing had changed and the behavior is the same. So i filed a regression bug <a href="https://issues.alfresco.com/jira/browse/ALF-11166" target="_blank">ALF-11166</a>, but after thinking of the multilingual behavior, it may be that it is not a bug after all, and this is why I&#8217;m writing this post.</p>
<p>I&#8217;ve thought of ways to fix this, one could be that you change the property definition of cm:title and cm:description in the data model from d:mltext to d:text. Some limited testing shows that this work, a property will stay multilingual (d:mltext) until next edit, then it is saved as d:text, and all user see the same thing regardless of locale. Changing the default model is nothing I recommend, and I only did very limited testing just to see what happened. And this is probably not the way to fix this, because it removes a nice feature. Alfresco is very locale (I18N for the hardcore) aware, you can localise almost everything, and from 4.0 property lists (constraints) can be localized. So the very fact that you can have a Site title and description in different locale is a good thing.</p>
<p>So the proper fix for this is to visually indicate what is going on in all forms and dialogs. It can be implemented in steps if not the full approach can be taken at once</p>
<ol>
<li>
Create a control with flag corresponding to the locale used, so that you visually see what locale is currently being edited.
</li>
<li>
Change the control so that you can list other values to see base language and the current values for other locales. That way you can keep track of translations and keep them in sync.
</li>
</ol>
<p>I created (or actually updated existing text controls) and then it looks like this for multilingual properties<br />
<a href="http://loftux.se/wp-content/uploads/2011/10/Multilingual-Properties.png"><img src="http://loftux.se/wp-content/uploads/2011/10/Multilingual-Properties-300x161.png" alt="" title="Multilingual Properties" width="300" height="161" class="alignleft size-medium wp-image-800" /></a><br />
Full details on how I did this is in the issue <a href="https://issues.alfresco.com/jira/browse/ALF-11166" target="_blank">ALF-11166</a>. Its a simple first step with just editing the control freemarker templates, a more complete solution would be as I outlined the possibility to list all added values for different languages. Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/10/30/alfresco-multilingual-properties-feature-or-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CKEditor Plugin for Alfresco Share forms</title>
		<link>http://loftux.com/2011/05/11/ckeditor-plugin-for-alfresco-share-forms/</link>
		<comments>http://loftux.com/2011/05/11/ckeditor-plugin-for-alfresco-share-forms/#comments</comments>
		<pubDate>Wed, 11 May 2011 07:34:45 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[extras]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=709</guid>
		<description><![CDATA[<p><a href="http://loftux.se/wp-content/uploads/2011/05/ckeditor-edit.png"></a>Alfresco Share use as standard TinyMCE for inline editing of html files. I needed to customize the editor for a project, but the TinyMCE editor used has some specific Alfresco customizations. Instead trying to understand the Alfresco code, I started from scratch and used the CKEditor, <a href="http://ckeditor.com" target="_blank">ckeditor.com</a>.</p> <p>Functionality</p> All standard functionality in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://loftux.se/wp-content/uploads/2011/05/ckeditor-edit.png"><img class="alignleft size-medium wp-image-695" title="ckeditor-edit" src="http://loftux.se/wp-content/uploads/2011/05/ckeditor-edit-300x220.png" alt="" width="300" height="220" /></a>Alfresco Share use as standard TinyMCE for inline editing of html files. I needed to customize the editor for a project, but the TinyMCE editor used has some specific Alfresco customizations. Instead trying to understand the Alfresco code, I started from scratch and used the CKEditor, <a href="http://ckeditor.com" target="_blank">ckeditor.com</a>.</p>
<p>Functionality</p>
<ul>
<li>All standard functionality in CKEditor.</li>
<li>Loading of custom configuration files</li>
<li>Insert images directly form Alfresco Share site</li>
</ul>
<p>For form in Alfresco Share it is easy to create new controls. In this case you just tell Share form to use the new control</p>
<pre class="brush: xml; title: ; notranslate">&lt;appearance&gt;
   &lt;field id=&quot;cm:content&quot;&gt;
      &lt;control template=&quot;/org/alfresco/components/form/controls/ckeditor.ftl&quot;&gt;
         &lt;control-param name=&quot;forceEditor&quot;&gt;true&lt;/control-param&gt;
      &lt;/control&gt;
   &lt;/field&gt;
&lt;/appearance&gt;</pre>
<p>The actual control including source code can be <a href="http://code.google.com/p/share-extras/downloads/detail?name=ckeditor-form-control-0.1.jar" target="_blank">downloaded</a> from <a href="http://code.google.com/p/share-extras/wiki/CKEditorFormControl" target="_blank">Share Extras project</a>.  More on how to configure forms on <a href="http://wiki.alfresco.com/wiki/Forms" target="_top">Alfresco Wiki</a><br />
To install, copy the file ckeditor-form-control-0.1.jar to tomcat/webapps/share/WEB-INF/lib. Then change the form definitions as outlined above or copy the file <a href="http://share-extras.googlecode.com/svn/trunk/CKEditor%20Form%20Control/ckeditor-config-custom.xml.sample target="_blank">ckeditor-config-custom.xml</a> (remove .sample file ending) to tomcat/shared/classes/alfresco/web-extension and restart.</p>
<p>If you would like to use custom configuration file you can tell the control what config file to load with</p>
<pre class="brush: xml; title: ; notranslate">&lt;control-param name=&quot;settingsfile&quot;&gt;components/editors/ckeditor/my-config.js&lt;/control-param&gt;</pre>
<p>The path should start without / and point to the location where you put your file. If you create a nice config file I can include it as an option file if you send it to me. Planning to add som custom config files in the future. More on how to <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide">configure CKEditor</a></p>
<p><a href="http://loftux.se/wp-content/uploads/2011/05/ckeditor-filebrowser.png"><img class="alignleft size-medium wp-image-704" title="ckeditor-filebrowser" src="http://loftux.se/wp-content/uploads/2011/05/ckeditor-filebrowser-300x252.png" alt="" width="300" height="252" /></a><br />
To browse for images, click &#8220;browse on server&#8221; and you will get a list of thumbnails. I based it on the Images dashlet, so of course you can click on an image to get a large preview. To select an image, click on the filename.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/05/11/ckeditor-plugin-for-alfresco-share-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco forms for Share</title>
		<link>http://loftux.com/2010/02/11/alfresco-forms-for-share/</link>
		<comments>http://loftux.com/2010/02/11/alfresco-forms-for-share/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 14:07:23 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=116</guid>
		<description><![CDATA[<p>Alfresco Share now has support for presentation of custom metadata using a forms engine. I have recently tried and implemented this for a customer. Here are some of my experiences (the examples requires some previous knowledge of Alfresco configuration).<br /> <br /> Start by reading the Alfresco documentation for <a href="http://wiki.alfresco.com/wiki/Forms">forms</a>. You will find most [...]]]></description>
			<content:encoded><![CDATA[<p>Alfresco Share now has support for presentation of custom metadata using a forms engine. I have recently tried and implemented this for a customer. Here are some of my experiences (the examples requires some previous knowledge of Alfresco configuration).<br />
<span id="more-116"></span><br />
Start by reading the Alfresco documentation for <a href="http://wiki.alfresco.com/wiki/Forms">forms</a>. You will find most thing on how to configure form there, and links to sample customizations. I have put my customized forms in share-config-custom.xml, that you place in web-extension folder. One thing that is not obvious from the Wiki documentation is how you add the <a href="http://wiki.alfresco.com/wiki/Forms#Configuring_Forms">confguration</a> for aspects. What you do is to put it in its own aspect evaluator</p>
<pre class="brush: xml; title: ; notranslate">
&lt;config evaluator=&quot;aspect&quot; condition=&quot;my:customaspect&quot;&gt;
	&lt;forms&gt;
		&lt;form&gt;
			&lt;appearance&gt;
				&lt;field id=&quot;my:customtextfield&quot; set=&quot;mycustomset&quot; mandatory=&quot;true&quot;&gt;
					&lt;control template=&quot;/org/alfresco/components/form/controls/autocomplete.ftl&quot;&gt;
						&lt;control-param name=&quot;ds&quot;&gt;/share/service/ds/autocomplete/alfrescoperson /&gt;
					&lt;/control&gt;
				&lt;/field&gt;
			&lt;/appearance&gt;
		&lt;/form&gt;
	&lt;/forms&gt;
&lt;/config&gt;
</pre>
<p>Now you have the looks of you aspect defined, now you will have to add when to display your custom aspect.</p>
<pre class="brush: xml; title: ; notranslate">&gt;
&lt;config evaluator=&quot;node-type&quot; condition=&quot;my:customtype&quot;&gt;
	&lt;forms&gt;
		&lt;form&gt;
			&lt;field-visibility&gt;
				&lt;show id=&quot;sys:node-dbid&quot; /&gt;
				&lt;show id=&quot;my:customaspect&quot; /&gt;
				...
</pre>
<p> It will display if you add that aspect to your document for that particular custom type. As you can see it should not go into the  appearence tag in node-type evaluator. For properties specific for that document type on the other hand, appearance should be placed there. As you can see I also use a custom set to group and to put a label for the aspect above (mycustomset). You will have to assign it under the aspect-evaluator. What you will have to do is for each document type create an appearance tag for the custom set you want to use.</p>
<pre class="brush: xml; title: ; notranslate">&lt;set id=&quot;mycustomset&quot; appearance=&quot;bordered-panel&quot; label=&quot;Company Inc. - My Custom Type&quot; /&gt;</pre>
<p>I have used the label to clearly identify what type of document you current document is (My Custom Type in this case).<br />
As you can see i&#8217;ve used sys:node-dbid, that is the internal number sequence Alfresco assigns a document, and works perfectly as a dokument-id. However, we need a better label than the default one. You can get that by adding to your node-type evaluator for you custom type</p>
<pre class="brush: xml; title: ; notranslate">&lt;appearance&gt;
       &lt;field id=&quot;sys:node-dbid&quot; read-only=&quot;true&quot; set=&quot;mycustomset&quot; label=&quot;Document ID&quot; /&gt;</pre>
<p>The forms enginge uses the data models message <a href="http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Model_Localization">resource bundle</a> to know what labels to put for each metadata field. So create this file together with you model file if you want you property sheet to be multi-lingual. It should be possible to create resource bundles that is used by the forms engine so that you dont need to hardcode for example &#8220;Document ID&#8221; as I did. I have yet to find out where to put those files, have to come back to that.<br />
The end result could be something like this:<br />
<a href="http://loftux.se/wp-content/uploads/2010/02/ShareForms.png"><br />
<img src="http://loftux.se/wp-content/uploads/2010/02/ShareForms-300x280.png" alt="" title="Share Forms" width="300" height="280" class="alignnone size-medium wp-image-110" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2010/02/11/alfresco-forms-for-share/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

