Hi,
When defining a view, it is possible to define an attribute for the view tag named "default-resource-name", which should set the associated resource bundle for translations. However, I've look through the source code and this value is never used: when evaluating a view, OfBiz looks for the "default-resource-name" connected to the table of the view, instead of the one connected to the view. What is this view tag attribute (default-resource-name) used for then? Regards, Óscar |
The GenericEnitity.java has some comments about this.
Also the entities themselves call out the Resources. like default-resource-name="CommonEntityLabels" this is in the framework/common/entitydef/ it refers to the framwork/common/config/CommonEntityLabels_xx.properties Oscar Pablo sent the following on 1/3/2008 11:17 PM: > Hi, > > When defining a view, it is possible to define an attribute for the view > tag named "default-resource-name", which should set the associated > resource bundle for translations. > > However, I've look through the source code and this value is never used: > when evaluating a view, OfBiz looks for the "default-resource-name" > connected to the table of the view, instead of the one connected to the > view. > > What is this view tag attribute (default-resource-name) used for then? > > Regards, > > Óscar > > > > > |
I know what this attribute is used for in entities. My question is
regarding to the attribute in view-entity: what sense makes it there if it is not used at view level? In GenericEntity.java, the comment in the code is the following: // In case of view entity try to retrieve the field heading from the real entity linked to the view So, it seems the attribute default-resource-name at view level is not used... or is used for another thing. On Fri, 2008-01-04 at 00:51 -0800, BJ Freeman wrote: > The GenericEnitity.java has some comments about this. > Also the entities themselves call out the Resources. > like > default-resource-name="CommonEntityLabels" > this is in the framework/common/entitydef/ > it refers to the > framwork/common/config/CommonEntityLabels_xx.properties > > Oscar Pablo sent the following on 1/3/2008 11:17 PM: > > Hi, > > > > When defining a view, it is possible to define an attribute for the > view > > tag named "default-resource-name", which should set the associated > > resource bundle for translations. > > > > However, I've look through the source code and this value is never > used: > > when evaluating a view, OfBiz looks for the "default-resource-name" > > connected to the table of the view, instead of the one connected to > the > > view. > > > > What is this view tag attribute (default-resource-name) used for > then? > > > > Regards, > > > > Óscar > > > > > > > > > > > > |
In reply to this post by opablo
Hi Pablo,
normally it's not so important to insert the default-resource-name into view-entity because OFBiz automatically retrieve the translations from the field of the base tables. So for example if you have to use the view-entity UomAndType the translations coming from the fields of the table Uom and UomType are retrieved automatically. Otherwise in this case you have previously translate the base tables (Uom/UomType) and then the view-entities again. So translations on view-entity is necessary only for calculated fields and so probably it's very rarely that they will be description. An example of use of the UseAndType view-entity translated automatically is visible on Product Price( AddProductPrice form in ProductForms.xml). Marco > I know what this attribute is used for in entities. My question is > regarding to the attribute in view-entity: what sense makes it there if > it is not used at view level? > > In GenericEntity.java, the comment in the code is the following: > > // In case of view entity try to retrieve the field heading from the > real entity linked to the view > > So, it seems the attribute default-resource-name at view level is not > used... or is used for another thing. > > > On Fri, 2008-01-04 at 00:51 -0800, BJ Freeman wrote: > > The GenericEnitity.java has some comments about this. > > Also the entities themselves call out the Resources. > > like > > default-resource-name="CommonEntityLabels" > > this is in the framework/common/entitydef/ > > it refers to the > > framwork/common/config/CommonEntityLabels_xx.properties > > > > Oscar Pablo sent the following on 1/3/2008 11:17 PM: > > > Hi, > > > > > > When defining a view, it is possible to define an attribute for the > > view > > > tag named "default-resource-name", which should set the associated > > > resource bundle for translations. > > > > > > However, I've look through the source code and this value is never > > used: > > > when evaluating a view, OfBiz looks for the "default-resource-name" > > > connected to the table of the view, instead of the one connected to > > the > > > view. > > > > > > What is this view tag attribute (default-resource-name) used for > > then? > > > > > > Regards, > > > > > > Óscar > > > > > > > > > > > > > > > > > > > > > |
In reply to this post by opablo
sorry for the late reply, look like the answer was given, in a more
direct way. I thought by showing you that the entities already used default-resource-name and a view is just a joining of entities it would be apparent. Oscar Pablo sent the following on 1/4/2008 1:59 AM: > I know what this attribute is used for in entities. My question is > regarding to the attribute in view-entity: what sense makes it there if > it is not used at view level? > > In GenericEntity.java, the comment in the code is the following: > > // In case of view entity try to retrieve the field heading from the > real entity linked to the view > > So, it seems the attribute default-resource-name at view level is not > used... or is used for another thing. > > > On Fri, 2008-01-04 at 00:51 -0800, BJ Freeman wrote: >> The GenericEnitity.java has some comments about this. >> Also the entities themselves call out the Resources. >> like >> default-resource-name="CommonEntityLabels" >> this is in the framework/common/entitydef/ >> it refers to the >> framwork/common/config/CommonEntityLabels_xx.properties >> >> Oscar Pablo sent the following on 1/3/2008 11:17 PM: >>> Hi, >>> >>> When defining a view, it is possible to define an attribute for the >> view >>> tag named "default-resource-name", which should set the associated >>> resource bundle for translations. >>> >>> However, I've look through the source code and this value is never >> used: >>> when evaluating a view, OfBiz looks for the "default-resource-name" >>> connected to the table of the view, instead of the one connected to >> the >>> view. >>> >>> What is this view tag attribute (default-resource-name) used for >> then? >>> Regards, >>> >>> Óscar >>> >>> >>> >>> >>> >> > > > > |
In reply to this post by mrisaliti@libero.it
Thanks Marco and BJ. It seems default-resource-name from view is never
used (even with calculated fields like lower or upper). On Fri, 2008-01-04 at 11:35 +0100, [hidden email] wrote: > Hi Pablo, > > normally it's not so important to insert the default-resource-name > into view-entity because OFBiz automatically retrieve the translations > from the field of the base tables. > So for example if you have to use the view-entity UomAndType the > translations coming from the fields of the table Uom and UomType are > retrieved automatically. > Otherwise in this case you have previously translate the base tables > (Uom/UomType) and then the view-entities again. > So translations on view-entity is necessary only for calculated fields > and so probably it's very rarely that they will be description. > > An example of use of the UseAndType view-entity translated > automatically is visible on Product Price( > AddProductPrice form in ProductForms.xml). > > Marco > > > I know what this attribute is used for in entities. My question is > > regarding to the attribute in view-entity: what sense makes it there > if > > it is not used at view level? > > > > In GenericEntity.java, the comment in the code is the following: > > > > // In case of view entity try to retrieve the field heading from the > > real entity linked to the view > > > > So, it seems the attribute default-resource-name at view level is > not > > used... or is used for another thing. > > > > > > On Fri, 2008-01-04 at 00:51 -0800, BJ Freeman wrote: > > > The GenericEnitity.java has some comments about this. > > > Also the entities themselves call out the Resources. > > > like > > > default-resource-name="CommonEntityLabels" > > > this is in the framework/common/entitydef/ > > > it refers to the > > > framwork/common/config/CommonEntityLabels_xx.properties > > > > > > Oscar Pablo sent the following on 1/3/2008 11:17 PM: > > > > Hi, > > > > > > > > When defining a view, it is possible to define an attribute for > the > > > view > > > > tag named "default-resource-name", which should set the > associated > > > > resource bundle for translations. > > > > > > > > However, I've look through the source code and this value is > never > > > used: > > > > when evaluating a view, OfBiz looks for the > "default-resource-name" > > > > connected to the table of the view, instead of the one connected > to > > > the > > > > view. > > > > > > > > What is this view tag attribute (default-resource-name) used for > > > then? > > > > > > > > Regards, > > > > > > > > Óscar > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
I would imagine, if you wanted internationalization of some generated
fields, then seems default-resource-name would be used. since the internationalization has been a slow process, of refactoring screens, does not mean it will not be used in the future. if you generate some fields that are passed to the screen widget and you want to have internationalization, then by all means use it. Oscar Pablo sent the following on 1/7/2008 12:11 AM: > Thanks Marco and BJ. It seems default-resource-name from view is never > used (even with calculated fields like lower or upper). > > On Fri, 2008-01-04 at 11:35 +0100, [hidden email] wrote: >> Hi Pablo, >> >> normally it's not so important to insert the default-resource-name >> into view-entity because OFBiz automatically retrieve the translations >> from the field of the base tables. >> So for example if you have to use the view-entity UomAndType the >> translations coming from the fields of the table Uom and UomType are >> retrieved automatically. >> Otherwise in this case you have previously translate the base tables >> (Uom/UomType) and then the view-entities again. >> So translations on view-entity is necessary only for calculated fields >> and so probably it's very rarely that they will be description. >> >> An example of use of the UseAndType view-entity translated >> automatically is visible on Product Price( >> AddProductPrice form in ProductForms.xml). >> >> Marco >> >>> I know what this attribute is used for in entities. My question is >>> regarding to the attribute in view-entity: what sense makes it there >> if >>> it is not used at view level? >>> >>> In GenericEntity.java, the comment in the code is the following: >>> >>> // In case of view entity try to retrieve the field heading from the >>> real entity linked to the view >>> >>> So, it seems the attribute default-resource-name at view level is >> not >>> used... or is used for another thing. >>> >>> >>> On Fri, 2008-01-04 at 00:51 -0800, BJ Freeman wrote: >>>> The GenericEnitity.java has some comments about this. >>>> Also the entities themselves call out the Resources. >>>> like >>>> default-resource-name="CommonEntityLabels" >>>> this is in the framework/common/entitydef/ >>>> it refers to the >>>> framwork/common/config/CommonEntityLabels_xx.properties >>>> >>>> Oscar Pablo sent the following on 1/3/2008 11:17 PM: >>>>> Hi, >>>>> >>>>> When defining a view, it is possible to define an attribute for >> the >>>> view >>>>> tag named "default-resource-name", which should set the >> associated >>>>> resource bundle for translations. >>>>> >>>>> However, I've look through the source code and this value is >> never >>>> used: >>>>> when evaluating a view, OfBiz looks for the >> "default-resource-name" >>>>> connected to the table of the view, instead of the one connected >> to >>>> the >>>>> view. >>>>> >>>>> What is this view tag attribute (default-resource-name) used for >>>> then? >>>>> Regards, >>>>> >>>>> Óscar >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>> > > > > |
Free forum by Nabble | Edit this page |