Commit Graph
1071 Commits
Author SHA1 Message Date
Bruno Busco d5c2d0d92f A slightly changed (tabs replaced with spaces) patch from Blas Rodriguez Somoza
OFBIZ-3671 - XHTML validation errors (framework/widget) In xml (xhtml) ID must be unique
https://issues.apache.org/jira/browse/OFBIZ-3671

In XML id is a special attribute which must be unique.

    * ModelFormField.java must have the method getCurrentContainerId which is already on ModelForm
    * MacroFormRendered and HtmlFormRenderer must be modified to use the getCurrentContainerID instead of getIdName
    * htmlFormMacroLibrary. span id must be different from the associated hidden field.

Also:

htmlFormMacroLibrary
Line 73: readonly attribute without value.
Lines 102.103: better formatted, more readable javascript call.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935197 13f79535-47bb-0310-9956-ffa450edef68
2010-04-17 16:10:24 +00:00
Scott Gray d5c795b8f0 Doh, forgot to remove the import
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935143 13f79535-47bb-0310-9956-ffa450edef68
2010-04-17 07:48:33 +00:00
Scott Gray 2d64fd155b Removed unused import, removed implements declaration (the superclass already declares it) and removed some unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935142 13f79535-47bb-0310-9956-ffa450edef68
2010-04-17 07:47:09 +00:00
Erwan de Ferrieres 08359da5c5 removing image path from request parameters after rendering the given hyperlink to avoid associating it to other link not having images in a list
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@933244 13f79535-47bb-0310-9956-ffa450edef68
2010-04-12 14:08:02 +00:00
Bilgin Ismet Ibryam 82a5bf6b02 A patch from OFBIZ-3555 "Show lookup value descriptions". This enhancements allows displaying a description for the IDs in lookup fields. To enable this feature set widget.lookup.showDescription to Y in widget.properties
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@933130 13f79535-47bb-0310-9956-ffa450edef68
2010-04-12 07:54:10 +00:00
Bilgin Ismet Ibryam 906d1cd234 Fixed wrong argument name passed to renderContainerField macro. Thanks to Blas for reporting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@933099 13f79535-47bb-0310-9956-ffa450edef68
2010-04-12 06:13:40 +00:00
Bruno Busco ea99105d8c A slightly changed patch from Blas Rodriguez Somoza
OFBIZ-3626 - XHTML validation errors (framework/widget) Bugs in ModelForm (fieldgroups, itemrows with links)
https://issues.apache.org/jira/browse/OFBIZ-3626

Errors in ModelForm in fieldgroups and itemrows.
I only removed some tabs and added curly brackets


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932840 13f79535-47bb-0310-9956-ffa450edef68
2010-04-11 06:29:53 +00:00
Scott Gray 80804f0931 Removed usage of the deprecated macro renderer constructors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932174 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:23:33 +00:00
Scott Gray 5796fe94d7 Deprecated the form and screen macro renderer constructors and added new ones that don't take an Appendable as an argument
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932173 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:23:25 +00:00
Scott Gray a255f30b29 Fixed a bug in the macro form renderer where the writer being passed in to the render* methods was being ignored and the writer supplied in the constructor was being used instead, this causes problems when multiple writers are being used to render a page.
Solved by ignoring the writer passed into the constructor (I'll deprecate that constructor and put in a new one shortly) and instead maintaining a separate freemarker environment for each appendable passed into the renderer using a WeakHashMap.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932172 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:14:17 +00:00
Scott Gray 1f29264b91 Fixed a bug in the macro screen renderer where the writer being passed in to the render* methods was being ignored and the writer supplied in the constructor was being used instead, this causes problems when multiple writers are being used to render a page.
Solved by ignoring the writer passed into the constructor (I'll deprecate that constructor and put in a new one shortly) and instead maintaining a separate freemarker environment for each appendable passed into the renderer using a WeakHashMap.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932171 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:14:12 +00:00
Scott Gray 44e130fc03 Removed an unused import and a couple of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932164 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:13:33 +00:00
Scott Gray 9658e8c30e Remove some unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931422 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 03:51:02 +00:00
Scott Gray 9b4de5dadc Added support for setting a class attribute (using widget-style) on the div rendered by ContainerField.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931416 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 03:31:24 +00:00
Scott Gray 990e174e75 Cleaned up renderContainerFindField [sic] to use the writer directly
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931393 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 01:06:14 +00:00
Scott Gray 3f0a06483f Removed an unnecessary cast, some autogenerated TODO commments and added a missing @Override
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931378 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 00:18:52 +00:00
Scott Gray 29bf43bb3a Removed a field declaration that was already present on the superclass
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931377 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 00:18:47 +00:00
Scott Gray 0b42ce7ffa A few basic code cleanups, nothing functional:
- Static field wasn't being accessed in a static way
- Removed a bunch of unnecessary casts
- Removed a redundant null check

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931374 13f79535-47bb-0310-9956-ffa450edef68
2010-04-06 23:57:22 +00:00
Bilgin Ismet Ibryam e2c539b0ef Removed double ampersands from autoCompleterTarget, because it was breaking autocompleters.
Autocompleter code (a third party library) expects only one ampersand and adds the second one itself during ajax call.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930670 13f79535-47bb-0310-9956-ffa450edef68
2010-04-04 12:28:33 +00:00
Erwan de Ferrieres 68c6130cf1 Fixing a NPE introduced at rev.929173
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929576 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 15:09:59 +00:00
Erwan de Ferrieres e185d50179 Correcting a NPE introduced at rev 929157 when using sub-hyperlink
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929449 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 09:54:55 +00:00
Adrian Crum af0ca8e141 A patch from Blas Rodriguez Somoza: XHTML validation errors (framework/widget) - (https://issues.apache.org/jira/browse/OFBIZ-3623).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929173 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 15:35:28 +00:00
Erwan de Ferrieres ddc80e3cb6 Adding title for images in hyperlink field or in a field displaying an image. Use the description if exists otherwise takes the title.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929157 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 14:45:45 +00:00
Jacques Le Roux 3e33b7c700 To be consistent with definitions in widget-form.xsd, change renderLookupField attributes names prefixed by lookup to no prefixes (eg lookupPresentation becomes presentation)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@928240 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 17:50:16 +00:00
Adrian Crum a88013f96c Restored the original Binding setup used for Groovy scripts.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927173 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 20:23:58 +00:00
Adrian Crum 7125cab539 Small fixup for last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926825 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 22:44:29 +00:00
Adrian Crum 50cc22e375 Added the ability for screen widgets to invoke Groovy script methods. Groovy script methods do not have parameters; parameters are passed in the context - just like other screen widget actions. To use:
<actions>
  <script location="groovyLocation#methodName"/>
</actions>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926819 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 22:34:54 +00:00
Andrew Zeneski 538a0d8829 added link + javascript to clear lookup field when the text area is disabled; also clears the description field if it exists
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926207 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 17:32:25 +00:00
Erwan de Ferrieres 14ca433955 Adding alternate tag when using hyperlink in forms. If the image is not found, then the alternate text will be displayed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926006 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 09:10:24 +00:00
Scott Gray 6109808c8a Tabs to spaces
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Jacques Le Roux 9652e69f8f Allow double quote in title. This is possible because, at least OOTB, all title should be localized. Hence from a label in an XML file, and nothing prevent to use double quotes there
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921773 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 10:17:15 +00:00
Jacques Le Roux a7a09a0817 As suggested by Adam and Scott move the encodeQuotes static method (actually renamed encodeDoubleQuotes) from UtilHttp to FreeMarkerWorker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921714 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 07:57:27 +00:00
Jacques Le Roux ca38a526fa Following r921421, here is the right and simplest solution (KISS way).
Simply encoding the tooltip (why I did not think about that before, really sometimes I wonder how my brain is working, I need to stop working for it to begin to work)
There are no needs to encode char like >, but of course < is needed (in he XML file) since else there is a problem in the XML labels file (always the same issue: around vs inside)
So yes, it's only a matter of encoding at the right place, ie before the "around vs inside" issue arises
Good night ;)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921643 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 00:20:57 +00:00
Jacques Le Roux 9fbb7f392c Fix a small encoding bug found in Example Widget form
Set default values for fields 4&5 (time dropdowns)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921401 13f79535-47bb-0310-9956-ffa450edef68
2010-03-10 15:29:44 +00:00
Jacopo Cappellato 0e57369c97 Reverted rev. 920359 (by erwan) and reimplemented in a cleaner way by refactoring the renderHyperlinkTitle code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921397 13f79535-47bb-0310-9956-ffa450edef68
2010-03-10 15:21:23 +00:00
Jacopo Cappellato 32aa30cfcb Minor code simplification: no functional changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921305 13f79535-47bb-0310-9956-ffa450edef68
2010-03-10 11:15:30 +00:00
Erwan de Ferrieres dbc53a2fb8 html string encoding for alternate and description tags on image field
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921287 13f79535-47bb-0310-9956-ffa450edef68
2010-03-10 10:24:33 +00:00
Erwan de Ferrieres 245534d516 Adding description and alternate text on a field type="image"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920770 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 10:18:54 +00:00
Scott Gray 42cffa5c24 [CVE-2010-0432] Multiple fixes to the macro and html form widget renderers to ensure that all output is encoded when necessary.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920372 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 16:05:24 +00:00
Scott Gray 8d2545c68e [CVE-2010-0432] Menu widget links of type hidden-form were not correctly encoding the value attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920369 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 16:05:09 +00:00
Erwan de Ferrieres 84c5f1b037 When making CSV or PDF exports, and having sort-field as table headers, the descriptions weren't displayed in the exported documents.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920359 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 15:36:04 +00:00
Scott Gray f55d6f8fe4 Added missing svn props, no code changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918840 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04 03:37:57 +00:00
Jacques Le Roux ff4623a475 Re-apply r912645
<<Make use of FSE.expand(), instead of expandString, to provide support
for direct setting of values in widgets.  This closes OFBIZ-3486.>>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918476 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 14:03:19 +00:00
Jacques Le Roux 423ce79a21 A slightly modified patch from Sascha Rodekamp " Some improvements for the layer lookup" (https://issues.apache.org/jira/browse/OFBIZ-3524) - OFBIZ-3524
A flag was added to fade the background behind the layered lookup (ie all the screen but the lookup) when a layer is opened.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917940 13f79535-47bb-0310-9956-ffa450edef68
2010-03-02 10:02:04 +00:00
Adam Heath b0192e663c Reverting 912645, for now, until I have time to investigate further.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915650 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 03:31:49 +00:00
David E. Jones e72da60d42 Fixed issue where link parameters where not adjusted for TimeZone, though they are expected to be in the event processing which causes links and such with times and timestamps, and sometimes dates, to not match what they came from; now time zone adjustment is done for link parameters
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915644 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 02:31:37 +00:00
Bilgin Ismet Ibryam 149a5a0909 Allow hiding header for multi forms.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915516 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 20:59:31 +00:00
Adam Heath 350a287883 Make use of FSE.expand(), instead of expandString, to provide support
for direct setting of values in widgets.  This closes OFBIZ-3486.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912645 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 16:34:47 +00:00
Bruno Busco ee1f838fa3 Removed unused calGif parameter from Form rendering Macros
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@911186 13f79535-47bb-0310-9956-ffa450edef68
2010-02-17 21:57:22 +00:00
Erwan de Ferrieres 311e0d14ac Adding a new field type in forms' display so we can display an image and keep a list's consistency
Example :
<field name="displayProduct" use-when="!&quot;foo&quot;.equals(productId)">
  <hyperlink target="EditProduct" image-location="/images/next.gif" also-hidden="false"/>
</field>
<field name="displayProduct" use-when="&quot;Cap&quot;.equals(productId)">                                                                                                                                                                         
  <display type="image" image-location="/images/ofbiz.ico"/>
</field>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@908894 13f79535-47bb-0310-9956-ffa450edef68
2010-02-11 09:27:01 +00:00