Java 覆盖ADF中组件中“ok”按钮的标签

Java 覆盖ADF中组件中“ok”按钮的标签,java,oracle-adf,Java,Oracle Adf,在我的项目的web层中,我使用ADF Faces组件。在一些地方,我使用了与dialog嵌套的ADF弹出元素 <af:popup id="myPopup" popupFetchListener="#{.....}"> <af:dialog contentWidth="400" title="Dialog Title" contentHeight="100" closeIconVisible="true" modal="tru

在我的项目的web层中,我使用ADF Faces组件。在一些地方,我使用了与dialog嵌套的ADF弹出元素

<af:popup id="myPopup" popupFetchListener="#{.....}">
        <af:dialog contentWidth="400" title="Dialog Title" contentHeight="100" closeIconVisible="true"
                   modal="true" type="okCancel" id="d3" 
                   dialogListener="#{mybean.myDialogListener}">
        </af:dialog>
 </af:popup>
在我的支持bean中,我在DialogEvent类的帮助下捕获ok/cancel事件

我想根据我的项目需求将框架构建确定按钮的标签更改为一些自定义标签。如果我在消息包中添加所需的标签,如何在框架生成的按钮中反映该标签

有人能提供一些线索吗?

您必须使用dialog元素的Type、AffirmativeTextAndAccessKey和CancelTextAndAccessKey属性。 要使“确定”显示为“是”,请:

<af:popup id="myPopup" popupFetchListener="#{.....}">
    <af:dialog contentWidth="400" title="Dialog Title" contentHeight="100" closeIconVisible="true"
               modal="true" type="okCancel" id="d3" 
               dialogListener="#{mybean.myDialogListener}" type="yesNo" affirmativeTextAndAccessKey="yes please">
    </af:dialog>

dialogEvent.Outcome.ok
dialogEvent.Outcome.yes