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.

Similar Messages

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

  • JMS paging store - what is difference between bytes and messages threshholds?

              You can activate and configure both "bytes paging" and "message paging". What
              is the difference? Why use one or the other or are both required?
              Thanks,
              John
              

    Hi Mr. Black,
              Cool name.
              Message paging is based on number of messages. Bytes paging is based
              on the size of message payload (properties, body, corr-id, and type),
              where the payload does not include the header size. One can set
              either or both -- if both are set, paging kicks in as soon
              as the first threshhold is reached.
              As for which one to use, you may wish to set both. The former
              accounts for large numbers of small messages, and the latter
              handles large messages. (eg 1000 small 10 byte messages
              will charge 10,000 bytes toward quota but actually use up
              128,000 bytes of JVM memory once the header is thrown in...)
              Tom
              John Black wrote:
              > You can activate and configure both "bytes paging" and "message
              paging". What
              > is the difference? Why use one or the other or are both required?
              >
              > Thanks,
              > John
              

  • What is difference between transport protocol and message protocol

    what is difference between transport protocol and message protocol
    please give definition and small explanation

    Hi,
    Transport protocol gives information about outside of message details, kind of system, security details.
    A transport protocol is a network protocol that has the capability of transferring some payload from one node to another, thus providing some level of transparency from the underlying network.
    Transport protocols are used as a mechanism to move payloads around a network. Typically, a payload will have a transport binding associated with it. For example, SOAP (acting as a payload) has a predetermined binding for HTTP (a transport protocol).
    Some common transport protocols include: HTTP, HTTP-R, SMTP and BEEP.
    Message protocol gives you an idea of message type XI payload
    http://help.sap.com/saphelp_nw04/helpdata/en/b6/0b733cb7d61952e10000000a11405a/content.htm

  • Mail attachment: difference between script and app bundle?

    Hiya Folks,
    I am trying to make an application in Applescript that will receive a file, then create a new email (in Mail.app) with that file attached. I would prefer it to be an app, rather than a script when it's finished. I have a script that appears to work.
    This simple script will put up a Choose File window asking for a file, then bring Mail to the front and create a new message, with the selected file attached (it won't send it). For debugging, I made a dialog box pop up showing the path to the file selected:
    -- begin script
    set OpenedFile to choose file
    display dialog "OpenedFile: " & OpenedFile
    tell application "Mail"
    activate
    set newMessage to make new outgoing message with properties {subject:"Subject", content:"Content"}
    tell newMessage
    set visible to true
    tell content
    make new attachment with properties {file name:OpenedFile} at after the last paragraph
    end tell
    end tell
    end tell
    -- end script
    So I tried to make that into an app onto which I could drag n drop a file, and have Mail make a new message with that file attached. Try saving this following script as an Application or an Application Bundle:
    -- begin script
    on open OpenedFile
    display dialog "OpenedFile: " & OpenedFile
    tell application "Mail"
    activate
    set newMessage to make new outgoing message with properties {subject:"Subject", content:"Content"}
    tell newMessage
    set visible to true
    tell content
    make new attachment with properties {file name:OpenedFile} at after the last paragraph
    end tell
    end tell
    end tell
    end open
    -- end script
    Run the first script as a script, and it works as advertised. Drag a file onto the second script saved as an app, and the message is created, but no attachment.
    Note that the path displayed in the pop-up is the same for both scripts.
    Anybody know what I'm doing wrong?
    Thanks for your help,
    Drewstre

    on open (dragged_items)
    my handleFiles(draggeditems) -- Send selected items to custom handler.
    end open
    on handleFiles(localItems)
    tell application "Mail" -- Use terms of 'Mail'
    activate -- Launch 'Mail'.
    -- Add text to 'Subject' and 'Message' fields.
    set newMessage to make new outgoing message with properties {subject:"Subject", content:"Content"}
    tell newMessage -- Set focus to 'newMessage'
    set visible to true -- Make message visible.
    repeat with i in local_Items -- Cycle through the dragged items, adding each to new message.
    tell content to make new attachment with properties {file name:i} at after the last paragraph
    end repeat
    end tell
    end tell
    end handle_Files
      Mac OS X (10.4.4)  

  • 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

  • Difference Between Transport and message protocols in XI

    Hi,
        Can u please explain with some example , Difference Between Transport and message protocols in XI.
    thanks
    dhanush

    Hi dhanush,
    This two can have different attributes which were assigned in the adapter metadata. Please see this help for some info on this:
    http://help.sap.com/saphelp_nw04/helpdata/en/79/e462405c910272e10000000a155106/content.htm
    Go to SAP BASIS 6.40 or 7.00 software compoenent and open namespace http://sap.com/xi/XI/System. Go to Adapter objects and open Adapter metadata. Then open any adapter. Here you can see all the properties of your adapter which support.
    Transport protocol gives information about outside of message details, kind of system, security details.
    A transport protocol is a network protocol that has the capability of transferring some payload from one node to another, thus providing some level of transparency from the underlying network.
    Transport protocols are used as a mechanism to move payloads around a network. Typically, a payload will have a transport binding associated with it. For example, SOAP (acting as a payload) has a predetermined binding for HTTP (a transport protocol).
    Some common transport protocols include: HTTP, HTTP-R, SMTP and BEEP.
    Message protocol gives you an idea of message type XI payload
    http://help.sap.com/saphelp_nw04/helpdata/en/b6/0b733cb7d61952e10000000a11405a/content.htm
    Regards
    Biplab
    <b><i>
    note:reward with points if helpful</i></b>

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

  • Difference Between Data type and message type

    Hi,
        i have doubt on data type and message type.why we are mapping the message type why not data type?wht is the difference between data type and message type?

    Hi Narayanana,
    Data type defines the structure of your xml message.Message type is the wrapper of data type.You will be using your message type while mapping and not the data type.Its the abstraction concept used in oops
    kanan thiyam  
    Posts: 28
    Questions: 7
    Registered: 1/8/07
    Forum points: 24 
       Re: What is deffernce b/w Data type and message type  
    Posted: Jun 13, 2007 8:05 AM    in response to: suresh k         Reply      E-mail this post 
    Hi Suresh,
    Data Type defines the structure of the message and it will be wrapped under Message Type.
    Hope the details below will clearify your doubts.
    A data type in a programming language is a set of data with values having predefined characteristics. Examples of data types are: integer, floating point unit number, character, string, and pointer.
    The characteristic of columns and variables that defines what types of data values they can store.
    Check out the details:
    http://en.wikipedia.org/wiki/Data_type
    A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type:
    Details:
    http://help.sap.com/saphelp_nw04/helpdata/en/2d/c0633c3a892251e10000000a114084/content.htm
    kanan

  • Difference between IDOC Type and Message Type

    Hi, please let me know the difference between IDOC type and Message Type?
    Thanks

    Hi,
    Message type is business name for IDOC you are sending hiding all technical details of the IDOC.
    IDOC type gives more technical information about structure of the IDOC.
    You will be linking IDOC type to message type while processing IDOC in runtime.  You will be specifying message type and IDOC type in WE20 trasaction which says which message will go to which partner whether it is outbound or inbound.
    Best Regards,
    Krishna

  • Differences between Issue and Message?

    Hi all,
    Can anyone know the exact difference between issue and message? 
    In testing perspective, which one should we post?
    Regards,
    Vijaya Bhaskar

    Hi Vijaya,
    The difference starts in the concept.
    Issues are meant to handle project problems, like lack of human resources, lack of expertise, go-live strategy decision, that is all problems that are mainly linked to a managerial decision/order and can have impact on business.
    Messages are meant to handle system problems, like printer not working, message error when saving a purchase order, lack of authorizations,etc.
    Because of these differences, also the funcions available for each one and the workflow will be different.
    Hope this could make this more clear to you.
    Regards,
    Val

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

  • JSP - LoadBundle and Component Error in Visual Design Editor

    Hi.
    I've tried to make simple international JSF application. So the first thing to do was to externalize strings from JSP to resources. According to instructions from Java Studio Creator Field Guide Chapter 13:
    http://developers.sun.com/members/promo/jscreator/bookshelf/fieldguide2_preview_13_customizing.pdf
    I added LoadBundle component to my JSP page:
    <f:loadBundle basename="myApp.Bundle" var="messages1"/>
    and set a text property of label component like this:
    <ui:label binding="#{Page1.label1}" id="label1" labelLevel="1"
    style="position: absolute; left: 144px; top: 48px; width: 240px; height: 24px" text="#{messages1.title}"/>
    There is a line in myApp.Bundle.properties file:
    title = Title from resource bundle
    After changing text property of label component to #{messages1.title} I've got a message:
    Component Error
    Cannot display label component in the Visual Design editor.
    Error message from the component: javax.faces.el.PropertyNotFoundException: Error testing property 'title' in bean of type null.
    Exception message:
    javax.faces.el.PropertyNotFoundException: Error testing property 'title' in bean of type null
         at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
         at com.sun.rave.web.ui.faces.UIComponentPropertyResolver.getType(UIComponentPropertyResolver.java:298)
         at com.sun.rave.web.ui.faces.DataProviderPropertyResolver.getType(DataProviderPropertyResolver.java:264)
         at com.sun.jsfcl.data.ResultSetPropertyResolver.getType(ResultSetPropertyResolver.java:141)
         at com.sun.rave.jsfsupp.container.DesignTimePropertyResolver.getType(DesignTimePropertyResolver.java:169)
         at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
         at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
         at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:350)
         at com.sun.rave.web.ui.renderer.ValueHolderDesignTimeRenderer.encodeBegin(ValueHolderDesignTimeRenderer.java:59)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
    The same problem appears when I open example project from this book:
    Login2I18N-Alt
    It is a bug or am I doing something wrong?
    greatings
    znienacka

    go to Tools/Update Center and download the latest
    version of the components. It will solve the
    problem.Thanks, it works. But there is still one drawback - Visual Designer doesn't show any text inside label. If I remove all strings from JSP to resource file I will get an empty page!
    Is there any solution of this problem?
    znienacka

  • Locale. Can't get it to load Message Bundle

    Have specified two properties files
    default en, supported es in faces.config.xml.
       <application>
         <locale-config>
           <default-locale>en</default-locale>
           <supported-locale>es</supported-locale>
         </locale-config>
       </application>Using IE7. Added es-ES as supported language (at top of list). Tools>IE Options>Languages.
    No luck
    Tried to force issue by setting locale in <f:view locale="es">
    Still not picking up the properies.messages.es file.
    Stays at default properties.messages
    I have used the following tag
    <f:loadBundle basename="com.apress.jsf.messages" var="msgs">
    Tags appear in this sequence in page:
    <f:view locale="es">
    <f:loadBundle basename="com.apress.jsf.messages" var="msgs" />
    Is this the problem?
    Or is this broken in JSF

    Have also tried removing loadbundle and modifying faces.config.xml
       <application>
         <resource-bundle>
           <base-name>com.apress.jsf.messages</base-name>
           <var>msgs</var>
         </resource-bundle>
       </application>Even when view specified es, still not working..
    Once thing I've noticed about IE language support is it shows as es-ES.
    Does my properties.messages file have to have a .es-ES suffix instead of just es?

  • 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