When specifying the ignore-if-empty attribute inside an entity-constraint in an entity-options a NPE will be thrown whenever the env-name of this entity-constraint is empty.
The error occurs because a null condition is created for the entity-constraint.
When validateSql get called in
org.ofbiz.entity.condition.EntityJoinOperator.validateSql(EntityJoinOperator.java:178)
there is no null checking so when
condition.checkCondition(modelEntity);
gets called an NPE is thrown.
The patch modifies the code in
framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
to avoid the inclusion of a null condition to the entity-options.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340826 13f79535-47bb-0310-9956-ffa450edef68
"As of creating new BeansWrapper, be sure you create it only once during the application life-cycle and then reuse the same instance, or else it will have to rebuild the class introspection cache again and again."
Thanks to Adam Heath for the comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340631 13f79535-47bb-0310-9956-ffa450edef68
Moves to Attic:
framework/base/lib/ant/ant-nodeps-1.8.1.jar => can be removed IMO. It was added with ant 1.8 by Hans, not sure why (no comment about need), seems to contains no needed stuff
framework/base/lib/javacc can be removed IMO. The Java Compiler Compiler tm (JavaCC tm) - The Java Parser Generator, not used OOTB, was added by Marco, not sure why (no comment about need)
framework/base/lib/Tidy.jar was used at bottom of eCommerce pages before, no longer needed
framework/base/lib/ant-trax-1.8.0.jar can be removed IMO. It was added with ant 1.8 by Hans, not sure why (no comment about need), contains XSLT task
framework/base/lib/commons/commons-vfs-20070730.jar certainly added with Webslinger can be removed now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340414 13f79535-47bb-0310-9956-ffa450edef68
If an entity field type is "Date" (YYYY-MM-DD), in edit or create form of webtools, the component of this field is redered as "timestamp".
Update the ViewGeneric.ftl to change the related "shortDateInput" from false to true resolves this problem.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340405 13f79535-47bb-0310-9956-ffa450edef68
This can be useful to improve code like:
cache.putIfAbsent("key", "value");
value = cache.get("key"); // if a concurrent thread has cleared the cache the value could be null
into this:
value = cache.putIfAbsentAndGet("key", "value");
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340351 13f79535-47bb-0310-9956-ffa450edef68
"Since BeansWrapper.getDefaultInstance() returns an instance that is
shared in the scope of the class-loader that defined the FreeMarker
classes, and since possibly multiple independently developed
components in your system use FreeMarker and thus getDefaultInstance
(and you may don't even know about it), and since the returned
BeanWrapper can be configured (not read-only), you never know how the
returned BeanWrapper is configured. So you add a 3rd party component,
and if you are unlucky, suddenly your other component is broken.
As of creating new BeansWrapper, be sure you create it only once
during the application life-cycle and then reuse the same instance, or
else it will have to rebuild the class introspection cache again and
again."
I have replaced the usage of the static instance of the BeansWrapper with a newly created object.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339504 13f79535-47bb-0310-9956-ffa450edef68
* Adds a keepSpace boolean to UtilXml.writeXmlDocument(), this allows to use xsl:preserve-space into UtilXml.createOutputTransformer()
* Uses it into SaveLabelsToXmlFile.saveLabelsToXmlFile()
* Adds some French labels into CommonUiLabels.xml using Labels Manager to test the new functionality
* Adds the xml:space attribute into the valueType complexType
* Adds the ofbiz-properties.xsd schema into the base-catalog.xml
I got an issue when 1st trying to commit:
Commit failed (details follow):
While preparing
'D:\workspace\ofbizClean\framework\common\config\CommonUiLabels.xml' for commit
Inconsistent line ending style
So I forced the EOLs to my locale platform value (Win XP)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338831 13f79535-47bb-0310-9956-ffa450edef68
When a project manager expires the assignment of a resource by clicking the delete button in the Project Resources overview the resource is deleted from the overview. It should be that the resource is still shown in the overview with the tru-date visible.
Otherwise there will be a discrepancy between the overview of resources of the project and the project dashboard.
The name of the button is also wrong. It should state 'expire' not 'delete'.
jleroux: I have also created a new label FormFieldTitle_expireButton copying labels from CommonExpire. I saw that labels where not sorted at all so I used Labels Manager for that. I put back CommonEmptyHeaderby hand. I will soon fix this issue. So, apart the sort changes, there is also a lot of false changes in CommonUiLabels.xml because Labels Manager now uses the right way for Language Identification: http://www.w3.org/TR/REC-xml/#sec-lang-tag (ie a - separate language from country instead of previously a _)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338695 13f79535-47bb-0310-9956-ffa450edef68
If sorting is enabled for at least one field in the list type form-widget, we get an error, here is the details:
Error executing macro: renderFieldTitle
required parameter: id is not specified.
The problematic instruction:
----------
==> macro renderFieldTitle [on line 53, column 1 in component://widget/templates/csvFormMacroLibrary.ftl]
in user-directive renderFieldTitle [on line 116, column 57 in component://widget/templates/csvFormMacroLibrary.ftl]
in user-directive renderSortField [on line 1, column 1 in Fri May 11 12:33:29 IST 2012]
----------
Java backtrace for programmers:
----------
freemarker.template.TemplateException: Error executing macro: renderFieldTitle
required parameter: id is not specified.
at freemarker.core.Macro$Context.sanityCheck(Macro.java:211)
Adding a default empty string to the id parameter fixes the issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338570 13f79535-47bb-0310-9956-ffa450edef68
introduce a new Delegator.findByAnd variant that takes a boolean cache
parameter.
This change continues the simplication of the delegator api. There is
no longer a version of a method with a 'Cache' suffix; instead, a single
version now exists that takes a boolean cache parameter. Also, there
has been a trend to remove several method variants that take different
numbers and types of parameters, instead preferring to fully specify all
parameters; this also continues that trend.
Delegator.findByAnd(String, Map) is replaced with findByAnd(String, Map,
null, false).
Delegator.findByAnd(String, Map, List) is replaced with
findByAnd(String, Map, List, false).
Delegator.findByAnd(String, Object...) is replaced with
findByAnd(String, Map, null, false). The object array is converted to a
map by using UtilMisc.toMap(Object...).
Delegator.findByAndCache(String, Map) is replaced with findByAnd(String,
Map, null, true).
Delegator.findByAndCache(String, Map, List) is replaced with
findByAnd(String, Map, List, true).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338424 13f79535-47bb-0310-9956-ffa450edef68
parameter; this is the same similiar pattern that other methods have.
After all code has been modified to use this new method, the older
methods will be deprecated(and eventually replaced).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338400 13f79535-47bb-0310-9956-ffa450edef68