Commit Graph
778 Commits
Author SHA1 Message Date
Adrian Crum b1737aee5d Eliminated redundant code in the new widget classes. ModelSingleForm and ModelGrid are effectively light-weight "decorators" for the ModelForm abstract class. ModelForm still retains code for all form types (single and list) - because any attempt to separate the functionality will result in an avalanche of code modifications.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1654683 13f79535-47bb-0310-9956-ffa450edef68
2015-01-25 18:36:26 +00:00
Adrian Crum 2818037cc7 Updated widget visitor for new grid widget.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1654673 13f79535-47bb-0310-9956-ffa450edef68
2015-01-25 17:57:44 +00:00
Jacques Le Roux 6c48f830c8 A slightly modified patch from Pierre Smits for "Remove Portal Management code from Framework/WebTools." https://issues.apache.org/jira/browse/OFBIZ-5817
Remove code related to Portal Management functionality from WebTools after equivalent code in MyPortal has been committed. 

jleroux: I just removed also the FindPortalPage entry in Webtools main.ftl


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1653481 13f79535-47bb-0310-9956-ffa450edef68
2015-01-21 11:27:16 +00:00
Adrian Crum dcecdd25a4 Reorganized the screen widget src folder so classes are more organized.
This commit might break some Groovy scripts. There seemed to be a lot of C&P widget import statements, but there were no widget classes being used in the script, so I removed them. I might have overlooked something though.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1652852 13f79535-47bb-0310-9956-ffa450edef68
2015-01-18 21:03:40 +00:00
Jacques Le Roux ef7494f2f2 Improvement, I had enough to remove trailing blanks when filtering by entity name
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1652803 13f79535-47bb-0310-9956-ffa450edef68
2015-01-18 17:19:03 +00:00
Jacques Le Roux b8ca5543c9 Changes in all labels files: <value xml:lang="(.*)_(.*)"> to <value xml:lang="$1-$2">
Changes also listLocales.ftl to show dashes rather than underscores

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1650880 13f79535-47bb-0310-9956-ffa450edef68
2015-01-11 09:59:32 +00:00
Adrian Crum 91feff5f51 Updated the UI label files so they reference a schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649666 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:24:18 +00:00
Adrian Crum 66adcd9de2 Fix Web Tools FindGeneric screen so it can display byte-array field types.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649615 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 19:15:24 +00:00
Jacopo Cappellato a5879b6f8f Moved code dependent on OWASP ESAPI and utilities for codec tasks from StringUtil to a new UtilCodec class: now the UtilCodec class is the only class dependent on OWASP ESAPI.
The DefaultEncoder from OWASP ESAPI, used internally by UtilCodec is now built with the default constructor that also adds the JavascriptCodec to the list of codecs used to canonicalize and validate the input.
Renamed the UrlEncoder class to UrlCodec in order to better describe its behavior.
Misc minor cleanups.
Added to the list of tests of the base component a series of Junit test classes that were missing.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648403 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 18:24:57 +00:00
Jacopo Cappellato b969e376ed A series of cleanup to the integration with OWASP ESAPI. Isolated dependencies on the external OWASP ESAPI jar into the StringUtil class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648298 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 09:24:46 +00:00
Ashish Vijaywargiya f8927d3d3e Applied patch from jira issue OFBIZ-5902 - Fetch configurable settings data driven by replacing UtilProperties.getPropertyValue() method with EntityUtilProperties.getPropertyValue().
We have removed the recent changes that we did for <property-to-field> in XML file because those changes was not actually needed.
Thanks Arun for the contribution. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646214 13f79535-47bb-0310-9956-ffa450edef68
2014-12-17 12:28:02 +00:00
Ashish Vijaywargiya 039f0608bc Applied framework related patch from jira issue - OFBIZ-5844 - Convert java files to EntityQuery.
Thanks Arun for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646212 13f79535-47bb-0310-9956-ffa450edef68
2014-12-17 12:13:46 +00:00
Ashish Vijaywargiya f19b8bdfe7 Reverting r1646165. It seems that changes that we did for <property-to-field> are not needed. I will commit the new changes soon.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646191 13f79535-47bb-0310-9956-ffa450edef68
2014-12-17 10:49:41 +00:00
Ashish Vijaywargiya fa7cb8eb15 Applied recent patch from jira issue - OFBIZ-5902 - Fetch configurable settings data driven by replacing UtilProperties.getPropertyValue() method with EntityUtilProperties.getPropertyValue().
Thanks Arun for the contribution. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646165 13f79535-47bb-0310-9956-ffa450edef68
2014-12-17 07:57:56 +00:00
Ashish Vijaywargiya 9e044d163a Applied patch from jira issue - OFBIZ-5902 - Fetch configurable settings data driven by replacing UtilProperties.getPropertyValue() method with EntityUtilProperties.getPropertyValue(). Thanks so much Arun for this important contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644015 13f79535-47bb-0310-9956-ffa450edef68
2014-12-09 10:09:22 +00:00
Jacques Le Roux 682c9014a2 Fixes and completes r1640588 and more minor things which were left after the change from run-install to load-demo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640727 13f79535-47bb-0310-9956-ffa450edef68
2014-11-20 12:18:59 +00:00
Adrian Crum 1a21c100ff Add throws clause to ModelWidgetVisitor.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639886 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 14:06:32 +00:00
Adrian Crum 4a62dd6107 Move form widget artifact info code to a separate class. This eliminates a lot of duplicate code and it should speed up artifact info gathering. Also converted form widget to reuse some of the screen widget action models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636077 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 01:21:39 +00:00
Adrian Crum d389cdc2a9 Revert rev 1636071. I broke something.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636073 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 00:06:34 +00:00
Adrian Crum 89ad95e8d7 Move form widget artifact info code to a separate class. This eliminates a lot of duplicate code and it should speed up artifact info gathering. Also converted form widget to reuse screen widget action models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636071 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 23:47:47 +00:00
Adrian Crum f69d5fbe73 Move screen widget artifact info code to a separate class. This eliminates a lot of duplicate code and it should speed up artifact info gathering.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636031 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 20:15:27 +00:00
Jacques Le Roux 3b118d4842 An excerpt of a patch from Nick Ho for "Add/Revise Traditional Chinese (zh-TW) translations" https://issues.apache.org/jira/browse/OFBIZ-5764
added/revised zh-TW translations in the framework, applications and specialpurpose folders to have consistent, commonly-used meaningful terms in Traditional Chinese.

jleroux: from Nick Ho's patch I have extracted only the Chinese changes, w/o the proposed  dash to underscore changes
This contains notably this 14 "zh" (not "sh-TW") changes:
<value xml:lang="zh">人将由电子邮件接受一个临时密码。</value><!-- was 客户将通过电子邮件收到一个临时密码。 -->
<value xml:lang="zh">合计属于公司: </value>
<value xml:lang="zh"> 完整文本:${fullText}</value>
<value xml:lang="zh">供货商佣金百分比</value>
<value xml:lang="zh">文本大小</value>
<value xml:lang="zh">值</value>
<value xml:lang="zh">算子</value>
<value xml:lang="zh">不能转移已序列化的库存。</value>
<value xml:lang="zh">货运收据</value>
<value xml:lang="zh">获取标识为 ${productStoreShipMethId} 的产品店铺送货方法(ProductStoreShipmentMeth)时出错:${errorString}</value>
<value xml:lang="zh">中国人民币元</value>
<value xml:lang="zh">如果选择"specify other",下拉框旁边会出现文本框。参考form的drop-down元素的other-field-size属性说明</value>
<value xml:lang="zh">文本消息</value>
<value xml:lang="zh">能够收到和解析XML消息,但是BSR->NOUN(买卖关系->名词) ${bsrNoun} 和/或 BSR->VERB(买卖关系->动词) ${bsrVerb} 是空的</value>
I have no competency to judge these changes, but from previous Shi Jinghai's feedback I believe there are OK

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1625816 13f79535-47bb-0310-9956-ffa450edef68
2014-09-17 20:44:07 +00:00
Jacopo Cappellato 281209d0d1 Removed unused and not maintained integration with DataVision.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622979 13f79535-47bb-0310-9956-ffa450edef68
2014-09-07 06:43:41 +00:00
Jacopo Cappellato 75fe5a9107 Removed the old UtilJ2eeCompat util class that was probably created for compatibility with some old application servers.
UtilJ2eeCompat was used to figure out, by checking the servlet container implementation, if the response should be sent using a Writer or a OutputStream; a Writer was used for Tomcat, Websphere, Jetty, Orion, Jrun, Tradecity and an OutputStream was used for all the other servlet containers.

However accordingly to the Servlet api:

ServletResponse.getWriter():
         Returns a PrintWriter object that can send character text to the client.
ServletResponse.getOutputStream():
         Returns a ServletOutputStream suitable for writing binary data in the response.

Based on this getWriter() should always be used (for html pages) in all the containers, not just Tomcat, Websphere, Jetty, Orion, Jrun, Tradecity.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622976 13f79535-47bb-0310-9956-ffa450edef68
2014-09-07 06:32:25 +00:00
Adrian Crum c84824d1a7 A code cleanup/reorganization in the service engine.
The LocalDispatcher is supposed to represent the state of a single application, but that state was split between LocalDispatcher and DispatchContext. In addition, both classes shared a lot of fields.

This commit moves application state to LocalDispatcher and DispatchContext becomes a lightweight container for objects service implementations need to use.

In addition, some minor thread-safety issues were fixed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622256 13f79535-47bb-0310-9956-ffa450edef68
2014-09-03 13:45:44 +00:00
Jacopo Cappellato 4f78f82b1d Removed the old and no more used custom JSP taglib.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621979 13f79535-47bb-0310-9956-ffa450edef68
2014-09-02 13:31:31 +00:00
Jacopo Cappellato 9d4de1ee06 Removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621977 13f79535-47bb-0310-9956-ffa450edef68
2014-09-02 13:15:26 +00:00
Jacques Le Roux 425ce1c003 A patch from Nick Ho for "Add/Revise Traditional Chinese (zh-TW) translations in framework" https://issues.apache.org/jira/browse/OFBIZ-5737
more added/updated translations patch files for zh-TW locale

jleroux: 
I added the label
<value xml:lang="zh_TW">服務執行程式拋出一個異常</value>
by hand
Only 1 label was not added:
<value xml:lang="zh_TW">代號</value>
Because of the fuzziness and presence of several possibilities


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621688 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 06:51:33 +00:00
Jacopo Cappellato 8390460a89 This was probably a bug due to copy-and-paste.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620633 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 15:20:59 +00:00
Jacopo Cappellato c00fc92699 Merged framework-api-cleanup branch into trunk.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620538 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 09:16:52 +00:00
Jacopo Cappellato d8c412302f OFBIZ-5287: Upgrade to Log4j2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618831 13f79535-47bb-0310-9956-ffa450edef68
2014-08-19 10:36:01 +00:00
Ashish Vijaywargiya 8c673dff9e Applied fix for jira issue OFBIZ-5719 - Error to use <#if serviceParameter.value!> in setServiceParameterSync.ftl.
Thanks Wei for reporting the issue and providing the details for the fix. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618537 13f79535-47bb-0310-9956-ffa450edef68
2014-08-18 05:00:29 +00:00
Ashish Vijaywargiya e4d68ed2f7 Applied the patch OFBIZ-4902_framework.patch from OFBIZ-4902 - Replace in Freemarker templates the deprecated built-ins: default, exists, if_exists.
Thanks http://ofbiz.us team for providing the patch work.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618325 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 10:58:51 +00:00
Adam Heath 2aaa234042 Add a global fork-join thread pool, and switch a bunch of stuff over to
it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617809 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:01 +00:00
Jacopo Cappellato 5455dc53d4 Fixed bug I introduced in rev. 1610918: thanks to Deepak Dixit for the bug report and resolution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1612190 13f79535-47bb-0310-9956-ffa450edef68
2014-07-21 05:56:45 +00:00
Jacopo Cappellato c1e1671ab1 Add missing import from my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610925 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 07:57:01 +00:00
Jacopo Cappellato 3b4e2b7ec5 Fixed miscellaneous errors spotted while reviewing the logs generated by the ArtifactInfo tool.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610918 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 07:16:15 +00:00
Jacopo Cappellato 85f8da63bb Removed useless, old and incomplete code: OFBIZ-4740 Un-necessary Drop Down in Web Tools Service Reference page
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610420 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 14:51:52 +00:00
Jacopo Cappellato e2a23a25a8 Removed from "parseEntityXmlFile" the useless require-new-transaction="true" because in this service definition we have use-transaction="false"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1609149 13f79535-47bb-0310-9956-ffa450edef68
2014-07-09 13:51:04 +00:00
Jacques Le Roux 8802023ece Fix a small bug where delegator was missing in a Groovy script
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1606660 13f79535-47bb-0310-9956-ffa450edef68
2014-06-30 09:59:06 +00:00
Adam Heath 5bc5c4151f Change encrypt=true fields to no longer have a pre-pended salt value.
This is done by just setting the length of salt bytes to 0, but still
having a length byte prepended.

Add a feature to allow for certain fields to actually have a salt
prefix.  This is enabled by setting encrypt=salt in the entity
definition.

This change is slightly incompatible with existing code.  Old database
values will continue to be decrypted correctly.  However, newly
encrypted values will no longer have a salt prepended, while originally
they would.  This shouldn't be a problem in practice.

This change, along with the previous commit, finally allow for direct
lookup of encrypted values.  However, already stored values will not be
found.  To fix those, each database row will have to be read in by
ofbiz, then immediately written back out.

This is part two to completely fix OFBIZ-5959:
Person.socialSecurityNumber can't be used for findByAnd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604968 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:23 +00:00
Jacques Le Roux da63b56fbb Improves serviceResult.ftl, from Yvan Cauchy (reformatted: we use 2 spaces for indentation in FTL files)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597237 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 05:07:39 +00:00
Jacopo Cappellato 1ea8fe79b2 Fixes for a bug reported by Pierre Smits in OFBIZ-4130 (and OFBIZ-5319): a tenant user can access, via the delegator, the meta data information of other tenants; for example a tenant user with grants to use the Webtools application could view/edit the database details of all tenants.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589589 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 05:19:13 +00:00
Jacques Le Roux 328ae4e946 A patch from Justen Walker for "Missing import in FindGeneric.groovy" https://issues.apache.org/jira/browse/OFBIZ-5504
Revision 1560176 introduces a change to FindGeneric.groovy that extracts some logic into UtilMisc. However, this class is not imported in the file and results in a MissingProperty exception.
This patch adds the import statement which resolves this bug.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1560699 13f79535-47bb-0310-9956-ffa450edef68
2014-01-23 14:35:20 +00:00
Jacques Le Roux 0757ed8a24 A patch from Gareth Carter for "last index for paging is not calculated correctly" https://issues.apache.org/jira/browse/OFBIZ-5497
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
2014-01-21 20:53:29 +00:00
Jacques Le Roux eb01bb126d Misc. cleaning in labels
Removes all empty ones
Removes some redundant/duplicates ones (please committers don't commit those again, I know it's not easy to catch, hopefully now we should have less of them)
Automatically replaces some tabs
Few French labels improvements
Removes 2 orphan entries ("ja" & "cs")
Fixes the schema header of WebtoolsUiLabels.xml


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551594 13f79535-47bb-0310-9956-ffa450edef68
2013-12-17 16:00:50 +00:00
Jacques Le Roux 4c3e9b7ec8 No functional changes:
Removes all remaining unchecked warnings
Automatically adds some @Override

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551207 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 13:30:46 +00:00
Adrian Crum e04471523b Fixed a bug in the setSyncServiceParameters screen. Some service parameter data types would cause FreeMarker to throw an exception.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542388 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 20:42:37 +00:00
Adrian Crum bfe1317c16 Fixed broken ModelInduceFromDb.jsp file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1539781 13f79535-47bb-0310-9956-ffa450edef68
2013-11-07 19:44:41 +00:00
Adrian Crum af23fe0b35 Refactored ConfigXMLReader.java - added exception handling. The class swallowed exceptions like controller.xml file is missing or invalid - making debugging difficult. This commit introduces a WebAppConfigurationException and it propagates that exception farther up the stack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534517 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 06:50:05 +00:00