Struts internalization for javascript messages

Hi ALL,
I am doing an internalization to my struts application... i am using property files for each language (say for example, english, french.. etc,) ... i can get the labels, messages to the struts fields, other texts..
but how to interact the javascript messages? i don't know how to implement those messages for javascript...,
please advise me
Thanks
Logu

The javascript message is just template text printed onto the page right?
So how is it different in concept from any other label?
You may need to escape the messages for javascript (quotes etc etc) but on the whole you can apply the same i18n principles as you do elsewhere.
ie
// instead of this
<script>
alert('You did a bad thing');
</script>
// something like this
<script>
alert('<fmt:message key="badThing"/>');
</script>

Similar Messages

  • Constraints / limitations of af:message for inline message display ?

    Using JDev 11.1.1.3; reading the help content, it seems very simple to drop an af:message component onto the page, and associate with a component for validation message display. Trying it inside a popup belonging to a jspx page works fine, but when I try and use it inside a popup contained within a bounded task flow / fragment, the validation framework appears to be ignoring the message component, and using the balloon hint message display instead. Thinking maybe the For/edit property selection isn't properly handling the nesting of components, I've located the message components closer/next to the source component, but no change ...
    <af:panelFormLayout id="pfl2" labelAlignment="top">
    <af:panelLabelAndMessage id="pgl3" label="#{bindings.CtFlag.label}">
    <af:panelGroupLayout id="pgl5" layout="horizontal">
    <af:selectOneRadio value="#{bindings.CtFlag.inputValue}" required="#{bindings.CtFlag.hints.mandatory}"
    shortDesc="#{bindings.CtFlag.hints.tooltip}" id="sorct" autoSubmit="true"
    layout="horizontal" simple="true"
    valueChangeListener="#{backingBeanScope.ClaimMedical.setConditionCtFlag}">
    <f:selectItems value="#{bindings.CtFlag.items}" id="si2"/>
    </af:selectOneRadio>
    <af:spacer width="10" height="3" id="s3b"/>
    <af:inputDate value="#{bindings.CtFromDate.inputValue}" label="#{bindings.CtFromDate.hints.label}"
    required="#{backingBeanScope.ClaimMedical.ctPeriodRequired}" shortDesc="#{bindings.CtFromDate.hints.tooltip}"
    id="idctf" columns="10" partialTriggers="sorct" disabled="#{!backingBeanScope.ClaimMedical.ctPeriodRequired}"> <<<<<<<<<<
    <f:validator binding="#{bindings.CtFromDate.validator}"/>
    <af:convertDateTime type="date" pattern="#{Constants.dateFormat}"/>
    </af:inputDate>
    <af:spacer width="5" height="3" id="s3c"/>
    <af:inputDate value="#{bindings.CtThruDate.inputValue}" label="#{bindings.CtThruDate.hints.label}"
    required="#{backingBeanScope.ClaimMedical.ctPeriodRequired}" shortDesc="#{bindings.CtThruDate.hints.tooltip}"
    id="idctt" columns="10" partialTriggers="sorct" disabled="#{!backingBeanScope.ClaimMedical.ctPeriodRequired}"> <<<<<<<<<<
    <f:validator binding="#{bindings.CtThruDate.validator}"/>
    <af:convertDateTime type="date" pattern="#{Constants.dateFormat}"/>
    </af:inputDate>
    <af:message id="m3" for="idctf"/> <<<<<<<<<<<<
    </af:panelGroupLayout>
    </af:panelLabelAndMessage>
    </af:panelFormLayout>
    <af:message id="m4" for="idctt"/> <<<<<<<<<<<<
    Doesn't seem to matter where I put them inside the popup, they don't display. I've used/removed the immediate/auto-submit properties on the inputDate, but no change.
    Are there constraints in when/how these can be used, or if not, what is it that I'm missing ?
    Thanks,

    Hi Srikavi,
    to achieve a Validation of an item when leaving the field you'll have to use some javascript code (as ApexLib does internally).
    What do you need:
    - onChange - Event on your Item
    - some Javascript code which is called in the onChange Event (you can put this code either in your page html header or, if it is used more often in your application, in a seperate js File)
    - call the ApexLib method apexlib.error.showError to display your error
    I actually never tried it myself, but i'm pretty sure that this will work (according to what i've seen in the ApexLib code).
    Have fun and tell us how it went,
    Peter
    Edited by: peter_raganitsch on Sep 5, 2008 11:56 AM

  • (Internationalization) in Javascript Messages......

    Hello
    does anyone have any idea how to show Chinese/Japanese/French/German
    characters in the alert messages of javascript ?
    My web pages are able to show all these languages, but would like to know
    how to do the same for javascript alert messages.
    I have tried the following :
    <script language="JavaScript1.3">
    function sayThat()
    alert("\u00A9 \u00e5");
    But the alert messages simply shows up junk, instead of correct characters.
    Any ideas....?
    Thanks

    JavaScript Alerts doesn't support non ASCII charaters.
    There is no way to get around this problem.
    Kumar.
    JSB wrote:
    Hello
    does anyone have any idea how to show Chinese/Japanese/French/German
    characters in the alert messages of javascript ?
    My web pages are able to show all these languages, but would like to know
    how to do the same for javascript alert messages.
    I have tried the following :
    <script language="JavaScript1.3">
    function sayThat()
    alert("\u00A9 \u00e5");
    But the alert messages simply shows up junk, instead of correct characters.
    Any ideas....?
    Thanks

  • Unique id For System Message

    Dear all,
       Any one can please tell me the unique id for System Message.  Also i want to know the unique id for 'yes' and 'No' in System Message. Its very urgent
    Thanks in advance
    with Regards
    G.shankar

    System message has formtype = 0. The Yes and No button has no ids for sap, but when you want to press one of this button, use sendkeys as SBO_Application.SendKeys("") or tab for No (default is Yes).
    For accesing to correct system message, use some global variable and there before showing system msgbox set some value and compare it after showing.
    hope it helps

  • My iphone 4s voice dictation for text messages is not consistently working. Sometimes it works, other times after the dictation it just gives me a blank space. Anyone else having this problem?

    My iphone 4s voice dictiation for text messages is not consistently working. I've had the phone since Thanksgiving and it always worked perfectly, but the last few weeks it's been hit or miss. Sometimes it works, sometimes it doesn't. Anyone else having this problem? I tried the hard reset but that hasn't fixed it.

    I have the same problem since updating to IOS 8.3. Any app to which I want to send a new link via IMessage does not allow me to select a contact to send the IMessage to. Using a pre-existing thread does not have same problem.

  • I have a Galaxy SIII and I stopped receiving visual notification for text messages.  How do I correct it?

    I have a Galaxy SIII and recently stopped receiving visual notification for text messages.  How do I correct it?

        Hmmm that's strange TopDiver. Let's get to the bottom of this. Have you checked the notification settings on the device? To verify the notification setting on the device click on menu>settings>sound>notification sound, then test device notifications.
    Thank You,
    MichelleL_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • Message settings option for text messages is not c...

    I am using  N73 phone and here i cant go to the message settings option for text messages. actually i want to change my message center.
    Message > Options > Settings > Text Message 
    When i tried to follow above steps it finally ends up with the Main menu. But previously it works fine. I want to know there whether there is another way to set it or i need to go for a phone software installation.
    Thanks.

    The settings can also the sent directly to your phone as an auto install sms from your network. Contact your network and request they send you the sms.

  • Cannot see context menu for XML messages with Safari and Google Chrome

    Hi All,
    I am unable to see Context menu with the option of Create, Edit, Delete etc. for KM messages. This problem persists with Safari, Chrome and IE9 browsers. This thing works fine on IE7 and IE8 browesrs.
    On clicking  History and Options buttondoesn't perform any action i.e. we cannot see the list of options when clicking on those. This problem also persists with the above mentioned browsers.
    Also, with IE9 , I am unable to create New message when clicking on New button. The XML form doesnt open on the button click.
    The portal version I am using is EP 7.0.
    Can someone help me out with this?
    Thanks a lot in advance.
    Regards,
    Archana

    Hello Archana,
    You should check the PAM to see if your browser is supported with your current EP verison.
    http://service.sap.com/pam
    Regards,
    Lorcan.

  • In Mail, one mailbox for Recovered Message (AOL) keeps showing 1 very large message that I cannot delete. How can I get rid of this recurring problem, please?

    In Mail on iMac, successfully running OS X Lion, one mailbox on My Mac for "Recovered Messages (from AOL)" keeps showing 1 very large message (more than 20 Mb) that I just cannot seem to delete. Each time I go into my In Box, the "loading" symbol spins and the message appears in the "Recovered Messages" mailbox. How can I get rid of this recurrent file, please?
    At the same time, I'm not receviving any new mails in my In Box, although, if I look at the same account on my MacBook Pro, I can indeed see the incoming mails (but on that machine I do not have the "recovery" problem).
    The help of a clear-thinking Apple fan would be greatly appreciated.
    Many thanks.
    From Ian in Paris, France

    Ian
    I worked it out.
    Unhide your hidden files ( I used a widget from http://www.apple.com/downloads/dashboard/developer/hiddenfiles.html)
    Go to your HD.
    Go to Users.
    Go to your House (home)
    there should be a hidden Library folder there (it will be transparent)
    Go to Mail in this folder
    The next folder ( for me ) is V2
    Click on that and the next one will be a whole list of your mail servers, and one folder called Mailboxes
    Click on that and there should be a folder called recovered messages (server) . mbox
    Click on that there a random numbered/lettered folder -> data
    In that data folder is a list of random numbered folders (i.e a folder called 2, one called 9 etc) and in EACH of these, another numbered folder, and then a folder called messages.
    In the messages folder delete all of the ebmx (I think that's what they were from memory, sorry I forgot as I already deleted my trash after my golden moment).
    This was GOLDEN for me. Reason being, when I went to delete my "recovered file" in mail, it would give me an error message " cannot delete 2500 files". I knew it was only 1 file so this was weird. Why 2500 files? Because if you click on the ebmx files like I did, hey presto, it turned out that they were ALL THE SAME MESSAGE = 2500 times. In each of those folders in the random numbers, in their related message folder.
    Now remember - DONT delete the folder, make sure you have gone to the message folder, found all those pesky ebmx files and deleted THOSE, not the folder.
    It worked for me. No restarting or anything. And recovered file. GONE.
    Started receiving and syncing mail again. Woohoo.
    Best wishes.

  • Trx F-53, The difference is too large for clearing Message no. F5263

    Hi,
    I created a PO, then I posted the goods receipt, the invoice and I was trying to
    post the payment by F-53 trx.
    When I select an open item from the list and I try to simulate the posting by the menu (Document, simulate), system replies by:
    "*The difference is too large for clearing
    Message no. F5263*"
    Cannot understand why it is not possible to post the outgoing payment
    Regards

    Dear Sappione,
    did You check the tolerances?
    Check in transaction OBY6 the indicator 'No forex rate diff. when
    clearing in LC' is not set the amount is converted with the exchange
    rate valid at clearing date, in case You're clearing in LC a foreign document.
    When you post a clearing transaction with rounding
    differences, those differences are posted to an additional line item
    GL accounts. This account determination is customized as follows :
    FBKP - Exchange rate differences -
    Exchange rate difference in open items - KDF -a/c XXXXXXXXX
    (Realized gain exchange rate difference)
    The accounts used for rounding differences when clearing
    are the realized gain/loss exchange rate accounts.
    please check all the 3 suggestions.
    Mauri

  • Is there any tools for move messages from errorqueues in WLS 8.1.5?

    Hello!
              I have created a JMSDestination (MyQueue) in my wls 8.1.5.
              I have also created an other JMSDestination (MyErrorQueue) in my wls 8.1.5.
              In the wls it is possible to specify an "Error Destination:" for a JMSDestination. In my wls I have specified MyErrorQueue as error destination for MyQueue.
              If anything goes wrong during consuming message from MyQueue the message will be moved to the error destination MyErrorQueue.
              If this situation ever occur, for eg. there is a cable connection loss or something. The error destination will save me alot of trouble.
              Very nice!
              But now I wonder if there is any tool or function i wls 8.1.5 that helps me move the message back to MyQueue from the error destination, MyErrorQueue, when the problem is solved.? For eg, when the broken cable is replaced.
              Or do I have to write such a application my self? Seems strange since the concept of error destination exists.
              Best regards
              Fredrik

    Have a look at this
              http://www.hermesjms.com/confluence/display/HJMS/Home
              We use it and it works very well for handling messages on error queues.
              Some messages we automatically re-queue using a modified version of this
              code here
              https://codesamples.projects.dev2dev.bea.com/servlets/Scarab/remcurreport/true/template/ViewIssue.vm/id/S134/eventsubmit_dosetissueview/foo/resultpos/1/nbrresults/285/action/ViewIssue/tab/2/readonly/true
              Hope that helps.
              Pete
              Fredrik Andersson wrote:
              > Hello!
              >
              > I have created a JMSDestination (MyQueue) in my wls 8.1.5.
              > I have also created an other JMSDestination (MyErrorQueue) in my wls 8.1.5.
              >
              > In the wls it is possible to specify an "Error Destination:" for a JMSDestination. In my wls I have specified MyErrorQueue as error destination for MyQueue.
              >
              > If anything goes wrong during consuming message from MyQueue the message will be moved to the error destination MyErrorQueue.
              >
              > If this situation ever occur, for eg. there is a cable connection loss or something. The error destination will save me alot of trouble.
              >
              > Very nice!
              >
              > But now I wonder if there is any tool or function i wls 8.1.5 that helps me move the message back to MyQueue from the error destination, MyErrorQueue, when the problem is solved.? For eg, when the broken cable is replaced.
              >
              > Or do I have to write such a application my self? Seems strange since the concept of error destination exists.
              >
              > Best regards
              > Fredrik

  • Using static variable in orchestration for each message

    Once a file is dropped to our Biztalk server I am capturing data from each message. However, I need to assign a batchID for this file that I will write to the database along with the data. How do I build my orchestration so that the code I'm using to generate
    the BatchID doesn't create a new ID for each message? I want each message to use the same ID.
    Thanks.
    Raymond

    Shankycheil,
    I think you've pointed out my primary issue. I'm fairly new to Biztalk and I just kind of let it do its thing when it comes to EDI processing. So, I guess my issue is due to the fact that I'm letting the EDI Disassembler debatch the file and pass messages
    into the orch one at a time. I have code in an expression shape that generates a BatchID, but of course if I'm debatching it creates a new BatchID for each message. How do I deal with the file as a whole inside the orchestration so that once I generate a BatchID
    it uses it for all of the messages in file? I've done what Prabhdeep suggested and promoted a field in the schema so that I can set the BatchID, but it needs to be the same for each message in a file.
    Thanks.
    Raymond

  • S/A bridge problem: No object type found for the message

    Hi all,
    I've been spending days looking into the following problem. I have a RFCXIFile scenario. The R3 system sends data via an RFC to XI and XI post the data as a flat file on a certain server using FTP.
    This scenario worked just fine for 1 exception. I could only run this scenario once. The second time I got timeouts when checking the data sent to my RFC destination using SM58. When I reactivated my RFC communcation channel I could again send 1 RFC to the system. All subsequent tries would fail.
    I guess this is due to the fact that I use a synchonous call (RFC) to an asynchronous one. Thus the adapter is still waiting for the response from the XI system and will not accept any further new calls from R3.
    So I figure let's use this pattern called the S/A bridge. So I designed everything according to guides and examples and I'm quite certain everything is configured right but when I run the scenario I get the following message:
    <i> <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="BPE_ADAPTER">UNKNOWN_MESSAGE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No object type found for the message. Check that the corresponding process is activated</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error></i>
    It seems that the adapter cannot find any integration process to send the message into!?
    I've looked at numerous threads on sdn and tried all kinds of stuff (looked at the cache==> code 0 = OK , tried to reactivate my integration process, checked the interface determination,...), but to no avail. Does anybody has an idea what could be wrong ?
    Any help would be greatly appreciated for I'm all out of clues....
    Bob

    First of all, Thank you for trying to help me out here.
    Some answer to your suggestions/questions:
    The IP has return code 0 in SXI_CACHE. so that doesn't seem to be the problem.
    I've checked the BPM for syntax errors. I doesn't have any.
    I've reimported the BPM into the integration directory.
    And did a full cache refresh in SXI_CACHE. Return code is (stays) zero, so that's OK.
    I've already included the error message from SXI_MONI. It is in the last step ("Call Adater") that the error occurs.
    The other steps execute just fine...
    The RFC communcation channel accepts the incoming RFC call and puts into the pipeline, so no problems with the communication channel either. the problem is actually when the pipeline is trying to forward the message into an IP trhough the BPE_ADAPTER (according to SXMB_MONI).
    Therefore I'm not able to go to into PE, because the workflow is never started. the BPE_ADAPTER does not find any active process for the interface determination i've entered.
    So i can not debug the IP in the PE and check container variables, like some of you mentioned.
    Maybe some more information about the scenario:
    The RFC is called from an R3 system to XI over the interface "CONTROL_RECIPE_DOWNLOAD", which is an imported RFC, with a request and response message type.
    Then I got a receiver and interface determination with lead the incoming RFC message to the IP, into interface "XI_ERP_MF_MD_CONTROL_RECIPE_REQ_AI_MI".
    This is an abstract synchronous interface based on the request and response types of the "CONTROL_RECIPE_DOWNLOAD" imported RFC.
    This interface is used the first step (receive) of my BPM as the synchronous interface to open the S/A bridge.
    The message (container var)  used in this step is
    name: CORREQ
    Category: Abstract interface
    type: "XI_ERP_MF_MD_CONTROL_RECIPE_REQ_AI_MI"
    The interface "XI_ERP_MF_MD_CONTROL_RECIPE_REQ_AI_MI" is an abstract, asynchronous interface based on the request type of the "CONTROL_RECIPE_DOWNLOAD".
    Then there are 2 send steps for putting the flat files into place and finally i close the the S/A bridge using message:
    name: CORRES
    Category: Abstract interface
    type: "XI_ERP_MF_MD_CONTROL_RECIPE_RES_AI_MI"
    The interface "XI_ERP_MF_MD_CONTROL_RECIPE_RES_AI_MI" is an abstract, asynchronous interface based on the response type of the "CONTROL_RECIPE_DOWNLOAD".
    I hope this information gives you guys a better understanding of hte problem.
    Really looking forward to see more suggestions and to solve this nasty problem ...
    Regards,
    Bob

  • My phone is not ringing for a message and a call

    Not able to here a tone for a message and a call. names just appear on the banner even my phone is in handy.

    Hello all...
    I'm on iPhone 4 with iOS 5.0.1 on Australian Vodafone Pre-paid network.
    Have a similar issue where I would call my iPhone from a landline, ring tone suggest that phone is ringing, but the actual iPhone device itself is not ringing.
    Thought it was the network, so I got myself a new sim - same problem.
    Use other (working in other iPhone) sim on the problem iPhone - same problem.
    Tried calling out from the problem iPhone - same problem.
    The only fix for me was to reset the iPhone by going to: Settings - General - Reset - Reset All Settings.
    Hope that helps others...
    The question is - what was the root cause of the problem? Hmmmm...

  • Java Application for submission message in multiple forum at a time

    Hello,
    I want to build a Java desktop application by which I can be able to submit any message to my desired forum without login into the forum website. My application will be able to send the same message to as many forum I specify.
    I have not yet started to work on it. So, I need ideas regarding the following topics-
    1. Is the message we submit in any forum same to any mail we generally use for email? if yes, hoe can I understand what protocol(SMTP, POP3, IMAP) is used in any website? If no, what is that kind of mailing for posting message in a forum and where is it stored?
    2. What should be my steps for building such application?
    3. Is there any Java API / technology that can help me?
    If you have done something like my project, please provide me some code for starting. And, please help me on this regard with your ideas.
    With Thanks-
    aynhq

    aynhq wrote:
    Hello,
    With a grateful heart I would say, I thank you for your mmessages. But, You have taken the problem I specified as an evil concept.
    Here I should mention that I have registration with more than one hundred forums. I have premium membership and secured password. In those forums I usually submit my writing for the other member in those forum.
    Sometimes I need to submit same writings to all the forum. And I manually enter into those websites using my username & password and then submit the writings. You must admit it is a time consuming process. So, I want to develop this programm that would help me to send messages using my username and password. In fact necessity is the mother of invention.
    One thing must be mentioned here that I don't have intension to use this program as a spam or something you are thinking of. Any way, if you don't understand my goal please ask me. But I need help on this concept. Better you suggest me some way how to solve my problem.
    With Thanks-
    aynhqYou sound like a parrot.
    Now go away.

Maybe you are looking for

  • Brother Control Center installed but won't open

    I have a Brother MFC 685-cw and it plays pretty well with the Image Capture application for scanning but I would like a few more options.  I have been to the Brother website and downloaded and installed the CUPS Printer driver and the TWAIN Scanner d

  • How to have multi select dropdowns for web request and adobe forms

    Hi All, I am working on interactive forms for CRM 7.0 using web request and ZCI layout. When I say web request we define the fields required for the form in CRM that becomes the context for WDA and passed onto Adobe form. This web request is a flat s

  • Please help - Ipod freezes when playing any video

    Hi I only got my ipod video a day ago and it wont play any video files. Everytime i go to play a video it freezes and just shows a black screen. I have tried downloading a music video from the itunes store and this wont work either. When i first got

  • Count lines of code present in methods of a class

    Hi Friends, Can anyone suggest how to count lines of abap code in methods of a class?I have used the function module  'SEO_CLASS_GET_INCLUDE_SOURCE' but this function module doesnt counts the code for methods of a class. Kindly help. Regards ST

  • Photo Page - Clicking on thumbnail launches slideshow

    Let me preface this by say that I'm using iWeb without a .mac account and just publishing to my Sites folder. Whenever I create a photo page, the thumbnails that I click automatically launch a slideshow window. I've seen a bunch of iWeb example sites