ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Malin <nicolas.ma...@nereide.fr>
Subject Improve FindGeneric on webtools
Date Thu, 16 Feb 2017 10:01:15 GMT
Hello, I want just sharing a small improvement realized yesterday.

During a travel, I was bored on the train I tried to replace the old ftl 
FindGeneric screen to display and search all entity by an xml form with 

The main problem came from it's impossible to create a xml file with use 
dynamiclay an entityName for the element <auto-fields-entity> (for 
cache/performance reason) so I tried to generate on the fly by groovy 
the xml flow, and call without cache the rendering, like this :
String dynamicAutoEntityFieldForm = '<?xml version="1.0" 
         '<form name="FindGeneric" type="single" target="FindGeneric">' +
         '<auto-fields-entity entity-name="' + entityName + '" 
default-field-type="find"/>' +
         '<field name="noConditionFind"><hidden value="Y"/></field>' +
         '<field name="entityName"><hidden value="' + entityName + 
'"/></field>' +
         '<field name="searchButton" title="' + 
"FormFieldTitle_searchButton", locale) + '"><submit/></field>' +
     Document dynamicAutoEntityFieldFormXml = 
UtilXml.readXmlDocument(dynamicAutoEntityFieldForm, true, true)
     dynamicAutoEntitySearchFormRenderer.render(writer, context)
and on the ftl
I realized this on the search and list form so now I can use complex 
search operator and the performFind for all entity. What do you thinks 
about that ?

I will open an issue.


logoNrd <https://nereide.fr/>
	Nicolas Malin
The apache way <http://theapacheway.com/> : *Openness* Technical 
decisions are made publicly
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way 
<http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE 

View raw message