[OFBiz] Dev - How can I pass an uiLabelMap to a form widget created in a bsh form?

Adrian Crum adrianc at hlmksw.com
Mon Apr 11 12:20:13 EDT 2005


I'm sorry I didn't give more detail.

Use the code from envsetup.bsh to create the uiLabelMap object, then put 
it in the HtmlFormWrapper's context using HtmlFormWrapper.putInContext().

Example:

locale = UtilHttp.getLocale(request);
uiLabelMap = UtilProperties.getResourceBundleMap("MyComponentUiLabels", 
locale);
uiLabelMap.addBottomResourceBundle("CommonUiLabels", locale);
myFormWrapper = new HtmlFormWrapper();
myFormWrapper.putInContext("uiLabelMap", uiLabelMap);


Jacopo Cappellato wrote:

> Adrian,
> 
> in the envsetup.bsh file, I cannot find anything about form widgets... am I missing something?
> 
> Kind regards,
> Jacopo
>  
> 
> 
>>Look in Party Manager envsetup.bsh.
>>
>>
>>Jacopo Cappellato wrote:
>>
>>>Hi all,
>>>
>>>how can I pass an uiLabelMap to a form widget created in a bsh form?
>>>
>>>I've noticed that uiLabelMap can be referenced from within a form definition if the form is included using the include directive of the screen definition.
>>>
>>>On the other hand, if the form is created directly in the bsh script (thru the "new HtmlFormWrapper(...)" constructor), the uiLabelMap is missing and the follwing definition returns an empty title:
>>>
>>><field name="notAvailableQuantity" title="${uiLabelMap.ProductNotAvailable}"><display/></field>
>>>
>>>Any hints?
>>>
>>>Thanks,
>>>
>>>Jacopo
>>>
>>>
>>>
>>>____________________________________________________________
>>>6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
>>>Scaricalo su INTERNET GRATIS 6X http://www.libero.it
>>>
>>>
>>> 
>>>_______________________________________________
>>>Dev mailing list
>>>Dev at lists.ofbiz.org
>>>http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>
>> 
>>_______________________________________________
>>Dev mailing list
>>Dev at lists.ofbiz.org
>>http://lists.ofbiz.org/mailman/listinfo/dev
>>
> 
> 
> 
> 
> ____________________________________________________________
> Navighi a 4 MEGA e i primi 3 mesi sono GRATIS. 
> Scegli Libero Adsl Flat senza limiti su http://www.libero.it
> 
> 
>  
> _______________________________________________
> Dev mailing list
> Dev at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/dev
> 


More information about the Dev mailing list