http://127.0.0.1:8080/share/page/site/test/search?t=&q={'prop_sc_archiviata-date-range':'','prop_sc_...
<?xml version="1.0" encoding="UTF-8"?>
<!– Custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository. So, all custom –>
<!– types and aspects added here will automatically be registered –>
<model name="sc:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Custom Model</description>
<author></author>
<version>1.0</version>
<imports>
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="custom.model" prefix="sc"/>
</namespaces>
<types>
<type name="sc:tipomodulo">
<title>Modulistica</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>sc:protocollabile</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<aspect name="sc:protocollabile">
<title>Previp Protocollo</title>
<properties>
<property name="sc:archiviata">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="sc:codmodulo">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sc:codprotocollo">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sc:codfiscale">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sc:cognome">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sc:nome">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</aspect>
</aspects>
</model>
<alfresco-config>
<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">
<aspects>
<!– Aspects that a user can see –>
<visible>
<aspect name="sc:protocollabile" />
</visible>
<!– Aspects that a user can add. Same as "visible" if left empty –>
<addable>
</addable>
<!– Aspects that a user can remove. Same as "visible" if left empty
–>
<removeable>
</removeable>
</aspects>
</config>
<config evaluator="aspect" condition="sc:protocollabile">
<forms>
<form>
<field-visibility>
<show id="sc:archiviata" />
<show id="sc:codmodulo" />
<show id="sc:codprotocollo" />
<show id="sc:codfiscale" />
<show id="sc:cognome" />
<show id="sc:nome" />
</field-visibility>
<appearance>
<field id="sc:archiviata" label-id="prop.sc_archiviata" />
<field id="sc:codmodulo" label-id="prop.sc_codmodulo" />
<field id="sc:codprotocollo" label-id="prop.sc_codprotocollo" />
<field id="sc:codfiscale" label-id="prop.sc_codfiscale" />
<field id="sc:cognome" label-id="prop.sc_cognome" />
<field id="sc:nome" label-id="prop.sc_nome" />
</appearance>
</form>
</forms>
</config>
<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!– Forms for the advanced search type list –>
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="type.sc_tipomodulo" descriptionId="search.form.desc.sc_tipomodulo">sc:tipomodulo</form>
</forms>
</advanced-search>
</config>
<config evaluator="model-type" condition="sc:tipomodulo">
<forms>
<!– Search form –>
<form id="search">
<field-visibility>
<show id="sc:archiviata" />
<show id="sc:codmodulo" force="true" />
<show id="sc:codprotocollo" />
<show id="sc:codfiscale" />
<show id="sc:cognome" />
<show id="sc:nome" />
</field-visibility>
<appearance>
<field id="sc:archiviata" label-id="prop.sc_archiviata">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="sc:codmodulo" label-id="prop.sc_codmodulo">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:codprotocollo" label-id="prop.sc_codprotocollo">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:codfiscale" label-id="prop.sc_codfiscale">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:cognome" label-id="prop.sc_cognome">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:nome" label-id="prop.sc_nome">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
</alfresco-config>
Map newDocProps = new HashMap();
newDocProps.put(PropertyIds.OBJECT_TYPE_ID, "D:sc:tipomodulo,P:cm:titled,P:sc:protocollabile,P:cm:author");
/**
* Custom content types
*/
function getContentTypes()
{
// TODO: Data webscript call to return list of a
var contentTypes = [
{
id: "cm:content",
value: "cm_content"
},
{
id: "sc:tipomodulo",
value: "type.sc_tipomodulo"
}];
return contentTypes;
}
model.contentTypes = getContentTypes();
function main()
{
// Widget instantiation metadata…
var flashUpload = {
id : "FlashUpload",
name : "Alfresco.FlashUpload"
};
model.widgets = [flashUpload];
}
main();
<!–
Used by the "Change Type" action
Define valid subtypes using the following example:
<type name="cm:content">
<subtype name="cm:mysubtype" />
</type>
Remember to also add the relevant i18n string(s):
cm_mysubtype=My SubType
–>
<types>
<type name="cm:content">
<subtype name="sc:tipomodulo" />
</type>
</types>
<subtype name="cm:mysubtype" />
<subtype name="sc:tipomodulo" />
<config evaluator="model-type" condition="cm:content" force="true">
<forms>
<!– Search form –>
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="shc:type" force="true" />
<show id="shc:owner" force="true" />
<show id="shc:dateAdopted" force="true" />
<show id="shc:reviewDate" force="true" />
<!– tuoi campi custom –>
<show id="sc:cognome" force="true" />
<show id="sc:nome" force="true" />
</field-visibility>
<appearance>
<field id="shc:reviewDate">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="shc:dateAdopted">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<!– campi custom –>
<field id="sc:cognome" label-id="prop.sc_cognome">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:nome" label-id="prop.sc_nome">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
Archive content from product discussions in Italian.
This group is now closed and content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.