Aspectos - Busquedas y Formularios

cancel
Showing results for 
Search instead for 
Did you mean: 
nalvarez_colesc
Active Member II

Aspectos - Busquedas y Formularios

Muy buenos días, entiendo que soy repetitivo y molesto con esto, estuve leyendo y buscando, encontré varios documentos y post's al respecto, pero no logro poder:

1) Que la búsqueda simple me realice "búsquedas de mis aspectos personalizados".

2) Crear un formulario de búsqueda avanzada para mi aspecto.

Para tipos / modelos puedo ok. El aspecto esta bien definido, ya que el mismo funciona. Pero no logro que sus propiedades sean utilizadas en búsquedas. 

Les comparto mi shared-custom-config, para ver si alguno puede ayudarme, una vez mas me disculpo por las molestias y agradezco desde ya su colaboración.

<aspects>
<!-- Aspects that a user can see -->
<visible>
<aspect name="cm:generalclassifiable" />
<aspect name="cm:complianceable" />
<aspect name="cm:dublincore" />
<aspect name="cm:effectivity" />
<aspect name="cm:summarizable" />
<aspect name="cm:versionable" />
<aspect name="cm:templatable" />
<aspect name="cm:emailed" />
<aspect name="emailserver:aliasable" />
<aspect name="cm:taggable" />
<aspect name="app:inlineeditable" />
<aspect name="cm:geographic" />
<aspect name="exif:exif" />
<aspect name="audio:audio" />
<aspect name="cm:indexControl" />
<aspect name="dp:restrictable" />
<aspect name="smf:customConfigSmartFolder" />
<aspect name="smf:systemConfigSmartFolder" />
<aspect name="verificable:documento" />
<aspect name="descriptible:documento" />
</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>


<types>

<!-- NEW -->
<type name="cm:content">
<subtype name="inside:documento" />
</type>

<type name="cm:content">
<subtype name="colescba:documento" />
</type>

<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<type name="cm:content">
<subtype name="descriptible:documento" />
</type>


<type name="cm:content">
<subtype name="smf:smartFolderTemplate" />
</type>

<type name="cm:folder">
</type>

<type name="trx:transferTarget">
<subtype name="trx:fileTransferTarget" />
</type>
</types>

<!-- needed for Create Content menu -->
<create-content>
<content id="myContent" mimetype="text/xml" label="Documento InSide" itemid="inside:documento"/>
<content id="colescba" mimetype="text/xml" label="Documento Colescba" itemid="colescba:documento"/>

<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<content id="verificable" mimetype="text/xml" label="verificable" itemid="verificable:documento"/>
<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<content id="descriptible" mimetype="text/xml" label="descriptible" itemid="descriptible:documento"/>
</create-content>


<!--
If set, will present a WebDAV link for the current item on the Document and Folder details pages.
Also used to generate the "View in Alfresco Explorer" action for folders.
-->
<repository-url>http://localhost:8080/alfresco</repository-url>

<!--
Google Docs™ integration
-->
<google-docs>
<!--
Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
-->
<enabled>false</enabled>

<!--
The mimetypes of documents Google Docs allows you to create via the Share interface.
The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
-->
<creatable-types>
<creatable type="doc">application/vnd.openxmlformats-officedocument.wordprocessingml.document</creatable>
<creatable type="xls">application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</creatable>
<creatable type="ppt">application/vnd.ms-powerpoint</creatable>
</creatable-types>
</google-docs>

<!--
File upload configuration
-->
<file-upload>
<!--
Adobe Flash™
In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session.
See: http://bugs.adobe.com/jira/browse/FP-4830
For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries.
-->
<adobe-flash-enabled>true</adobe-flash-enabled>
</file-upload>
</config>

<!-- You need to add "node-type" (for viewing/editing) and "model-type" (for creating) -->

<config evaluator="model-type" condition="colescba:documento">
<forms>
<form id="search">
<field-visibility>
<show id="colescba:Nombre_archivo" />
<show id="colescbaSmiley Very Happyescripcion_del_archivo" />
<show id="colescba:Usuario_alta" />
<show id="colescba:Fecha_alta" />
<show id="colescba:Usuario_modificacion" />
<show id="colescba:Fecha_modificacion" />
<show id="colescba:Cvs" />
<show id="colescba:Valor_cvs" />
<show id="colescba:Identificador" />
<show id="colescba:Tipo_Identificador" />
<show id="colescbaSmiley Tongueartido" />
<show id="colescba:Registro" />
<show id="colescba:Bis" />
<show id="colescbaSmiley Frustratedector" />
<show id="colescba:Modulo" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>


<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<config evaluator="model-type" condition="descriptible:documento">
<forms>
<form id="search">
<field-visibility>
<show id="descriptible:nombre" />
<show id="descriptible:descripcion" />
<show id="descriptible:tipo" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>


<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<config evaluator="node-type" condition="descriptible:documento">
<forms>
<form>
<field-visibility>
<show id="descriptible:nombre" />
<show id="descriptible:descripcion" />
<show id="descriptible:tipo" />
</field-visibility>
</form>
</forms>
</config>

<config evaluator="node-type" condition="colescba:documento">
<forms>
<form>
<field-visibility>
<show id="colescba:Nombre_archivo" />
<show id="colescbaSmiley Very Happyescripcion_del_archivo" />
<show id="colescba:Usuario_alta" />
<show id="colescba:Fecha_alta" />
<show id="colescba:Usuario_modificacion" />
<show id="colescba:Fecha_modificacion" />
<show id="colescba:Cvs" />
<show id="colescba:Valor_cvs" />
<show id="colescba:Identificador" />
<show id="colescba:Tipo_Identificador" />
<show id="colescbaSmiley Tongueartido" />
<show id="colescba:Registro" />
<show id="colescba:Bis" />
<show id="colescbaSmiley Frustratedector" />
<show id="colescba:Modulo" />
</field-visibility>
</form>
</forms>
</config>

<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<config evaluator="aspect" condition="verificable:documento">
<forms>
<form id="search">
<field-visibility>
<show id="verificable:Cvs" />
<show id="publicableSmiley Tongueublico" />
</field-visibility>

</form>
</forms>
</config>

<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<config evaluator="node-type" condition="descriptible:documento">
<forms>
<form id="search">
<field-visibility>
<show id="descriptible:nombre" />
<show id="descriptible:descripcion" />
<show id="descriptible:tipo"/>
</field-visibility>

</form>
</forms>
</config>


<config evaluator="node-type" condition="cm:content">
<forms id="nelson">
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:author" force="true" />
<show id="size" for-mode="view" />
<show id="cm:creator" for-mode="view" />
<show id="cm:created" for-mode="view" />
<show id="cm:modifier" for-mode="view" />
<show id="cm:modified" for-mode="view" />

<!-- De esta manera muestro las propiedades de los aspectos en la vista del documento -->
<show id="descriptible:nombre" />
<show id="descriptible:descripcion" />
<show id="descriptible:tipo" />
<show id="verificable:Cvs" />
</field-visibility>
</form>
</forms>
</config>


<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>

<forms>

<form labelId="Inside"
descriptionId="Documento Inside">
inside:documento
</form>

<form labelId="Colescba"
descriptionId="Metadatos Colescba">
colescba:documento
</form>


<!-- Este es mi ASPECTO, el que quiero mostrar y buscar -->
<form labelId="descriptible"
descriptionId="descriptible">
descriptible:documento
</form>

</forms>
</advanced-search>
</config>

1 Reply
angelborroy
Alfresco Employee

Re: Aspectos - Busquedas y Formularios

Las búsquedas avanzadas solo soportan tipos, así que deberás declarar la búsqueda sobre un tipo (p.e colescba:documento) y después incluir como propiedades de búsqueda las propiedades del aspecto sobre el que quieras buscar incluyendo el tag force="true" para que la muestre en el formulario.

Explico algo parecido aquí:

Alfresco Share – Customize advanced search for aspect properties | Programming and So 

Hyland Developer Evangelist