Generator Locales and Entity Message Bundles

I'm using 7 different languages within my application and have set the Internationalization entries within the JHeadstart Application Definition Editor to use a propertyFile and I have supplied all the relevant generator locales. That is all working fine. My confusion now lies with the generation of MsgBundles when creating validation rules on an entity attribute. On doing that a EntityImplMsgBundle java class is created but only for the default locale.
1. Is there an easy way to generate the different localised entity MsgBundles
2. better still, how can I change the entity validation to use my JHeadstart generarted property files rather than a MsgBundle java class ? I thought I may be able to copy the rule name and message over to my properties file and then delete the MsgBundle but I can't seem to delete the MsgBundle
Many thanks for your help. Cheers,
Brent

Brent,
1. No, you have to manually create those files
2. Not possible either, even if you do not use declarative validation but do it in code and throw a JboException, the message bundle must be a java class.
I believe that in JDev 11, you can have centralized resource bundles, like in JHeadstart.
You might try the JDev forum for better alternatives though, since these are really ADF BC specific issues.
Steven Davelaar,
JHeadstart team,

Similar Messages

  • 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

  • Message bundles accessed from JSF and JSP pages

    Hello, everybody!
    I'm developing a localized JSF application. It is working pretty well until now.
    These are my message files:
    mensagens.properties
    mensagens_en_US.propertiesThis is how they're configured in faces-config.xml:
    <application>
        <resource-bundle>
            <base-name>br.urca.www.biblioteca.web.mensagens</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>And this is how I access the messages in a page:
    <h:outputText value="#{msg.titulo}" />Nothing new until now. But now there was a need for me to have a raw jsp page in
    my web application. This page is displaying ok but I also need to access the
    message bundles as I'm able to access in the normal jsp with the JSF components.
    As you should know I can't use something like the above code with an +<h:outputText>+
    to access the messages because this is a JSF component and I'll not be able to use
    JSF components with this raw jsp page.
    So, my question is: how do I access my localized messages from a raw jsp page? I
    suppose there should be a way to do this, but unfortunately I started programming
    to the web world in Java with JSF, not JSP, so I don't know how to do this with
    JSP.
    Thank you very much.
    Marcos

    BalusC wrote:
    Just include [jstl-1.2.jar|https://maven-repository.dev.java.net/repository/jstl/jars/] in your classpath and define the fmt taglib in your JSP. Nothing more is needed.
    Hello, BalusC. Thank you for your help. We're almost there. After I have included the jstl-1.2.jar you provided me I can use the fmt tag and access message bundles from my raw jsp page (even though I had to provide other message bundles instead of the ones that I use in the other jsf pages, but it's better than nothing).
    Now there just on problem to be fixed. The jsp page is not aware when I change the locale of my application. I change this locale in a jsf page.
    I have this component:
    <h:selectOneMenu value="#{pesquisaAcervo.idiomaAplicacao}"
        valueChangeListener="# {pesquisaAcervo.idiomaAplicacaoMudado}" onchange="submit();">
        <f:selectItems value="#{pesquisaAcervo.idiomasAplicacao}" />
    </h:selectOneMenu>that calls this event in my backing bean class:
    public void idiomaAplicacaoMudado(ValueChangeEvent e)
        fIdiomaAplicacao.liberarItens();
        Idioma idioma = Idioma.deString(e.getNewValue().toString());
        // This line is for JSF
        FacesContext.getCurrentInstance().getViewRoot().setLocale(idioma.localidade());
        // This line is for Tiles
        FacesContext.getCurrentInstance().getExternalContext().getSessionMap().
            put(org.apache.tiles.locale.impl.DefaultLocaleResolver.LOCALE_KEY, idioma.localidade());
    }So, do I have to include another line in the idiomaAplicacaoMudado event above in order for the jsp page load the correct resource bundle? Or what else do I have to do?
    Thank you.
    Marcos

  • .99 cent plan and messaging bundle question

    all my friends have verizon and i only planned on texting so i got the basic plan(no fee) and the messaging bundle. now that ive really thought about it i want to get the 99 cent plan so i can talk to all my friends.
    so my question is,
    if i have the 99 cent plan will it only charge me on days i CALL people OR will it charge me 99 cents even if i only text that day even though i have the messaging bundle(10 dollars a month)?

    I have been a prepaid person for 10 yrs and have had verizon prepaid for 2 yrs. I have the core plan which is the 99 cent plan, you can take my word for this you only get charged 99cents when you make a phone call or receive a phone call, it does not have anything to do with texting, texting is considered Data, the phone is considered Voice,  so in answer to your last question
    i got 2 differant answerd so i dont know which one is right.
    ok so say i buy a 15 dollar card. they take the 10 dollars for the messaging bundle. this leaves me with 5 dollars.
    the first day i call someone and get charged the 99 cent fee. now im left with 4.01 dollars. the second day i DO NOT call anyone, BUT i text my friends, will i still be charged the 99 cent daily access fee even though i have the messaging bundle?
    If you use a 15 dollar card and take the 10 dollars for the messaging bundle that leaves you with 5 dollars and if you make a cell call or receive a cell call your balance would be 4.01 it does not matter how many texts you send or receive as long as you have a text pkg. the balance would still be 4.01 and the end of your 30 days as long as you don't make or receive another cell call.  I use the 30 dollar card because you get 90 days for 30 dollars and with the 10 dollar text pkg if you don't make any phone calls you get 90 days of texting. Its like getting one month free, 15 dollars every 30 days would come to 45 dollars,  Hope this answers all your questions.  A note about the core plan - remember if you call after 9:59 or on weekends you pay the 99 cents plus 10 cents per minute, That is listed  in your booklet and also on the prepaid plan for the Core (99 cent plan)

  • 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.

  • Assign message bundle jdeveloper oracle adf entity

    how do you assign a message bundle in jdeveloper 10g for an oracle adf entity

    When you open the entity dialog, select a attribute, open the control hints tab and add some labels, formats, tooltips, JDev creates a messagebundle for you in the common package. Same for the viewobject dialog.
    hth, Markus

  • F:loadBundle and message-bundle difference

    Hello I have one question:
    I have those lines in my faces-cofig:
    <locale-config>
    <default-locale>pl_PL</default-locale>
    <supported-locale>en_US</supported-locale>
    </locale-config>
    <message-bundle>pl.myCompany.crm.localization.application</message-bundle>           
    and this line is in every jsp file that use messages properties:
    <f:loadBundle basename="pl.myCompany.crm.localization.application" var="messages" />
    my questin is:
    Is there a possiblity to define only <message-bundle> in faces-config.xml and use properties in jsp files without defining f:loadBundle.
    I know that I can remove the message-bundle from faces-config .xml and everything works fine but in that case I have path to my resources file in almost evry jsp file in my app and this path could be changed in the future.
    Regards
    Tom

    Another question : how can I get the current Locale
    of the session context ?UIViewRoot#getLocale()
    Resource bundle is stored as a request scope variable of Map type.

  • Storing and Maintaining messages locally

    Once i receive all messages on my client (i currently get all folders and the messages they come with, and place them in a HashMap in the form of (Folder_Name,Messages[]), i want to store them locally so that the next time the client opens, it does not go through the whole process of fetching all messages again..
    So when the client starts again, it gets the messages from the disk and forms a new hashmap..Then if new messages are detected, retrieve them and place them in the hashmap again to be stored before the client closes. Is this an efficient way of doing it? Or is there any better way of achieving what i am trying to do here?

    If you want to store them on your local disk, the simplest thing would be to run an IMAP server
    on your machine and copy the messages into your local server. Or, use one of the local
    store providers and copy the messages there. There's several local store providers on the
    [JavaMail Third Party Products|http://java.sun.com/products/javamail/Third_Party.html] page.
    And it's a well kept secret (:-)) that there's a local store (mbox) provider in the JavaMail
    source code, which you might be able to get working. (It's currently only really been tested
    on Solaris.)

  • Display of RE: and FW: messages generated in mail.app

    II am the sole Mac user in a 100+ person company. (I run the company so IT tolerates me.) After receiving many complaints about unpredictable display of FW: and RE: messages sent from mail.app (leopard and snow leopard), I gave up and converted to Outlook '11. Hated it. Airplane pilots have fewer buttons, ribbons, etc., on their control panels. So, I'm back to Mail.app and newly determined to solve, or at least understand, the issue.
    Posting what I've discovered here in the hope someone can shed light on it or, better yet, fix it.
    What I discovered is that a message with embedded graphics in it (e.g., a company logo .gif embedded in a signature) generated in mail.app will display very differently in different email clients and settings.
    In iphone (iOS 4) the message renders perfectly. No issue.
    In Mail.app received via exchange, the message also appears to render perfectly. No issue.
    However, it's a different story in Outlook '08 for Windows and '11 for Mac) BUT ALSO in Mail on the iPad. AND also if the message is viewed from the sent items folder in the very application (Mail.app) in which it was created. Here's what happens.
    Text before the embedded image is rendered correctly. But after that, everything is displayed as an attachment. The embedded image is displayed an attachment. So too is any text that follows it. (ATT0001.htm). If there are multiple embedded images with text in between them, you'll get a string of attachments (image001.gif, ATT0001.htm, image002.gif, ATT0002.htm, etc.)
    (Note that I have already done everything I know to make things clean and windows friendly. Mail.app is set to windows friendly attachments. Iconizer is installed. Mail.app is also set to send re: and fw: messages at the same level to avoid formatting issues different levels might create. )
    I'm not a coder, but I did take a look at the source code. What I noticed is that mail.app treats a message with embedded graphics very differently than one without. A message with just text (even when sent as HTML format) is just text. A message with embedded graphics has the first bit (before the first graphic) as text, then the first graphic, then, the next bit of text is an HTML file, and so on. Apparently, mail on the iphone can recognize this and render properly. Not so others. The question is why Mail turns text bits into HTML files this way?
    Now, the good news is, having isolated the problem, I've solved most of it by simply eliminating embedded graphics (including a logo in my signature) from my emails. Still, I often forward or re: to long strings that do include these graphics. Not so good.
    Thoughts?

    IMO, if you want to send magazines, then e-mail isn't the vehicle. Better to create PDF files and send them as attachments. This problem you're running into has to do with poorly followed standards in all those e-mail clients and attempting to send magazines as messages. Stick to plain text and there aren't any issues. Just my

  • Mountain Lion Mail randomly deletes messages: locally and from server

    Hello,
    Mountain Lion Mail deletes mails randomly, locally and from the IMAP server.
    I have confirmed this for a fact:
    - I have been forwarded lost mails to another (webmail) account: the timestamps indicate that some mails were lost somewhere before I ever saw them on Mail
    - my mail service provider confirmed that their logs show mails that I never saw on Mail
    - the lost mails don't appear via webmail, either, i.e. they're not on the server
    Others are experiencing the same in Lion:
    http://www.seifi.org/email/lion-mail-app-deletes-imap-emails-without-notice-gmai l-important-fix.html
    https://discussions.apple.com/thread/3206902
    I became aware of this as my customer referred on the phone to messages from them that I had never seen. And, Mail deletes messages randomly from the IMAP server too - it's literally eating messages!
    No, this is not a rule issue. No, this is not anything I could have done to cause. This should be evident as very many others are experiencing the same (see the above links).
    This is the worst bug I've ever encountered in any Apple product.
    Apple need to acknowledge this and address it, like, immediately.
    Is there a fix for this? One that works 100% - I really can't risk not receiving business e-mail.
    br Janne

    I'm experiencing something similar. I see a message being received in Mountain Lion via notification. When I'm going to look for this mail, it's gone.
    I dont't have any rules set up and no mail plugins installed. The mail is also vanished from the server. I'm using IMAP on my own web-site (via a service provider). I was able to verify, that a certain message from a certain sender dissapeard, which had a PDF attached. I thought it might have something to do with my ISPs virus protection, but they a) insured me, that they don't delete any mail and b) I got a new mail from someone I don't know this morning. Again: Saw the notification, afterwards the mail is gone.
    For now, I will switch to ThunderBird (this was also the recommendation of my ISP).
    Kind regards
    Marco Heine

  • Message Bundle class not found

    Hello,
    i'm using JDev 10.1.3.3, and creating ADF BC application. When i've created the jspx page, went to it's Page Definition, and in Structure editor tried to add the Message Bundle file to this page - selected the "Generate Resource Bundle" from the context menu - i'm getting error "Class ...app_XXXPageDefMsgBundle not found" .
    Other pages in application got the same error.
    How can i solve this problem?

    And in the same time, Message Bundle classes for Entity Objects (XXXRowImplMsgBundle.java) are generating well, without any errors.

  • How to use the same services-config for the local and remote servers.

    My flex project works fine using the below but when I upload my flash file to the server I doesn't work, all the relative paths and files are the same execpt the remote one is a linux server.
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
        <services>
            <service id="amfphp-flashremoting-service"
                class="flex.messaging.services.RemotingService"
                messageTypes="flex.messaging.messages.RemotingMessage">
                <destination id="amfphp">
                    <channels>
                        <channel ref="my-amfphp"/>
                    </channels>
                    <properties>
                        <source>*</source>
                    </properties>
                </destination>
            </service>
        </services>
        <channels>
        <channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://localhost/domainn.org/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>
        </channels>
    </services-config>
    I think the problem  is the line
            <endpoint uri="http://localhost/domainn.org/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
    but I'm not sure how to use the same services-config for the local and remote servers.

    paul.williams wrote:
    You are confusing "served from a web-server" with "compiled on a web-server". Served from a web-server means you are downloading a file from the web-server, it does not necessarily mean that the files has been generated / compiled on the server.
    The server.name and server.port tokens are replaced at runtime (ie. on the client when the swf has been downloaded and is running) not compile time (ie. while mxmlc / ant / wet-tier compiler is running). You do not need to compile on the server to take advantage of this.
    Hi Paul,
    In Flex, there is feature that lets developer to put all service-config.xml file configuration information into swf file. with
    -services=path/to/services-config.xml
    IF
    services-config.xml
    have tokens in it and user have not specified additional
    -context-root
    and this swf file is not served from web-app-server (like tomcat for example) than it will not work,
    Flash player have no possible way to replace token values of service-config.xml file durring runtime if that service-config.xml file have been baked into swf file during compilation,
    for example during development you can launch your swf file from your browser with file// protocol and still be able to access blazeDS services if
    -services=path/to/services-config.xml
    have been specified durring compilation.
    I dont know any better way to exmplain this, but in summary there is two places that you can tell swf  about service confogiration,
    1) pass -services=path/to/services-config.xml  parameter to compiler this way you tell swf file up front about all that good stuff,
    or 2) you put that file on the webserver( in this case, yes you should have replacement tokens in that file) and they will be repaced at runtime .

  • How to specify multiple message bundles in faces-config.xml

    Hi
    I have different properties file which I want to use as message bundle.
    Message.properties
    Help.properties
    When I specify this in faces-config.xml
    <application>
    <message-bundle>/Message</message-bundle>
    <message-bundle>/Help</message-bundle>
    </application>
    and now when I try to use that in my jsp page like this
    <f:loadBundle basename="/Message" var="message"/>
    <f:loadBundle basename="/Help" var="help"/>
    and access any messagestring from those files I can not excess either of them. But when I use only one of them it works fine.
    Am I doing something wrong or I can not do this thing at all??
    Thanks in advance.

    I only specify one properties file in the <application> tag. That one is used for system messages. I have other properties files for labels, and another for just standard app text, so in my faces-config.xml I have something like this:
    <application>
    <message-bundle>message</message-bundle>
    <locale-config>
    <default-locale>en</default-locale>
    </locale-config>
    </application>
    where my message.properties is used for system messages (validation, etc).
    I don't list the other property files there. I have two more that I use, labels_en.properties, and standard_en.properties. Labels are words that have a : at the end or a *: for required fields. Standard are just other words that I use in my application. So on every page that I have, I start out with the following header:
    <html>
    <f:view locale="en_US">
    <head>
    <f:loadBundle basename="label" var="label"/>
    <f:loadBundle basename="standard" var="standard"/>
    <title>
    .....

  • Locale and language

    I am having trouble getting locales and languages to work as I would expect them to. I have created a tiny application (I'm a faces newbie still) and a bunch of localization files:
    message.properties
    messages_en.properties
    message_fr.properties
    messages_en_GB.properties
    I add all of these languages to the faces-config.xml file setting the en_GB to be the default. When I set my browser to en_GB it picks up the file as I would expect. When I set it to fr I get the french version but I have to restart the server (Tomcat 5.0.18 running under Netbeans) to make it switch over. I would have thought that since the browser is now sending up a different locale faces would just switch automatically to using a different bundle without a restart but it seems to remember some how. This may be due to the incremental redeploy into tomcat but I'm not convinced as the behaviour is unpredictable.
    What I am also confused about is the way defaults are dealt with. In the Core JavaServer Faces book it says that the base properties file will be used if a matching language resource can't be found. My observation is that it uses the default specified in the faces-config file. Is this right?
    I'm also curious to know what happens when a non-exact match is sent up. For instance which resouce bundle, of the four listed, would be chosen if a browser specified en_US?
    Thanks

    I had this problem this week. I guess this is a problem with Netbeans and Tomcat. When Netbeans detects your system language (LANG environment variable in Linux, for instance), its bundled Tomcat "sticks" with this locale and can't change it. If you try to run it with an external Tomcat, it may work.

  • How to generate localized chars using code point in Solaris 10?

    Hi All,
    Do enybody know how to generate localized chars (for example Japanese) using code points in Solaris 10?
    Like in the following web page:
    http://www.isthisthingon.org/unicode/index.phtml
    Unicode, shift-jis
    U+4e2f 87a3 �N
    U+4e3b 8ee5 ��
    U+4e3c 98a5 �S
    U+4f5c 8dec ��
    Thanks,
    Daniel

    I have found a "Code Point Input Method" tool in the following page:
    http://java.sun.com/products/jfc/tsc/articles/InputMethod/inputmethod.html
    Using this tool user can enter hexadecimal code point and the output is some char.
    But this tool doesn't work. I run this in the follwoing way:
    # java -jar CodePointIM.jar
    After this error message appers:
    Failed to load Main-Class manifest attribute from
    codepointim.jar
    If anybody could help I will be appreciate.
    Regards,
    Daniel

Maybe you are looking for