This discussion is archived
3 Replies Latest reply: Mar 25, 2008 10:53 AM by Frank Nimphius RSS

Like to change af:messages text 'Error' to 'Problem occured'

583138 Newbie
Currently Being Moderated
We have an requirement to change af:messages title text 'Error' to 'Problem occured' globally. Don't want to use af:messages text attribute to do that(which will required to change in every page). Text 'Error' is read from
oracle.adfinternal.view.faces.ui.laf.oracle.desktop.resource.BLAFBundle class. How do i override this file to have my title.

Thanks
JP
  • 1. Re: Like to change af:messages text 'Error' to 'Problem occured'
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    unfortunately in 10.1.3 you would have to create your own skin to change the resource bundle. In Jdeveloper 11 this will be simplified in that you can extend an existin skin, allowing you to change the default bundle while still using the default skin.

    However, 10.1.3 is not that way and I would suggest to wait with this cosmetic correction until upgrading to 11

    Frank
  • 2. Re: Like to change af:messages text 'Error' to 'Problem occured'
    583138 Newbie
    Currently Being Moderated
    Thanks Frank.

    I did not see any skin selector to change the af:messages title. Could you please point me to some sample doing this.
  • 3. Re: Like to change af:messages text 'Error' to 'Problem occured'
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    try

    af|messages_header{

    background-color:red;
    height:30px;
    color:yellow;

    }

    If you don't want to use a skin, use

    .af_messages_header{background-color:red; color:yellow; height:30px;}

    on the page directly. However, this is for the look and feel part, not the text changing part of it.

    To change the text message, you find a good document at http://myfaces.apache.org/trinidad/devguide/skinning.html#Skinning_Text

    This works similar on ADF Faces, except that the file to change is the faces-config.xml file that holds the skin definition. The only remaining issue is that there is no good documentation for the keys to use. However, the message keys are

    af_messages.ERROR
    af_messages.WARNING
    af_messages.INFORMATION
    af_messages.CONFIRMATION

    You create the message bundle as described in the Trinidad docment

    Hope this helps

    Frank