Hi Alberto,

I ended up overriding SearchActionsBean and SearchResultsBean to implement 
a new new type of search I called CONSTRAINED. The big change i made was 
the ability to pass a parameter from the search xhtml to the underlying 
custom search process which then maps to a queryModel I contributed via a 
query model contribution. In this way I can have numerous searches, each 
that uses it's own NXQL and I can restrict simple searches to a specific 
document type for example.

The xhtml command button then looked like
    <h:commandButton action=
"#{searchActions.performSearchCustom('CONSTRAINED')}"
      rendered="#{searchEnabled}"
      value="Client" class="button" /> 

Constrained maps (programmatically) to a query contribution
                <queryModel name="CONSTRAINED_SEARCH">
                        <pattern>
                                SELECT * FROM Document
                                WHERE ecm:fulltext LIKE ? AND
                                ecm:mixinType != 'HiddenInNavigation' AND
                                ecm:isCheckedInVersion = 0 AND
                                ecm:primaryType = 'Client Binder' AND
                                ecm:currentLifeCycleState != 'deleted'
                </pattern>
                        <max>15</max>
                        <sortable value="true" />
                </queryModel>

--------------------
metaLogic
ph. +1.905.629.7775 x225
fax +1.905.629.9887
http://metaLogic.ca



From:   Alberto Chaparro Terleira <[email protected]>
To:     <[email protected]>
Date:   03/10/2010 11:30 AM
Subject:        [Ecm] CUSTOM SEARCH



Hi all,

I would like to create several custom search screens in Nuxeo. We have 
some document types, for example contract and invoice document type, for 
each of them, we want to have an independent screen where we can select 
some filters (associated to custom document type attributes) and create 
and execute a NXDQL query with them.

Does someone know the way to do it?

Best regards.

Alberto Chaparro Terleira
Atos Origin
Technological Solutions
TELF: 91 126 72 92
T  [email protected]
------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive 
this e-mail in error, please notify the sender immediately and destroy it. 

As its integrity cannot be secured on the Internet, the Atos Origin 
group liability cannot be triggered for the message content. Although 
the sender endeavours to maintain a computer virus-free network, 
the sender does not warrant that this transmission is virus-free and 
will not be liable for any damages resulting from any virus transmitted. 

Este mensaje y los ficheros adjuntos pueden contener informacion 
confidencial 
destinada solamente a la(s) persona(s) mencionadas anteriormente 
pueden estar protegidos por secreto profesional. 
Si usted recibe este correo electronico por error, gracias por informar 
inmediatamente al remitente y destruir el mensaje. 
Al no estar asegurada la integridad de este mensaje sobre la red, Atos 
Origin 
no se hace responsable por su contenido. Su contenido no constituye ningun 

compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas 
partes. 
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor 

no puede garantizar nada al respecto y no sera responsable de cualesquiera 

danos que puedan resultar de una transmision de virus. 
------------------------------------------------------------------

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm


_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to