【问题标题】:ADF Faces: How to customize contextmenu with Javascript and Managedbean?ADF Faces:如何使用 Javascript 和 Managedbean 自定义上下文菜单?
【发布时间】:2014-03-03 16:05:08
【问题描述】:

我正在寻找一个很好的教程来自定义我的 ADF Faces 上下文菜单。

在谷歌上花了一些时间后,我找到了Adding close this / close others / close all to the UIShell

但这并不是我所期望的。

如果您在按钮或链接上按鼠标右键,ADF Faces 上下文菜单看起来像上图。如何自定义上下文菜单以在浏览器上像往常一样在新选项卡或窗口中打开链接,如下图所示?

【问题讨论】:

    标签: javascript jsf oracle-adf


    【解决方案1】:

    简单我只需将以下代码添加到我的 web.xml 以启用设置

    <context-param>
        <param-name>oracle.adf.view.rich.ACTION_LINK_BROWSER_CONTEXT_SUPPRESSION</param-name>
        <param-value>no</param-value>
    </context-param>
    

    在运行时,最终用户可以通过右键单击某些组件呈现的链接来调用浏览器的上下文菜单,如上所述

    您可以为其配置此行为的组件包括:

    af:commandLink
    
    af:commandImageLink
    
    af:commandMenuItem (stand-alone or within an af:menuBar component)
    
    af:commandNavigationItem if no value is specified for the destination attribute, the ADF Faces framework enables the browser context menu in the following scenarios:
    
    For the two anchors that af:commandNavigationItem renders when inside an af:train component
    
    When an af:commandNavigationItem renders inside an af:breadCrumbs component
    
    When an af:commandNavigationItem renders inside an af:navigationPane component (any hint--tabs, bar, buttons, choice, list)
    
    af:panelTabbed: the tabs and overflow indicators
    
    af:panelAccordion: the disclosure link and overflow indicators
    

    您不能为指定目标但不调用操作的组件配置此行为。这些组件的示例包括:

    af:goLink
    
    af:goImageLink
    
    af:commandNavigationItem
    

    为目标属性指定一个值,而没有为操作属性指定值

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-07
      • 1970-01-01
      • 1970-01-01
      • 2011-04-27
      • 1970-01-01
      相关资源
      最近更新 更多