ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Smits <pierre.sm...@gmail.com>
Subject Re: Error (for me only probably) LookupProduct screen
Date Mon, 08 Jul 2013 20:09:41 GMT

If I understand you correctly, you modified the entity 'Product' to not
include field 'facilityId'. And thus you now have to modify a standard
function to facilitate your needs.

Wouldn't it have been easier to add the field again in your entity, and not
modify the lookup functionality?



Pierre Smits

On Mon, Jul 8, 2013 at 8:07 PM, Skip <skip@thedevers.org> wrote:

> This is in a custom screen (not part of ofbiz) that edits
> products/prices/vendors/inventory/etc all in a single screen.  One of the
> parameters in the parameter map of this screen is facilityId (used for
> inventory).  facilityId is also a field in Product table.
> In this custom screen, I replaced the existing productId lookup field with
> <@htmlTemplate.lookupField ... fieldFormName="LookupProduct"/>  to be able
> to get autocompletion.  However, when I first tried it, I got no results
> even though I used well known productIds.  A little investigation turned up
> the problem to be with performFind.  LookupProducts has two forms,
> lookupProduct and listLookupProduct, both in
> product\widget\catalog\LoookupScreens.xml.  The second, listLookupProduct
> calls the service performFind with all parameters as the inputFields
> argument to that service.  However, because facilityId is in the parameter
> map, performFind finds that as a valid field in Product table and adds it
> to
> the query.  Once again, because I do not use facilityId for my Product
> table, no results were returned.
> The screen LookupProduct in LookupScreens.xml defines a <set
> field="searchFields".  However, this value is not used anywhere I can find
> and specifically is not used in the performFind service.  I simply added
> searchFields as an optional argument to the performFind servoce and in the
> performFind java code, used it if it existed by extracting just those
> values
> from the inputFields map.  Works a charm, but I am trying to find an OOTB
> solution because the next time I upgrade ofbiz, this code change will go
> away.
> This will be a problem to anyone using any of the lookup services in a
> custom app where there may be an unintended field in the parameter map.
> Skip
> -----Original Message-----
> From: Pierre Smits [mailto:pierre.smits@gmail.com]
> Sent: Monday, July 08, 2013 6:11 AM
> To: user@ofbiz.apache.org
> Subject: Re: Error (for me only probably) LookupProduct screen
> Skip,
> In what component are you using the LookupProduct functionality where it
> doesn't deliver the expected result?
> Regards,
> Pierre Smits

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message