Using a Resource Bundle to Map Text from One Value to Another
Resource bundles are a concept introduced in JDK1.1 specifically for internationalization. A resource bundle is implemented as a Java class. It implements an API that basically provides a mapping of object values. The difference between a resource bundle and a regular Java class is the way they are located and loaded. A regular Java class is uniquely identified by a fully qualified class name. When loading a class, the class is either found as specified or not found and an error is reported. A resource bundle name, on the other hand, can refer to one or more Java classes. The resource bundle related classes have names that include their intended locale values. For details on how resource bundles are used, refer to the JDK internationalization documentation.
Note that the mapping values used by a resource bundle may be loaded from a properties file. Assume that we want to map the word 'Close' to 'Quit'. We can create a properties file containing a single line:
Close=Quit
Save this file as 'mapping.properties' (or any valid name) and place this file in a directory that is on the CLASSPATH. The mapping file can be activated in the Report Designer by setting the property StyleReport.locale.resource in the .stylereport file located in the user home directory. You can also load the Designer from the command prompt with the following code:
java –DStyleReport.locale.resource=mapping inetsoft.report.design.Designer
|
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software. |
More Articles About Reporting
Advantages of Self-hosted Business Intelligence - Self-hosted Business Intelligence (BI) refers to the practice of deploying and managing BI tools and platforms within an organization's own infrastructure rather than relying on external cloud-based solutions. There are several advantages to choosing self-hosted BI: Data Security and Privacy: One of the primary advantages of self-hosted BI is that it allows organizations to maintain full control over their data. Since data is stored and processed within the organization's own infrastructure, there is less reliance on external third-party providers, reducing the risk of data breaches and unauthorized access...
Applicant Funnel Conversion Rates - The passage of applicants through each step of the recruiting process is shown visually in the application funnel conversion rates graphic. Beginning with the submission of an application, going through a series of interviews, and ending with employment offers, this graphic deliver a thorough summary of conversion rates at every phase. Potential areas for improvement in the recruiting funnel may be found by recruiters, enabling focused efforts to increase conversion rates and maximize the effectiveness of the hiring process as a whole...
Bookkeeper Enterprise Dashboards - A bookkeeper at a wholesaler plays a crucial role in maintaining the financial records of the business. Enterprise dashboards are powerful tools that can significantly enhance their efficiency and effectiveness in this role. Here's a detailed explanation of how a bookkeeper at a wholesaler might utilize enterprise dashboards: Financial Reporting and Analysis: Enterprise dashboards are instrumental in providing a comprehensive overview of the financial health of the wholesaler. They allow the bookkeeper to generate reports on key financial metrics like revenue, expenses, profits, and cash flow. This enables them to make informed decisions and advise management on financial matters...
Municipal Department Metrics - The Municipal Department of Building Permits and Inspections typically employs various key performance indicators (KPIs) and metrics to evaluate the efficiency, effectiveness, and compliance of its permitting and inspection processes. These metrics help assess the department's performance in managing construction activities, ensuring regulatory compliance, promoting public safety, and supporting economic development. Here are some common KPIs and metrics used by such departments...
Obstacles to Deploying Web Based Dashboards - Deploying web-based dashboards can be a complex process that involves various challenges and obstacles. Some of the top obstacles to deploying web-based dashboards are: Data integration and connectivity: One of the primary obstacles is connecting and integrating data from various sources into the dashboard. This may involve dealing with different data formats, APIs, databases, and data transformation processes. Data quality and consistency: Ensuring data quality and consistency can be a significant challenge. Data may have missing values, inconsistencies, or errors, which can affect the accuracy and reliability of the dashboard. Cleaning and validating data is crucial to maintain the integrity of the information presented...