Re: svn commit: r687675 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

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

Re: svn commit: r687675 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Adam Heath-2
[hidden email] wrote:
> +            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
> +            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " + listSize + "</span> \n");
>          }
>          if (highIndex < listSize) {
>              writer.append(" <a href=\"");

This is the wrong way to translate something.  You don't translate a
word, but a phrase.  Some languages have different ordering of primary
phrase components.

A - B of Y -> "%1 - %2 of %3", with args {lowIndex + 1, lowIndex +
actualPageSize, listSize}.

I'd do that, but I don't know the translation system in ofbiz.

ps: I'd probably go so far as to say that all single-word translation
entries currently in ofbiz are probably wrong.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Adrian Crum
We have discussed this in the past. There should be a UI label like

Displaying ${lowCount} - ${highCount} of ${total}

-Adrian

Adam Heath wrote:

> [hidden email] wrote:
>> +            String ofLabel =
>> UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale)
>> context.get("locale"));
>> +            writer.append(" <span class=\"tabletext\">" + (lowIndex +
>> 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " +
>> listSize + "</span> \n");
>>          }
>>          if (highIndex < listSize) {
>>              writer.append(" <a href=\"");
>
> This is the wrong way to translate something.  You don't translate a
> word, but a phrase.  Some languages have different ordering of primary
> phrase components.
>
> A - B of Y -> "%1 - %2 of %3", with args {lowIndex + 1, lowIndex +
> actualPageSize, listSize}.
>
> I'd do that, but I don't know the translation system in ofbiz.
>
> ps: I'd probably go so far as to say that all single-word translation
> entries currently in ofbiz are probably wrong.
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Jacques Le Roux
Administrator
I agree that only sentences should be translated. There are still plenty of that in OFBiz :/
It would  need a full review.
On a related topic I also mentionned the use <fail-message> in OFBiz OOTB recently

I will write a bad translation practices in Wiki ! Any suggestions is/will be welcome
I will also rewrite this one as suggested...

Jacques

From: "Adrian Crum" <[hidden email]>

> We have discussed this in the past. There should be a UI label like
>
> Displaying ${lowCount} - ${highCount} of ${total}
>
> -Adrian
>
> Adam Heath wrote:
>> [hidden email] wrote:
>>> +            String ofLabel =
>>> UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale)
>>> context.get("locale"));
>>> +            writer.append(" <span class=\"tabletext\">" + (lowIndex +
>>> 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " +
>>> listSize + "</span> \n");
>>>          }
>>>          if (highIndex < listSize) {
>>>              writer.append(" <a href=\"");
>>
>> This is the wrong way to translate something.  You don't translate a
>> word, but a phrase.  Some languages have different ordering of primary
>> phrase components.
>>
>> A - B of Y -> "%1 - %2 of %3", with args {lowIndex + 1, lowIndex +
>> actualPageSize, listSize}.
>>
>> I'd do that, but I don't know the translation system in ofbiz.
>>
>> ps: I'd probably go so far as to say that all single-word translation
>> entries currently in ofbiz are probably wrong.
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Jacques Le Roux
Administrator
I wrote this

Index: framework/common/config/CommonUiLabels.xml
===================================================================
--- framework/common/config/CommonUiLabels.xml (revision 687584)
+++ framework/common/config/CommonUiLabels.xml (working copy)
@@ -1705,6 +1705,10 @@
         <value xml:lang="zh_CN">ç¦?用</value>
         <value xml:lang="zh">æ— æ•ˆ</value>
     </property>
+    <property key="CommonDisplaying">
+        <value xml:lang="en">Displaying ${lowCount} - ${highCount} of ${total}</value>
+        <value xml:lang="fr">Affichage de ${lowCount} Ã  ${highCount} sur ${total}</value>
+    </property>
     <property key="CommonDistance">
         <value xml:lang="ar">مساÙ?Ø©</value>
         <value xml:lang="de">Distanz</value>
Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
===================================================================
--- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 687675)
+++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
@@ -340,8 +340,11 @@

         }
         if (listSize > 0) {
-            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
-            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " "
+ listSize + "</span> \n");
+            @SuppressWarnings("unused") int lowCount = lowIndex + 1;
+            @SuppressWarnings("unused") int highCount = lowIndex + actualPageSize;
+            @SuppressWarnings("unused") int total = listSize;
+            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", (Locale)
context.get("locale"));
+            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
         }
         if (highIndex < listSize) {
             writer.append(" <a href=\"");

But I'm still unsure how to test it. Bilgin spoke about party manager -> fin accounts but then you are in accouting and I guess I
miss some data he has.

Jacques

From: "Jacques Le Roux" <[hidden email]>

>I agree that only sentences should be translated. There are still plenty of that in OFBiz :/ It would  need a full review. On a
>related topic I also mentionned the use <fail-message> in OFBiz OOTB recently
>
> I will write a bad translation practices in Wiki ! Any suggestions is/will be welcome
> I will also rewrite this one as suggested...
>
> Jacques
>
> From: "Adrian Crum" <[hidden email]>
>> We have discussed this in the past. There should be a UI label like
>>
>> Displaying ${lowCount} - ${highCount} of ${total}
>>
>> -Adrian
>>
>> Adam Heath wrote:
>>> [hidden email] wrote:
>>>> +            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
>>>> +            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel
>>>> + " " + listSize + "</span> \n");
>>>>          }
>>>>          if (highIndex < listSize) {
>>>>              writer.append(" <a href=\"");
>>>
>>> This is the wrong way to translate something.  You don't translate a word, but a phrase.  Some languages have different ordering
>>> of primary phrase components.
>>>
>>> A - B of Y -> "%1 - %2 of %3", with args {lowIndex + 1, lowIndex + actualPageSize, listSize}.
>>>
>>> I'd do that, but I don't know the translation system in ofbiz.
>>>
>>> ps: I'd probably go so far as to say that all single-word translation entries currently in ofbiz are probably wrong.
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Bilgin Ibryam
On Fri, 2008-08-22 at 14:24 +0200, Jacques Le Roux wrote:

> I wrote this
>
> Index: framework/common/config/CommonUiLabels.xml
> ===================================================================
> --- framework/common/config/CommonUiLabels.xml (revision 687584)
> +++ framework/common/config/CommonUiLabels.xml (working copy)
> @@ -1705,6 +1705,10 @@
>          <value xml:lang="zh_CN">ç¦?用</value>
>          <value xml:lang="zh">æ— æ•ˆ</value>
>      </property>
> +    <property key="CommonDisplaying">
> +        <value xml:lang="en">Displaying ${lowCount} - ${highCount} of ${total}</value>
> +        <value xml:lang="fr">Affichage de ${lowCount} Ã  ${highCount} sur ${total}</value>
> +    </property>
>      <property key="CommonDistance">
>          <value xml:lang="ar">مساÙ?Ø©</value>
>          <value xml:lang="de">Distanz</value>
> Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
> ===================================================================
> --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 687675)
> +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
> @@ -340,8 +340,11 @@
>
>          }
>          if (listSize > 0) {
> -            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
> -            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " "
> + listSize + "</span> \n");
> +            @SuppressWarnings("unused") int lowCount = lowIndex + 1;
> +            @SuppressWarnings("unused") int highCount = lowIndex + actualPageSize;
> +            @SuppressWarnings("unused") int total = listSize;
> +            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", (Locale)
> context.get("locale"));
> +            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
>          }
>          if (highIndex < listSize) {
>              writer.append(" <a href=\"");
>
> But I'm still unsure how to test it. Bilgin spoke about party manager -> fin accounts but then you are in accouting and I guess I
> miss some data he has.
>
> Jacques


Jacques,

it is not very easy to see iterate section with page numbers.
you have to create few fin accounts for a party and then a screenlet with iterate section for fin accounts will appear in party -> profile screen.
But even then you can not see the page numbers. To see them you have to add the following attributes to iterate-section element:  paginate="true" , view-size, paginate-target
(I will create a jira issue to change DEFAULT_PAGE_SIZE from 100 to 10, as it is in form pagination).

Finally you have to modify your code as shown bellow.
Thanks for working on this.


Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
===================================================================
--- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 688079)
+++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
@@ -33,6 +33,7 @@
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
@@ -340,8 +341,9 @@
 
         }
         if (listSize > 0) {
-            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
-            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + " " + listSize + "</span> \n");
+            Map messageMap = UtilMisc.toMap("lowCount", Integer.valueOf(lowIndex + 1), "highCount", Integer.valueOf(lowIndex + actualPageSize), "total", Integer.valueOf(listSize));
+            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", messageMap, (Locale) context.get("locale"));
+            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
         }
         if (highIndex < listSize) {
             writer.append(" <a href=\"");




Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Jacques Le Roux
Administrator
Thanks to Bilgin's help, I commited something in revision 688167.
It works well but doint this I found an error which ends by
    java.lang.UnsupportedOperationException: = (=)
You can easily repreoduce this error on the demo server while using Party Profile, but it's a random error.

Actually trying to reproduce it I got
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
[component://party/widget/partymgr/PartyScreens.xml#findparty]: java.lang.IllegalArgumentException: Error calling service with name
findParty:         org.ofbiz.service.GenericServiceException: Service [findParty] target threw an unexpected exception (=) (Error
calling service with name findParty: org.ofbiz.service.GenericServiceException: Service [findParty] target threw an unexpected
exception (=))

Also trying to create a fin account I got
    Error in simple-method operation []: java.lang.UnsupportedOperationException: = null
But not always...

No logs sorry... I suspect something related to cache...

Jacques

From: "Bilgin Ibryam" <[hidden email]>

> On Fri, 2008-08-22 at 14:24 +0200, Jacques Le Roux wrote:
>> I wrote this
>>
>> Index: framework/common/config/CommonUiLabels.xml
>> ===================================================================
>> --- framework/common/config/CommonUiLabels.xml (revision 687584)
>> +++ framework/common/config/CommonUiLabels.xml (working copy)
>> @@ -1705,6 +1705,10 @@
>>          <value xml:lang="zh_CN">ç¦?用</value>
>>          <value xml:lang="zh">æ— æ•ˆ</value>
>>      </property>
>> +    <property key="CommonDisplaying">
>> +        <value xml:lang="en">Displaying ${lowCount} - ${highCount} of ${total}</value>
>> +        <value xml:lang="fr">Affichage de ${lowCount} Ã  ${highCount} sur ${total}</value>
>> +    </property>
>>      <property key="CommonDistance">
>>          <value xml:lang="ar">مساÙ?Ø©</value>
>>          <value xml:lang="de">Distanz</value>
>> Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
>> ===================================================================
>> --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 687675)
>> +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
>> @@ -340,8 +340,11 @@
>>
>>          }
>>          if (listSize > 0) {
>> -            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
>> -            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel +
>> " "
>> + listSize + "</span> \n");
>> +            @SuppressWarnings("unused") int lowCount = lowIndex + 1;
>> +            @SuppressWarnings("unused") int highCount = lowIndex + actualPageSize;
>> +            @SuppressWarnings("unused") int total = listSize;
>> +            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", (Locale)
>> context.get("locale"));
>> +            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
>>          }
>>          if (highIndex < listSize) {
>>              writer.append(" <a href=\"");
>>
>> But I'm still unsure how to test it. Bilgin spoke about party manager -> fin accounts but then you are in accouting and I guess I
>> miss some data he has.
>>
>> Jacques
>
>
> Jacques,
>
> it is not very easy to see iterate section with page numbers.
> you have to create few fin accounts for a party and then a screenlet with iterate section for fin accounts will appear in party ->
> profile screen.
> But even then you can not see the page numbers. To see them you have to add the following attributes to iterate-section element:
> paginate="true" , view-size, paginate-target
> (I will create a jira issue to change DEFAULT_PAGE_SIZE from 100 to 10, as it is in form pagination).
>
> Finally you have to modify your code as shown bellow.
> Thanks for working on this.
>
>
> Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
> ===================================================================
> --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 688079)
> +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
> @@ -33,6 +33,7 @@
>
> import org.ofbiz.base.util.Debug;
> import org.ofbiz.base.util.GeneralException;
> +import org.ofbiz.base.util.UtilMisc;
> import org.ofbiz.base.util.UtilProperties;
> import org.ofbiz.base.util.UtilValidate;
> import org.ofbiz.base.util.UtilXml;
> @@ -340,8 +341,9 @@
>
>         }
>         if (listSize > 0) {
> -            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
> -            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel + "
> " + listSize + "</span> \n");
> +            Map messageMap = UtilMisc.toMap("lowCount", Integer.valueOf(lowIndex + 1), "highCount", Integer.valueOf(lowIndex +
> actualPageSize), "total", Integer.valueOf(listSize));
> +            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", messageMap, (Locale)
> context.get("locale"));
> +            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
>         }
>         if (highIndex < listSize) {
>             writer.append(" <a href=\"");
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Jacques Le Roux
Administrator
Here is a local log for the error appearing on FinAccounts screenlet in Party Profile. We get the same trying to update a Fin
Account

2008-08-22 20:42:15,468 (http-0.0.0.0-18443-1) [       SimpleMethod.java:926:ERROR]
---- runtime exception report --------------------------------------------------
Error in simple-method operation [<store-value/>]: java.lang.UnsupportedOperationException: =
Exception: java.lang.UnsupportedOperationException
Message: =
---- stack trace ---------------------------------------------------------------
java.lang.UnsupportedOperationException: =
org.ofbiz.entity.condition.EntityComparisonOperator.compare(EntityComparisonOperator.java:131)
org.ofbiz.entity.condition.EntityComparisonOperator.mapMatches(EntityComparisonOperator.java:158)
org.ofbiz.entity.condition.EntityExpr.mapMatches(EntityExpr.java:167)
org.ofbiz.entity.condition.EntityJoinOperator.mapMatches(EntityJoinOperator.java:142)
org.ofbiz.entity.condition.EntityConditionListBase.mapMatches(EntityConditionListBase.java:99)
org.ofbiz.entity.cache.AbstractEntityConditionCache.storeHook(AbstractEntityConditionCache.java:200)
org.ofbiz.entity.cache.AbstractEntityConditionCache.storeHook(AbstractEntityConditionCache.java:166)
org.ofbiz.entity.cache.AbstractEntityConditionCache.storeHook(AbstractEntityConditionCache.java:141)
org.ofbiz.entity.cache.Cache.remove(Cache.java:114)
org.ofbiz.entity.GenericDelegator.clearCacheLine(GenericDelegator.java:2810)
org.ofbiz.entity.GenericDelegator.clearCacheLine(GenericDelegator.java:2795)
org.ofbiz.entity.GenericDelegator.store(GenericDelegator.java:1213)
org.ofbiz.minilang.method.entityops.StoreValue.exec(StoreValue.java:74)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:921)
org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:749)
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:149)
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:131)
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:332)
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:444)
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:276)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:198)
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:78)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:259)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)

I had a quick look, but did not find anything so far...

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Thanks to Bilgin's help, I commited something in revision 688167.
> It works well but doint this I found an error which ends by
>    java.lang.UnsupportedOperationException: = (=)
> You can easily repreoduce this error on the demo server while using Party Profile, but it's a random error.
>
> Actually trying to reproduce it I got
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
> [component://party/widget/partymgr/PartyScreens.xml#findparty]: java.lang.IllegalArgumentException: Error calling service with
> name findParty:         org.ofbiz.service.GenericServiceException: Service [findParty] target threw an unexpected exception (=)
> (Error calling service with name findParty: org.ofbiz.service.GenericServiceException: Service [findParty] target threw an
> unexpected exception (=))
>
> Also trying to create a fin account I got
>    Error in simple-method operation []: java.lang.UnsupportedOperationException: = null
> But not always...
>
> No logs sorry... I suspect something related to cache...
>
> Jacques
>
> From: "Bilgin Ibryam" <[hidden email]>
>> On Fri, 2008-08-22 at 14:24 +0200, Jacques Le Roux wrote:
>>> I wrote this
>>>
>>> Index: framework/common/config/CommonUiLabels.xml
>>> ===================================================================
>>> --- framework/common/config/CommonUiLabels.xml (revision 687584)
>>> +++ framework/common/config/CommonUiLabels.xml (working copy)
>>> @@ -1705,6 +1705,10 @@
>>>          <value xml:lang="zh_CN">ç¦?用</value>
>>>          <value xml:lang="zh">æ— æ•ˆ</value>
>>>      </property>
>>> +    <property key="CommonDisplaying">
>>> +        <value xml:lang="en">Displaying ${lowCount} - ${highCount} of ${total}</value>
>>> +        <value xml:lang="fr">Affichage de ${lowCount} Ã  ${highCount} sur ${total}</value>
>>> +    </property>
>>>      <property key="CommonDistance">
>>>          <value xml:lang="ar">مساÙ?Ø©</value>
>>>          <value xml:lang="de">Distanz</value>
>>> Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
>>> ===================================================================
>>> --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 687675)
>>> +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
>>> @@ -340,8 +340,11 @@
>>>
>>>          }
>>>          if (listSize > 0) {
>>> -            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
>>> -            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel +
>>> " "
>>> + listSize + "</span> \n");
>>> +            @SuppressWarnings("unused") int lowCount = lowIndex + 1;
>>> +            @SuppressWarnings("unused") int highCount = lowIndex + actualPageSize;
>>> +            @SuppressWarnings("unused") int total = listSize;
>>> +            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", (Locale)
>>> context.get("locale"));
>>> +            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
>>>          }
>>>          if (highIndex < listSize) {
>>>              writer.append(" <a href=\"");
>>>
>>> But I'm still unsure how to test it. Bilgin spoke about party manager -> fin accounts but then you are in accouting and I guess
>>> I
>>> miss some data he has.
>>>
>>> Jacques
>>
>>
>> Jacques,
>>
>> it is not very easy to see iterate section with page numbers.
>> you have to create few fin accounts for a party and then a screenlet with iterate section for fin accounts will appear in
>> party -> profile screen.
>> But even then you can not see the page numbers. To see them you have to add the following attributes to iterate-section element:
>> paginate="true" , view-size, paginate-target
>> (I will create a jira issue to change DEFAULT_PAGE_SIZE from 100 to 10, as it is in form pagination).
>>
>> Finally you have to modify your code as shown bellow.
>> Thanks for working on this.
>>
>>
>> Index: framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
>> ===================================================================
>> --- framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (revision 688079)
>> +++ framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (working copy)
>> @@ -33,6 +33,7 @@
>>
>> import org.ofbiz.base.util.Debug;
>> import org.ofbiz.base.util.GeneralException;
>> +import org.ofbiz.base.util.UtilMisc;
>> import org.ofbiz.base.util.UtilProperties;
>> import org.ofbiz.base.util.UtilValidate;
>> import org.ofbiz.base.util.UtilXml;
>> @@ -340,8 +341,9 @@
>>
>>         }
>>         if (listSize > 0) {
>> -            String ofLabel = UtilProperties.getMessage("CommonUiLabels", "CommonOf", (Locale) context.get("locale"));
>> -            writer.append(" <span class=\"tabletext\">" + (lowIndex + 1) + " - " + (lowIndex + actualPageSize) + " "+ ofLabel +
>> " " + listSize + "</span> \n");
>> +            Map messageMap = UtilMisc.toMap("lowCount", Integer.valueOf(lowIndex + 1), "highCount", Integer.valueOf(lowIndex +
>> actualPageSize), "total", Integer.valueOf(listSize));
>> +            String commonDisplaying = UtilProperties.getMessage("CommonUiLabels", "CommonDisplaying", messageMap, (Locale)
>> context.get("locale"));
>> +            writer.append(" <span class=\"tabletext\">" + commonDisplaying + "</span> \n");
>>         }
>>         if (highIndex < listSize) {
>>             writer.append(" <a href=\"");
>>
>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Adam Heath-2
In reply to this post by Jacques Le Roux
Jacques Le Roux wrote:
> Thanks to Bilgin's help, I commited something in revision 688167.
> It works well but doint this I found an error which ends by
>    java.lang.UnsupportedOperationException: = (=)
> You can easily repreoduce this error on the demo server while using
> Party Profile, but it's a random error.

Did you update first?  I committed something that should fix this in
687936; I found a case of this exception, that then went away when I
made the fix.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Jacques Le Roux
Administrator
Yes, + clean and even a fresh DB. To reproduce : create a fin account, then try to update it

Jacques

From: "Adam Heath" <[hidden email]>

> Jacques Le Roux wrote:
>> Thanks to Bilgin's help, I commited something in revision 688167.
>> It works well but doint this I found an error which ends by
>>    java.lang.UnsupportedOperationException: = (=)
>> You can easily repreoduce this error on the demo server while using
>> Party Profile, but it's a random error.
>
> Did you update first?  I committed something that should fix this in
> 687936; I found a case of this exception, that then went away when I
> made the fix.
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Adam Heath-2
Jacques Le Roux wrote:
> Yes, + clean and even a fresh DB. To reproduce : create a fin account,
> then try to update it

Please don't leave out any steps.  Tell me exactly what you did, all of it.


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Jacques Le Roux
Administrator
From: "Adam Heath" <[hidden email]>
To: <[hidden email]>
Sent: Friday, August 22, 2008 10:51 PM
Subject: Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java


> Jacques Le Roux wrote:
>> Yes, + clean and even a fresh DB. To reproduce : create a fin account, then try to update it
>
> Please don't leave out any steps.  Tell me exactly what you did, all of it.

Create a fin account of type service credit for party admin. View admin profile (1st error, random : pass it by refeshing screen).
Try to "Apply service credit" this one is reproductible...

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Scott Gray
In reply to this post by Adam Heath-2
Adam, I reverted 687675 yesterday a few hours before you committed
your last fix, I think it's related to that.  The base compare method
is still expecting a comparable rhs.

2008/8/23 Adam Heath <[hidden email]>:
> Jacques Le Roux wrote:
>>
>> Yes, + clean and even a fresh DB. To reproduce : create a fin account,
>> then try to update it
>
> Please don't leave out any steps.  Tell me exactly what you did, all of it.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Scott Gray
Oops not r687675 but r687578, I was looking at the subject of this thread.

2008/8/23 Scott Gray <[hidden email]>:

> Adam, I reverted 687675 yesterday a few hours before you committed
> your last fix, I think it's related to that.  The base compare method
> is still expecting a comparable rhs.
>
> 2008/8/23 Adam Heath <[hidden email]>:
>> Jacques Le Roux wrote:
>>>
>>> Yes, + clean and even a fresh DB. To reproduce : create a fin account,
>>> then try to update it
>>
>> Please don't leave out any steps.  Tell me exactly what you did, all of it.
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Scott Gray
I'll go ahead and recommit it, I've run through a few processes that
were having issues and they seem fine now.

Regards
Scott

2008/8/23 Scott Gray <[hidden email]>:

> Oops not r687675 but r687578, I was looking at the subject of this thread.
>
> 2008/8/23 Scott Gray <[hidden email]>:
>> Adam, I reverted 687675 yesterday a few hours before you committed
>> your last fix, I think it's related to that.  The base compare method
>> is still expecting a comparable rhs.
>>
>> 2008/8/23 Adam Heath <[hidden email]>:
>>> Jacques Le Roux wrote:
>>>>
>>>> Yes, + clean and even a fresh DB. To reproduce : create a fin account,
>>>> then try to update it
>>>
>>> Please don't leave out any steps.  Tell me exactly what you did, all of it.
>>>
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Scott Gray
Done in r688212

2008/8/23 Scott Gray <[hidden email]>:

> I'll go ahead and recommit it, I've run through a few processes that
> were having issues and they seem fine now.
>
> Regards
> Scott
>
> 2008/8/23 Scott Gray <[hidden email]>:
>> Oops not r687675 but r687578, I was looking at the subject of this thread.
>>
>> 2008/8/23 Scott Gray <[hidden email]>:
>>> Adam, I reverted 687675 yesterday a few hours before you committed
>>> your last fix, I think it's related to that.  The base compare method
>>> is still expecting a comparable rhs.
>>>
>>> 2008/8/23 Adam Heath <[hidden email]>:
>>>> Jacques Le Roux wrote:
>>>>>
>>>>> Yes, + clean and even a fresh DB. To reproduce : create a fin account,
>>>>> then try to update it
>>>>
>>>> Please don't leave out any steps.  Tell me exactly what you did, all of it.
>>>>
>>>>
>>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r687675 -/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java

Adam Heath-2
Scott Gray wrote:
> Done in r688212

Yeah, that looks good.