When you use the paginate = true in a screen and the total number of rows returned is greater than 999 the string is formatted with a coma and an exception is thrown when trying to convert it to an Integer.
jleroux: this depends on language (French would be space) but Simon's fix works for all (we are only dealing with integers there)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1577268 13f79535-47bb-0310-9956-ffa450edef68
Scenario:
1. Go to Content webapp
2. Go to CompDoc menuitem
3. Search
4. Go to 'Tree' view
5. We can not use 'Up' and 'Down' function
When menu with linktype="hidden-form" was render for each menu, they has the same name for form element, so it cause error.
My solution is add extra attribute(extra-index) for Menu, and then in menu definition we provide this attribute and the forms with different name will be rendered.
My implement was tested in this bug for Content webapp
jleroux: I have simply amended the up and down labels to have them more legible. I'd have preferred to not have all uppercased, but ran out of time for such a trivial change
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576891 13f79535-47bb-0310-9956-ffa450edef68
Then with https://issues.apache.org/jira/browse/OFBIZ-3128 contains became the default
But this was working only when defining a text-field. When auto-fields-entity (and I guess auto-fields-service, not tested) was used then like/begins-with was still the default.
This commit changes that and makes things consistent: contains is now always used and set as default everywhere (no longer need to specify the text-field when using auto-fields-* to have contains as default)
Note: I'm not quite sure why like/begins-with was still used as default, since it was no longer the default in widget-form.xsd, but anyway making contains default there works. Also in ModelFormField.java to have things consistent
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1576276 13f79535-47bb-0310-9956-ffa450edef68
Scenario:
1. Load-seed
2. Create-admin-user
3. Access: /catalog/control/main
4. Login
5. Change password for the first use
After password change, web browser redirect user to /catalog/control/main with an error
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1575508 13f79535-47bb-0310-9956-ffa450edef68
The service "renderSingleFormString" check the previous field position to see if the current field must be displayed after the previous field or on a new line.
When the previous field has a use-when condition that is not valid, it remains as the currentFormField and the next field is compared with this "not rendered" field. If the position of this previous field is the same as the current field, the current is displayed on the next line.
To reproduce, add in a single form the three fields below :
<field position="1" name="first"><display description="first"/></field>
<field position="2" name="second" use-when="true"><display description="second"/></field>
<field position="2" name="second" use-when="false"><display description="second"/></field>
The field second is rendered on a new line
jleroux: this second version works correctly
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1574019 13f79535-47bb-0310-9956-ffa450edef68
The service "renderSingleFormString" check the previous field position to see if the current field must be displayed after the previous field or on a new line.
When the previous field has a use-when condition that is not valid, it remains as the currentFormField and the next field is compared with this "not rendered" field. If the position of this previous field is the same as the current field, the current is displayed on the next line.
To reproduce, add in a single form the three fields below :
<field position="1" name="first"><display description="first"/></field>
<field position="2" name="second" use-when="true"><display description="second"/></field>
<field position="2" name="second" use-when="false"><display description="second"/></field>
The field second is rendered on a new line
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1573161 13f79535-47bb-0310-9956-ffa450edef68
The last index (used on the last button) is not calculated correctly in ftl or the renderer classes. It currently users floor which works only for list sizes that are not multiples of the view size. When you have a list size which is a multiple of the view size, it does not subtract 1 for zero based index and therefore the last button goes to the last page + 1
Examples
listSize = 1
viewSize = 10
listSize / viewSize = 0.1
floor(0.1) = 0
This one produces the correct value
listSize = 20
viewSize = 10
listSize / viewSize = 2
floor(2) = 2
Last index should be 1 because of zero based index but never occurs
To reproduce, enter a view with a list and paging functionality, the list size must be a multiple of the view size
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1560176 13f79535-47bb-0310-9956-ffa450edef68
jquery-1.8.2 to jquery-1.10.2 which implies using jquery-migrate-1.2.1 for plugins compatiblities
jquery-ui-timepicker-addon-1.0.5 to jquery-ui-timepicker-addon-1.4.3 (using min now, better i18n)
jquery-ui-1.9.0 to jquery-ui-1.10.3
removes jquery.ui.datepicker.js now integrated in jquery.ui
jquery.hotkeys-0.7.9 to jquery.hotkeys-0.8
jquery.maskedinput-1.2.2 to jquery.maskedinput-1.3.1
jquery.validate 1.10.0 to 1.11.1
I never realised how much efforts have been put in this plugin!
I fixed an issue in JsLanguageFilesMapping generation
I removed the messages_ptbr.js and messages_ptpt.js files and the related conundrum in JsLanguageFileMappingCreator.java
untested, found not use cases OOTB
jquery.jcarousel ?(2006) to 0.3.0 (2013)
untested, found not use cases OOTB
jquery.flot 0.7 to 0.8.2 (lot of changes, still works)
removes useless flotpie.ftl
removes empty flotr folder
jquery.mobile-1.1.0-rc.1 to jquery.mobile-1.4.0
untested, found not use cases OOTB
jquery.cookie to jquery.cookie-1.4.0
Removes all useless/redundant js files (not only jQuery unused old versions)
notably removes all under images/jquery/ui/development-bundle/ui
removes now useless GooglemapMarkers.js and GooglemapSimple.js
Flat Grey application.js
moves jQuery(document).ready(function() at bottom (spotted in Chrome console)
css
I did not find much issues, I spotted the title bar of the lookups, but got it fixed after some efforts.
Issues:
Imagemanagement: I got issues while testing, actually I'm not quite qure how it works, even in stable demo. It should be validated again. I commit nevertheless my changes:
moves js part from product to images component
removes useless calls to js files (mostly in imagemanagement, but not only)
renames jquery.min.js to sizzle.min.js.
Inside sizzle.min.js, updates the Dojo part to v1.10.17-pre and removes the jQuery part
changes to use ofbizContentUrl macro for generating js calls
jquery.rotate.js NOT! It's jQueryRotateCompressed.js http://markmail.org/message/dit3dlh3ph4jnenp
Got ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'D:\projectsASF\ofbizClean\framework\images\webapp\images\pro&' to length 100. I opened OFBIZ-5501 for that
I tried to update jstree to jstree 3 but gave up. I let the jquery.jstree-3.0.0-beta3 files in place in case someone would give it a chance...
Not related but while a it:
removes <!--flot example requests--> from birt controller (moved recently to example component)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559769 13f79535-47bb-0310-9956-ffa450edef68
Since it uses "GET" method to submit the pagination request, it's restricted by the URL max length limitation.
The patch attached changes the submit way from GET to "POST" if total length of URL > 2k.
jleroux: I also sort of (found after it was due to it) reverted r1204170, I don't see the reason for this now, and it was uselessly duplicating the current entry in the page size dropdown
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559338 13f79535-47bb-0310-9956-ffa450edef68
It actually does more than that. It follows Adrian's proposition of improving the GeoPoint data model.
I did not applies all of Adrian's proposition (see our conversation in the Jira issue). Feel free to apply it completely if you are inclined so.
I will also add an entry in wiki page "Revisions Requiring Data Migration (upgrade ofbiz)" at https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045166
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557447 13f79535-47bb-0310-9956-ffa450edef68
And definitively fixes issues with i18n of geolocation
It introduces a "locale" attribute to the "set" operation in widget (I only tested screen, form is quite similar, should be ok) and minilang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554681 13f79535-47bb-0310-9956-ffa450edef68
The method "renderLink" of new class MacroMenuRenderer calls the WidgetWorker.determineAutoLinkType. When menuItem.getDisabled() is true, the link target will be set to null and NPE occurs.
jleroux: This was related with r1517353 and r1537833. The Leon's patch fixes r1517353 and this commits also reverts r1537833
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553887 13f79535-47bb-0310-9956-ffa450edef68
There are 2 issues with the existing code.
1 - floor is applied to viewSize only not the computed value
2 - if the listSize divides with viewSize evenly, you'll get one extra
eg
24/2=12 - no of pages = 13
24/5=4.8 - no of pages = 5
Change to correctly calculate the number of pages using ceiling rather than floor
To repoduce this I went into find party screen, search for all and manually set the view size (I had to click next and change the VIEW_SIZE parameter in the url).
In my description I mention 24/2=12 and 24/5=4.8,
24 is number of parties I had
2/5 is the view size
It does not matter what the item size is (as long as its more than 0), you just have to make sure listSize divides by viewSize evenly. In my case 24/2 divided evenly and which should have have given 12 pages but gave 13.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1550201 13f79535-47bb-0310-9956-ffa450edef68
The idea is to avoid ThreadLocal with custom classes, this can lead to memory leaks when an external application server is used.
Reverts r1075322 (commit for OFBIZ-4107) hence removes CompilerMatcher
Uses PatternFactory instead of CompilerMatcher class (from CompilerMatcher keeps the compiled patterns cache idea)
In UtilHttp.java
Removes dead code
Removes useless "UtilHttp." for class methods and constants calls (moot point, have we conventions on this?).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542960 13f79535-47bb-0310-9956-ffa450edef68
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
"other-field-size" of drop-down form element is a very nice feature, but it's crippled in current version.
attached a patch to make it works and added an example section for that into FormWidgetExample.
jleroux: Interesting, I did not know this feature existed, it was committed long ago by David (before ASF era)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511279 13f79535-47bb-0310-9956-ffa450edef68
When you want edit/remove an entity from link call it's needed to give all pk on parameter element as like :
{quote} <field name="deleteLink">
<hyperlink target="example_deleteExampleFeatureAppl">
<parameter param-name="exampleId"/>
<parameter param-name="exampleFeatureId"/>
<parameter param-name="fromDate"/>
<hyperlink/>
</field>
{quote}
To simplify, I introduce auto-parameters-entity like this :
{quote}
<field name="deleteLink">
<hyperlink target="example_deleteExampleFeatureAppl">
<auto-parameters-entity entity-name="ExampleFeatureAppl"/>
<hyperlink/>
</field>
{quote}
or
{quote}
<form name="ListExampleFeatureAppls" type="list" default-entity-name="ExampleFeatureAppl">
<field name="deleteLink">
<hyperlink target="example_deleteExampleFeatureAppl">
<auto-parameters-entity/>
<hyperlink/>
</field>
{quote}
This method is inspired from auto-fields-entity and I homogenized on widget renderer screen (link), menu (link) and form (hyperlink, sub-link)
jleroux: I simply put returns in case of no dispatcher or delegator
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506835 13f79535-47bb-0310-9956-ffa450edef68
Two simples errors after last change from FastList to standard java List :
1) go to example component / Dasboard
1.1) click on edit for one page
Screen is blocked
reason :
{code}
for (GenericValue portalPage : portalPages) {
cond = EntityCondition.makeCondition(UtilMisc.toList(
EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, userLoginId),
EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, portalPage.getString("portalPageId"))),
EntityOperator.AND);
List <GenericValue> privatePortalPages = delegator.findList("PortalPage", cond, null, null, null, false);
if (UtilValidate.isNotEmpty(privatePortalPages)) {
portalPages.remove(portalPage);
portalPages.add(privatePortalPages.get(0));
}
}
{code}
code iterate on a list and modify it, I don't know how it could work before ;-)
I propose to use an other list on iterate
2) on appbarclose.ftl for tomawak theme there is
{code}
<#assign portalPage = delegator.findOne("PortalPage", findMap, true)>
{code}
when you click to "revert to original" in dasboard screen
{code}
Error on line 45, column 5 in component://tomahawk/includes/appbarClose.ftl delegator.findOne("PortalPage", findMap, true) is undefined. It cannot be assigned to portalPage The problematic instruction: ---------- ==> assignment: portalPage=delegator.findOne("PortalPage", findMap, true) [on line 45, column 5 in component://tomahawk/includes/appbarClose.ftl] -
{code}
2.1) to see the error, modify ExampleMenus.xml and change menu-item name from "Dasboard" to "Dasboard1"
2.2) go to example / dashboard and edit one page
2.3) click to "revert to original"
I propose to add ?if_exists
One other bug in portal page personalization.
When trying to delete portlet or column in portal page, there is an error because in delete service, cache is used to read data before remove.
Correction proposed is to remove use-cache="true"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1493352 13f79535-47bb-0310-9956-ffa450edef68
For now, It's configured globally through "widget.lookup.showDescription" in widget.properties.
In some case, we want to disable this feature for particular <lookup> filed. So we try to make it enabled.
1. update the widget-form.xsd to add new attribute "show-description" to <lookup> filed
* if set this attribute explicitly to true or false, then showDescription feature is enabled or disabled respectively
* if this attribute is not set (default), then showDescription or not depends on the "widget.lookup.showDescription" setting
2. modify ModelFormField and MacroFormRenderer to make it works
3. Since we introduce individual "showDescription" configuration, the global "SHOW_DESCRIPTION" was unable to work properly. It has been replaced by dynamic values
4. Show description function depends on ajax-autocompleter, but not vice versa. That's why the condition [options.showDescription != ""] was removed from _createAjaxAutoComplete function.
jleroux: I formatted the XSD documentation and used
showDescription = "Y".equals(UtilProperties.getPropertyValue("widget", "widget.lookup.showDescription", "Y"));
instead of
showDescription = "Y".equals(UtilProperties.getPropertyValue("widget", "widget.lookup.showDescription", "N"));
Because, in widget.properties, widget.lookup.showDescription is Y by default (and I know that well, since I made this description working correctly in all cases)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1491936 13f79535-47bb-0310-9956-ffa450edef68
1. URL parameters were being mangled by clunky string manipulation code.
2. The sort column logic was piggy-backed on the pagination event. I created a new choice for the form widget <on-event-update-area> element - "sort-column" - so column sort events can update their own areas.
3. The parameter name for the sort column was hard-coded, so column sorting in multiple lists on the same screen would not work. I added a new <form> attribute - "sort-field-parameter-name" - so each list can be sorted separately.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488315 13f79535-47bb-0310-9956-ffa450edef68