Java message bundle format date - Help

Hi, I use that MessageSource.java:
String description = getMessageSource().getMessage(msgCode, msgParams, ApplicationLocales.DEFAULT_LOCALE);
where msgParams is Object[]{myDate}
and msgCode is what I have in my .properties file...
for example:
customer.create.message=New customer has been created, date: {0}
myDate can have different formats (with date and without it): like 2005-10-10 14:00
If it doesn't have hours, the {0} should manage it and the description shouldn't have the nonsense 0:00 time (it happens, if date is without hours)
I know that i should write something to {0} but thats the question. Maybe someone has better knowlegdne of this technique?

I've gathered info from about 5 different links. Do u
know some good tutorial covering formatting data in
details?Formatting dates is quite well-documented in the API docs (links from reply 1)
You can check DecimalFormat for numeric data, or ChoiceFormat for formatting a range of numbers.
There is also a tutorial from Sun about formatting.
Hope it helps.

Similar Messages

  • Canceling or removing the $10 messaging bundle

    So a couple weeks ago I used a 10 dollar message bundle card, yesterday i added a $15 verizon refil card to my cell phone and the amount that showed up was only 5 dollars, i want my full $15 on my acount and the messaging bundle removed. HELP ME PLEASE!!!!!

    You probably need to call prepaid CS to see if they can correct the issue.  You can dial *611 from your prepaid handset to reach them.

  • Formatting dates in a table in webdynpro java for mutliple entries.

    Hi all,
    I have a requirement to format date values in a table for multiple entries to dd/MM/yyyy format in webdynpro java for mutiple line items in that table.
    Please help me out with the technique for the same.
    Thanks and Regards,
    Soumyadeep.

    Hi,
    here is the code for changing the formatting the date.
    Date currentDate = new Date ();
                DateFormat df =  DateFormat.getDateInstance(DateFormat.SHORT);
                String today = df.format(currentDate);
                SimpleDateFormat sdfInput = new SimpleDateFormat("dd/mm/yyyy");
                SimpleDateFormat sdfOutput = new SimpleDateFormat ("mm/dd/yyyy");
    try {
                      String dateft = sdfOutput.format((Date) sdfInput.parse(df.format(currentDate)));
                } catch (ParseException e) {

  • I upgraded from mountain lion to the OS X Mavericks and my EndNote X5 can not open.I re-installed but cannot open. I keep on getting the message "Unable to load EndNote X5: Applications/EndNote X5/EndNote X5.app/Contents/Encore.bundle" can anyone help?

    I upgraded from mountain lion to the OS X Mavericks and my EndNote X5 can not open.I re-installed it but cannot open. I keep on getting the message "Unable to load EndNote X5: Applications/EndNote X5/EndNote X5.app/Contents/Encore.bundle" can anyone help?

    Please take each of the following steps that you haven't already tried. Test after each one. Back up all data before making any changes.
    1. Make sure that the right volume is selected in the Startup Disk preference pane.
    2. Disconnect all wired peripherals except those needed to start up. If there's no change, reconnect them
    3. Reset the System Management Controller.
    4. Reset the PRAM.
    5. Start up in safe mode, then restart as usual. If you can't start in safe mode—for instance, if FileVault is active—then triple-click anywhere in the line below on this page to select it:
    /var/folders
    Right-click or control-click the highlighted line and select
              Services ▹ Reveal
    from the contextual menu. A Finder window should open with an item named "folders" selected. Move the selected item to the Trash. You'll be prompted for your administrator password. Restart and empty the Trash.

  • How to send response message from Java mapping class? Please help!

    Hi Experts,
      I have a sync scenario
              -Req-->  -
    >
    SOAP           XI       RFC
              <Res--     <-----
      The Req message contains:
      <Order>
           <Orderid>100</Orderid>
           <Desc>Extrenal Order</Desc>
           <Qty>2500</Qty>
      </Order>
      Response message is:
      <Log>
         <LogTxt>Qty value cannot be more than 3 chars</LogTxt>
      </Log>
      In the XI I have to validate the input request message using a schema. For this I am writing a java mapping program using aii_map_api.jar.
    My requirement is that If the input message schema validation fails then I want to send a response message back to sender.
      How can I send a response message back to the sender in java mapping program?
    Kindly help with sample code example.
    Thanks
    Gopal

    Hi,
    First, I think PI 7.1 has this functionality and perhaps it comes in a SP for PI 7.0 and XI 3.0.  So first have a look at that before creating custom development.
    Second, if you use the java mapping, you will only have access to a request or response message.  I would advise using a custom java module in the module processor and insert this message in the sender communication channel.  This will allow you to validate request and send a response.
    Regards,
    Yaghya

  • Localized Data Model Message Bundle

    When you use the Validations in the Entity Objects of a data model and you place text for the text, errors, etc...it creates a MsgBundle for that class. Then for other languages you can create additional message bundle (e.g. MsgBundle_it, for italian) files for additional languages.
    My question is how does the data model layer find the locale for the user? So when it issues a data model validation error, how does it know to use the italian version instead of the default, english one?
    Also, I should add that I don't have access to the FacesContext and my Data Model project cannot be dependant on the ViewController object. So I cannot get the locale in the same fashion that I'm doing for my applications (i.e. get translated text for adf faces messages).
    Message was edited by:
    Kerri

    Hi Heri,
    the system behavior is correct. The account in company code consists of three entity types:
    1) COA - Chart of Accounts (Type 3)
    2) ACCOUNT - Account (A-Segment, related to ECC table SKA1, Type 1)
    3) ACCCCDET - Account in Company Code (B-Segment, releated to ECC table SKB1, Type 1).
    3) includes 1) and 2) whereas 2) includes 1). If you grant authorization only for 3) but not for 1) and 2), you cannot do anything.
    Best regards
    Michael

  • Just installed OS Yosemite, and now I can't open Illustrator CS6. Asks me to update my Java, but I check and my Java is up to date. Please help!

    Just installed OS Yosemite, and now I can't open Illustrator CS6. Asks me to update my Java, but I check and my Java is up to date. Please help!

    Some people have reported reinstalling the Apple 2014-001 Java update has helped.
    See thread 7 here  Illustrator CC 2014 crashes on startup after Yosemite 10.10 upgrade today.

  • Help writing HTML formatted data to JEditorPane multiple times

    I have problems writing data to a JEditorPane more than once. The first time, it works, but the 2nd, 3rd, and so on, the data that is displayed is corrupt. This is where I print the data:
                   ResultsDisplay.getEditorKit().createDefaultDocument();
                   ResultsDisplay.setText(inputStore.toString());There seems to be something wrong with the way I display the data. What do I have to do to change HTML formated data that is printed to an JEditorPane?
    This is how I set up the JEditorPane:
         javax.swing.JEditorPane ResultsDisplay = new javax.swing.JEditorPane();
         JScrollPane ResultsDisplayScrollPlane = new JScrollPane(ResultsDisplay);
         HTMLEditorKit htmlEdKit = new HTMLEditorKit();and
              ResultsDisplay.setEditable(false);
              ResultsDisplay.setEditorKit(htmlEdKit);
              ResultsDisplay.setContentType("text/html");
              ResultsDisplay.setEditorKitForContentType("text/html", htmlEdKit);
              getContentPane().add(ResultsDisplayScrollPlane);
              ResultsDisplayScrollPlane.setBounds(50,50,700,450);Am I doing anything wrong here? Why can I only write the data once during the Applet's run life?

    Hi again,
    Does anyone have experience writing to a JEditorPane multiple times during the run-life of a Applet? When I first send the data, it is displayed correctly. But everytime after that, the data is corrupted. My data is written in tables (in HTML format). The second time I write to the JEditorPane, it only displays the first of my tables, and only displays the collumn names and in the last column it displays the first row of data squeezed into the last column name's cell. If I run a third time, it takes this old table and adds a new table from the third run. With the fourth run I end up with 3 tables each containing only one row with the column names and the 1st row of data squeezed into the last collumn name cell.
    Can anyone help? I've already tried creating a new document as described in the JEditorPane's API.

  • Date format ! Help me !

    My XML data have date format like:
    <INVOICE_DATE>20-JAN-06</INVOICE_DATE>
    I want to change date format to: '20/01/2006'
    In my rtf template, I tried some way in the user guide to do date format
    I. Using the Microsoft Date Format Mask. To apply a date format to a form field:
    1. Open the Form Field Options dialog box for the placeholder field.
    2. Set the Type to Date
    3. Select the appropriate Date format from the list of options "dd/MM/yyyy"
    II. Using the Oracle Format Mask
    <?format-date:INVOICE_DATE; ’dd/MM/yyyy’?>
    III. Using the xdofx function
    <?xdofx:to_date( INVOICE_DATE, ’dd/MM/yyyy')
    But all the way i did date format is not work !
    Anyone help me to change date format '20-JAN-06' to '20/01/2006' ?
    Thanks !

    The Data should be canonical Data Format to format the date in RTF Template.
    "YYYY-MM-DD";
    "YYYY-MM-DD\"T\"HH24:MI:SS.FF3TZH:TZM";
    "YYYY-MM-DD HH24:MI:SS";
    Sample :
    - <TEST>
    <p_hiredate>1981-09-08 00:00:00.0</p_hiredate>
    - <LIST_Q_query>
    - <Q_query>
    <EMPNO>7844</EMPNO>
    <ENAME>TURNER</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>1981-09-08T00:00:00.000-07:00</HIREDATE>
    <SAL>1500</SAL>
    <COMM>0</COMM>
    <DEPTNO>30</DEPTNO>
    </Q_query>
    </LIST_Q_query>
    </TEST>

  • Here is the message I got from the red "i" message... please help.The backup disk image "/Volumes/Data/Lisa's MacBook Pro.sparsebundle" is already in use.

    Here is the message I got from the red "i" message... please help.The backup disk image “/Volumes/Data/Lisa’s MacBook Pro.sparsebundle” is already in use.

    http://pondini.org/TM/C12.html

  • Convert milliseconds to formatted data in JAVA

    hi all,
    i want to convert my time in milliseconds to HH:MM:SS:sss format ,
    i use ;
    Date date = new Date(timeInMills);
    SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss:SSS");
    String s = sdf.format(date.getTime());
    but it gives me: 02:00:00:150 instead of 00:00:00:150
    i think it is about the TimeZone. What can i do to prevent this.?

    If you insist on doing it this way, then read the API docs for SimpleDateFormat, and the class(es) from which it inherits closely, as one of them contains a method for setting the timezone, which don't you think it would be a good idea to set the timezone to GMT/UTC rather than worrying about any local timezone effects?

  • Message bundle Please help !

    Hey Im trying to make the message bundle
      <application>
            <message-bundle>webadmin.MyErrors</message-bundle>
        </application>I would like to make another file "MyErrors2 and have it switch based on a variable in the controller.. is that possible?

    You might be able to do it using the fact that ResourceBundles may be actual classes; i.e. they do not have to be properties files.
    But, I am inclined to ask what is the problem you are trying to solve? I suspect you may be down the wrong path. Be broad in your description of the problem.

  • Need help for FM that converts RAW format data to xls format

    Hi all,
         I am able to get the data from the given spool number to be converted into 'RAW' format. I need to convert this data into Excel format nad want to send the mail as attachment.
         I want to know is there a Function Module that converts this RAW format data into the Excel format?
    regards,
    Brijesh Patel

    Hi,
    instead of that you can do this....
    once spool is generated you have spool number , using the spool number you can generate the excel file using the FM <b>RSPO_DOWNLOAD_SPOOLJOB</b>, pass the spool number, and filename as some.xls and then it will download it to xls file,
    Regads
    vijay

  • Sun Java Messaging Server help.

    I have currently running netsacpe messaging server on solris 7. I want to upgrade or change my mail server now. I am intrested in Sun Java Messaging Server 6.
    Here i have few questions in my mind.
    Will it only install on solaris 10 (linux not) ?
    Can I upgrade my NMS 4.1 and Solaris 7 into to SJMS 6 w / without solaris 10 ?
    If I seprate install it can I able to migrate my old NMS 4.1 into SJMS 6 ?
    And lastly Solaris 10 and SJMS are free or not (without commercial support) ?
    If all things goes in my favour then please point me to the right how-to or docs.
    Thanks for reading.

    Well i have started work on it. Two question more.
    1. Does whole JES is free to use without support or i
    need to purchase any component.No purchase of any kind is needed.
    >
    2. Is it possible to migrate NMS 4.1 directory server
    users by using ldif to this new directory server. Absolutely. It's even documented how to do it.
    check in the 5.2 documentation:
    http://docs.sun.com/app/docs/doc/816-6734-10
    As for anti-spam and anti-virus:
    Our engineers believe that they know how to build an excellent mail system. They make no claim to be experts at creaging spam or virus scanners.
    We do have, however, integration with SpamAssassin (free spam scanning), and it's quite easy to integrate Clam AV anti-virus (also free_.
    Why is our Messaging Server better than other products?
    First, it's the highest performance of all we've been able to test.
    Second, the mail server is extremely stable, and scales to systems holding up to a million mailboxes on a single hose. This reduces your cost of administration.
    Third. the system is higly resistant to crashing to the point you have a lot of downtime.
    Fourth, we go to extreme efforts to never loose a message
    >
    Thanks.

  • Message-bundle

    Hello,
    I have declared a message-bundle in my faces-config.xml :
    <message-bundle>resource.messages</message-bundle>But if I want to use this one in my JSP file, I have to declare the following tag :
    <f:loadbundle basename="resource.messages" var="bundle" />Isn't it possible to use the bundle declared in the faces-config.xml file without declaring a f:loadbundle tag in my JSP file ?
    So, is it possible to declare the message-bundle in the faces-config.xml as :
    <message-bundle id="bundle">resource.messages</message-bundle>...and use the #{bundle.key} in the JSP file ?
    Could someone help me please ?
    Thanks in advance.
    bgOnline

    I don't think you can automatically load message bundles into a JSP page without defining it with loadBundle.
    As for localization, JSF allows you to specify a resource bundle in your faces-config.xml file. This will allow JSF to load the appropriate message bundles defined by the users browser. You still have to include it with loadBundle if you want to access it via JSP. JSF also allows you to mess with these resource bundles programatically.
    Here's an example of the entry in your faces-config.xml file.
    <faces-config>
         <application>
              <locale-config>
                   <default-locale>en</default-locale>
                   <supported-locale>de</supported-locale>
              </locale-config>
              <message-bundle>
                   com.facesite.resource.MessageResources
              </message-bundle>
         </application>
    </faces-config>This will tell JSF that MessageResources.properties is the en (English) locale and to load this by default but it also tells JSF that you have a MessageResources_de.properties file that supports the German language which would be specified by the browser.
    Loading it into your JSP.
    <f:loadBundle basename="com.facesite.resource.MessageResources"  var="msg"/>The MessageResources.properties file is in the standard java.util.Properties format.

Maybe you are looking for

  • Where to see the standard Maps  in import manager ?

    hi to all                I am working on MDM 5.5 Import Manager i want to know where exactly we see the standard maps of employee,vendor,product,customer in order to import data from sapR/3 .

  • Address Book Images Gone Funky

    Adding images to Address Book contacts just results in a random part of the image showing. In iOS I can add images just fine, and they show up in Address Book ok. It's never done this before. Any ideas??

  • View archived renumeration data

    Hi friends, Does any one have an idea how to view archived renumeration statements data? We can view the payroll data from PC_PAYRESULT transaction code but customer needs to view archived renumeration statements data? Many Thanks for your time.

  • Request sending client to client with in single server

    hi i have created one request, how do i transport this request from one client to another client within  the same server i have created already 200 and 300 clients, now my question is , how to transport this customises request from 200 to 300 client

  • ITunes + iPod sync problems

    so, I plugged in my iPod last night for the first time since updating to 7.7 - a friend had already warned me there might be something wrong with the syncing, so I was a little bit apprehensive about it anyway. so, it found my iPod and started the sy