Hi Bilgin,

Glad you are also interested by that. Sure, actually all is already in trunk. It was 1st commited by Andrew at r894277, 894460, 894480, 894671, 904198. Then, at r904922, I just fixed an issue related to the new layer lookup feature (Ajaxified lookup, thanks to Sascha's work) that I will explain and certainly generalize soon in trunk. Contrary at the lookup by name, this last feature is easy to install and will replace the old popup lookups, if the community agree about that. There will be some positionning to do, though we may simply center them all in screen, and that's it.

So to use them simply use this kind of syntax

       <field name="facilityName" 
title="${uiLabelMap.FormFieldTitle_facilityName}">
<lookup disabled="true" target-form-name="LookupFacilityName" description-field-name="parentFacilityId" default-value="${parentFacilityName}"/></field>
       <field name="facilityId"><hidden/></field>
instead of
       <field name="facilityId" 
title="${uiLabelMap.FormFieldTitle_facilityName}">
           <lookup disabled="true" target-form-name="LookupFacility"/>
       </field>

also in a new listLookupFacilityName, use
       <field name="facilityId"><hidden/></field>
       <field name="select" title="${uiLabelMap.CommonSelect}" 
widget-style="smallSubmit">
<hyperlink also-hidden="false" target-type="plain" description="${facilityName}" target="javascript:set_values('${facilityName}','${facilityId}')"/>
       </field>
instead of
       <field name="facilityId" title="${uiLabelMap.CommonEmptyHeader}" 
widget-style="buttontext">
<hyperlink also-hidden="false" target-type="plain" description="${facilityId}" target="javascript:set_values('${facilityId}', '${facilityName}')"/>
       </field>

I let you figure out the details, I guess you have enough information for that

Cheers

Jacques

From: "Bilgin Ibryam" <[email protected]>
Jacques Le Roux wrote:
Hi Scott,

Yes sorry for that, I forgot again :/

The only real change was the introduction of FieldLookupPopup2 which solves an 
issue that can't be reproduced with OFBiz OOTB has
this functionnality is not used in OFBiz (yet?). It allows to show names 
instead of Ids in lookups fields. This was needed by a
client but introduces some complexity  when you use it (easier to deal directly 
with an Id like the lookups do OOTB)

Jacques
Hi Jacques,

would you share some code from your implementation to show names instead of Ids in lookup fields? I'm also interested in implementing this functionality in form widgets.

Bilgin


Reply via email to