4 Replies Latest reply on Apr 3, 2012 12:33 PM by 913951

    Trinidad skining - Messages bundle - validation messages

      *Edit Sorry, wrong thread. Really sorry. First post on OTN. Please move to appropriate thread if you can


      We want to localize ADF components. That's why we've defined own skin in trinidad-skins.xml+ and created Java class which overrides messages by key like:

      {"af_dialog.LABEL_OK", "Demo:OK"},
      {"af_dialog.LABEL_CANCEL", "Demo:Cancel"},

      This solution works like a charm with labels, tooltips and other "Resource Strings" (term from http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e15862/toc.htm).

      But I'm totally confused how to translate validation messages like "A value is required.", "You must enter a value." and so on.

      Tryied in different ways. For example, decompiling JDeveloper jar libraries to get message keys. Found file MessageBundle+ class in trinidad-api.jar+ (in ...Middleware\oracle_common\modules\oracle.adf.view_11.1.1) which have very similar messages I want to override:

      public class MessageBundle extends ListResourceBundle
      public Object[][] getContents()
      return new Object[][] { { "org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED", "A value is required." }, { "org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail", "You must enter a value." }, { "org.apache.myfaces.trinidad.UIXSelectMany.REQUIRED", "A selection is required." }, ......

      When trying to put these values into own bundle class it's not working and original messages are displaying. Tryed also override other(non-trinidad) keys like "javax.faces.component.UIInput.REQUIRED", "javax.faces.UIXEditableValue.REQUIRED", "oracle.adf.view.rich.component.UIInput.REQUIRED" etc. with no result.

      Do you have any idea?

      P.S. I'm using JDeveloper with ADF Faces components.

      Edited by: 869270 on 2011.30.6 11:55

      Edited by: 869270 on 2011.30.6 12:01