[jira] [Commented] (OFBIZ-11810) Element link can update partial area

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-11810) Element link can update partial area

Nicolas Malin (Jira)

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

Nicolas Malin commented on OFBIZ-11810:
---------------------------------------

I also failed to reproduce on trunk, but after investigation, I identified it on my development environnement, because I reintroduce it with some local improvement.

The root is here : *themes/common-theme/template/macro/HtmlMenuMacroLibrary.ftl:75*
{code:java}
... <#if targetWindow?has_content && "update-area" != linkType> target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType><#if linkUrl?has_content>javascript:ajaxSubmitFormUpdateAreas('${uniqueItemName}', '${linkUrl}')<#else>javascript:document.${uniqueItemName}.submit()</#if>...{code}
the linkUrl contains normally an areaCvsString if we need to update a partial area. Or on my local I detected that the *MacroCommonRenderer.getLinkUrl*(_CommonWidgetModels.Link link, Map<String, Object> context_) that works on resolve the linkUrl (and return empty if not necessary) use the linkType directly from the Link element and not analyse the execution context like the function *WidgetWorker.determineAutoLinkType*(_String linkType, String target, String targetType, HttpServletRequest request_) do.

The result: OFBiz analyse this menu link with the value *auto* and not *hidden-form* .
I will take care of this on the future commit and close this issue after ensure that the problem is behind :)

> Element link can update partial area
> ------------------------------------
>
>                 Key: OFBIZ-11810
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11810
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework/widget
>    Affects Versions: Trunk
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Major
>              Labels: screen, widget
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-11808-OFBIZ-11810.patch
>
>
> Currently when you want to display an information easily on sub-screen dynamically (example as related element) is currently not possible without write specific js code. A easy step would be add a new link type: update-area, to indicate to the theme that we want to refresh after the call only a local area.
> {code:xml}
>             <link target="ListCategoryProductMembers" link-type="update-area" target-window="detail">
>                 <parameter param-name="productCategoryId" from-field="productCategory.productCategoryId"/>
>             </link>
> {code}



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