From: "Adrian Crum" <[email protected]>
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" <[email protected]>
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" <[email protected]>
Ha ok! Thanks

Jacques

From: "Adrian Crum" <[email protected]>
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);












Reply via email to