Fill placeholders within message strings dynamically on jspx pages

Hello all,
i am searching a solution for the following problem.
Let's assume the following key/value pair exists in the message resource bundle:
targets.delete.confirmation=Do your really want to delete the target "{0}"?
On a jspx page there is a confirmation dialog. The code looks like that:
<af:dialog id="dialogDel" type="yesNo" closeIconVisible="true"
title="#{nls\['targets.delete.title'\]}"
visible="true" modal="true" partialTriggers="tabTgt tabTgt:btnDelete"
dialogListener="#{backingBeanScope.targetsBean.dialogDel_action}">
<af:message messageType="confirmation" message="#{nls\['targets.delete.confirmation'\]}">
<f:attribute name="{0}" value="#{bindings.TgtName.inputValue}"/>
</af:message>
</af:dialog>
Now i want the placeholder {0} getting filled at runtime dynamically with the inputValue of the appropriate binding.
The code as shown doesn't solve the problem.
I'm experienced in developping web applications with ADF UIX and there i got this done with the following code:
<boundAttribute name="title">
<messageFormat format="${nls\['targets.delete.confirmation'\]}">
<dataObject source="${bindings.TgtName.inputValue}"/>
</messageFormat>
</boundAttribute>
What's the equivalent to 'messageFormat' in ADF Faces??
Any help will be appreciated.

Hi,
Not sure if this will help, but rather than using proper messages, can you just use a piece of output text like:
<h:outputFormat value="#{nls['targets.delete.confirmation']}">
  <f:param value="#{bindings.TgtName.inputValue}"/>
</h:outputFormat>The outputFormat tag is from the JSF HTML tag library
Dave

Similar Messages

  • Process Message failed: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.

    Hi
    I am trying to process an X12 message and I am getting following error.
    Method : ProcessMessage
    Message : Process Message failed: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    Parameter name: length
       at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
       at Q.Inbound.X12Preprocessor.getTranTypeFromFuncCode()
       at Q.Inbound.X12Preprocessor.setProcessType()
       at Q.Inbound.X12Preprocessor.getFuncGroupHeader(StreamReader sr)
       at Q.Inbound.X12Preprocessor.ProcessMessage(X12Definition& docInfo)
    Please help.
    Thanks

    Might try them over here.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral%2Cvbgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to get a set of character within a string?

    Hi,
    I need to cut a set of character within a string. I have tried everthing but I need help.
    Example.
    Database Version 11.2.0.3
    create table tst_string (message varchar2(600));
    insert into tst_string values ('ANR0166I Inventory file expiration finished processing for node OSOGBO, filespace OSOGBO\SystemState, copygroup BACKUP and object type GROUP BASE with processing statistics: examined 43, deleted 43, retrying 0, and failed 0. (SESSION: 1506, PROCESS: 2)');
    insert into  tst_string values ('ANE4175I Starting Full VM restore of VMware Virtual Machine ''mfujiwara'' target node name=''VC1_DC1'', data mover node name=''VC1_DC1_DM3''  (SESSION: 3780)');
    commit;
    select * from tst_string;
    MESSAGE
    ANR0166I Inventory file expiration finished processing for node OSOGBO, filespace OSOGBO\SystemState, copygroup BACKUP and object type GROUP BASE with processing statistics: examined 43, deleted 43, retrying 0, and failed 0. (SESSION: 1506, PROCESS: 2)
    ANE4175I Starting Full VM restore of VMware Virtual Machine 'mfujiwara' target node name='VC1_DC1', data mover node name='VC1_DC1_DM3'  (SESSION: 3780)
    ## I want get
    # From first line following values:
    node OSOGBO
    filespace OSOGBO\SystemState
    examined 43
    deleted 43
    retrying 0
    failed 0
    # From second line
    mfujiwara
    VC1_DC1
    VC1_DC1_DM3Any help can be useful...
    Thanks in advance.

    Hi Frank,
    It looks like message can be seen as delimited lsit of sub-messages, where a number of different characters (perhaps ',' amd ':') may serve as delimiters. Each sub-message may or consist (entirely or in part) of something you want to display.Yes. In my first case where is "ANR0166I" I want get the characteres before "," (e.g "OSOGBO," I want get "OSOGBO") excluding "(SESSION: 1506, PROCESS: 2)"
    Would a user-define PL/SQL function be okay for you?Yes.. no problem.
    I'm not good with shell script, but will try show what I want using SHELL commands:
    See this example:
    ### I create a file named "tst_string"
    $ vi tst_string
    ANR0166I Inventory file expiration finished processing for node OSOGBO, filespace OSOGBO\SystemState\NULL\System State\SystemState, copygroup BACKUP and object type GROUP BASE with processing statistics: examined 43, deleted 43, retrying 0, and failed 0. (SESSION: 1506, PROCESS: 2)
    ## So I used a function sed to get my desired values. The command bellow is poor, but My point is the result.
    $ cat tst_string | sed 's/ANR0166I.*node //g' | sed 's/, filespace//g' | sed 's/, copygroup BACKUP and object type GROUP BASE with processing statistics: //g' | sed 's/. (SESSION.*//g' | sed 's/, deleted//g' | sed 's/, retrying//g' | sed 's/, and failed//g'
    OSOGBO OSOGBO\SystemState\NULL\System State\SystemState 43 43 0 0The result was:
    NODE     FILESPACE                              Examined     Deleted     Retrying        Failed      
    OSOGBO      OSOGBO\SystemState\NULL\System State\SystemState     43           43      0           0I will go check the links wich you mentioned.
    Thanks

  • Findind out the number of lines within a string - using buffered reader

    Hi All,
    Want to know the number of lines within a string..Sample code is there for reference..could u help me out how to have the number of lines in a string without java comments (i.e string within /**------*/ and // should be eliminated)
    public class ReadLines {
         public static void main(String[] args) throws Exception{
              ReadLines rl = new ReadLines();
              rl.readLines();
         void readLines() throws Exception{
              String str = "/** This is a test message\n"+
                   "* for testing\n"+
                   "*/\n"+
                   "import java.io.*\n"+
                   "// this is again comment\n"+
                   "public class ReadLines {\n"+
              BufferedReader reader = new BufferedReader(new StringReader(str));
              String line = "";
              int count = 0;
              while ((line = reader.readLine())!= null )
                   //line = reader.readLine();
                   count++;
              System.out.println(count);
    }Thanks
    MK

    Hi
    What you need to do is parse the file in such a way that you read /*, */ and // as tokens. By that I mean rather than read a line at a time (although I'm sure you could), read it character by character. So every time you reach a new line character then increment the counter. But there are two casaes when you don increment the counter they are:
    If you encounter a / followed by * then keep reading but if you encounter a newline character then DONT increment the counter ONLY continue counting when you read a * followed by a / (as this is the end of the comment)
    If you encounter / followed by another / then do not count that particular line and go to the next line and continue counting from there.
    Where I've written 'continue counting' this is subject to the lines that follow not conforming to the above two cases.
    I hope this helps.

  • [JS - CS3]  Can't REPLACE A with B within a string? Help Please...

    Hello Experts,
    First off - I'm a newbee to all this JS and especially with CS3.
    I have a string: '
    b myDocumentName
    which can have it's value as: '
    b 00000en_ Generator WX/WY
    Problem is, backshlashes ( / )are a bad thing for me...
    b Question:
    How can I do a 'replace' operation to replace the '/' from the string with a '_'?
    I have at the moment:
    > var myDocSaveName = oneResult[3]+oneResult[4]+oneResult[5];
    > myDocSaveName.replace(what "/", with "");
    > myDoc.save ("C:/DATA/"+myDocSaveName, undefined, undefined, true)
    I get an error Nr. 25... Offending text:"/"
    What am I doing wrong?

    'what' and 'with' are the names of those arguments. They should not be included in the statement:
    myDocSaveName.replace("/", "");
    But that still won't work because replace doesn't operate on a string in situ, it returns the modified string. So:
    myDocSaveName = myDocSaveName.replace("/", "");
    This too has its limitations. It'll change only the first instance of "/", not all of them. To change all of them, you need to restate the 'what' as a RegExp:
    myDocSaveName = myDocSaveName.replace(/\//g, "_");
    A RegExp literal is delimited by the "/" character, so to have it, alone, as the character to be sought you must use the backslash to escape the character. Then, to indicate you want the replace to happen globally within the string, you add the 'g' after the RegExp.
    Dave

  • How To Use Dynamic Menus To Place Manually Created Jspx Pages On Sub-Level

    JHeadstarters,
    Back on the JHS trail and could use some help.
    I started using dynamic menus (see section 9.2 JHS Dev Guide) to setup a custom menu structure and found it could not be easier however I need to solve 2 issues;
    1. How to get more than 2 levels deep on the menus (parent, child, grand-child, etc.)? In the menu structure setup I have created a menu that is 3-levels deep however when it runs you only get 2 levels. Perhaps a template needs to be changed.
    2. How can I assign manually created jspx pages to sub-level menus?
    Scenerio;
    I have JHS generated pages *** AND *** manually created pages. Using dynamic menus to place the JHS genned pages works fine, the problem is how to do it with manually created pages.
    Using Dynamic Menu's I created a top-level menu tab named "warp-core", below it on the next level I have two sub-menus, one named "search" and one named "form" for displaying the results of the search and modifying the rows (don't ask me why they are seperate).
    The problem is how to assign the manually created jspx pages to those sub-menus? Or am I going abouth this the wrong way? Perhaps I could use JHS to generate seperate search and display pages.
    Thanks!
    BG...

    Bill,
    1. Yes, you need to decide yourself how and where you want to render this third level menu. You then create a region file similar to dynamicMenu2Tabs.jspx, just replace the references to level2MenuItems with level3MenuItems. Then create a custom template to call this menu 3 region file.
    For example, you could create a bulleted vertical list for level 3 as illustrated in section 9.1.3 of the Developers Guide (that example is with static menu, but you can use similar technique for dynamic menu)
    2. Instead of a group name, you can specify a JSF Navigation action in the menu administration application. So, you create a global navigation case to your custom page, and you enter this navigation case id in the menu admin app.
    Note that if you want to generate separate search pages, you can do so by setting the advanced search property to "separatePage".
    Steven Davelaar,
    JHeadstart Team.

  • Finding a word within a string

    Hey everyone,
    Just having a little trouble with something.
    I'm trying to find a word -- that is, not a substring, an actual word as defined by the english language -- within a string.
    For example I don't want "hell" to be found in "hello".. only "hello" to be found.
    Currently i've got two strings, one is the sentance (String input), and one is the word to be found in the sentance (String word). I need the program to find the WORD, and then go back and search for the word again and again and again until it reaches the end of the string.
    This is what I've got thus far:
              for(i = 0; i < input.length(); i++)
                   // This statement checks the string "input" for the string "word" starting at offset 0 (as this is what the variable was first defined as)
                   if(input.indexOf(word, offset) >= 0)
                        // If it finds the word at all, this line increases the offset ahead of this word so it doesn't simply find the same word again
                        offset = offset + (input.indexOf(word)) + (word.length());
                        times++;
              }At the moment this searches for the sub-string, not the WORD which is what I would like it to do.
    What's the easiest way of going about this? I've been fiddling around trying to add extra sections to the if statement, for example
    if((input.indexOf(word, offset) >= 0) && (input.charAt(offset +1) == 32))(32 as in the ASCII character for a space, which would do what I wanted it to do)
    But I eventually get errors because at some stage or another the charAt is going to be higher than the actual length of the String. Plus, this only looks if there's a space next to the word - a word can be valid if it has a ! next to it for example, or a comma...
    Thanks for any help :)
    viddy

    I think there's a word boundary marker in regex. So it'd be "\\w+hello\\w+" or whatever the marker is, to be used with a Pattern instance.

  • Include a variable in message string

    Hi,
    I want to include a variable in the message string like:
    wa_log-msg = 'Length for material number should be ' (here I want to iclude variable holding the length).
    How to do this?
    Thanks in advance...
    Regards,
    Sriram

    Hi, Sriram
    Hope following will solve out your problem,
    DATA: msg TYPE string,
          vlen(2).
    vlen = 19.
    CONCATENATE: 'Length for material number should be ' vlen INTO msg SEPARATED BY space.
    Best Regards,
    Faisal

  • System.log filling with error messages

    After SL update my system.log if filling with error messages.
    Does any process delete the system.log periodically?
    What's causing this error? Getting thousands of them.
    9/30/09 12:08:13 PM [0x0-0x12012].com.nowsoftware.nowxagent[181] at now.swing.NProgressBar.fixAppleAnimationBug(null:-1)

    JHF45 wrote:
    After SL update my system.log if filling with error messages.
    Does any process delete the system.log periodically?
    Yes. There are three automatic jobs that run daily, weekly, and monthly doing this sort of thing. They run in the early hours of the morning if your Mac is awake, or shortly after it wakes up if it was sleeping. In Leopard, if it was powered-off, they won't run; I don't know if it's the same in Snow.

  • Logical && within EL Expression on jspx pages

    Hello all,
    Anyone know how to convert the logical AND symbol '&&' into something that can be properly understood within an EL expression? The ampersand is a reserved symbol within an xml document and can not be used in the jspx page.
    Thanks in advance!
    - Joe

    & a m p;& a m p;
    Should be without blank spaces but looks like this forum also escape the characters.
    Thanks,
    Alex
    Edited by: Alexbie on 26-Aug-2010 9:44 AM
    Edited by: Alexbie on 26-Aug-2010 9:45 AM
    Edited by: Alexbie on 26-Aug-2010 9:45 AM
    Edited by: Alexbie on 26-Aug-2010 9:56 AM

  • Can you save an entire text message string?

    Can you copy an entire text message string to forward in an e-mail or otherwise save? Thanks.

    try this page
    https://discussions.apple.com/thread/3798706?start=0&tstart=0

  • Error message string : cant put and and HTML Blink tag

    Hi All,
    I have experienced a strange problem in the error message string .When i put <abc>.txt as a error message in my validation routine it just truncates abc .
    I think HTMLDB understands it as a HTML tag .
    Any idea how to put open and close angle ?
    And one more question do i put HTML blink tag inside error message ? Its not working ....
    Cheers,
    ROSY

    Try using & lt ; and & gt ; instead (without the spaces inbetween the characters).
    What do you mean by "not working" for the blink question? I'd also suggest that it "not working" is a good thing...blinking text on a website usually looks horrible ;)

  • Image Manager : upload image - error message String index out of range

    Hello,
    i'm facing an issue with the upload functionality of 'Image Manager'.
    When i upload a file, systematicaly an error message pops up :
    "error message String index out of range : - XXX"
    Where XXX is a value as large as the size of the file.
    I have the feeling that the problem may come from the installation of VC.
    Did someone encountered this issue ?
    Thank you

    Hi,
    Plz check the below link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bip/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do
    Govindu

  • Searching for a substring within a string

    can someone reccomend a simple way to search for a substring within a string and count the number occurences of that substring.
    The substring and the string will be provided as command line parameters.
    Thanks
    gg

    A simple way would be to use the indexOf methods in String:
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
    Not sure what this has to do with event handling though :-P

  • Externalizing message strings away from the JSP

    Hello,
              I'm just starting to investigate some of WebLogic's
              internationalization features, and I'm trying to decide what the
              benefits would be for using the i18n features instead of straight Java
              resource bundles.
              Basically, I'm looking for a way to externalize all of our error
              messages, exceptions, and UI elements (like text labels). This will
              be a Struts application, using Struts validation.
              Internationalization itself would be nice, but it is not the driving
              factor for externalizing all of our message strings.
              I'm seeing to benefits to using the WebLogic i18n functionality.
              First, all of the "resource strings" are specified in an XML document
              that can be validated and is possibly easier to maintain. Second,
              accessing these strings becomes a call to individual methods of a
              automatically generated TextFormatter class, thereby freeing client
              code from having to directly access resource bundles.
              Are there any other benefits to using this? I'm just wondering if
              these benefits are really worth it, or if it's overkill.
              Thanks for the help.
              - Jeff
              

    You do not have to implement the whole Struts framework just for
              internationalization (I18N) because I18N is only smaller part of Struts.
              Instead, you can use only taglibs dedicated for I18N. Look at www.apache.org
              site for I18N taglib as well as for other usefull taglibs. Or you can create
              your own taglib but it's not worth it because you'll reach the same result
              that's already implemented in existig open source taglibs on Internet.
              "Jeff" <[email protected]> wrote in message
              news:[email protected]...
              > Hello,
              >
              > I'm just starting to investigate some of WebLogic's
              > internationalization features, and I'm trying to decide what the
              > benefits would be for using the i18n features instead of straight Java
              > resource bundles.
              >
              > Basically, I'm looking for a way to externalize all of our error
              > messages, exceptions, and UI elements (like text labels). This will
              > be a Struts application, using Struts validation.
              > Internationalization itself would be nice, but it is not the driving
              > factor for externalizing all of our message strings.
              >
              > I'm seeing to benefits to using the WebLogic i18n functionality.
              > First, all of the "resource strings" are specified in an XML document
              > that can be validated and is possibly easier to maintain. Second,
              > accessing these strings becomes a call to individual methods of a
              > automatically generated TextFormatter class, thereby freeing client
              > code from having to directly access resource bundles.
              >
              > Are there any other benefits to using this? I'm just wondering if
              > these benefits are really worth it, or if it's overkill.
              >
              > Thanks for the help.
              >
              > - Jeff
              

Maybe you are looking for

  • HT2513 My iCalendar wont open after a OS 10.8.2 update failed to install.

    I noticed there was an update for OS10.8.2 so I ran it. The computer needed a restart so I did it but aftwerwards it gave me an error message saying update failed. I restarted and it loaded the OX but the update didnt load and the iMac no longer show

  • Stop the carousel from moving

    I've added navigation buttons to this carousel of items that will move the carousel either left or right, however I would like the carousel to STOP anytime an icon is at the center X point. When a nav button is pressed, the carousel moves until the n

  • TS1506 Why I can't open attachments on my iPhone anymore?

    I used to be able to open any kind of attachment from emails, but now I just get the same page over and over again. Am I doing something wrong, or is it some problem with the phone?

  • Render and email

    I incorrectly set up my render and email and I need to fix a couple of things in the setup part.  but it won't let me, when i press the script "render and email" it renders and is unable to send the email, I need to fix this so it will email me when

  • Windows 10 TP build 9926 Update error 0x800705b4

    I am getting  error 0x800705b4 when trying to install realtek audio driver.I am attaching the images.I ran the windows troubleshooter which found  "Service registration missing or corrupt" and fixed it but the update error persists