Administrator
|
Hi Adrian,
I did not have much time and I did not get it, could you explain a bit more please? Actually this email more to ask to all if it's normal we don't have online help access in Webtools? Thanks Jacques > Author: adrianc > Date: Tue Apr 19 11:23:07 2011 > New Revision: 1095037 > > URL: http://svn.apache.org/viewvc?rev=1095037&view=rev > Log: > New feature: i18n entity descriptions in Web Tools. New feature demonstrated in Example component. > > Modified: > ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml > ofbiz/trunk/framework/example/entitydef/entitymodel.xml > ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java > > Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff > ============================================================================== > --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml (original) > +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue Apr 19 11:23:07 2011 > @@ -69,6 +69,22 @@ > <value xml:lang="th">สภาà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> > <value xml:lang="zh">çå®ä¸ç</value> > </property> > + > + <!-- Entity descriptions. The Web Tools component will use these properties > + for online documentation. Entity description property keys have the form: > + EntityDescription.[entityname]. > + --> > + <property key="EntityDescription.Example"> > + <value xml:lang="en">Example Entity</value> > + </property> > + > + <!-- Entity field descriptions. The Web Tools component will use these properties > + for online documentation. Field description property keys have two forms: > + FieldDescription.[fieldname] - will be used for all fields of that name > + FieldDescription.[entityname].[fieldname] - will be used for the specified > + entity field > + --> > + > <property key="FieldDescription.Example.exampleId"> > <value xml:lang="en">A unique Example ID. If you don't assign an ID, one will be generated automatically</value> > <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée > automatiquement</value> > @@ -134,12 +150,6 @@ > <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> > <value xml:lang="zh">æ ·ä¾æ¥æ</value> > </property> > - <!-- Entity field descriptions. The Webtools component will use these properties > - for online documentation. Field description properties have two forms: > - FieldDescription.[fieldname] - will be used for all fields of that name > - FieldDescription.[entityname].[fieldname] - will be used for the specified > - entity field > - --> > <property key="FieldDescription.exampleId"> > <value xml:lang="en">Example ID</value> > <value xml:lang="fr">Réf. d'exemple</value> > > Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff > ============================================================================== > --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) > +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr 19 11:23:07 2011 > @@ -39,11 +39,7 @@ under the License. > <!-- org.ofbiz.example.example --> > <!-- ========================================================= --> > > - <entity entity-name="Example" > - package-name="org.ofbiz.example.example" > - title="Example Entity" > - default-resource-name="ExampleEntityLabels" > - > > + <entity entity-name="Example" package-name="org.ofbiz.example.example" title="Example Entity"> > <field name="exampleId" type="id-ne"><description>primary sequenced ID</description></field> > <field name="exampleTypeId" type="id-ne"></field> > <field name="statusId" type="id-ne"></field> > > Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff > ============================================================================== > --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) > +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Tue Apr 19 11:23:07 2011 > @@ -663,6 +663,15 @@ public class WebToolsServices { > Debug.logInfo(exception.getMessage(), module); > } > } > + String entityDescription = null; > + if (bundle != null) { > + try { > + entityDescription = bundle.getString("EntityDescription." + entity.getEntityName()); > + } catch (Exception exception) {} > + } > + if (UtilValidate.isEmpty(entityDescription)) { > + entityDescription = entity.getDescription(); > + } > > // fields list > List<Map<String, Object>> javaNameList = FastList.newInstance(); > @@ -754,7 +763,7 @@ public class WebToolsServices { > entityMap.put("groupName", groupName); > entityMap.put("plainTableName", entity.getPlainTableName()); > entityMap.put("title", entity.getTitle()); > - entityMap.put("description", entity.getDescription()); > + entityMap.put("description", entityDescription); > String entityLocation = entity.getLocation(); > entityLocation = entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); > entityMap.put("location", entityLocation); > > |
It works the same as the i18n field descriptions. Instead of embedding
entity descriptions in English in the entitymodel.xml file, you put the translated entity description in the UI label file. -Adrian On 4/20/2011 1:56 AM, Jacques Le Roux wrote: > Hi Adrian, > > I did not have much time and I did not get it, could you explain a bit > more please? > Actually this email more to ask to all if it's normal we don't have > online help access in Webtools? > > Thanks > > Jacques > >> Author: adrianc >> Date: Tue Apr 19 11:23:07 2011 >> New Revision: 1095037 >> >> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >> Log: >> New feature: i18n entity descriptions in Web Tools. New feature >> demonstrated in Example component. >> >> Modified: >> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >> >> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >> >> Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >> >> ============================================================================== >> >> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >> (original) >> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue >> Apr 19 11:23:07 2011 >> @@ -69,6 +69,22 @@ >> <value xml:lang="th">สภ>> าà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >> <value xml:lang="zh">çå®ä¸ç</value> >> </property> >> + >> + <!-- Entity descriptions. The Web Tools component will use these >> properties >> + for online documentation. Entity description property keys >> have the form: >> + EntityDescription.[entityname]. >> + --> >> + <property key="EntityDescription.Example"> >> + <value xml:lang="en">Example Entity</value> >> + </property> >> + >> + <!-- Entity field descriptions. The Web Tools component will use >> these properties >> + for online documentation. Field description property keys >> have two forms: >> + FieldDescription.[fieldname] - will be used for all fields >> of that name >> + FieldDescription.[entityname].[fieldname] - will be used for >> the specified >> + entity field >> + --> >> + >> <property key="FieldDescription.Example.exampleId"> >> <value xml:lang="en">A unique Example ID. If you don't assign an ID, >> one will be generated automatically</value> >> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas >> de réf., elle sera générée >> automatiquement</value> >> @@ -134,12 +150,6 @@ >> <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >> </property> >> - <!-- Entity field descriptions. The Webtools component will use >> these properties >> - for online documentation. Field description properties have >> two forms: >> - FieldDescription.[fieldname] - will be used for all fields >> of that name >> - FieldDescription.[entityname].[fieldname] - will be used for >> the specified >> - entity field >> - --> >> <property key="FieldDescription.exampleId"> >> <value xml:lang="en">Example ID</value> >> <value xml:lang="fr">Réf. d'exemple</value> >> >> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >> >> ============================================================================== >> >> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) >> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr >> 19 11:23:07 2011 >> @@ -39,11 +39,7 @@ under the License. >> <!-- org.ofbiz.example.example --> >> <!-- ========================================================= --> >> >> - <entity entity-name="Example" >> - package-name="org.ofbiz.example.example" >> - title="Example Entity" >> - default-resource-name="ExampleEntityLabels" >> - > >> + <entity entity-name="Example" >> package-name="org.ofbiz.example.example" title="Example Entity"> >> <field name="exampleId" type="id-ne"><description>primary sequenced >> ID</description></field> >> <field name="exampleTypeId" type="id-ne"></field> >> <field name="statusId" type="id-ne"></field> >> >> Modified: >> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >> >> ============================================================================== >> >> --- >> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >> (original) >> +++ >> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >> Tue Apr 19 11:23:07 2011 >> @@ -663,6 +663,15 @@ public class WebToolsServices { >> Debug.logInfo(exception.getMessage(), >> module); >> } >> } >> + String entityDescription = null; >> + if (bundle != null) { >> + try { >> + entityDescription = >> bundle.getString("EntityDescription." + entity.getEntityName()); >> + } catch (Exception exception) {} >> + } >> + if (UtilValidate.isEmpty(entityDescription)) { >> + entityDescription = >> entity.getDescription(); >> + } >> >> // fields list >> List<Map<String, Object>> javaNameList = >> FastList.newInstance(); >> @@ -754,7 +763,7 @@ public class WebToolsServices { >> entityMap.put("groupName", groupName); >> entityMap.put("plainTableName", >> entity.getPlainTableName()); >> entityMap.put("title", entity.getTitle()); >> - entityMap.put("description", >> entity.getDescription()); >> + entityMap.put("description", >> entityDescription); >> String entityLocation = entity.getLocation(); >> entityLocation = >> entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); >> entityMap.put("location", entityLocation); >> >> > > |
Administrator
|
Ha ok! Thanks
Jacques From: "Adrian Crum" <[hidden email]> > It works the same as the i18n field descriptions. Instead of embedding entity descriptions in English in the entitymodel.xml file, > you put the translated entity description in the UI label file. > > -Adrian > > On 4/20/2011 1:56 AM, Jacques Le Roux wrote: >> Hi Adrian, >> >> I did not have much time and I did not get it, could you explain a bit more please? >> Actually this email more to ask to all if it's normal we don't have online help access in Webtools? >> >> Thanks >> >> Jacques >> >>> Author: adrianc >>> Date: Tue Apr 19 11:23:07 2011 >>> New Revision: 1095037 >>> >>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >>> Log: >>> New feature: i18n entity descriptions in Web Tools. New feature demonstrated in Example component. >>> >>> Modified: >>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>> >>> Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml (original) >>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue Apr 19 11:23:07 2011 >>> @@ -69,6 +69,22 @@ >>> <value xml:lang="th">สภาà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >>> <value xml:lang="zh">çå®ä¸ç</value> >>> </property> >>> + >>> + <!-- Entity descriptions. The Web Tools component will use these properties >>> + for online documentation. Entity description property keys have the form: >>> + EntityDescription.[entityname]. >>> + --> >>> + <property key="EntityDescription.Example"> >>> + <value xml:lang="en">Example Entity</value> >>> + </property> >>> + >>> + <!-- Entity field descriptions. The Web Tools component will use these properties >>> + for online documentation. Field description property keys have two forms: >>> + FieldDescription.[fieldname] - will be used for all fields of that name >>> + FieldDescription.[entityname].[fieldname] - will be used for the specified >>> + entity field >>> + --> >>> + >>> <property key="FieldDescription.Example.exampleId"> >>> <value xml:lang="en">A unique Example ID. If you don't assign an ID, one will be generated automatically</value> >>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée >>> automatiquement</value> >>> @@ -134,12 +150,6 @@ >>> <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >>> </property> >>> - <!-- Entity field descriptions. The Webtools component will use these properties >>> - for online documentation. Field description properties have two forms: >>> - FieldDescription.[fieldname] - will be used for all fields of that name >>> - FieldDescription.[entityname].[fieldname] - will be used for the specified >>> - entity field >>> - --> >>> <property key="FieldDescription.exampleId"> >>> <value xml:lang="en">Example ID</value> >>> <value xml:lang="fr">Réf. d'exemple</value> >>> >>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) >>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr 19 11:23:07 2011 >>> @@ -39,11 +39,7 @@ under the License. >>> <!-- org.ofbiz.example.example --> >>> <!-- ========================================================= --> >>> >>> - <entity entity-name="Example" >>> - package-name="org.ofbiz.example.example" >>> - title="Example Entity" >>> - default-resource-name="ExampleEntityLabels" >>> - > >>> + <entity entity-name="Example" package-name="org.ofbiz.example.example" title="Example Entity"> >>> <field name="exampleId" type="id-ne"><description>primary sequenced ID</description></field> >>> <field name="exampleTypeId" type="id-ne"></field> >>> <field name="statusId" type="id-ne"></field> >>> >>> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >>> ============================================================================== >>> --- >>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) >>> +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Tue Apr 19 11:23:07 2011 >>> @@ -663,6 +663,15 @@ public class WebToolsServices { >>> Debug.logInfo(exception.getMessage(), module); >>> } >>> } >>> + String entityDescription = null; >>> + if (bundle != null) { >>> + try { >>> + entityDescription = bundle.getString("EntityDescription." + entity.getEntityName()); >>> + } catch (Exception exception) {} >>> + } >>> + if (UtilValidate.isEmpty(entityDescription)) { >>> + entityDescription = entity.getDescription(); >>> + } >>> >>> // fields list >>> List<Map<String, Object>> javaNameList = FastList.newInstance(); >>> @@ -754,7 +763,7 @@ public class WebToolsServices { >>> entityMap.put("groupName", groupName); >>> entityMap.put("plainTableName", entity.getPlainTableName()); >>> entityMap.put("title", entity.getTitle()); >>> - entityMap.put("description", entity.getDescription()); >>> + entityMap.put("description", entityDescription); >>> String entityLocation = entity.getLocation(); >>> entityLocation = entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); >>> entityMap.put("location", entityLocation); >>> >>> >> >> |
Administrator
|
Still: is someone who knows why we don't have online help access in Webtools, is there any special reasons?
Thanks Jacques From: "Jacques Le Roux" <[hidden email]> > Ha ok! Thanks > > Jacques > > From: "Adrian Crum" <[hidden email]> >> It works the same as the i18n field descriptions. Instead of embedding entity descriptions in English in the entitymodel.xml >> file, you put the translated entity description in the UI label file. >> >> -Adrian >> >> On 4/20/2011 1:56 AM, Jacques Le Roux wrote: >>> Hi Adrian, >>> >>> I did not have much time and I did not get it, could you explain a bit more please? >>> Actually this email more to ask to all if it's normal we don't have online help access in Webtools? >>> >>> Thanks >>> >>> Jacques >>> >>>> Author: adrianc >>>> Date: Tue Apr 19 11:23:07 2011 >>>> New Revision: 1095037 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >>>> Log: >>>> New feature: i18n entity descriptions in Web Tools. New feature demonstrated in Example component. >>>> >>>> Modified: >>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>> >>>> Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>> URL: >>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>> ============================================================================== >>>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml (original) >>>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue Apr 19 11:23:07 2011 >>>> @@ -69,6 +69,22 @@ >>>> <value xml:lang="th">สภาà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >>>> <value xml:lang="zh">çå®ä¸ç</value> >>>> </property> >>>> + >>>> + <!-- Entity descriptions. The Web Tools component will use these properties >>>> + for online documentation. Entity description property keys have the form: >>>> + EntityDescription.[entityname]. >>>> + --> >>>> + <property key="EntityDescription.Example"> >>>> + <value xml:lang="en">Example Entity</value> >>>> + </property> >>>> + >>>> + <!-- Entity field descriptions. The Web Tools component will use these properties >>>> + for online documentation. Field description property keys have two forms: >>>> + FieldDescription.[fieldname] - will be used for all fields of that name >>>> + FieldDescription.[entityname].[fieldname] - will be used for the specified >>>> + entity field >>>> + --> >>>> + >>>> <property key="FieldDescription.Example.exampleId"> >>>> <value xml:lang="en">A unique Example ID. If you don't assign an ID, one will be generated automatically</value> >>>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée >>>> automatiquement</value> >>>> @@ -134,12 +150,6 @@ >>>> <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >>>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >>>> </property> >>>> - <!-- Entity field descriptions. The Webtools component will use these properties >>>> - for online documentation. Field description properties have two forms: >>>> - FieldDescription.[fieldname] - will be used for all fields of that name >>>> - FieldDescription.[entityname].[fieldname] - will be used for the specified >>>> - entity field >>>> - --> >>>> <property key="FieldDescription.exampleId"> >>>> <value xml:lang="en">Example ID</value> >>>> <value xml:lang="fr">Réf. d'exemple</value> >>>> >>>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>> URL: >>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>> ============================================================================== >>>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) >>>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr 19 11:23:07 2011 >>>> @@ -39,11 +39,7 @@ under the License. >>>> <!-- org.ofbiz.example.example --> >>>> <!-- ========================================================= --> >>>> >>>> - <entity entity-name="Example" >>>> - package-name="org.ofbiz.example.example" >>>> - title="Example Entity" >>>> - default-resource-name="ExampleEntityLabels" >>>> - > >>>> + <entity entity-name="Example" package-name="org.ofbiz.example.example" title="Example Entity"> >>>> <field name="exampleId" type="id-ne"><description>primary sequenced ID</description></field> >>>> <field name="exampleTypeId" type="id-ne"></field> >>>> <field name="statusId" type="id-ne"></field> >>>> >>>> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>> URL: >>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >>>> ============================================================================== >>>> --- >>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) >>>> +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Tue Apr 19 11:23:07 2011 >>>> @@ -663,6 +663,15 @@ public class WebToolsServices { >>>> Debug.logInfo(exception.getMessage(), module); >>>> } >>>> } >>>> + String entityDescription = null; >>>> + if (bundle != null) { >>>> + try { >>>> + entityDescription = bundle.getString("EntityDescription." + entity.getEntityName()); >>>> + } catch (Exception exception) {} >>>> + } >>>> + if (UtilValidate.isEmpty(entityDescription)) { >>>> + entityDescription = entity.getDescription(); >>>> + } >>>> >>>> // fields list >>>> List<Map<String, Object>> javaNameList = FastList.newInstance(); >>>> @@ -754,7 +763,7 @@ public class WebToolsServices { >>>> entityMap.put("groupName", groupName); >>>> entityMap.put("plainTableName", entity.getPlainTableName()); >>>> entityMap.put("title", entity.getTitle()); >>>> - entityMap.put("description", entity.getDescription()); >>>> + entityMap.put("description", entityDescription); >>>> String entityLocation = entity.getLocation(); >>>> entityLocation = entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); >>>> entityMap.put("location", entityLocation); >>>> >>>> >>> >>> > > |
What do you mean by online help access?
-Adrian On 4/20/2011 7:51 AM, Jacques Le Roux wrote: > Still: is someone who knows why we don't have online help access in > Webtools, is there any special reasons? > > Thanks > > Jacques > > From: "Jacques Le Roux" <[hidden email]> >> Ha ok! Thanks >> >> Jacques >> >> From: "Adrian Crum" <[hidden email]> >>> It works the same as the i18n field descriptions. Instead of >>> embedding entity descriptions in English in the entitymodel.xml >>> file, you put the translated entity description in the UI label file. >>> >>> -Adrian >>> >>> On 4/20/2011 1:56 AM, Jacques Le Roux wrote: >>>> Hi Adrian, >>>> >>>> I did not have much time and I did not get it, could you explain a >>>> bit more please? >>>> Actually this email more to ask to all if it's normal we don't have >>>> online help access in Webtools? >>>> >>>> Thanks >>>> >>>> Jacques >>>> >>>>> Author: adrianc >>>>> Date: Tue Apr 19 11:23:07 2011 >>>>> New Revision: 1095037 >>>>> >>>>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >>>>> Log: >>>>> New feature: i18n entity descriptions in Web Tools. New feature >>>>> demonstrated in Example component. >>>>> >>>>> Modified: >>>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>> >>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>> >>>>> Modified: >>>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>> URL: >>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>> >>>>> ============================================================================== >>>>> >>>>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>> (original) >>>>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>> Tue Apr 19 11:23:07 2011 >>>>> @@ -69,6 +69,22 @@ >>>>> <value xml:lang="th">สภ>>>>> าà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >>>>> <value xml:lang="zh">çå®ä¸ç</value> >>>>> </property> >>>>> + >>>>> + <!-- Entity descriptions. The Web Tools component will use these >>>>> properties >>>>> + for online documentation. Entity description property >>>>> keys have the form: >>>>> + EntityDescription.[entityname]. >>>>> + --> >>>>> + <property key="EntityDescription.Example"> >>>>> + <value xml:lang="en">Example Entity</value> >>>>> + </property> >>>>> + >>>>> + <!-- Entity field descriptions. The Web Tools component will use >>>>> these properties >>>>> + for online documentation. Field description property keys >>>>> have two forms: >>>>> + FieldDescription.[fieldname] - will be used for all >>>>> fields of that name >>>>> + FieldDescription.[entityname].[fieldname] - will be used >>>>> for the specified >>>>> + entity field >>>>> + --> >>>>> + >>>>> <property key="FieldDescription.Example.exampleId"> >>>>> <value xml:lang="en">A unique Example ID. If you don't assign an >>>>> ID, one will be generated automatically</value> >>>>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez >>>>> pas de réf., elle sera générée >>>>> automatiquement</value> >>>>> @@ -134,12 +150,6 @@ >>>>> <value >>>>> xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >>>>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >>>>> </property> >>>>> - <!-- Entity field descriptions. The Webtools component will use >>>>> these properties >>>>> - for online documentation. Field description properties >>>>> have two forms: >>>>> - FieldDescription.[fieldname] - will be used for all >>>>> fields of that name >>>>> - FieldDescription.[entityname].[fieldname] - will be used >>>>> for the specified >>>>> - entity field >>>>> - --> >>>>> <property key="FieldDescription.exampleId"> >>>>> <value xml:lang="en">Example ID</value> >>>>> <value xml:lang="fr">Réf. d'exemple</value> >>>>> >>>>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>> URL: >>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>> >>>>> ============================================================================== >>>>> >>>>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>> (original) >>>>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue >>>>> Apr 19 11:23:07 2011 >>>>> @@ -39,11 +39,7 @@ under the License. >>>>> <!-- org.ofbiz.example.example --> >>>>> <!-- ========================================================= --> >>>>> >>>>> - <entity entity-name="Example" >>>>> - package-name="org.ofbiz.example.example" >>>>> - title="Example Entity" >>>>> - default-resource-name="ExampleEntityLabels" >>>>> - > >>>>> + <entity entity-name="Example" >>>>> package-name="org.ofbiz.example.example" title="Example Entity"> >>>>> <field name="exampleId" type="id-ne"><description>primary >>>>> sequenced ID</description></field> >>>>> <field name="exampleTypeId" type="id-ne"></field> >>>>> <field name="statusId" type="id-ne"></field> >>>>> >>>>> Modified: >>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>> URL: >>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>> >>>>> ============================================================================== >>>>> >>>>> --- >>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>> (original) >>>>> +++ >>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>> Tue Apr 19 11:23:07 2011 >>>>> @@ -663,6 +663,15 @@ public class WebToolsServices { >>>>> >>>>> Debug.logInfo(exception.getMessage(), module); >>>>> } >>>>> } >>>>> + String entityDescription = null; >>>>> + if (bundle != null) { >>>>> + try { >>>>> + entityDescription = >>>>> bundle.getString("EntityDescription." + entity.getEntityName()); >>>>> + } catch (Exception exception) {} >>>>> + } >>>>> + if >>>>> (UtilValidate.isEmpty(entityDescription)) { >>>>> + entityDescription = >>>>> entity.getDescription(); >>>>> + } >>>>> >>>>> // fields list >>>>> List<Map<String, Object>> javaNameList = >>>>> FastList.newInstance(); >>>>> @@ -754,7 +763,7 @@ public class WebToolsServices { >>>>> entityMap.put("groupName", groupName); >>>>> entityMap.put("plainTableName", >>>>> entity.getPlainTableName()); >>>>> entityMap.put("title", entity.getTitle()); >>>>> - entityMap.put("description", >>>>> entity.getDescription()); >>>>> + entityMap.put("description", >>>>> entityDescription); >>>>> String entityLocation = entity.getLocation(); >>>>> entityLocation = >>>>> entityLocation.replaceFirst(System.getProperty("ofbiz.home") + >>>>> "/", ""); >>>>> entityMap.put("location", entityLocation); >>>>> >>>>> >>>> >>>> >> >> > > |
Administrator
|
The question mark button. I think it's because Webtools has a special layout and we miss it there
Jacques From: "Adrian Crum" <[hidden email]> > What do you mean by online help access? > > -Adrian > > On 4/20/2011 7:51 AM, Jacques Le Roux wrote: >> Still: is someone who knows why we don't have online help access in Webtools, is there any special reasons? >> >> Thanks >> >> Jacques >> >> From: "Jacques Le Roux" <[hidden email]> >>> Ha ok! Thanks >>> >>> Jacques >>> >>> From: "Adrian Crum" <[hidden email]> >>>> It works the same as the i18n field descriptions. Instead of embedding entity descriptions in English in the entitymodel.xml >>>> file, you put the translated entity description in the UI label file. >>>> >>>> -Adrian >>>> >>>> On 4/20/2011 1:56 AM, Jacques Le Roux wrote: >>>>> Hi Adrian, >>>>> >>>>> I did not have much time and I did not get it, could you explain a bit more please? >>>>> Actually this email more to ask to all if it's normal we don't have online help access in Webtools? >>>>> >>>>> Thanks >>>>> >>>>> Jacques >>>>> >>>>>> Author: adrianc >>>>>> Date: Tue Apr 19 11:23:07 2011 >>>>>> New Revision: 1095037 >>>>>> >>>>>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >>>>>> Log: >>>>>> New feature: i18n entity descriptions in Web Tools. New feature demonstrated in Example component. >>>>>> >>>>>> Modified: >>>>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>> >>>>>> Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>> URL: >>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>> ============================================================================== >>>>>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml (original) >>>>>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue Apr 19 11:23:07 2011 >>>>>> @@ -69,6 +69,22 @@ >>>>>> <value xml:lang="th">สภาà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >>>>>> <value xml:lang="zh">çå®ä¸ç</value> >>>>>> </property> >>>>>> + >>>>>> + <!-- Entity descriptions. The Web Tools component will use these properties >>>>>> + for online documentation. Entity description property keys have the form: >>>>>> + EntityDescription.[entityname]. >>>>>> + --> >>>>>> + <property key="EntityDescription.Example"> >>>>>> + <value xml:lang="en">Example Entity</value> >>>>>> + </property> >>>>>> + >>>>>> + <!-- Entity field descriptions. The Web Tools component will use these properties >>>>>> + for online documentation. Field description property keys have two forms: >>>>>> + FieldDescription.[fieldname] - will be used for all fields of that name >>>>>> + FieldDescription.[entityname].[fieldname] - will be used for the specified >>>>>> + entity field >>>>>> + --> >>>>>> + >>>>>> <property key="FieldDescription.Example.exampleId"> >>>>>> <value xml:lang="en">A unique Example ID. If you don't assign an ID, one will be generated automatically</value> >>>>>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée >>>>>> automatiquement</value> >>>>>> @@ -134,12 +150,6 @@ >>>>>> <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >>>>>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >>>>>> </property> >>>>>> - <!-- Entity field descriptions. The Webtools component will use these properties >>>>>> - for online documentation. Field description properties have two forms: >>>>>> - FieldDescription.[fieldname] - will be used for all fields of that name >>>>>> - FieldDescription.[entityname].[fieldname] - will be used for the specified >>>>>> - entity field >>>>>> - --> >>>>>> <property key="FieldDescription.exampleId"> >>>>>> <value xml:lang="en">Example ID</value> >>>>>> <value xml:lang="fr">Réf. d'exemple</value> >>>>>> >>>>>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>> URL: >>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>> ============================================================================== >>>>>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) >>>>>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr 19 11:23:07 2011 >>>>>> @@ -39,11 +39,7 @@ under the License. >>>>>> <!-- org.ofbiz.example.example --> >>>>>> <!-- ========================================================= --> >>>>>> >>>>>> - <entity entity-name="Example" >>>>>> - package-name="org.ofbiz.example.example" >>>>>> - title="Example Entity" >>>>>> - default-resource-name="ExampleEntityLabels" >>>>>> - > >>>>>> + <entity entity-name="Example" package-name="org.ofbiz.example.example" title="Example Entity"> >>>>>> <field name="exampleId" type="id-ne"><description>primary sequenced ID</description></field> >>>>>> <field name="exampleTypeId" type="id-ne"></field> >>>>>> <field name="statusId" type="id-ne"></field> >>>>>> >>>>>> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>> URL: >>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>> ============================================================================== >>>>>> --- >>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) >>>>>> +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Tue Apr 19 11:23:07 2011 >>>>>> @@ -663,6 +663,15 @@ public class WebToolsServices { >>>>>> Debug.logInfo(exception.getMessage(), module); >>>>>> } >>>>>> } >>>>>> + String entityDescription = null; >>>>>> + if (bundle != null) { >>>>>> + try { >>>>>> + entityDescription = bundle.getString("EntityDescription." + entity.getEntityName()); >>>>>> + } catch (Exception exception) {} >>>>>> + } >>>>>> + if (UtilValidate.isEmpty(entityDescription)) { >>>>>> + entityDescription = entity.getDescription(); >>>>>> + } >>>>>> >>>>>> // fields list >>>>>> List<Map<String, Object>> javaNameList = FastList.newInstance(); >>>>>> @@ -754,7 +763,7 @@ public class WebToolsServices { >>>>>> entityMap.put("groupName", groupName); >>>>>> entityMap.put("plainTableName", entity.getPlainTableName()); >>>>>> entityMap.put("title", entity.getTitle()); >>>>>> - entityMap.put("description", entity.getDescription()); >>>>>> + entityMap.put("description", entityDescription); >>>>>> String entityLocation = entity.getLocation(); >>>>>> entityLocation = entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); >>>>>> entityMap.put("location", entityLocation); >>>>>> >>>>>> >>>>> >>>>> >>> >>> >> >> |
Also, it might be because the Help link depends on the content
component, and the framework is no longer dependent on components in the applications folder. Something that needs serious consideration is a redesign of the help system. From my perspective, having the help system closely tied to the content component is a bad idea - because many installations might not use the content component. In addition, framework-only installations don't use any of the components in the applications folder. -Adrian On 4/20/2011 9:37 AM, Jacques Le Roux wrote: > The question mark button. I think it's because Webtools has a special > layout and we miss it there > > Jacques > > > From: "Adrian Crum" <[hidden email]> >> What do you mean by online help access? >> >> -Adrian >> >> On 4/20/2011 7:51 AM, Jacques Le Roux wrote: >>> Still: is someone who knows why we don't have online help access in >>> Webtools, is there any special reasons? >>> >>> Thanks >>> >>> Jacques >>> >>> From: "Jacques Le Roux" <[hidden email]> >>>> Ha ok! Thanks >>>> >>>> Jacques >>>> >>>> From: "Adrian Crum" <[hidden email]> >>>>> It works the same as the i18n field descriptions. Instead of >>>>> embedding entity descriptions in English in the entitymodel.xml >>>>> file, you put the translated entity description in the UI label file. >>>>> >>>>> -Adrian >>>>> >>>>> On 4/20/2011 1:56 AM, Jacques Le Roux wrote: >>>>>> Hi Adrian, >>>>>> >>>>>> I did not have much time and I did not get it, could you explain >>>>>> a bit more please? >>>>>> Actually this email more to ask to all if it's normal we don't >>>>>> have online help access in Webtools? >>>>>> >>>>>> Thanks >>>>>> >>>>>> Jacques >>>>>> >>>>>>> Author: adrianc >>>>>>> Date: Tue Apr 19 11:23:07 2011 >>>>>>> New Revision: 1095037 >>>>>>> >>>>>>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >>>>>>> Log: >>>>>>> New feature: i18n entity descriptions in Web Tools. New feature >>>>>>> demonstrated in Example component. >>>>>>> >>>>>>> Modified: >>>>>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>>> >>>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>>> >>>>>>> Modified: >>>>>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>>> URL: >>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>>> >>>>>>> ============================================================================== >>>>>>> >>>>>>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>>> (original) >>>>>>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>>> Tue Apr 19 11:23:07 2011 >>>>>>> @@ -69,6 +69,22 @@ >>>>>>> <value xml:lang="th">สภ>>>>>>> าà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >>>>>>> <value xml:lang="zh">çå®ä¸ç</value> >>>>>>> </property> >>>>>>> + >>>>>>> + <!-- Entity descriptions. The Web Tools component will use >>>>>>> these properties >>>>>>> + for online documentation. Entity description property >>>>>>> keys have the form: >>>>>>> + EntityDescription.[entityname]. >>>>>>> + --> >>>>>>> + <property key="EntityDescription.Example"> >>>>>>> + <value xml:lang="en">Example Entity</value> >>>>>>> + </property> >>>>>>> + >>>>>>> + <!-- Entity field descriptions. The Web Tools component will >>>>>>> use these properties >>>>>>> + for online documentation. Field description property >>>>>>> keys have two forms: >>>>>>> + FieldDescription.[fieldname] - will be used for all >>>>>>> fields of that name >>>>>>> + FieldDescription.[entityname].[fieldname] - will be >>>>>>> used for the specified >>>>>>> + entity field >>>>>>> + --> >>>>>>> + >>>>>>> <property key="FieldDescription.Example.exampleId"> >>>>>>> <value xml:lang="en">A unique Example ID. If you don't assign an >>>>>>> ID, one will be generated automatically</value> >>>>>>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous >>>>>>> n'entrez pas de réf., elle sera générée >>>>>>> automatiquement</value> >>>>>>> @@ -134,12 +150,6 @@ >>>>>>> <value >>>>>>> xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >>>>>>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >>>>>>> </property> >>>>>>> - <!-- Entity field descriptions. The Webtools component will >>>>>>> use these properties >>>>>>> - for online documentation. Field description properties >>>>>>> have two forms: >>>>>>> - FieldDescription.[fieldname] - will be used for all >>>>>>> fields of that name >>>>>>> - FieldDescription.[entityname].[fieldname] - will be >>>>>>> used for the specified >>>>>>> - entity field >>>>>>> - --> >>>>>>> <property key="FieldDescription.exampleId"> >>>>>>> <value xml:lang="en">Example ID</value> >>>>>>> <value xml:lang="fr">Réf. d'exemple</value> >>>>>>> >>>>>>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>>> URL: >>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>>> >>>>>>> ============================================================================== >>>>>>> >>>>>>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>>> (original) >>>>>>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue >>>>>>> Apr 19 11:23:07 2011 >>>>>>> @@ -39,11 +39,7 @@ under the License. >>>>>>> <!-- org.ofbiz.example.example --> >>>>>>> <!-- ========================================================= --> >>>>>>> >>>>>>> - <entity entity-name="Example" >>>>>>> - package-name="org.ofbiz.example.example" >>>>>>> - title="Example Entity" >>>>>>> - default-resource-name="ExampleEntityLabels" >>>>>>> - > >>>>>>> + <entity entity-name="Example" >>>>>>> package-name="org.ofbiz.example.example" title="Example Entity"> >>>>>>> <field name="exampleId" type="id-ne"><description>primary >>>>>>> sequenced ID</description></field> >>>>>>> <field name="exampleTypeId" type="id-ne"></field> >>>>>>> <field name="statusId" type="id-ne"></field> >>>>>>> >>>>>>> Modified: >>>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>>> URL: >>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>>> >>>>>>> ============================================================================== >>>>>>> >>>>>>> --- >>>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>>> (original) >>>>>>> +++ >>>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>>> Tue Apr 19 11:23:07 2011 >>>>>>> @@ -663,6 +663,15 @@ public class WebToolsServices { >>>>>>> >>>>>>> Debug.logInfo(exception.getMessage(), module); >>>>>>> } >>>>>>> } >>>>>>> + String entityDescription = null; >>>>>>> + if (bundle != null) { >>>>>>> + try { >>>>>>> + entityDescription = >>>>>>> bundle.getString("EntityDescription." + entity.getEntityName()); >>>>>>> + } catch (Exception exception) {} >>>>>>> + } >>>>>>> + if >>>>>>> (UtilValidate.isEmpty(entityDescription)) { >>>>>>> + entityDescription = >>>>>>> entity.getDescription(); >>>>>>> + } >>>>>>> >>>>>>> // fields list >>>>>>> List<Map<String, Object>> javaNameList = >>>>>>> FastList.newInstance(); >>>>>>> @@ -754,7 +763,7 @@ public class WebToolsServices { >>>>>>> entityMap.put("groupName", groupName); >>>>>>> entityMap.put("plainTableName", >>>>>>> entity.getPlainTableName()); >>>>>>> entityMap.put("title", entity.getTitle()); >>>>>>> - entityMap.put("description", >>>>>>> entity.getDescription()); >>>>>>> + entityMap.put("description", >>>>>>> entityDescription); >>>>>>> String entityLocation = >>>>>>> entity.getLocation(); >>>>>>> entityLocation = >>>>>>> entityLocation.replaceFirst(System.getProperty("ofbiz.home") + >>>>>>> "/", ""); >>>>>>> entityMap.put("location", entityLocation); >>>>>>> >>>>>>> >>>>>> >>>>>> >>>> >>>> >>> >>> > > |
Administrator
|
From: "Adrian Crum" <[hidden email]>
> Also, it might be because the Help link depends on the content component, and the framework is no longer dependent on components > in the applications folder. Is that true now? I thought there were still some dependencies. > Something that needs serious consideration is a redesign of the help system. From my perspective, having the help system closely > tied to the content component is a bad idea - because many installations might not use the content component. In addition, > framework-only installations don't use any of the components in the applications folder. I think we all agree on that, still some work ahead it seems... Jacques > -Adrian > > > On 4/20/2011 9:37 AM, Jacques Le Roux wrote: >> The question mark button. I think it's because Webtools has a special layout and we miss it there >> >> Jacques >> >> >> From: "Adrian Crum" <[hidden email]> >>> What do you mean by online help access? >>> >>> -Adrian >>> >>> On 4/20/2011 7:51 AM, Jacques Le Roux wrote: >>>> Still: is someone who knows why we don't have online help access in Webtools, is there any special reasons? >>>> >>>> Thanks >>>> >>>> Jacques >>>> >>>> From: "Jacques Le Roux" <[hidden email]> >>>>> Ha ok! Thanks >>>>> >>>>> Jacques >>>>> >>>>> From: "Adrian Crum" <[hidden email]> >>>>>> It works the same as the i18n field descriptions. Instead of embedding entity descriptions in English in the entitymodel.xml >>>>>> file, you put the translated entity description in the UI label file. >>>>>> >>>>>> -Adrian >>>>>> >>>>>> On 4/20/2011 1:56 AM, Jacques Le Roux wrote: >>>>>>> Hi Adrian, >>>>>>> >>>>>>> I did not have much time and I did not get it, could you explain a bit more please? >>>>>>> Actually this email more to ask to all if it's normal we don't have online help access in Webtools? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> Jacques >>>>>>> >>>>>>>> Author: adrianc >>>>>>>> Date: Tue Apr 19 11:23:07 2011 >>>>>>>> New Revision: 1095037 >>>>>>>> >>>>>>>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev >>>>>>>> Log: >>>>>>>> New feature: i18n entity descriptions in Web Tools. New feature demonstrated in Example component. >>>>>>>> >>>>>>>> Modified: >>>>>>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>>>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>>>> >>>>>>>> Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml >>>>>>>> URL: >>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>>>> ============================================================================== >>>>>>>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml (original) >>>>>>>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue Apr 19 11:23:07 2011 >>>>>>>> @@ -69,6 +69,22 @@ >>>>>>>> <value xml:lang="th">สภาà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> >>>>>>>> <value xml:lang="zh">çå®ä¸ç</value> >>>>>>>> </property> >>>>>>>> + >>>>>>>> + <!-- Entity descriptions. The Web Tools component will use these properties >>>>>>>> + for online documentation. Entity description property keys have the form: >>>>>>>> + EntityDescription.[entityname]. >>>>>>>> + --> >>>>>>>> + <property key="EntityDescription.Example"> >>>>>>>> + <value xml:lang="en">Example Entity</value> >>>>>>>> + </property> >>>>>>>> + >>>>>>>> + <!-- Entity field descriptions. The Web Tools component will use these properties >>>>>>>> + for online documentation. Field description property keys have two forms: >>>>>>>> + FieldDescription.[fieldname] - will be used for all fields of that name >>>>>>>> + FieldDescription.[entityname].[fieldname] - will be used for the specified >>>>>>>> + entity field >>>>>>>> + --> >>>>>>>> + >>>>>>>> <property key="FieldDescription.Example.exampleId"> >>>>>>>> <value xml:lang="en">A unique Example ID. If you don't assign an ID, one will be generated automatically</value> >>>>>>>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée >>>>>>>> automatiquement</value> >>>>>>>> @@ -134,12 +150,6 @@ >>>>>>>> <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> >>>>>>>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> >>>>>>>> </property> >>>>>>>> - <!-- Entity field descriptions. The Webtools component will use these properties >>>>>>>> - for online documentation. Field description properties have two forms: >>>>>>>> - FieldDescription.[fieldname] - will be used for all fields of that name >>>>>>>> - FieldDescription.[entityname].[fieldname] - will be used for the specified >>>>>>>> - entity field >>>>>>>> - --> >>>>>>>> <property key="FieldDescription.exampleId"> >>>>>>>> <value xml:lang="en">Example ID</value> >>>>>>>> <value xml:lang="fr">Réf. d'exemple</value> >>>>>>>> >>>>>>>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml >>>>>>>> URL: >>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>>>> ============================================================================== >>>>>>>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) >>>>>>>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr 19 11:23:07 2011 >>>>>>>> @@ -39,11 +39,7 @@ under the License. >>>>>>>> <!-- org.ofbiz.example.example --> >>>>>>>> <!-- ========================================================= --> >>>>>>>> >>>>>>>> - <entity entity-name="Example" >>>>>>>> - package-name="org.ofbiz.example.example" >>>>>>>> - title="Example Entity" >>>>>>>> - default-resource-name="ExampleEntityLabels" >>>>>>>> - > >>>>>>>> + <entity entity-name="Example" package-name="org.ofbiz.example.example" title="Example Entity"> >>>>>>>> <field name="exampleId" type="id-ne"><description>primary sequenced ID</description></field> >>>>>>>> <field name="exampleTypeId" type="id-ne"></field> >>>>>>>> <field name="statusId" type="id-ne"></field> >>>>>>>> >>>>>>>> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java >>>>>>>> URL: >>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff >>>>>>>> ============================================================================== >>>>>>>> --- >>>>>>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) >>>>>>>> +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Tue Apr 19 11:23:07 2011 >>>>>>>> @@ -663,6 +663,15 @@ public class WebToolsServices { >>>>>>>> Debug.logInfo(exception.getMessage(), module); >>>>>>>> } >>>>>>>> } >>>>>>>> + String entityDescription = null; >>>>>>>> + if (bundle != null) { >>>>>>>> + try { >>>>>>>> + entityDescription = bundle.getString("EntityDescription." + entity.getEntityName()); >>>>>>>> + } catch (Exception exception) {} >>>>>>>> + } >>>>>>>> + if (UtilValidate.isEmpty(entityDescription)) { >>>>>>>> + entityDescription = entity.getDescription(); >>>>>>>> + } >>>>>>>> >>>>>>>> // fields list >>>>>>>> List<Map<String, Object>> javaNameList = FastList.newInstance(); >>>>>>>> @@ -754,7 +763,7 @@ public class WebToolsServices { >>>>>>>> entityMap.put("groupName", groupName); >>>>>>>> entityMap.put("plainTableName", entity.getPlainTableName()); >>>>>>>> entityMap.put("title", entity.getTitle()); >>>>>>>> - entityMap.put("description", entity.getDescription()); >>>>>>>> + entityMap.put("description", entityDescription); >>>>>>>> String entityLocation = entity.getLocation(); >>>>>>>> entityLocation = entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); >>>>>>>> entityMap.put("location", entityLocation); >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>>> >>>> >> >> |
On Apr 20, 2011, at 1:18 PM, Jacques Le Roux wrote: > From: "Adrian Crum" <[hidden email]> >> Also, it might be because the Help link depends on the content component, and the framework is no longer dependent on components >> in the applications folder. > > Is that true now? I thought there were still some dependencies. > >> Something that needs serious consideration is a redesign of the help system. From my perspective, having the help system closely >> tied to the content component is a bad idea - because many installations might not use the content component. In addition, >> framework-only installations don't use any of the components in the applications folder. > > I think we all agree on that, still some work ahead it seems... I don't know that we all agree on that... in fact isn't the idea backwards? In other words shouldn't we move parts (not all) of the content component to the framework instead of removing dependencies on it? -David |
In reply to this post by Jacques Le Roux
Because the help system is created using the content component which is
not part of the framework. Webtools is part of the framework and that is why is was not added there. Why not add core parts of the content component to the framework so help is part of it? Regards, Hans On Wed, 2011-04-20 at 16:51 +0200, Jacques Le Roux wrote: > Still: is someone who knows why we don't have online help access in Webtools, is there any special reasons? > > Thanks > > Jacques > > From: "Jacques Le Roux" <[hidden email]> > > Ha ok! Thanks > > > > Jacques > > > > From: "Adrian Crum" <[hidden email]> > >> It works the same as the i18n field descriptions. Instead of embedding entity descriptions in English in the entitymodel.xml > >> file, you put the translated entity description in the UI label file. > >> > >> -Adrian > >> > >> On 4/20/2011 1:56 AM, Jacques Le Roux wrote: > >>> Hi Adrian, > >>> > >>> I did not have much time and I did not get it, could you explain a bit more please? > >>> Actually this email more to ask to all if it's normal we don't have online help access in Webtools? > >>> > >>> Thanks > >>> > >>> Jacques > >>> > >>>> Author: adrianc > >>>> Date: Tue Apr 19 11:23:07 2011 > >>>> New Revision: 1095037 > >>>> > >>>> URL: http://svn.apache.org/viewvc?rev=1095037&view=rev > >>>> Log: > >>>> New feature: i18n entity descriptions in Web Tools. New feature demonstrated in Example component. > >>>> > >>>> Modified: > >>>> ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml > >>>> ofbiz/trunk/framework/example/entitydef/entitymodel.xml > >>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java > >>>> > >>>> Modified: ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml > >>>> URL: > >>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml?rev=1095037&r1=1095036&r2=1095037&view=diff > >>>> ============================================================================== > >>>> --- ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml (original) > >>>> +++ ofbiz/trunk/framework/example/config/ExampleEntityLabels.xml Tue Apr 19 11:23:07 2011 > >>>> @@ -69,6 +69,22 @@ > >>>> <value xml:lang="th">สภาà¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸£à¸´à¸</value> > >>>> <value xml:lang="zh">çå®ä¸ç</value> > >>>> </property> > >>>> + > >>>> + <!-- Entity descriptions. The Web Tools component will use these properties > >>>> + for online documentation. Entity description property keys have the form: > >>>> + EntityDescription.[entityname]. > >>>> + --> > >>>> + <property key="EntityDescription.Example"> > >>>> + <value xml:lang="en">Example Entity</value> > >>>> + </property> > >>>> + > >>>> + <!-- Entity field descriptions. The Web Tools component will use these properties > >>>> + for online documentation. Field description property keys have two forms: > >>>> + FieldDescription.[fieldname] - will be used for all fields of that name > >>>> + FieldDescription.[entityname].[fieldname] - will be used for the specified > >>>> + entity field > >>>> + --> > >>>> + > >>>> <property key="FieldDescription.Example.exampleId"> > >>>> <value xml:lang="en">A unique Example ID. If you don't assign an ID, one will be generated automatically</value> > >>>> <value xml:lang="fr">Une réf. unique d'exemple. Si vous n'entrez pas de réf., elle sera générée > >>>> automatiquement</value> > >>>> @@ -134,12 +150,6 @@ > >>>> <value xml:lang="th">à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¸§à¸±à¸à¸à¸µà¹</value> > >>>> <value xml:lang="zh">æ ·ä¾æ¥æ</value> > >>>> </property> > >>>> - <!-- Entity field descriptions. The Webtools component will use these properties > >>>> - for online documentation. Field description properties have two forms: > >>>> - FieldDescription.[fieldname] - will be used for all fields of that name > >>>> - FieldDescription.[entityname].[fieldname] - will be used for the specified > >>>> - entity field > >>>> - --> > >>>> <property key="FieldDescription.exampleId"> > >>>> <value xml:lang="en">Example ID</value> > >>>> <value xml:lang="fr">Réf. d'exemple</value> > >>>> > >>>> Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml > >>>> URL: > >>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=1095037&r1=1095036&r2=1095037&view=diff > >>>> ============================================================================== > >>>> --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) > >>>> +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Tue Apr 19 11:23:07 2011 > >>>> @@ -39,11 +39,7 @@ under the License. > >>>> <!-- org.ofbiz.example.example --> > >>>> <!-- ========================================================= --> > >>>> > >>>> - <entity entity-name="Example" > >>>> - package-name="org.ofbiz.example.example" > >>>> - title="Example Entity" > >>>> - default-resource-name="ExampleEntityLabels" > >>>> - > > >>>> + <entity entity-name="Example" package-name="org.ofbiz.example.example" title="Example Entity"> > >>>> <field name="exampleId" type="id-ne"><description>primary sequenced ID</description></field> > >>>> <field name="exampleTypeId" type="id-ne"></field> > >>>> <field name="statusId" type="id-ne"></field> > >>>> > >>>> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java > >>>> URL: > >>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=1095037&r1=1095036&r2=1095037&view=diff > >>>> ============================================================================== > >>>> --- > >>>> ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) > >>>> +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Tue Apr 19 11:23:07 2011 > >>>> @@ -663,6 +663,15 @@ public class WebToolsServices { > >>>> Debug.logInfo(exception.getMessage(), module); > >>>> } > >>>> } > >>>> + String entityDescription = null; > >>>> + if (bundle != null) { > >>>> + try { > >>>> + entityDescription = bundle.getString("EntityDescription." + entity.getEntityName()); > >>>> + } catch (Exception exception) {} > >>>> + } > >>>> + if (UtilValidate.isEmpty(entityDescription)) { > >>>> + entityDescription = entity.getDescription(); > >>>> + } > >>>> > >>>> // fields list > >>>> List<Map<String, Object>> javaNameList = FastList.newInstance(); > >>>> @@ -754,7 +763,7 @@ public class WebToolsServices { > >>>> entityMap.put("groupName", groupName); > >>>> entityMap.put("plainTableName", entity.getPlainTableName()); > >>>> entityMap.put("title", entity.getTitle()); > >>>> - entityMap.put("description", entity.getDescription()); > >>>> + entityMap.put("description", entityDescription); > >>>> String entityLocation = entity.getLocation(); > >>>> entityLocation = entityLocation.replaceFirst(System.getProperty("ofbiz.home") + "/", ""); > >>>> entityMap.put("location", entityLocation); > >>>> > >>>> > >>> > >>> > > > > > > -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates. |
In reply to this post by David E. Jones-2
On 4/20/2011 3:28 PM, David E Jones wrote:
> On Apr 20, 2011, at 1:18 PM, Jacques Le Roux wrote: > >> From: "Adrian Crum"<[hidden email]> >>> Also, it might be because the Help link depends on the content component, and the framework is no longer dependent on components >>> in the applications folder. >> Is that true now? I thought there were still some dependencies. >> >>> Something that needs serious consideration is a redesign of the help system. From my perspective, having the help system closely >>> tied to the content component is a bad idea - because many installations might not use the content component. In addition, >>> framework-only installations don't use any of the components in the applications folder. >> I think we all agree on that, still some work ahead it seems... > I don't know that we all agree on that... in fact isn't the idea backwards? In other words shouldn't we move parts (not all) of the content component to the framework instead of removing dependencies on it? > > In the original help system, help text was pulled in from a URL that could be configured. There was no dependency on the content component. I still prefer that approach, because a deployment can point to any source of help. -Adrian |
On Apr 20, 2011, at 5:24 PM, Adrian Crum wrote: > On 4/20/2011 3:28 PM, David E Jones wrote: >> On Apr 20, 2011, at 1:18 PM, Jacques Le Roux wrote: >> >>> From: "Adrian Crum"<[hidden email]> >>>> Also, it might be because the Help link depends on the content component, and the framework is no longer dependent on components >>>> in the applications folder. >>> Is that true now? I thought there were still some dependencies. >>> >>>> Something that needs serious consideration is a redesign of the help system. From my perspective, having the help system closely >>>> tied to the content component is a bad idea - because many installations might not use the content component. In addition, >>>> framework-only installations don't use any of the components in the applications folder. >>> I think we all agree on that, still some work ahead it seems... >> I don't know that we all agree on that... in fact isn't the idea backwards? In other words shouldn't we move parts (not all) of the content component to the framework instead of removing dependencies on it? >> >> > > In the original help system, help text was pulled in from a URL that could be configured. There was no dependency on the content component. I still prefer that approach, because a deployment can point to any source of help. Sorry, I wasn't clear. I didn't mean to comment on anything related to help, just the idea of removing framework dependencies on the content component versus moving parts of the content component into the framework. I'm in favor of the latter. -David |
Administrator
|
To be clear myself, I agree with both of you:
1) no applications dependencies for the help system. 2) have the content component in the framework. Or at least a part of it as it's now? I mean the core part. I think we already discussed about that Sascha is working on the JCR branch, maybe it could be a way to do the last? Jacques From: "David E Jones" <[hidden email]> > On Apr 20, 2011, at 5:24 PM, Adrian Crum wrote: > >> On 4/20/2011 3:28 PM, David E Jones wrote: >>> On Apr 20, 2011, at 1:18 PM, Jacques Le Roux wrote: >>> >>>> From: "Adrian Crum"<[hidden email]> >>>>> Also, it might be because the Help link depends on the content component, and the framework is no longer dependent on >>>>> components >>>>> in the applications folder. >>>> Is that true now? I thought there were still some dependencies. >>>> >>>>> Something that needs serious consideration is a redesign of the help system. From my perspective, having the help system >>>>> closely >>>>> tied to the content component is a bad idea - because many installations might not use the content component. In addition, >>>>> framework-only installations don't use any of the components in the applications folder. >>>> I think we all agree on that, still some work ahead it seems... >>> I don't know that we all agree on that... in fact isn't the idea backwards? In other words shouldn't we move parts (not all) of >>> the content component to the framework instead of removing dependencies on it? >>> >>> >> >> In the original help system, help text was pulled in from a URL that could be configured. There was no dependency on the content >> component. I still prefer that approach, because a deployment can point to any source of help. > > Sorry, I wasn't clear. I didn't mean to comment on anything related to help, just the idea of removing framework dependencies on > the content component versus moving parts of the content component into the framework. I'm in favor of the latter. > > -David > |
Free forum by Nabble | Edit this page |