------------------------------------------------------------------------
r1859800 | jleroux | 2019-05-23 18:36:37 +0200 (jeu. 23 mai 2019) | 8 lignes
Fixed: Replace request-redirect w/ no redirect-param attribute by
request-redirect-noparam
(OFBIZ-9997)
Reverts all the rest from r1816180, and, after reading carefully the code used
for "request-redirect" in RequestHandler (and downward), fixes the documentation
in site-conf.xsd
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859801 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10599)
As discussed with Dennis in OFBIZ-10569, the idea is to implement an
"url-redirect" response type where an external URL can be set with redirected
parameters like it's done with request-redirect which is only internal.
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844729 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-10438
The request-map element has a new method attribute to control a uri be called by GET or POST or all.
Thanks: Mathieu Lirzin for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834389 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10411)
To define boolean values, some ad-hoc enumeration of "true" and "false" are
repeatedly used. Since XML Schema defines a standard boolean datatype
better to use it.
For now only `site-conf.xsd` is fixed
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831930 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9891)
This fixes a bug where the configuration attribute in the view-map
differs from what is read in the configuration handler.
Aditionally,
a new option "none" is introduced. If it is set, no X-Frame-Options
header will be set.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813276 13f79535-47bb-0310-9956-ffa450edef68
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
1. The following xsd are duplicated to use namespaces
site-conf.xsd -> site-conf-ns.xsd
widget-form.xsd -> widget-form-ns.xsd
widget-screen.xsd -> widget-screen-ns.xsd
widget-menu.xsd -> widget-menu-ns.xsd
simple-methods.xsd-> simple-methods-ns.xsd
For example, in site-conf-ns.xsd, we have the following document level attribute
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://ofbiz.apache.org/Site-Conf" targetNamespace="http://ofbiz.apache.org/Site-Conf">
instead of
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
2. The above schema are used into compound-widgets.xsd so that compound widgets use only one consolidated schema.
3. Update ExampleCompoundWidgets.xml to use the new compound-widgets.xsd. For example
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sc="http://ofbiz.apache.org/Site-Conf"
xmlns:sm="http://ofbiz.apache.org/Simple-Method"
xmlns:wf="http://ofbiz.apache.org/Widget-Form"
xmlns:wt="http://ofbiz.apache.org/Widget-Tree"
xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
<sc:site-conf>
<sc:request-map uri="CompoundWidgets1">
<sc:security https="true" auth="true"/>
<sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
<sc:response name="success" type="view" value="CompoundWidgets1"/>
</sc:request-map>
<sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>
<sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
<sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
</sc:site-conf>
...... the rest
4. Change java code to support reading xml with namespace (i.e. xml for compound widgets)
jleroux: I simply replaced tabs by spaces in Java files and removed this commented out line
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd">
in ExampleCompoundWidgets.xml
We decided to duplicate the simple-methods.xsd rather than updating all concerned files. Else we would have to update the attributes at document level for rest of the controllers, menus, forms, simple methods and screens. For example, in controller.xml, we would have to change
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd”
to
xmlns="http://ofbiz.apache.org/sc” xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”>
But especially we would have to use the same syntax with namespaces prefixes than in ExampleCompoundWidgets.xml (see example above). This can be discussed because with auto-completion it's not a big deal, but could be overwhelming for existing custom projects...
James mentionned that "the schema location at compound-widgets.xsd is relative to the project...". I don't see any problems with that. We can keep as is as long as we maintain the relation (ie if the main XSDs are moved). Moreover with the previous addition of compound-widgets.xsd in widget-catalog.xml it seems all things work correctly (eg w/o the new *-ns.xsd yet committed, the auto-completion works well in ExampleCompoundWidgets.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746302 13f79535-47bb-0310-9956-ffa450edef68
This is related with r1361130, where the birt component was moved from framework to specialpurpose.
The fix is to create the possibility of a loose coupling from applications controllers to specialpurpose controllers. For that an if-present attribute is added to the include element. When used, if the included controller does not exist, instead of an error and a stack trace, a warning is thrown (only in English, for developers) suggesting to checkout the component from trunk. Indeed, in the current case, this situation should only arise in release after 12.04 where the birt component, like all others but the ecommerce component, had been removed. This can be used in other cases, but for now only the component level is covered.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1518777 13f79535-47bb-0310-9956-ffa450edef68
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68
"Allow a whole controller or/and request/s to override a default 302 in case of redirect"
Since I did not get any feedbacks but Paul's, I decided to use 302 as default instead of 303.
The reason is like that nobody will be surprised. The same (bad for SEO) default than Java will be used.
Please test and review, and let's discuss it more if wanted...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432567 13f79535-47bb-0310-9956-ffa450edef68
Now it will be very easy to extract the birt component (for OFBiz Extras) or to disable it when deploying to production or when interested in sparing some hardware resources. I did some cursory tests but since the work has been challenging and rather complex I would appreciate testing help and also reviews to finds chunks of code that I could have missed and that could be moved out as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361130 13f79535-47bb-0310-9956-ffa450edef68
Patrick : The goal of this improvement is to allow at the view level, through setup in the controller.xml file, to generate no-cache http headers. Example is included for the showcart view of the ecommerce application.
JLR : I have commented out Patrick's example in controller and put a comment about its usage
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@833096 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
firstvisit, after-login, before-logout, preprocessor and postprocessor elements. Events with same name will be overridden and only the last one will be executed. Overriding works also in cases when a controller.xml includes other controller files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@761220 13f79535-47bb-0310-9956-ffa450edef68
1. created a new function in the partyManager called 'myCommunications'
This function enables the sending and receiving of email and internal communications to/from the current userlogin. It looks like an email client for internal and external email.
2. merged the party/webapp/partymgr/communication/CommMenus.xml and party/widget/partymgr/PartyMenus.xml
3. moved all forms/screens from my portal back into the party component
4. fixed some more problems with myportal
5. added 'save-home' and save 'current' in the same pattern as 'save-last' function in the controler.xml
6. added 'view-home' in the same pattern as 'view-last'
7. moved all related uilabels from myportal to party
8. This update needs a re-creation of the portlet/portal entities.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@758522 13f79535-47bb-0310-9956-ffa450edef68
Big refactor of ControlServlet, RequestManager, RequestHandler, and ConfigXMLReader so that simple objects are used instead of Maps within Maps within Maps for the data from the controller.xml file, which results in eliminating hundreds of lines of code including the entire RequestHandler class. I have tested this a lot with different apps that use the ControlServlet differently, but this is a very big change so there could still be issues. Based on this cleanup future issues and new features should be easier and less error prone, and that is why doing it now in order to help with a number of other improvements and bug fixes that are part of this commit.
Also added redirect-parameter element to go under the request-map -> response element which allows you to specify which parameters will be passed on in a redirect instead of using all of them. Also improved default there and in various places to only include parameters from the URL to avoid issues with form data, but if the ID to display (like following a crAlso added redirect-parameter element to go under the request-map -> response element which allows you to specify which parameters will be passed on in a redirect instead of using all of them. Also improved default there and in various places to only include parameters from the URL to avoid issues with form data, but if the ID to display (like following a crAlso added redirect-parameter element to go under the request-map -> response element which allows you to specify which parameters will be passed on in a redirect instead of using all of them. Also improved default there and in various places to only include parameters from the URL to avoid issues wd in and also going to the same page after login from auth=true or from clicking on the login link.
Related to cleaning up login URLs also changed how the request and parameters passed to a request before a login are saved and used after a login is successful so that it URL parameters go on the URL in a redirect to the original request to make it more transparent, and non-URL parameters just stay in the session and are used when the original request is run again to avoid putting sensitive information like passwords and big information like textarea data in the URL, which has been a problem before.
To see what some of these things combined can do try going to the example app, login, click on the New Example link, then logout in another tab or window, then go back to the New Example page and enter a name and a whole bunch of text in the long description then click Create, the system will show you the login page so enter username/password, and then after login you'll see a nice URL to EditExample with the correct exampleId parameter and all of the data entered before login successfully saved and never appearing in a URL.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@741374 13f79535-47bb-0310-9956-ffa450edef68