uiLabelMap

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

uiLabelMap

damon henry
I have a custom app that I am building.  I started with an existing app which I copied to hot-deploy and have been modifying as needed.  I'm having a hard time figuring out where uiLabelMap is being loaded from.  My app is still utilizing the properties in the original component for it's uiLabelMap values, and I would like it to point to the ones in the new component I am modifying.  Can someone point me in the right direction?  If it matters, it is the Warehouse component that I started with.
thanksDamon    
Reply | Threaded
Open this post in threaded view
|

Re: uiLabelMap

taher
Hi,

All setup and mapping is done in ofbiz-component.xml fix everything you
need there.

Taher Alkhateeb
On Aug 4, 2015 8:40 PM, "damon henry" <[hidden email]> wrote:

> I have a custom app that I am building.  I started with an existing app
> which I copied to hot-deploy and have been modifying as needed.  I'm having
> a hard time figuring out where uiLabelMap is being loaded from.  My app is
> still utilizing the properties in the original component for it's
> uiLabelMap values, and I would like it to point to the ones in the new
> component I am modifying.  Can someone point me in the right direction?  If
> it matters, it is the Warehouse component that I started with.
> thanksDamon
Reply | Threaded
Open this post in threaded view
|

Re: uiLabelMap

Gil Portenseigne
Yes and moreover in the CommonScreens.xml of each component you got the application decorators where you can find some :

<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>

To Add your label file, just add <property-map resource="YourFileUiLabels" map-name="uiLabelMap" global="true"/> (YourFileUiLabels.xml have to be in config folder if you kept default config)

Adding it after the other overload already existing properties.

HTH

Gil

On 04/08/2015 19:47, Taher Alkhateeb wrote:
Hi,

All setup and mapping is done in ofbiz-component.xml fix everything you
need there.

Taher Alkhateeb
On Aug 4, 2015 8:40 PM, "damon henry" [hidden email] wrote:

I have a custom app that I am building.  I started with an existing app
which I copied to hot-deploy and have been modifying as needed.  I'm having
a hard time figuring out where uiLabelMap is being loaded from.  My app is
still utilizing the properties in the original component for it's
uiLabelMap values, and I would like it to point to the ones in the new
component I am modifying.  Can someone point me in the right direction?  If
it matters, it is the Warehouse component that I started with.
thanksDamon

    

Reply | Threaded
Open this post in threaded view
|

RE: uiLabelMap

damon henry
Thanks, this was just the info I needed.  I thought I needed to disconnect the old UILabelMap and start over with something new, but by adding my own property-map, I can leave all the existing UiLabelMap in place and just put anything new that I need in a separate property file and load it from the CommonScreens.xml file as you have indicated below.  It works perfect.
damon

Date: Tue, 4 Aug 2015 21:02:45 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: uiLabelMap


 
   
 
 
    Yes and moreover in
    the CommonScreens.xml of each component you got the application
    decorators where you can find some :

   

    <property-map resource="AccountingUiLabels" map-name="uiLabelMap"
    global="true"/>

   

    To Add your label file, just add <property-map
    resource="YourFileUiLabels" map-name="uiLabelMap" global="true"/>
    (YourFileUiLabels.xml have to be in config folder if you kept
    default config)

   

    Adding it after the other overload already existing properties.

   

    HTH

   

    Gil

   

    On 04/08/2015 19:47, Taher Alkhateeb
      wrote:

   
   
      Hi,

All setup and mapping is done in ofbiz-component.xml fix everything you
need there.

Taher Alkhateeb
On Aug 4, 2015 8:40 PM, "damon henry" <[hidden email]> wrote:


     
        I have a custom app that I am building.  I started with an existing app
which I copied to hot-deploy and have been modifying as needed.  I'm having
a hard time figuring out where uiLabelMap is being loaded from.  My app is
still utilizing the properties in the original component for it's
uiLabelMap values, and I would like it to point to the ones in the new
component I am modifying.  Can someone point me in the right direction?  If
it matters, it is the Warehouse component that I started with.
thanksDamon

     
     
   
   
     
Reply | Threaded
Open this post in threaded view
|

Re: uiLabelMap

Michael Brohl-3
In reply to this post by damon henry
I recommend using "ant create-component", this will create a new
component in hot-deploy with all necessary files and folders and
prevents you from the complexity of an existing component.

Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de

Am 04.08.15 um 19:40 schrieb damon henry:
> I have a custom app that I am building.  I started with an existing app which I copied to hot-deploy and have been modifying as needed.  I'm having a hard time figuring out where uiLabelMap is being loaded from.  My app is still utilizing the properties in the original component for it's uiLabelMap values, and I would like it to point to the ones in the new component I am modifying.  Can someone point me in the right direction?  If it matters, it is the Warehouse component that I started with.
> thanksDamon  



smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: uiLabelMap

damon henry
Thanks for the tip.  If I were starting from scratch I would probably go that route, but in this case I was specifically looking to create a customer view component with a very limited subset of features in the existing component.  It seemed easiest just to reuse the existing code and strip out all the request mappings for functionality I did not want to expose, as well as modify the UI a bit.
damon

> Date: Tue, 4 Aug 2015 22:08:19 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: uiLabelMap
>
> I recommend using "ant create-component", this will create a new
> component in hot-deploy with all necessary files and folders and
> prevents you from the complexity of an existing component.
>
> Regards,
>
> Michael Brohl
> ecomify GmbH
> www.ecomify.de
>
> Am 04.08.15 um 19:40 schrieb damon henry:
> > I have a custom app that I am building.  I started with an existing app which I copied to hot-deploy and have been modifying as needed.  I'm having a hard time figuring out where uiLabelMap is being loaded from.  My app is still utilizing the properties in the original component for it's uiLabelMap values, and I would like it to point to the ones in the new component I am modifying.  Can someone point me in the right direction?  If it matters, it is the Warehouse component that I started with.
> > thanksDamon  
>
>
     
Reply | Threaded
Open this post in threaded view
|

Re: uiLabelMap

Deepak Dixit-3
In reply to this post by damon henry
You need to include config folder into class path in ofbiz-component.xml

<classpath type="dir" location="config”/>

Thanks & Regards

Deepak Dixit


> On Aug 4, 2015, at 11:10 PM, damon henry <[hidden email]> wrote:
>
> I have a custom app that I am building.  I started with an existing app which I copied to hot-deploy and have been modifying as needed.  I'm having a hard time figuring out where uiLabelMap is being loaded from.  My app is still utilizing the properties in the original component for it's uiLabelMap values, and I would like it to point to the ones in the new component I am modifying.  Can someone point me in the right direction?  If it matters, it is the Warehouse component that I started with.
> thanksDamon    

Reply | Threaded
Open this post in threaded view
|

RE: uiLabelMap

damon henry
Thanks for the info.  Since this is an archived email list, and since I learned a few things in the process I will just summarize what I learned for future reference.  If I get something wrong please feel free to correct me.
uiLabelMap is used all over OfBiz.  It's main purpose is to allow resource bundles to be used for internationalization of languages within OfBiz.   The standard way of implementing it is to create your resources in either .properties files or .xml files in the config directory of a component.  In order to use the properties you need to include the config folder in a class path statement in ofbiz-component.xml like this  <classpath type="dir" location="config”/>.  Also, the specific property file needs to be loaded.  A common place to do this is in CommonScreens.xml of your component, although it can be done from any widget actions element.  Inserting it in CommonScreens.xml main-application-decorator is a method which makes the values available to all your widgets which is usually desirable.Example:<actions>
<property-map resource="YourFileUiLabels" map-name="uiLabelMap" global="true"/></actions>To Add your label file, just add <property-map resource="YourFileUiLabels" map-name="uiLabelMap" global="true"/> (YourFileUiLabels.xml or YourFileUiLabels.properties has to be in config folder of your component.)
The effect is cumulative.  uiLabelMap is being used by most OfBiz components, so anything you add is meshed in with what is already there.  There is a pretty thorough wiki entry here https://cwiki.apache.org/confluence/display/OFBIZ/Text+Translation but it does not mention the classpath aspect of making this work.
damon

> Subject: Re: uiLabelMap
> From: [hidden email]
> Date: Wed, 5 Aug 2015 11:26:24 +0530
> CC: [hidden email]
> To: [hidden email]
>
> You need to include config folder into class path in ofbiz-component.xml
>
> <classpath type="dir" location="config”/>
>
> Thanks & Regards
> —
> Deepak Dixit
>
>
> > On Aug 4, 2015, at 11:10 PM, damon henry <[hidden email]> wrote:
> >
> > I have a custom app that I am building.  I started with an existing app which I copied to hot-deploy and have been modifying as needed.  I'm having a hard time figuring out where uiLabelMap is being loaded from.  My app is still utilizing the properties in the original component for it's uiLabelMap values, and I would like it to point to the ones in the new component I am modifying.  Can someone point me in the right direction?  If it matters, it is the Warehouse component that I started with.
> > thanksDamon    
>