Did you look at how it's done in OFBiz OOTB? There are plenty of cases where 
you enter/set values for a search and a have a result list underneath.
There are several ways to do this. Using a couple of widget forms (find a list 
forms) with the performFind service in the list form is the easiet, when 
possible
This is for instance a common pattern in lookups fields

Jacques

On Wednesday, January 15, 2014 12:12 PM, jadelome...@robertheath.co.uk wrote
> So in fact I have the following form:
> 
> /<form name="PlanetDropDown" type="single"  target="processDropdown">
> 
>  <field name="planetId" title="LoanVehicle"
> map-name="mechMap.postalAddress">
>    <drop-down allow-empty="false" current="selected">
>      <option key="parameterValue1" description="All"/>
>      <option key="parameterValue2" description="Yes"/>
>      <option key="parameterValue3" description="No"/>
>    </drop-down>
>  </field>
> 
>  <field name="planetId2" title="HireVehicle"
> map-name="mechMap.postalAddress">
>    <drop-down allow-empty="false" current="selected">
>      <option key="parameterValue1" description="All"/>
>      <option key="parameterValue2" description="Yes"/>
>      <option key="parameterValue3" description="No"/>
>    </drop-down>
>  </field>
> 
>  <field name="planetId3" title="Type" map-name="mechMap.postalAddress">
>    <drop-down allow-empty="false" current="selected">
>      <entity-options description="${planetName}" entity-name="Planet"
> key-field-name="planetId" filter-by-date="true">
>        <entity-order-by field-name="planetName"/>
>      </entity-options>
>    </drop-down>
>  </field>
> 
>  <field name="planetId4" title="Status" map-name="mechMap.postalAddress">
>    <drop-down allow-empty="false" current="selected">
>      <entity-options description="${planetName}" entity-name="Planet"
> key-field-name="planetId" filter-by-date="true">
>        <entity-order-by field-name="planetName"/>
>      </entity-options>
>    </drop-down>
>  </field>
> 
>  <field name="ContractStart"><date-time type="date" default-value="${bsh:
> org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/></field>
>  <field name="ContractEnd"><date-time type="date" default-value="${bsh:
> org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/></field>
> 
>  <field name="make"><text/></field>
>  <field name="model"><text/></field>
>  <field name="registrationNumber"><text/></field>
>  <field name="search"><submit/></field>
> 
> </form>/
> 
> which is included in a screen.
> 
> I then created an event like this:
> 
> / public static String processDropdown(HttpServletRequest
> request,HttpServletResponse response)
> {
> String make = request.getParameter("make");
> String model = request.getParameter("model");
> String registrationNumber = request.getParameter("registrationNumber");
> String resultMsg = make + " " + model + " " + registrationNumber;
> if( make==null || model==null || registrationNumber==null || make=="" ||
> model=="" || registrationNumber==""  )
> {return "error";}
> request.setAttribute("resultMsg", resultMsg);
> request.setAttribute("allParams", UtilHttp.getParameterMap(request));
> request.setAttribute("submit", "Submitted");
> request.setAttribute("_EVENT_MESSAGE_", resultMsg);
> 
> 
> return "success";
> 
> }/
> 
> note: a lot is there just for testing. + I also wrote a lot of other
> screens, forms, ...for testing
> 
> Question:
> 
> How would I, from within the event shown above, trigger a query which would
> have conditions the make, model & other parameters that I am getting from my
> FORM.
> And I would like to show the results of this query in another scree. Would
> having a FORM of type list in that screen be the best way to show the query
> results?
> 
> 
> 
> 
> 
> -----
> Jad El Omeiri

Reply via email to