[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Accessing literals via ResourceManager - default text returned...  XML
Forum Index -> Development
Author Message
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

(from mail conversation)

..have a question regarding the static method findLiteral() in class ResourceManager.

When the literal is not found it returns a default value, right? Is there a way to prevent the creation of the default value and catch some kind of Exception?

Currently it is the case that if the literal is not found in the literal-file given, I need some extra logic after...


Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

There are method with parameter "withError", e.g.:

Code:
     /**
      * Find text for a resource / literal-id within the current runtime
      * instance.
      */
     public static String findLiteral(String resourceName, String literalId, boolean withError)
     {
         ...
     }
 


Of withError is set to false, then a default value is returned - otherwise an Error is thrown.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team