Jacques Le Roux
e57c2599a9
A patch from Sumit Pandit "Issue in rendering Freemarker Template from String." ( https://issues.apache.org/jira/browse/OFBIZ-3782 ) - OFBIZ-3782
...
With the help of Bob Morley (it was more a cache issue than what Sumit thought)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950866 13f79535-47bb-0310-9956-ffa450edef68
2010-06-03 04:11:32 +00:00
Scott Gray
d233cd5675
The following deprecated classes, constructors or methods have been removed:
...
org.ofbiz.content.data.DataResourceWorker.getImageType(Delegator, String)
- Use getMimeType(GenericValue) instead
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@944175 13f79535-47bb-0310-9956-ffa450edef68
2010-05-14 09:46:18 +00:00
Adam Heath
aa053eb1ae
Add some caching to a few delegator calls, a few cases during the
...
loading of survey data were always hitting the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@941047 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04 21:19:28 +00:00
Ashish Vijaywargiya
9712434557
Applied patch from jira issue: OFBIZ-3719 - Include DOCTYPE at the begining of CMS driven html page.
...
Description of work:
Include DOCTYPE at the begining of html pages, that are render through cms.
Currently DOCTYPE is included in HtmlHead.ftl for cms.
By doing so the DOCT YPE is always included on the top of the page before rendering single HTML statement.
Thanks Deepak & Rishi for the contribution and Scott for the comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935886 13f79535-47bb-0310-9956-ffa450edef68
2010-04-20 12:03:21 +00:00
Scott Gray
d4e34a244a
Fixed a ton of pointless ServiceUtil.returnError(...) calls, I've left the ones that aren't inside services for now since they require a little more thought to fix
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935164 13f79535-47bb-0310-9956-ffa450edef68
2010-04-17 10:28:18 +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
ffb067d933
Applied patch from Jacopo Cappellato, switched the content rendering logic over to using the macro renderers rather than the soon to be deprecated html renderers
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932170 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:14:07 +00:00
Scott Gray
6a48871974
Remove an unnecessary null assignment
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932169 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:14:02 +00:00
Scott Gray
6c4c6ce197
Remove some unnecessary casts
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932168 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 23:13:58 +00:00
Scott Gray
8ff3d00360
Removed commented and ununsed code
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931212 13f79535-47bb-0310-9956-ffa450edef68
2010-04-06 16:28:34 +00:00
Scott Gray
c46617fed3
Generics markup
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931210 13f79535-47bb-0310-9956-ffa450edef68
2010-04-06 16:26:06 +00:00
Scott Gray
a75dd88034
Added support for generating content links by looking for an appropriate WebSitePathAlias to use, I skipped adding support for finding an alias via mapKey/contentId for now since quite a bit of processing would be required to find an appropriate match
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@931174 13f79535-47bb-0310-9956-ffa450edef68
2010-04-06 15:02:32 +00:00
Scott Gray
bde54f16ff
In ContentWorker.renderContentAsText, I've moved the check for a dataResourceId down to the point where the DataResource record actually needs to be rendered. If a decorator content is present then it is quite possible that the content record is simply being used as a plcaeholder to render sub content records.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930968 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 21:42:28 +00:00
Scott Gray
25c3f11822
Improved the content rendering so that multiple levels of decoration are supported, previously you could have only one content and it's decorator, anything above that and the contents being decorated would get lost in the rendering logic.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930544 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 17:11:34 +00:00
Scott Gray
195c3dbb10
Log an error and ignore decoratorContentId if it is the same as the contentId being rendered. Prevents a stack overflow.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930156 13f79535-47bb-0310-9956-ffa450edef68
2010-04-02 03:37:33 +00:00
Scott Gray
63c1179dd6
Add a debug warning when a given contentId cannot be verified to the given webSiteId
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929298 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 21:25:31 +00:00
Ashish Vijaywargiya
2127f39c02
Corrected the condition.
...
Thanks Arun!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927739 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 09:04:06 +00:00
Scott Gray
edd1849adb
Have the cms event use the current request's overrideViewUri (_CURRENT_CHAIN_VIEW_) if present instead of request.getPathInfo(), this allows you to go through a chain of requests before pushing back into cms.
...
So you can now have a request response push back to cms with something like this:
<response name="success" type="request" value="cms/contentId/mapKey"/>
basically anything that would have worked in the URL will work here, except for relying on the default-request mapping which chained requests ignore, so you have to prefix with cms/ (or whatever your cms uri is)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926418 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 00:47:51 +00:00
Scott Gray
11576a1b0f
Add some more cache usage when verifying the content to be rendered.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926390 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 23:11:24 +00:00
Scott Gray
4219c2781f
Use String.valueOf(int) instead of "" + int
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926387 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 23:11:15 +00:00
Scott Gray
29c75f6fe2
Rename hasContent variable to hadContent which better reflects what it actually means.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926201 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 17:15:16 +00:00
Scott Gray
53e42796c0
Remove pathInfo.indexOf(/) and just do the split regardless, the end result is the same.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926200 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 17:15:12 +00:00
Scott Gray
6d6699a458
Remove unnecessary null and length check after a string.split(String) call that always returns at least an array of length 1
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926199 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 17:15:07 +00:00
Scott Gray
3008619787
Use the cache when looking for a default content record
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926198 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 17:15:02 +00:00
Scott Gray
f33c311218
Fix null checks, pathInfo may be null but pathParsed won't be.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926197 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 17:14:58 +00:00
Scott Gray
7703b69d73
Remove some commented code, keeping it around serves no purpose.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926176 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 16:45:51 +00:00
Scott Gray
23508aa989
Access static fields of HttpServletResponse directly
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926175 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 16:45:46 +00:00
Scott Gray
6d4fe06c5c
Formatting tidy up, mostly adding missing spaces. No functional changes.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926174 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 16:45:42 +00:00
Scott Gray
c75bda5d7a
OrderHeader isn't cached so there's no point in trying to do lookups via the cache
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924575 13f79535-47bb-0310-9956-ffa450edef68
2010-03-18 00:56:54 +00:00
Adam Heath
93d0182f49
Make all variables in ControllerConfig private, and add accessor
...
functions to them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@904250 13f79535-47bb-0310-9956-ffa450edef68
2010-01-28 20:10:51 +00:00
Ashish Vijaywargiya
e0dd935336
Avoid NPE.
...
Patch from Vivek.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@902752 13f79535-47bb-0310-9956-ffa450edef68
2010-01-25 09:40:15 +00:00
Adam Heath
b17eb127ec
Fix trailing whitespace, and mixed tab/space at the beginning of lines.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@899812 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 21:00:23 +00:00
Scott Gray
84445caafe
Fix typo
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889043 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 01:02:37 +00:00
Scott Gray
ced8fd1a54
Reverted previous temporary security fix for request parameters being directly inserted into survey forms and changed all SurveyWrapper instances using this method to instead store the parameter map in the session temporarily.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889040 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 00:53:47 +00:00
Scott Gray
bcaacf4fd1
Added new class SurveyEvents and event method that wraps a createSurveyResponse service call and additionally restores a previously stored request parameter map
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889039 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 00:52:53 +00:00
Jacques Le Roux
47b0eff762
More uses of is(Not)Empty
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885112 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 16:27:42 +00:00
Jacques Le Roux
e07ab48fb4
Some cleaning related to is(Not)Empty
...
* remove duplicate ()
* remove casts no longer needed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885103 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 15:46:52 +00:00
Jacques Le Roux
c72b29cb1f
Use UtilValidate.isNotEmpty methods instead of (obj != null) || (obj.length > 0) and (obj != null) || (obj.size > 0)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883549 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:41:34 +00:00
Jacques Le Roux
5518e9baf8
Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
...
Complete r883492
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883516 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 22:02:05 +00:00
Jacques Le Roux
8ae9319710
Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883492 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 20:34:27 +00:00
Jacopo Cappellato
c8546fe174
Removed some unused import statements.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@833076 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 16:37:12 +00:00
Bruno Busco
40a72014a1
A patch from Patrick Antivackis "Addind Error Pages (404 - 410) possibilities for the Content app" ( https://issues.apache.org/jira/browse/OFBIZ-3022 ) - OFBIZ-3022
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826205 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 09:12:39 +00:00
Scott Gray
dc450c1890
Fix security issue reported by Alexandre Mazari - OFBIZ-2747
...
Request parameters were being made available to surveys which in turn were sending them straight back to the browser creating an XSS vulnerability.
This isn't a true fix because I've simply disabled the functionality but at least the security hole is plugged.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826196 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 08:40:17 +00:00
Adrian Crum
a4d68934c9
Converted GenericDelegator concrete class references to Delegator interface references.
...
This commit requires ant clean. Also, external libraries that reference GenericDelegator will need to be updated.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821643 13f79535-47bb-0310-9956-ffa450edef68
2009-10-05 00:08:27 +00:00
Jacques Le Roux
ef8b371712
A patch from Patrick Antivackis "Improving the ContentMapFacade class in order to filter and sort results." ( https://issues.apache.org/jira/browse/OFBIZ-2988 ) - OFBIZ-2988
...
Today's ContentMapFacade.class is mapped in the content application to the ${thisContent} variable in Freemarker templates.
Using {$thisContent.subcontent_all} return all the "subcontents" associated with thisContent sorting by -fromDate.
(in fact you usually use it like
<#list thisContent.subcontent_all as contentItem>
${contentItem}
</#list>
)
Using {$thisContent.subcontent.foo} return all the first "subcontent" associated with thisContent and mapped by foo mapKey (first sorted by -fromDate).
Unfortunatelly this facade don't bring any filter or sorting options.
I updated this class in order to allow to :
- sort the subcontents (both sucontent_all or subcontent.foo) by whatever field of the ContentAssocViewTo view. For this you need to write in the Freemarker template ${thisContent.setSortOrder(sortString)} before using the sucontent_all or subcontent .foo operations.
- filter the output of subcontent_all by mapKey. For this you need to write in the Freemarker template ${thisContent.setMapKeyFilter(mapKeyString)} before using the subcontent_all operation.
- filter the output of subcontent_all or subcontent.foo by statusId of the content. For this you need to write in the Freemarker template ${thisContent.setStatusFilter(CONTENT_STATUS)} before using the sbucontent_all or subcontent.foo operations.
Examples are given in the Jira issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821474 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 07:53:56 +00:00
Scott Gray
65221e1e3d
Removed the following deprecated methods from DataResourceWorker:
...
renderDataResourceAsText(GenericDelegator, String, Map, GenericValue, Locale, String)
renderDataResourceAsText(GenericDelegator, String, Appendable, Map, GenericValue, Locale, String)
renderDataResourceAsTextCache(GenericDelegator, String, Map, GenericValue, Locale, String)
renderDataResourceAsTextCache(GenericDelegator, String, Appendable, Map, GenericValue, Locale, String)
getDataResourceTextCache(GenericValue, String, Locale, Map, GenericDelegator)
writeDataResourceTextCache(GenericValue, String, Locale, Map, GenericDelegator, Appendable)
getDataResourceText(GenericValue, String, Locale, Map, GenericDelegator)
writeDataResourceText(GenericValue, String, Locale, Map, GenericDelegator, Appendable)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821252 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 05:24:00 +00:00
Scott Gray
9e77901bf8
Cleaned up imports
...
Additional generics markup
Enhanced for loops
Fixed a comment typos
Removed an unused method variable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821238 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 04:12:28 +00:00
Scott Gray
d02b770738
Removed the deprecated method getImageType(GenericDelegator, GenericValue)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821234 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 03:41:43 +00:00
Scott Gray
013ceb9961
Removed use of a deprecated method from getImageType(GenericDelegator, String) and deprecated the method itself
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821233 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 03:39:29 +00:00
Hans Bakker
0b7fe13bb1
On request of adrian, put the VISUAL_THEME default record back in the database, however added the function that values in general properties can override this value. Combined the implementation with the definition of the defaultOrganizationPartyId
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@820178 13f79535-47bb-0310-9956-ffa450edef68
2009-09-30 05:16:17 +00:00