We ran into a problem where we have now properly modeled all
parameters to controller requests with the "parameter" element; for
example here is a properly modeled link ...
<menu-item name="Items" title="${uiLabelMap.Items}">
<link target="ViewSalesOrder">
<parameter param-name="orderId" from-
field="parameters.orderId"/>
</link>
</menu-item>
What ofbiz does when it attempts to render this link, is determine if
it should render it as an anchor or with a hidden form. The
determining factor here is if the controller request "ViewSalesOrder"
has an event defined. If it has an event, it must render as a hidden
form for security reasons. In this case, ViewSalesOrder will call an
event to properly create and save the ShoppingCart object into the
session. As a result, we now render this as a POST instead of a GET
(when the parameters were defined as query string arguments).
After this happens, there may be a number of things that happen to the
page that require us to do a page refresh. This is typically done as
part of a modal box operation. What we had done in the past was use
the document.location.href to refresh the page. Now that these
navigation links are rendered as POSTs this no longer works, and a
number of bugs had been created around "missing orderId" and similar
problems as part of that refresh.
Our solution right now was to fix how we do a refresh page. I have
created a "reloadPage" javascript snippet that gets rendered on all
Emforium themed pages in the footer. This uses the request to build a
proper request to reload the page with the url, parameters, and
request method. The modal box inclusion now uses this function
instead of its own location.href refreshing mechanism. A number of
parameters that were setting this success function directly have been
removed in favor of this new method.
This was checked in as part of revision 13393 and has resolved a few
tickets such as EMF-3403.
There should be no direct developer impact. After an svn refresh you
may be assigned tickets that were related to this problem and have now
been fixed. Please let me know if you have any questions or concerns.
Robert Morley
Senior Software Developer
Emforium Group Inc.
ALL-IN Softwareâ„¢
519-772-6824 ext 220
[email protected]