Commit Graph
1568 Commits
Author SHA1 Message Date
Adrian Crum fe1a35d9af Screen widgets - some code cleanup plus add some accessor methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643683 13f79535-47bb-0310-9956-ffa450edef68
2014-12-07 15:23:55 +00:00
Adrian Crum 50811e5a51 Screen widgets - clean up some object types around SectionsRenderer class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643584 13f79535-47bb-0310-9956-ffa450edef68
2014-12-06 18:50:10 +00:00
Jacques Le Roux 82506bb7cc It's not quite clear to me why Date.CultureInfo.formatPatterns.longTime from date.js returns ms (always .000 it seems). I don't know if this would not happen, but anyway I prefer to assign the value to the calendar out of the block which changes the value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641165 13f79535-47bb-0310-9956-ffa450edef68
2014-11-23 08:49:48 +00:00
Jacques Le Roux c680b1c262 A patch from Gareth Carter for "jQuery datetimepicker popup time value is not set correctly from an existing value" https://issues.apache.org/jira/browse/OFBIZ-5883
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641131 13f79535-47bb-0310-9956-ffa450edef68
2014-11-22 22:48:44 +00:00
Adrian Crum 865c3ef338 Fixed a bug in the form widgets that was caused by recent refactoring - https://issues.apache.org/jira/browse/OFBIZ-5882.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641087 13f79535-47bb-0310-9956-ffa450edef68
2014-11-22 15:56:41 +00:00
Jacques Le Roux d244ee435b A slightly modified patch from Gareth Carter for "<@htmlTemplate.renderDateTimeField does not parse date string based on input format" https://issues.apache.org/jira/browse/OFBIZ-5850
Commit 1626419 changed htmlFormMacroLibrary.ftl renderDateTimeField to use Date.parse instead of Date.parseExact.
https://code.google.com/p/datejs/wiki/APIDocumentation states Date.parse will use current CultureInfo for formats but for parsing ISO yyyy-MM-dd from hidden field, need to use parseExact.
I spotted this when CultureInfo was en-GB and selecting 2014-11-01 on any date field (i18n field displays 11/01/2014 instead of 01/11/2014)
For November all days after the 12th display correctly

jleroux: I simply removed the line added in the block which remove the dot and 000 ms in date/time string. I did not see any reason why this was needed. I modified the comment on this block for faster understanding.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641066 13f79535-47bb-0310-9956-ffa450edef68
2014-11-22 14:15:54 +00:00
Adrian Crum f803833df9 ModelFormField.java refactor:
1. Extract FieldInfo class to a separate file.
2. Make FieldInfo thread-safe.
3. Modify FieldInfo subclasses so they include a thread-safe copy method.

This commit fixes a major flaw in the original design. When a widget form is extended, the original design would copy the child FieldInfo state to the parent FieldInfo - so the parent FieldInfo referenced the child form instead of the parent form. With this commit, parent FieldInfo instances  are copied as new instances to the child form - so the parent FieldInfo instances remain unchanged.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639927 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 21:33:51 +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 fd4ea93d14 Fix NPE caused by recent widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-5875.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639551 13f79535-47bb-0310-9956-ffa450edef68
2014-11-13 23:30:26 +00:00
Adrian Crum da478e9144 Fix JS bug caused by recent screen widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-5856.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637050 13f79535-47bb-0310-9956-ffa450edef68
2014-11-06 08:24:53 +00:00
Adrian Crum f25e674873 Extract rendering code from ModelForm.java to rendering classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636437 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 20:46:34 +00:00
Adrian Crum 46fb78ef34 Remove unused methods from ModelForm.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636383 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 16:29:40 +00:00
Adrian Crum 087c291998 Cleaned up ModelScreen.java transaction handling - https://issues.apache.org/jira/browse/OFBIZ-4278.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636374 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 15:32:11 +00:00
Adrian Crum 8e57e863f0 Major overhaul of ModelForm.java:
1. Class and its nested classes were not thread-safe.
2. Bugs caused by C&P errors.
3. The "extends" feature had problems:
  3.1 Only a few class members were inherited from the parent form.
  3.2 Child forms modified the state of the parent form.
4. Bad null/empty checking.
5. Inefficient code.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636339 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 12:42:03 +00:00
Adrian Crum 833f3b4dad Bug fix and code cleanup in form widget:
1. Cache keys must include delegator name. Multiple forms based on the same entity name might be completely different due to the delegator being used.

2. Do not hold references to ModelReader and DispatchContext after construction.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636158 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 17:48:20 +00:00
Adrian Crum 25a4a9997f Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636139 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 14:22:29 +00:00
Adrian Crum 9275221812 Delegate most tree widget actions to ModelWidgetAction. Tree nodes will support an <actions> element like other widgets, but that is still a WIP.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636137 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 14:03:02 +00:00
Adrian Crum 2ac5f3cb46 Delegate most menu widget actions to ModelWidgetAction.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636102 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 12:03:09 +00:00
Adrian Crum 21e094915a Delegate most form widget actions to ModelWidgetAction.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636096 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 09:08:21 +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 46f16abccd Add a form field visitor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636070 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 23:43:06 +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
Adrian Crum d96c82438c Add a screen widget action visitor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636030 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 20:13:41 +00:00
Adrian Crum de2bae353a Add a screen widget model visitor. This will enable us to externalize a lot of unrelated code that has been included in the models, as well as provide a cleaner API for the renderers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635990 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 16:57:07 +00:00
Adrian Crum 0b0aedacc6 Continue working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635984 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 16:11:46 +00:00
Adrian Crum 9b9ef5eea4 Remove unused rawString method from screen widgets. I will be committing a widget visitor soon, so if anyone really wants to generate screen widget XML they can create a visitor implementation for it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635964 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 15:13:12 +00:00
Adrian Crum 21c0969f4f Continue working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635961 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 14:56:07 +00:00
Adrian Crum a35f9e3b4e Continue working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635957 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 14:28:41 +00:00
Adrian Crum 6976bd1fa6 Begin working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635917 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 10:49:29 +00:00
Adrian Crum b887db4aef Remove Javolution from the widgets component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635878 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 23:13:03 +00:00
Scott Gray 44e2c4fda1 Regex search/replace for delegator.findOne() to EntityQuery.queryOne()
Apologies for the large commit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635383 13f79535-47bb-0310-9956-ffa450edef68
2014-10-30 04:18:05 +00:00
Ashish Vijaywargiya 63349b6a5f Applied patch from jira issue - OFBIZ-3382 - inter-app hyperlink generates incorrect url.
Thanks Pranay for the contribution and thanks Nathan for reporting the issue. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632803 13f79535-47bb-0310-9956-ffa450edef68
2014-10-18 15:02:12 +00:00
Jacopo Cappellato 5e106b124d Upgraded to the latest, now official, release of Freemarker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1631299 13f79535-47bb-0310-9956-ffa450edef68
2014-10-13 06:45:42 +00:00
Jacopo Cappellato a67d04c2ee Removed deprecated methods in the widget API; cleaned up a bunch of old commented out code; fixed formatting issues; some minor code improvements (no functional changes).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1628361 13f79535-47bb-0310-9956-ffa450edef68
2014-09-30 06:20:29 +00:00
Ashish Vijaywargiya 7859237729 Applied bug fix from jira issue - OFBIZ-5773 - <@htmlTemplate.renderDateTimeField> icon buttons disappear on some pages after refresh.
Thanks Akash Jain for the contribution. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1626419 13f79535-47bb-0310-9956-ffa450edef68
2014-09-20 11:14:02 +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 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
Jacopo Cappellato e4e0710c18 Removed old and unused experimental class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621810 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 14:44:19 +00:00
Jacopo Cappellato 6545122723 Removed unused/obsolete request/screen context fields.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621801 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 14:11:32 +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
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
Jacopo Cappellato 066d782950 Misc minor cleanups to log messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616744 13f79535-47bb-0310-9956-ffa450edef68
2014-08-08 13:16:46 +00:00
Jacques Le Roux 59119195eb A patch from Leon for "Wrong timeFormat of datetimepicker causes hours represented as 12 not 24" https://issues.apache.org/jira/browse/OFBIZ-5702
Latest datetimepicker add-on uses "timeFormat" option to detect am/pm, lowercase "h" represents 12hr am/pm, uppercase "H" represents 24 hr. (see https://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/547). The datetime input widget that relying on this add-on does not work correctly: it's in 12-hours format not 24 hours.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616272 13f79535-47bb-0310-9956-ffa450edef68
2014-08-06 16:39:30 +00:00
Jacopo Cappellato 05073f29df Upgrade to the most recent version of Freemarker-2.3-gae: this is not an official release yet but it will be soon; I have committed this work, as discussed in the dev list, in order to get help from the community to test this new improved version of Freemarker and provide feedback to the Freemarker community.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605029 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 08:33:04 +00:00
Jacques Le Roux 8f3be2d59f Dammit, reverts unwanted previous commit (wrong button)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1596126 13f79535-47bb-0310-9956-ffa450edef68
2014-05-20 07:42:55 +00:00
Jacques Le Roux 10f0335c64 git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1596125 13f79535-47bb-0310-9956-ffa450edef68 2014-05-20 07:40:25 +00:00
Jacques Le Roux a5e8b8639a Complete r1583026, sequel of "Focus input(dropdown list) when click on label in widget form" https://issues.apache.org/jira/browse/OFBIZ-5594. Thanks to Wei Zhang's report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1584552 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 08:00:04 +00:00
Jacques Le Roux f23822cdca A patch from Rong Nguyen for "Focus input(dropdown list) when click on label in widget form" https://issues.apache.org/jira/browse/OFBIZ-5594
The current widget form does not focus input(dropdown list) when a label is clicked on.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583026 13f79535-47bb-0310-9956-ffa450edef68
2014-03-29 16:49:02 +00:00