Setting the message parameter in java class

Hi!
I have a resource bundle with a message that includes a parameter.
my.message.key=Part1 {0} Part2
I am able to fill this parameter when using this message in jspx page like:
<h:outputFormat value="#{res['my.message.key']}"
  rendered="#{userInfo.authenticated}"
  escape="false">
<f:param value="SomeValue"/>But when I try to get this message in a backing bean I just can't find a way to set this parameter value.
I'm using JSFUtils.getStringFromBundle for all my messages without parameters but can't find a way for messages with parameters. Can someone please tell me how do I set my parameter value (I know this can't be this difficult)?
Thanks!
BB

java.text.MessageFormat.format("Part1 {0} Part2", new Object[] { "SomeValue" }) will produce "Part1 SomeValue Part2".

Similar Messages

  • Error Message: A main Java class needs to be specified to run the program.

    Hi,
    I am adding a program object to cms using java program, and trying to run it. I am getting an error message like
    Error Message: A main Java class needs to be specified to run the program.
    Could you please help me on this., please find the pasted program object pasted below
    public class MoveReports   {
    public void run(IEnterpriseSession enterpriseSession, IInfoStore infoStore,
                   String[] args) throws SDKException {
        int objectSize = ;
        String cms = "";
         String username = "";
         String password = "";
         String auth = "";
        try {
              ISessionMgr sm = CrystalEnterprise.getSessionMgr();
             enterpriseSession = sm.logon(username, password, cms, auth);
             IInfoStore oInfoStore=(IInfoStore)enterpriseSession.getService("", "InfoStore");
                 IInfoObjects iObjects = null;
                   iObjects = oInfoStore.query("Select * from CI_INFOOBJECTS where SI_PARENTID = 44104 AND SI_PROGID LIKE '%CrystalEnterprise.Excel%'");
                   // Getting total number of reports
                   objectSize = iObjects.size();
                   if(objectSize > 0)
                        for (int count = 0; count < objectSize; count++)
                             IInfoObject obj = (IInfoObject) iObjects.get(count);
                             // Specify the Destination parent Id to move the reports
                             obj.setParentID(44102);
                        oInfoStore.commit(iObjects);
                        System.out.println("Reports Moved Successfully");
                   else
                        System.out.println("Reports Not Available");
             catch (SDKException e) {
                 e.printStackTrace();
                 System.out.println("Error : " + e.getMessage());
    Thanks&Regards
    Damodar
    Edited by: Damodaram B on Nov 2, 2009 1:29 PM

    There's couple of things at issue here - you've not specified the proper interface (IProgramBase or IProgramBaseEx), and the program job server can't find the class in question (a deployment issue).
    You may want to open a support ticket with SAP.
    Sincerely,
    Ted Ueda

  • How to set the tables parameter to a BAPI using adaptive RFC model

    Hi,
    I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
    I used adaptive RFC model and created model classes for the BAPI.
    My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
    I have the following methods available
    ZBAPI input = new ZBAPI();
    1.ZTable table = new ZTable();
    table.setPernr(pernr);
    table.setname(name);
    input.addZPernr(table);
    how do i set the table parameter for multiple pernr and name
    2.
    add all the pernr and name to list and set that list to input in the following way
    input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
    out of two methods mentioned which one is correct.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Hi Bala,
                In your code:
    List pernrList = new ArrayList();
    pernrList  should be declared as the  type of class HROBJECT   ( The structure name in the model  e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
    Try this:
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr);
    input.setPernr_List(pernrList);
    // call BAPI execute method
    If you want to pass list of pernrs, you can pass in alternate way
    IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
    IPrivate<viewname>.I<nodeame>Element prEle;
    for (int i = 0; i < table.size(); i++) {
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr); // Set the pernr from current record
    prEle = prNode.create<nodeame>Element(pernrList);
    prNode.addElement(prEle);     
    // call BAPI execute method
    Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
    Say your node name is  PERNR_PERFRAT
    for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
    Regards,
    Siva

  • Manipulate / set the Message-ID?

    Hi folks!
    I have the following question! Is it possible (e.g. in a java-mapping) to explicitly SET / CHANGE the message-ID of a subsequent message?
    Short description of the task we have to implement: We get a big XML which includes many seperate invoices. Each invoice has some "unique data which identifies the invoice uniquely". This data should be used as "message-ID" within XI (monitoring, retry, ...) So I like to use BPM to SPlit the big XML and send the separate XML Invoice asynchronously to a subsequent process. The message-ID for this asynchronous sending-process should be SET to some identifier which is included in the XML Invoice itself ...
    Any ideas how to accomplish that? Is it possibly to <b>SET the message-ID</b> (to read it one can use the "MESSAGE_ID" System constant within java-mapping or java function - I know). Has anybody done that already?
    Thanks for any input you can give on this ...
    Best regards, Andy

    As Michael stated above ...
    All the info so far is regarding <b>getting</b> the values of runtime constants (and the special case of getting them in the BPE environment) but not how to <b>SET</b> them (if even possible) - maybe one solution is that I use the HTTP Sender Adapter to post the message to the XI Integration Engine itself - in this POST one could manipulate the "MSGGUID" Parameter for defining the Message-ID explicitly?
    Could this work?
    Thanks, Andi

  • Setting the value of a java variable in javascript function

    How can i set the value of a java variable in a javascript function?
    <%
    String fName = "";
    %>
    now i want to define a javascript function which can set the value of fName to the value it has been passed.
    <script language="javascript">
    function setJValue(val)
    </script>
    Thanks

    The only way you could simulate this, would be call the same page inside the Javascript function, and send it the parameter that was passed. Then you would have your Java code retrieve this parameter by request.getParameter("value");, and set the variable accordingly.

  • How can I change the FM ENQUEUE_EPPRELE to set the _wait parameter?

    I am trying to change the FM ENQUEUE_EPPRELE so that I can set the _wait parameter to 'X'. 
    I am receiving an error message that I cannot change a generated function?
    What is the procedure for changing the ENQUEUE and DEQUEUE function modules?

    I was able to modify the calling FM and set the _WAIT parameter.

  • Why the console gives me the message "You should need class or interface"

    Today I copy some Java codes from the webs,I paste them on the EmEditor
    I run the program But the console give me the message "You should need class or interface" I think maybe i paste somes some errors on it So i type the program by myseif But aftering running it I get the same result "You should need class or interface"
    here is my code:
    public class foo
         static String s;
         public static void main(String[] args ){
              System.out.println("s="+s);
    }

    public class foo
         public static void main(String[] args )
    String s="Hello";
              System.out.println("s="+s);
    }run that, it will work.

  • How to set the message in the status bar...

    hai,
    how to set the message in the status bar...
    let us say "inserted data successfully, or opening page followed  by the link clicked on the screen....."
    kindly help me out

    sunil,
    do not use advise by Ashutosh with WebDynpro.
    Instead of placing message into browser status bar (and browser is not the only WD UI agent), use IWDMessageManager API to post messages of such kind:
    wdComponentAPI.getMessageManager().reportSucces("Record inserted"); 
    VS

  • Troubleshoot-Adapter engine:Error Setting the message status to DLNG failed

    Dear Experts,
    We use SAP RFC- PI-JDBC(MSSQL).  here the Data(message) successfully transfered to mssql table but the status is been set to DLNG failed,  And it finally shown as SYSTEM ERROR.
    QoS required: ExactlyOnce ,  here The Message has got inserted in that particular table and in PI adapter the  status turned to  DLNG faild and the service again tries to send the same message which is not possible becoz the data is set for primary value.
    2010-09-15 09:59:48 Success Message successfully received by messaging system. Profile: XI URL: http://XXXXX:50000/MessagingSystem/receive/AFW/XI Credential (User): YYYY
    2010-09-15 09:59:48 Success Using connection JDBC_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    2010-09-15 09:59:48 Success Message successfully put into the queue.
    2010-09-15 09:59:48 Success The message was successfully retrieved from the receive queue.
    2010-09-15 09:59:48 Error Setting the message status to TBDL failed, due to: com.sap.aii.af.ra.ms.api.DeliveryException: Error updating status..
    2010-09-15 09:59:48 Success Delivering to channel: CCR_JDBC_ZZZZZ
    2010-09-15 09:59:48 Success MP: Entering module processor
    2010-09-15 09:59:48 Success MP: Processing local module localejbs/CallSapAdapter
    2010-09-15 09:59:48 Success Receiver JDBC adapter: processing started; QoS required: ExactlyOnce
    2010-09-15 09:59:48 Success JDBC adapter receiver channel CCR_JDBC_ZZZZZ : processing started; party  , service BS_BCP_IMPLOG_ZZZZZ 
    2010-09-15 09:59:49 Success Database request processed successfully
    2010-09-15 09:59:49 Success MP: Leaving module processor
    2010-09-15 09:59:49 Success The message was successfully delivered to the application using connection JDBC_http://sap.com/xi/XI/System.
    2010-09-15 09:59:49 Error Setting the message status to DLNG failed, due to: com.sap.aii.af.ra.ms.api.DeliveryException: Error updating status..
    2010-09-15 10:37:01 Success The message was successfully retrieved from the receive queue.
    2010-09-15 10:37:01 Success The message status set to DLNG.
    2010-09-15 10:37:01 Success Delivering to channel: CCR_JDBC_ZZZZZ
    2010-09-15 10:37:01 Success MP: Entering module processor
    2010-09-15 10:37:01 Success MP: Processing local module localejbs/CallSapAdapter
    2010-09-15 10:37:01 Success Receiver JDBC adapter: processing started; QoS required: ExactlyOnce
    2010-09-15 10:37:01 Success JDBC adapter receiver channel CCR_JDBC_ZZZZZ : processing started; party  , service BS_BCP_IMPLOG_ZZZZZ
    2010-09-15 10:37:01 Error Unable to execute statement for table or stored procedure. 'imp_log' (Structure 'STATEMENT') due to com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_XXX_log'. Cannot insert duplicate key in object 'dbo.XXX_log'.
    2010-09-15 10:37:01 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'imp_log' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_XXX_log'. Cannot insert duplicate key in object 'dbo.XXX_log'.
    Thanks in advance for your valuable answer.

    Hi Vinaygam,
    2010-09-15 10:37:01 Error Unable to execute statement for table or stored procedure. 'imp_log' (Structure 'STATEMENT') due to com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_XXX_log'. Cannot insert duplicate key in object 'dbo.XXX_log'.
    2010-09-15 10:37:01 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'imp_log' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_XXX_log'. Cannot insert duplicate key in object 'dbo.XXX_log'.
    See above error, It cannot the Duplicate Key in your log table. Duplicate means repeated as a same data.So kindly check once your data.
    IF,I assume your scenario is Synchronous, If you are using any sender JDBC adapter  just check with your Quality of Service and set it to "Exactly once".
    so kindly do it.
    Thank you,
    Sateesh
    Edited by: sateesh kumar .N on Sep 17, 2010 8:17 AM

  • How to execute the ldapsearch command by java class in linux os?

    hi,all
    I want to query the users by ldapsearch command. I call the command in my java class. In windows, It work well. But in linux , there haven't any result. My test program is following:
    ===============
    import java.util.*;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.LineNumberReader;
    public class test{
    public static Vector queryAllUser(){
    try{
    Vector v=new Vector();
    String cmdquery="ldapsearch -h localhost -b\"dc=metasphere,dc=com\" \"uid=*\" uid ";
    //String cmdquery="ls -la";
    Process process=Runtime.getRuntime().exec(cmdquery);
    System.out.println("cmdquery:"+cmdquery);
    InputStreamReader ir=new InputStreamReader(process.getInputStream());
    LineNumberReader input = new LineNumberReader (ir);
    System.out.println("input="+input);
    String line;
    while ((line = input.readLine ()) != null){
    System.out.println("Line:"+line);
    if(line.startsWith("uid")){
    String temp=line.substring(line.indexOf(":")+1,line.length());
    v.add(temp);
    return v;
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("runtime error:"+e.getMessage());
    return null;
    public static void main(String argv[]){
    Vector v=queryAllUser();
    for(int i=0;i<v.size();i++){
    System.out.println((String)v.get(i));
    ================
    In fact, when I execute the command: ldapsearch -h localhost -b"dc=metasphere,dc=com" "uid=*" uid
    in linux prompt, the screen show the results:
    version: 1
    dn: uid=toppymgt,dc=metasphere,dc=com
    uid: toppymgt
    dn: uid=qutao,dc=metasphere,dc=com
    uid: qutao
    dn: uid=zz,dc=metasphere,dc=com
    uid: zz
    dn: uid=z,dc=metasphere,dc=com
    uid: z
    dn: uid=admin,dc=metasphere,dc=com
    uid: admin
    dn: uid=alan,dc=metasphere,dc=com
    uid: alan
    dn: uid=misssixty,dc=metasphere,dc=com
    uid: misssixty
    dn: uid=channelv,dc=metasphere,dc=com
    uid: channelv
    What's reason? Please help me. Thx.

    If there have a bugs in Linux OS. Please help me!

  • Setting the utl_file_dir parameter in 10g

    I want to set the 'utl_file_dir' parameter. From the internet I found that I can do it from OEM (the web-based one) by choose 'All initialisation Parameters...SPFile Tab...' (Refer to http://otn.oracle.com/obe/obe10gdb/bidw/blast/blast.htm#t0c).
    However will this be temporary until the instance restarts? Also, will the change take effect after the restart of instance?

    There is another way you can specifiy the utl_file_dir in 10g without bouncing...
    Specify the UTL_FILE_DIR in 10g :-
    Two way you can specify the UTL_FILE_DIR:-
         a) Using Spfile (Database Bouncing is require)
         b) Using DIRECTORY (Database Bouncing is not required)
    a) Using Spfile (Database Bouncing is require)
         i) Login as sys user:-     
         SQL> conn sys@oratest as sysdba
         Enter password:
         Connected.
         SQL>
         SQL> show parameters utl
         NAME TYPE VALUE
         utl_file_dir string
         SQL>
         SQL>
         SQL>
         SQL> alter system set utl_file_dir='/u01/preproc/output', '/u01/app/oracle/admin/ARGOS/output' scope=SPFILE;
         System altered.
         SQL> show parameters utl
         NAME TYPE VALUE
         utl_file_dir string
         SQL>
         SQL> SHUTDOWN IMMEDIATE
         ORACLE instance shut down.
         SQL>
         SQL> STARTUP
         ORACLE instance started.
         Total System Global Area 160504432 bytes
         Fixed Size 453232 bytes
         Variable Size 134217728 bytes
         Database Buffers 25165824 bytes
         Redo Buffers 667648 bytes
         Database mounted.
         Database opened.
         SQL>
         SQL> show parameters utl
         NAME TYPE VALUE
         utl_file_dir string '/u01/preproc/output', '/u01/app/oracle/admin/ARGOS/output'
         SQL>
    b) Using DIRECTORY (Database Bouncing is not required)
         SQL> connect system/xxxx@oratest
         SQL> SELECT d.owner, t.privilege, d.directory_name
         FROM user_tab_privs t, all_directories d
         WHERE t.table_name(+)=d.directory_name
         ORDER BY 1,3,2
         OWNER PRIVILEGE DIRECTORY_NAME
         SYS ADMIN_DIR
         SYS READ DATA_FILE_DIR
         SYS WRITE DATA_FILE_DIR
         SYS READ DATA_PUMP_DIR
         SYS WRITE DATA_PUMP_DIR
         SYS READ LOG_FILE_DIR
         SYS WRITE LOG_FILE_DIR
         SYS MEDIA_DIR
         SYS READ MY_DIR
         SYS WRITE MY_DIR
         SYS READ MY_DIR_LOG
         SYS WRITE MY_DIR_LOG
         SYS SUBDIR
         SYS WORK_DIR
         SYS XMLDIR
         Here, OWNER sys has read,write permission to above DIRECTORY_NAME.
         i. Create a directory for UTL_FILE_DIR FOR PL/SQL package outputs.
         $ mkdir -p /u01/preproc/output
         $ chown -R oracle:oinstall /u01/preproc/output
         $ chmod -R 755 /u01/preproc/output
         SQL> connect system/xxxx@oratest
         SQL> CREATE OR REPLACE DIRECTORY UTL_FILE_DIR as '/u01/preproc/output';
         Directory created.
         GRANT 'read,write' ACCESS to the Specific User.
         SQL> GRANT read,write ON DIRECTORY UTL_FILE_DIR to PREPROC;
         Grant succeeded.
         SQL> GRANT read,write ON DIRECTORY UTL_FILE_DIR to JOB_TICKET_SCHEMA;
         Grant succeeded.
         SQL> GRANT read,write ON DIRECTORY UTL_FILE_DIR to DISE;
         Grant succeeded.
         SQL> GRANT read,write ON DIRECTORY UTL_FILE_DIR to PLAYPEN
         Grant succeeded.
         REVOKE 'read,write' ACCESS from the Specific User.
         SQL> REVOKE read,write ON DIRECTORY UTL_FILE_DIR from PLAYPEN;
         Revoke succeeded.

  • I have set the Message History setting to delete messages after 30 days. Since doing this, Messages app is quite buggy.

    I have no need to keep huge, old Messages conversations, so I recently set the Message History to delete messages after 30 days. Since doing this, however, I have noticed that the Messages app has become fairly buggy. Sometimes I'll open the app and it will look like there's no conversations, and the app prompts me to send a new message. Sometimes, I'll open the app to reply to an incoming message and my response will hang at 90% sent and then when I go back to the conversation list, it displays my outgoing, as-yet-unsent response as a new message, complete with little blue new message marker. The only way I have found to temporarily resolve these issues is to restart the phone. What's going on here?

    Hi,
    According to your description, I understand that you need to apply a rule to delete messages older than 30 days for all mailboxes in your environment. Is it right? If I misunderstand, please point it out.
    As all above suggestions, we can use retention tags and retention policies in Exchange 2013 to achieve it. To apply it, we can try the following steps:
    1. Login to Exchange Admin Center(EAC) in Exchange 2013 as an administrator.
    2. Click compliance management > retention tags.
    3. Click New Tag > applied automatically to entire mailbox(default).
    4. Edit the Name, Retention action and Retention period(30 days), then
    Save it.
    5. Click Retention Policies tab > New.
    6. Edit Name and add the Retention tags you created a moment ago. And
    Save it.
    7. Navigate to Recipients > Mailboxes.
    8. In the list view, use the Shift or Ctrl keys to select multiple mailboxes.
    9. In the details pane, click More options.
    10. Under Retention Policy, click Update.
    11. In Bulk Assign Retention Policy, select the retention policy you created to apply to the mailboxes, and then click
    Save.
    Hope it helps.
    Thanks,
    Winnie Liang
    TechNet Community Support

  • Deploying the JSPs, Servlets and Java class files

    Hello All,
    I'm very new to the Oracle 9i AS. We are using Version 1.0.2.2.
    How do we deploy the JSPs, Servlets, and Java class files (simple class files, not EJBs)?
    plese give us the procedure and stpes how to deply or the links for the same.
    Thanks,
    Santhosh.

    Hi
    I guess u r running apache-jserv as servlet engine for your jsp and servlets. If its so, jsp files can be run without any additonal configuration by putting the jsp file under document root or any subdirectory and for running servlets u have to add classpath entries for your servlet in jserv.properties file.
    To make sure that your servlet engine is working, try
    http://servername:port/servlet/IsItWorking, if u get success msg that means servlet engine is working fine.
    Hope this will help
    Regards
    Kumaran

  • Where can I download the api's of java classes ?

    I'd like to download all the api's of java classes. I only found a lot of pages, but i don't like to download one after other for a very long time.
    Where I can find a complete document of java classes api in a single document?
    When I say api of java classes I mean the name of all java classes , it's methods, atributes, what the class does, and so on...
    For the JAVA 1.5.0 of course...
    Thanks.

    Go to http://java.sun.com/j2se/1.5.0/download.jsp and click the Download link where it says J2SE 5.0 Documentation.

  • FM required for setting the message body with values from table

    Hi all,
      I have a retq wherein in tcode VL31n when i create the IBD,after saving the document,i need to send a mail to few people in the FI dept with the foll deatils:
    Inbound delivery no.
    A. Bill of Lading no.
    B. Bill of Lading date
    C. No. of containers
    D. Invoice no.
    E. Invoice date
    F. Supplier name
    G. Vessel name
    H. Name of the receiving port
    I. Final Destination,,
    J. Expected date of arrival
      The method used is SAVE_AND_PUBLISH_DOCUMENT.i get all these deatils in the table it_xlikp.But is there  any FM by means of which i cna read these  values and set the message body with these values and send this  as  a mail using the FM SO_DOCUMENT_SEND_API1?Full points will be  awarded..Any help is appreciated..
    Regards,
    Disha.

    HI Disha
    Check out these links. They will surely help
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    If you find this answer useful, please reward me for the same.
    Good luck
    Karthik Potharaju

Maybe you are looking for

  • How to let the character in my flash game make a jump using AS3?

    i want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.Hope somebody will give me some advice, Thank you

  • Adding new attribute to Master data - Not present in ECC

    Hi, We want to add a new field in the master data object 0plant. the new field is not present in the R/3 side. So we are planning to maintain it manually. Is it feasible? Can someone explain how to approach the situation? Since it is not going to com

  • Windows media player for intel macs?

    im so bumbed that windows media player wont run on intel macs...does anyone know when they plan on getting it for intel macs!..i need it!...Flip4mac *****...the formats that it plays i have not come across yet..and thats even if its working properly.

  • Upload of po

    hi all i have to upload open purchase order in sap , which method i have to use

  • Multiple AI channel reads with differant input limits

    I want to aquire two high frequency AI channel signals from my SCB-68 at the same time. The signal is coming from two seperate pressure transducers. One needs to be sampled at 2000Hz with a voltage range of -10V to 10V and the other sampled at 200000