Re: svn commit: r1682132 - in /ofbiz/trunk: applications/product/webapp/catalog/product/ applications/product/widget/catalog/ framework/widget/dtd/ framework/widget/src/org/ofbiz/widget/model/ framewo

2015-05-28 Thread Jacques Le Roux

Hi Michael,

Well done, here a small explanation on what have really been done would help 
reviewers, not only committers, but also external users following changelogs.
For instance :
Adds a maxlength attribute to the textarea element in form, handle errors using 
maxlength as default value
Apply the max length (255 chars) value in several FTL files, when the DB is 
limiting the length

You can always add a better comment (than mine ;)) in the commit log afterwards

Thanks

Jacque

Le 28/05/2015 00:18, mbr...@apache.org a écrit :

Author: mbrohl
Date: Wed May 27 22:18:29 2015
New Revision: 1682132

URL: http://svn.apache.org/r1682132
Log:
Manually applied and modified the changes of the patch from jira issue 
OFBIZ-6312: Catalog Manager's EditProduct screen HTML should place a limit on 
the size of text that can be entered in the Product Description box.

Thanks Forrest Rae for reporting the issue and providing the patch.

Modified:
 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl
 ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
 ofbiz/trunk/framework/widget/dtd/widget-form.xsd
 ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/html/HtmlFormRenderer.java
 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
 ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
 ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl
 ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
 ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl
 ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl

Modified: 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl?rev=1682132&r1=1682131&r2=1682132&view=diff
==
--- 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl 
(original)
+++ 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl 
Wed May 27 22:18:29 2015
@@ -52,7 +52,7 @@ under the License.
  ${uiLabelMap.ProductProductDescription}
   
  
-${(product.description)!}
+${(product.description)!}
  
  
  

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1682132&r1=1682131&r2=1682132&view=diff
==
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Wed May 27 
22:18:29 2015
@@ -353,7 +353,7 @@ under the License.
  
  
  
-
+
  
  
  

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1682132&r1=1682131&r2=1682132&view=diff
==
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Wed May 27 22:18:29 2015
@@ -1615,6 +1615,7 @@ under the License.
  
  
  
+
  
  
  

Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java?rev=1682132&r1=1682131&r2=1682132&view=diff
==
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
Wed May 27 22:18:29 2015
@@ -3503,6 +3503,7 @@ public class ModelFormField {
  private final int rows;
  private final FlexibleStringExpander visualEditorButtons;
  private final boolean visualEditorEnable;
+private final Integer maxlength;
  
  public TextareaField(Element element, ModelFormField modelFormField) {

  super(element, modelFormField);
@@ -3534,6 +3535,17 @@ public class ModelFormField {
  }
  }
  this.rows = rows;
+Integer maxlength = null;
+String maxlengthStr = element.getAttribute("maxlength");
+if (!maxlengthStr.isEmpty()) {
+try {
+maxlength = Integer.valueOf(maxlengthStr);
+ 

Re: svn commit: r1682132 - in /ofbiz/trunk: applications/product/webapp/catalog/product/ applications/product/widget/catalog/ framework/widget/dtd/ framework/widget/src/org/ofbiz/widget/model/ framewo

2015-05-28 Thread Michael Brohl

Hi Jaques,

I have changed the commit message, the original one was indeed too brief 
for what has been done.


Thanks for review and your advise,

Michael

Am 28.05.15 um 09:12 schrieb Jacques Le Roux:

Hi Michael,

Well done, here a small explanation on what have really been done 
would help reviewers, not only committers, but also external users 
following changelogs.

For instance :
Adds a maxlength attribute to the textarea element in form, handle 
errors using maxlength as default value
Apply the max length (255 chars) value in several FTL files, when the 
DB is limiting the length


You can always add a better comment (than mine ;)) in the commit log 
afterwards


Thanks

Jacque

Le 28/05/2015 00:18, mbr...@apache.org a écrit :

Author: mbrohl
Date: Wed May 27 22:18:29 2015
New Revision: 1682132

URL: http://svn.apache.org/r1682132
Log:
Manually applied and modified the changes of the patch from jira 
issue OFBIZ-6312: Catalog Manager's EditProduct screen HTML should 
place a limit on the size of text that can be entered in the Product 
Description box.


Thanks Forrest Rae for reporting the issue and providing the patch.

Modified:
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl
ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
 ofbiz/trunk/framework/widget/dtd/widget-form.xsd
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/html/HtmlFormRenderer.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
ofbiz/trunk/framework/widget/templates/foFormMacroLibrary.ftl
ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
ofbiz/trunk/framework/widget/templates/textFormMacroLibrary.ftl
ofbiz/trunk/framework/widget/templates/xmlFormMacroLibrary.ftl

Modified: 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl?rev=1682132&r1=1682131&r2=1682132&view=diff
== 

--- 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl 
(original)
+++ 
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductContent.ftl 
Wed May 27 22:18:29 2015

@@ -52,7 +52,7 @@ under the License.
  valign="top">${uiLabelMap.ProductProductDescription}

   
  
-rows="2">${(product.description)!}
+maxlength="255">${(product.description)!}

  
  
  

Modified: 
ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1682132&r1=1682131&r2=1682132&view=diff
== 

--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml 
(original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml 
Wed May 27 22:18:29 2015

@@ -353,7 +353,7 @@ under the License.
  title="${uiLabelMap.ProductDuplicateRemoveSelectedWithNewId}" 
map-name="dupProduct">
  title="${uiLabelMap.ProductInternalName}">maxlength="255"/>
  title="${uiLabelMap.ProductProductName}">maxlength="60"/>
-title="${uiLabelMap.ProductProductDescription}" 
widget-style="textAreaBox">
+title="${uiLabelMap.ProductProductDescription}" 
widget-style="textAreaBox">maxlength="255"/>
  title="${uiLabelMap.ProductLongDescription}" 
widget-style="textAreaBox dojo-ResizableTextArea">rows="7"/>
  title="${uiLabelMap.CommonDuplicate}" title-style="h1" map-name="dummy">

  

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1682132&r1=1682131&r2=1682132&view=diff
== 


--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Wed May 27 
22:18:29 2015

@@ -1615,6 +1615,7 @@ under the License.
  
  default="60" />
  default="3" />

+
  
  
  

Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java?rev=1682132&r1=1682131&r2=1682132&view=diff
== 

--- 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelFormField.java 
(original)
+++ 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/mode