Commit Graph
1568 Commits
Author SHA1 Message Date
Nicolas Malin 484124f581 Improve widget-form with four elements : include-form, include-grid, include-menu, include-screen to offert more flexibility to define complex display. The main purpose is to complete the screen widget capacity to replace ftl screen.
With these elements, example component have a new FindExample search screen to select the display list type with a example of :
   * include-form : list examples with their features
   * include-screen : list examples with their items
   * include-grid : list examples with their status history
The element include-menu is present on FindUtilCache screen. Also a new CommonInlineBarMenu menu type to display menu with specific purpose (in-line) is now present and with this logic adding in-line-bar css class on themes thomawak and flatgrey.

This patch is combinate Issues : 
 * OFBIZ-6502 Add support for form/grid embedding within grids
 * OFBIZ-6501 Add support for screen embedding inside grids
 * OFBIZ-6404 Allow form/grid widget hyperlinks to be grouped into a single column
sub-tasks of master issue OFBIZ-6314 Widget Refactoring - Placeholder issue

Thanks to Christian and Adrian for their time

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686116 13f79535-47bb-0310-9956-ffa450edef68
2015-06-17 21:50:27 +00:00
Nicolas Malin 34f0f48f08 correct renderLink macro on foScreenMacroLibrary.ftl to avoid a freemarker stacktrace, related to OFBIZ-6461
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685176 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 21:28:11 +00:00
Nicolas Malin c6e5d7e695 fix previous commit : tika has been commented, isn't needed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685133 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:52:28 +00:00
Nicolas Malin 68522eb09b Second pass due to local problem :/ . Resynchronise template macro form xml, text, csv and fo from html related to issue OFBIZ-6461.
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685132 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:48:55 +00:00
Nicolas Malin ae1af54128 revert previous commit, bad repo use my apologies
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685130 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:46:08 +00:00
Nicolas Malin d3e95bb938 Resynchronise template macro form xml, text, csv and fo from html related to issue OFBIZ-6461.
adding unit test that call webtools/control/WebtoolsLayoutDemo with html, text, csv, xml and fop render and detect on the stream if an FTl stacktrace is present.
The fop test is currently commented because the screenfop failed to generate WebtoolsLayoutDemo page.
To support the unit case, the screen engine has been extend to manage platform-specific : <text> and <csv>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1685124 13f79535-47bb-0310-9956-ffa450edef68
2015-06-12 16:25:30 +00:00
Christian Carlow aece17ee2f Adding support for styles for foFormMacroLibrary.ftl renderFormatListWrapperOpen
https://issues.apache.org/jira/browse/OFBIZ-6483

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684232 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 17:56:47 +00:00
Christian Carlow 78b42f0763 Adding support for foFormMacroLibrary.ftl renderFormOpen styles
https://issues.apache.org/jira/browse/OFBIZ-6481

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684176 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 13:19:55 +00:00
Christian Carlow e4b2284e49 Adding support for foFormMacroLibrary.ftl renderFieldTitle style parameter.
https://issues.apache.org/jira/browse/OFBIZ-6479

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684142 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 10:52:06 +00:00
Christian Carlow ce084046ad Adding support for renderImage in framework/widget/templates/foScreenMacroLibrary.ftl
https://issues.apache.org/jira/browse/OFBIZ-6475

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684067 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 19:47:17 +00:00
Christian Carlow e48310e533 Fixing this error caused by id parameter not being assigned to default value for OFBIZ-6403:
FreeMarker template error: When calling macro "makeHyperlinkString", required parameter "id" (parameter #12) was not specified.

https://issues.apache.org/jira/browse/OFBIZ-6403

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684066 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 19:41:47 +00:00
Christian Carlow f9b4e93a42 Added another ModelFormField.TextField constructor to allow subclass RangeFindField constructor to override the TextField default fieldType of FieldInfo.TEXT with FieldInfo.RANGEQBE
https://issues.apache.org/jira/browse/OFBIZ-6459

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683832 13f79535-47bb-0310-9956-ffa450edef68
2015-06-05 18:35:13 +00:00
Nicolas Malin 70cffbfb2c Form widget hyperlink.id attribute isn't supported by MacroFormRenderer.java (OFBIZ-6403) thanks christian carlow for this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1683642 13f79535-47bb-0310-9956-ffa450edef68
2015-06-04 20:55:59 +00:00
Taher A. Alkhateeb 62b0f73212 Translate the framework to Arabic
Another part of the translation of OFBiz to Arabic 
project found in JIRA OFBIZ-6432.

The commit translates the following files :
- framework/base/config/DateTimeLabels.xml
- framework/widget/config/conditional.xml

refs https://issues.apache.org/jira/browse/OFBIZ-6432


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682699 13f79535-47bb-0310-9956-ffa450edef68
2015-05-31 08:49:43 +00:00
Nicolas Malin e3dcdf5098 Apply patch from OFBIZ-6417 renderDateFindField doesn't reselect operation by Christian Carlow
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682462 13f79535-47bb-0310-9956-ffa450edef68
2015-05-29 13:39:53 +00:00
Jacques Le Roux 34fe4d09b6 Better documentation for <<Lookup fields break when used with a form having skip-start="true">> https://issues.apache.org/jira/browse/OFBIZ-6139
I also improved the description of the Jira. Thanks to Pierre Smits's questions who tried the feature.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682414 13f79535-47bb-0310-9956-ffa450edef68
2015-05-29 10:25:00 +00:00
Nicolas Malin 1e015b79ba Apply patch from OFBIZ-6415 renderTextFindField doesn't reselect operation dropdown or ignoreCase checkbox by christian carlow
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682342 13f79535-47bb-0310-9956-ffa450edef68
2015-05-28 21:41:52 +00:00
Michael Brohl 358a7486c5 Applied patch from jira issue OFBIZ-6414: drop-down widget field with allow-multiple="true" does not display current value.
ModelFormField.getEntry returns the string representation of the value corresponding to the field in either the context map or parameters map but when the value is returned as a list [X, Y, Z], the opening and closing brackets are encoded [X, Y, Z]
This prevents the FormRenderer (atleast MacroFormRenderer) from detecting a list object from the string and converting it back to a list
eg - currentValueList = StringUtil.toList(currentValue).

The solution detects a collection value and handles the proper encoding.

Thanks Gareth Carter for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682234 13f79535-47bb-0310-9956-ffa450edef68
2015-05-28 12:58:31 +00:00
Michael Brohl 6e499d7655 Code cleanup, no functional changes (https://issues.apache.org/jira/browse/OFBIZ-6420)
Removed unnecessary double checks and corrected exception handling where the catched exception was too broad.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682214 13f79535-47bb-0310-9956-ffa450edef68
2015-05-28 11:33:52 +00:00
Michael Brohl 1613bbee07 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.
Introduces a new maxlength attribute to the textarea element in forms, applies the maxlength (255 chars) value in several FTL files, when the DB is limiting the length.

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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682132 13f79535-47bb-0310-9956-ffa450edef68
2015-05-27 22:18:29 +00:00
Jacques Le Roux 6c637a7b7d Implements "The lookup and text-area have a read-only attribute but not the text input field" at https://issues.apache.org/jira/browse/OFBIZ-6395
Adds a read-only attribute to the text input field. Using the display type is not enough, because it's uneasy to assign values through Javascript as using the lookup description-field-name shows OOTB. And the disabled option is not good when you want to still show the submitted values on return.

Also 
* improves widget-form.xsd documentation about read-only attribute for lookup
* completes the foFormMacroLibrary.ftl where placeholder tabindex  were missing (if this even ever makes sense)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680921 13f79535-47bb-0310-9956-ffa450edef68
2015-05-21 16:29:49 +00:00
Jacques Le Roux 8d3e2f88cb A patch from Youssef Khaye updated by Wei Zhang for "Adding a new attribute ignore-when (verry similar to use-when) that enable rendering or not a field in list or multi form." https://issues.apache.org/jira/browse/OFBIZ-4481
Or on a form of type list or multi, it is not possible to completely ignore a field via use-when attribute. Instead it hides the title and the column header became shifted from the table content.
For example I want to hide the description column from my form when exampleName is choosen as sort-field.

This also modifies
    example/widget/example/ExampleForms.xml#ListExamples
to illustrate this functionality


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680865 13f79535-47bb-0310-9956-ffa450edef68
2015-05-21 13:09:01 +00:00
Adrian Crum 75aefbb887 Remove DCL pattern from MenuFactory.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680329 13f79535-47bb-0310-9956-ffa450edef68
2015-05-19 16:05:13 +00:00
Jacques Le Roux 8b7cda5012 Small change for "Improves dialog boxes generated by ajax-window link parameter" https://issues.apache.org/jira/browse/OFBIZ-6359
Adds closeOnEscape

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679172 13f79535-47bb-0310-9956-ffa450edef68
2015-05-13 10:09:27 +00:00
Ashish Vijaywargiya d604e748d5 Applied patch from jira issue - OFBIZ-6260 - foScreenMacroLibrary.ftl renderLabel doesn't apply style parameter.
Thanks Christian for creating the issue and contributing the patch for the same. Thanks Aditya for reviewing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674513 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 14:11:37 +00:00
Adrian Crum a1bb4ff6bc Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674064 13f79535-47bb-0310-9956-ffa450edef68
2015-04-16 13:05:55 +00:00
Jacques Le Roux 1788b6a224 Removes useless sentences according to Scott, after Adrian suggested to remove the HTML references.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672081 13f79535-47bb-0310-9956-ffa450edef68
2015-04-08 12:50:15 +00:00
Jacques Le Roux 5f0ea0a387 Completes r1671519 for https://issues.apache.org/jira/browse/OFBIZ-6232 "Adds HTML tabindex into widget form fields"
There was still an issue when rendering renderLookupField from FTL templates

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671847 13f79535-47bb-0310-9956-ffa450edef68
2015-04-07 13:49:53 +00:00
Jacques Le Roux e5066b2ce5 No functional changes, just a bit of refactoring/cleaning
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671758 13f79535-47bb-0310-9956-ffa450edef68
2015-04-07 08:21:49 +00:00
Jacques Le Roux eb67d60fc3 Completes r1671519 for https://issues.apache.org/jira/browse/OFBIZ-6232 "Adds HTML tabindex into widget form fields"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671756 13f79535-47bb-0310-9956-ffa450edef68
2015-04-07 08:20:39 +00:00
Jacques Le Roux fc90936482 Forgot to commit these changes at r1671519, I will complete the rest later today...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671524 13f79535-47bb-0310-9956-ffa450edef68
2015-04-06 12:24:06 +00:00
Jacques Le Roux f903bdc355 Fixes a bug related to renderDateTimeField reported by Adrian's aon dev ML (when used from FTL templates)
Fixes also a bug related to renderLookupField when used from FTL templates with lookupField macro

I also spotted a number of other misc. trivial tabindex missing in other *FormMacroLibrary.ftl which should have not (or minor) effects on rendering. I will fix them later today...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671519 13f79535-47bb-0310-9956-ffa450edef68
2015-04-06 12:11:18 +00:00
Jacques Le Roux 8e0222e137 Adds HTML tabindex into widget form fields. It allows to set the tab order of elements (when the "tab" button is used for navigating). For instance by column when columns are used with the position attribute.
Normally it's implemented for all concerned fields.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1671500 13f79535-47bb-0310-9956-ffa450edef68
2015-04-06 09:34:54 +00:00
Deepak Dixit 6f30b5de01 Fixed NPE while rendering content using screen widget, if content.dataResouceId is null then ModelScreenWidget throwing NPW.
Applied patch from jira issue OFBIZ-6219

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669588 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 13:44:45 +00:00
Adrian Crum f315f0d5be Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00
Jacques Le Roux 4e2d290f69 Fixes <<You can't rely on Lookup field description-field-name attribute in a form having skip-start="true">> https://issues.apache.org/jira/browse/OFBIZ-6170
Instead of adding a form-name attribute only in lookup sub-element, I added it a the field level and removed the one at the lookup level.So the form-name field attribute can be used in the field of both the lookup and if needed the field set in the lookup description-field-name attribute. I only tested it in a version more near 13.07 but I believe it's ok here

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667774 13f79535-47bb-0310-9956-ffa450edef68
2015-03-19 14:38:37 +00:00
Adrian Crum 9158c3af82 Fixed a bug in screenlet widget: If there is no Screenlet's preferenceKey in requestParameters, the initially-collapsed always be false. https://issues.apache.org/jira/browse/OFBIZ-6172
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667492 13f79535-47bb-0310-9956-ffa450edef68
2015-03-18 10:53:48 +00:00
Jacques Le Roux 2e4cfd552f Fixes <<"Lookup fields break when used with a form having skip-start="true">> https://issues.apache.org/jira/browse/OFBIZ-6139
We neglected this aspect so far, adding a "form-name" attribute to the lookup element fixes it. You then need also to set the correct id-name value on field element.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1665535 13f79535-47bb-0310-9956-ffa450edef68
2015-03-10 13:29:40 +00:00
Jacques Le Roux 9422ab9c95 A slightly modified patch from Christian Carlow for "date-find in form widget does not persist value" https://issues.apache.org/jira/browse/OFBIZ-5074
Reported by Taher:
Any search form that calls "performFind" and has a "date-find" tag will not persist but it will give correct search results. 
For example, If I go to Order -> Requests and search using any of the date fields, the result will be correct but the field will be blank upon returning results. This behavior affects only dates.
I suspect the main offender here is a bug in performFind service or one of the services it calls (prepareFind or executeFind). I believe that the "queryStringMap" does not contain the date-find fields in its returned value. I did not look heavily into the code but I think "fld" types are not persisted in-between requests.

Christian:
This issue is still relevant and needed. The <date-find> values are not persisted after submission due to MacroFormRenderer.java not evaluating value and value2 correctly. In face, value2 isn't event passed to the definition in framework/widget/templates/htmlFormMacroLibrary.ftl. This is a starting point for this functionality. I said starting point because I'm not sure if it handles default values and other field settings that may need to be applied after my patch.

jleroux: It indeed needs to be improved, at least to keep the related date operator... I don't close yet, but would be better to open a new Jira issue...
I simply formatted the patch (tabs instead of 4 spaces) and used UtilGenerics.checkMap() instead of (Map<String, Object>) 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1664696 13f79535-47bb-0310-9956-ffa450edef68
2015-03-06 18:53:42 +00:00
Jacques Le Roux f529b182ef Fixes "Birt doesn't work" reported by Leon at https://issues.apache.org/jira/browse/OFBIZ-5870
Workaround:
revert the commit r1621801 https://fisheye6.atlassian.com/changelog/ofbiz?cs=1621801, since ServletContextHashModel is being used by Birt, not the unused stuff.
revert the commit r1621953 to ControlServlet.java https://fisheye6.atlassian.com/changelog/ofbiz?cs=1621953 to import necessary packages
add "commons-discovery-0.4.jar" back to framework/base/lib/commons, or add it to specialpurpose/birt/lib folder, since it's depended by axis-1.4 https://fisheye6.atlassian.com/changelog/ofbiz?cs=1623042

jleroux: "commons-discovery-0.4.jar" has been already added back for OFBIZ-5876 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1662812 13f79535-47bb-0310-9956-ffa450edef68
2015-02-27 20:52:10 +00:00
Adrian Crum 5dc2a447ac Fixed form widget rendering bug caused by widget refactor - https://issues.apache.org/jira/browse/OFBIZ-6051.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1662120 13f79535-47bb-0310-9956-ffa450edef68
2015-02-24 21:19:09 +00:00
Adrian Crum eb7283f61d Fixed NPE in widget model toString() method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1662119 13f79535-47bb-0310-9956-ffa450edef68
2015-02-24 21:17:33 +00:00
Adrian Crum 5bf807a075 Fixed a bug in form widget extends feature - https://issues.apache.org/jira/browse/OFBIZ-6084.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1661760 13f79535-47bb-0310-9956-ffa450edef68
2015-02-23 20:05:55 +00:00
Jacopo Cappellato 4d485d7046 Applied patch contributed by Gareth Carter in OFBIZ-5910: it is a fix for a bug introduced by the fix for OFBIZ-3382.
The issue reported in OFBIZ-3382 and the fix committed for it need to be reviewed and possibly reworked but in the meantime this fix will solve the problem with broken links reported recently.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1660031 13f79535-47bb-0310-9956-ffa450edef68
2015-02-16 06:50:41 +00:00
Adrian Crum 98017c1e2e Fix an exception in MacroScreenViewHandler.java - https://issues.apache.org/jira/browse/OFBIZ-6074.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1659965 13f79535-47bb-0310-9956-ffa450edef68
2015-02-15 18:24:51 +00:00
Adrian Crum ee70626d67 Fixed a bug caused by recent widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-6041.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1656014 13f79535-47bb-0310-9956-ffa450edef68
2015-01-30 13:45:49 +00:00
Adrian Crum 828aff751a Fixed a bug in the form widget models where a default type was not being supplied under certain circumstances - https://issues.apache.org/jira/browse/OFBIZ-6037.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1654824 13f79535-47bb-0310-9956-ffa450edef68
2015-01-26 14:58:43 +00:00
Adrian Crum dbd5cc3e69 Restore private final fields in ModelForm.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1654684 13f79535-47bb-0310-9956-ffa450edef68
2015-01-25 18:39:51 +00:00
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