You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Ulrich Heidfeld (Jira)" <ji...@apache.org> on 2020/06/05 11:48:00 UTC

[jira] [Commented] (OFBIZ-11743) Multiple menu item link parameters get lost if link type is layered-modal

    [ https://issues.apache.org/jira/browse/OFBIZ-11743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17126706#comment-17126706 ] 

Ulrich Heidfeld commented on OFBIZ-11743:
-----------------------------------------

Hi [~nmalin],

i have spotted this issue only in menu items. For example this can be tested by applying following changes:
{code:java}
diff --git a/framework/webtools/widget/Menus.xml b/framework/webtools/widget/Menus.xml
index 0dab587..02f4a24 100644
--- a/framework/webtools/widget/Menus.xml
+++ b/framework/webtools/widget/Menus.xml
@@ -112,7 +112,7 @@
             <link target="threadList"/>
         </menu-item>
         <menu-item name="FindJobManagerLock" title="${uiLabelMap.WebtoolsJobManagerLockList}">
-            <link target="FindJobManagerLock"/>
+            <link target="AddJobManagerLock?1=true&amp;2=false" style="buttontext create" link-type="layered-modal"/>
         </menu-item>
         <menu-item name="scheduleJob" title="${uiLabelMap.WebtoolsScheduleJob}">
             <link target="scheduleJob"/>
diff --git a/framework/webtools/widget/ServiceScreens.xml b/framework/webtools/widget/ServiceScreens.xml
index 38f7266..d03c1ab 100644
--- a/framework/webtools/widget/ServiceScreens.xml
+++ b/framework/webtools/widget/ServiceScreens.xml
@@ -263,6 +263,8 @@
             <widgets>
                 <decorator-screen name="PopUpDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                        <label text="1: ${parameters.1}"/>
+                        <label text="2: ${parameters.2}"/>
                         <include-form name="AddJobManagerLock" location="component://webtools/widget/ServiceForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
{code}
The second parameter is not available in opening modal.

> Multiple menu item link parameters get lost if link type is layered-modal
> -------------------------------------------------------------------------
>
>                 Key: OFBIZ-11743
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11743
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/widget
>    Affects Versions: Release Branch 18.12, 17.12.03, Trunk
>            Reporter: Ulrich Heidfeld
>            Assignee: Ulrich Heidfeld
>            Priority: Minor
>              Labels: Modal, link, menu, menu-item
>         Attachments: Capture d’écran de 2020-05-29 17-11-58.png
>
>
> I got problems by opening a modal via menu link with two parameters. Only the first parameter is successfully accessible in modal's screens definition.
> Investigation revealed that for a menu link of type 'layered-modal' inline JS-Code get created with defined action-String. This String is used to set following context parameters.
> The problem is, that parameter concatenating expression '&' is not encoded like
> {code:java}
> // .../control/uri?param1=1&amp;param2=2
> {code}
>  
> My solution for this problem was to extend MacroMenuRenderer#renderLink by replacing 
> {code:java}
> &amp;{code}
> by '&'.
> Furthermore, this method shows that submitted parameters, defined between menus link tags, will be ignored, if link type is 'layered-modal'. So, within action-String, we have to submit parameters.
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)