Messages get displayed twice

I've got this global messages entry in my main JSP page that has a bunch of JSTL import in it. That main JSP page has one tag :
<h:panelGroup id="panelMsg">
       <h:graphicImage width="1" height="10" url="/images/spacer.gif"/>
        <h:messages id="msgRpf" globalOnly="true" styleClass="message"       layout="table"/>
</h:panelGroup>Whenever there is a message that has to be displayed we do it via a global method in our backingBean and the code is very simple :
protected void addMessage(String message){
        FacesContext context = FacesContext.getCurrentInstance();
        FacesMessage msg = new FacesMessage(message);
        context.addMessage(null, msg);
  }The problem is if we have to display two messages, instead of beaing added to the first one, another message block gets displayed, hence we have two messages panel displayed with one message each, instead of one panel with two messages in it.
I tried adding the ID in the context.addMessage method, but it doesn't get displayed...
Any help or clues would be appreciated
Thanks
-Ben

Maybe more code is needed to help...
This is part of the main JSP page
  <h:panelGrid id="contenu" columns="2" footerClass="subtitle" headerClass="subtitlebig" styleClass="contenu" columnClasses="subtitle, medium">
    <h:panelGroup id="panelNavigateur">
      <!-- ===== Navigateur -->
      <f:subview id="navigateur">
        <c:import url="navigateur.jsp"/>
      </f:subview>
    </h:panelGroup>
    <h:panelGroup id="panelContenu">
      <h:panelGroup id="panelMenu">
        <!-- ===== menu principal -->
        <f:subview id="menu123">
          <c:import url="gabaritMenu.jsp"/>
        </f:subview>
      </h:panelGroup>
      <!-- ===== sous titre page -->
      <f:facet name="header">
        <h:outputText styleClass="subtitle" value="Sous-Titre de la page"/>
      </f:facet>
      <!-- ===== messages page -->
      <h:panelGroup id="panelMsg">
        <h:graphicImage width="1" height="10" url="/images/spacer.gif"/>
        <h:messages id="msgRpf" globalOnly="true" styleClass="message" layout="table"/>
      </h:panelGroup>
      <!--  ===== formulaire de saisie -->
      <h:panelGroup id="menuH">
        <f:subview id="formSaisie">
          <c:if test="${XmlMenu.page != null}">
            <c:import url="${XmlMenu.page}"/>
          </c:if>
        </f:subview>
      </h:panelGroup>
    </h:panelGroup>
  </h:panelGrid>
...If we add 3 messages from our backing bean, instead of adding 3 lines with the corresponding text, 3 different "blocks" of text appear on the page. If I use the .getMessages() and Iterate through the messages, I only see one message instead of the 3 that should be there.
Any one have a clue ?
Thanks in advance.
-Ben

Similar Messages

  • Prevent that error messages are displayed twice

    Hi All!
    How can I prevent that error messages are displayed twice.
    The FuBa is called at the backend more than one time (at least twice)
    therefore I get every message twice.
    Regards
    sas

    Sas-
    I'm not sure if I understood your problem. Are you saying that you have a service which you call in a loop, and display the error message in the loop as well? If so an option would be to have a [HashMap|http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html] where the key is the error message id, and the value is the error message. In the loop check if the error message id returned by your service already exists in the map and add it only if absent. Then after your loop is complete use the MessageManager to display your consolidated error messages.
    Cheers-
    Atul

  • Throw Exception message is displayed twice.

    Hi all,
    In my java class based on a condition, I am throwing an exception. In runtime the exception message is displayed twice. I am sure that my code is gettign executed only once.
    Anyones help is greatly appreciated.
    Thanks in advance
    prabhakar

    Hi all,
    In my java class based on a condition, I am throwing
    an exception. In runtime the exception message is
    displayed twice. I am sure that my code is gettign
    executed only once.
    Anyones help is greatly appreciated.
    Thanks in advance
    prabhakarPlease be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
    Please post a short, concise, executable example of what you're trying to do. This does not have to be the actual code you are using. Write a small example that demonstrates your intent, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
    Post your code between [code] and [/code] tags as described in Formatting Help on the message entry page. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
    Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
    Help us help you solve your problem.

  • Error message getting displayed in testing system not in development system

    Hi All,
    I am working on BW 3.5 BEx Query Designer.
    I have transported my queries to quality system twice as there were few changes in the variables.
    now after the second transports, when I execute the queries in quality system I am getting one error message at the top of report output stating "variable name" does not exist.
    I am not able to trace out why the error message is getting displayed while query is working fine in quality system.
    If it is due to some variable that has been removed or deleted....will it impact on production move?
    how to resolve this problem?
    Please provide me some inputs.
    Thanks,
    Rashmi.
    Edited by: Rashmi on Aug 6, 2008 1:29 PM

    Rashmi,
    Once again Create transport request in RSA1 ans while creating it you need to collect the all the query element.
    Transport it again into quality and do the testing as per the business requirment
    It would help to resolve the issue

  • Mail messages sometimes displaying twice

    Lately, Mail sometimes displays new messages that have just arrived twice. There don't seem to be 2 actual copies of the message in the inbox, just the same messages displayed twice. It's kind of an odd behavior, really. If a message is clicked on and viewed in the preview window, the duplicate displayed doesn't change from unread to read. However, if a message is deleted both lines displaying the message go away and only one appears in the trash.
    This doesn't happen all of the time, just sometimes. Shutting down mail and reopening it gets rid of the duplicated message displays, but then some other time checking mail it will happen again.
    Anybody have any ideas on how to make this go away permanently? Thanks in advance.
    iMac G3 450 & eMac 700   Mac OS X (10.4.9)  

    You’re welcome.
    I don’t know what’s going on here. It looks as if the the account had been set up twice in Mail > Preferences > Accounts, even though you say it appears there only once...
    Try re-creating the file where the account settings are stored:
    1. Quit Mail if it’s running.
    2. Make a backup copy of the ~/Library/Mail folder, just in case something goes wrong while trying to solve the problem. You can do this in the Finder by dragging the Mail folder to the Desktop while holding the Option (Alt) key down, for example. This is where all your mail is locally stored.
    3. In the Finder, go to ~/Library/Preferences/. Locate com.apple.mail.plist and move it to the Desktop (to be deleted if this solves the problem).
    4. Open Mail. You’ll have to set up your non-.Mac accounts from scratch all over again. If given the option to import existing mailboxes or something like that, don’t. Just enter the account information and Mail will automagically rediscover the data in ~/Library/Mail/ when done.
    5. You’ll have to re-configure most of your settings in Mail > Preferences. For spam-related security reasons, the first thing you should do is go to Preferences > Viewing and disable Display remote images in HTML messages if it’s enabled.
    6. As a side effect of re-creating com.apple.mail.plist, Mail might rename Outbox (which is where messages waiting to be sent are stored) to Delivered. The name of that mailbox is actually a misnomer, as it would contain messages (if any) that couldn’t be delivered for some reason. You can delete that mailbox if you wish.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. You can easily locate any of the folders referred to in this post by copying the folder path here, doing Go > Go to Folder in the Finder, and pasting the folder path there.

  • Po message getting triggered twice

    Hi,
    recently we have upgraded SRM5.0 to SRM7.0 with ECC6.0 EHP pack4 .
    we have a problem when we create PO from SRM shopping cart in ECC.PO message is getting triggered twice. Th issue was not there before upgrade.
    Can anyone please help me resolving this.
    Thanks & Regards,
    Beena.

    Hi,
    While making a purchase requisition, you can refer to either last purchase or can take a reference of blanket purchase agreement, just check for that particular supplier that whether in the requisition table while importing requisition from maximo, there exist a reference of any last purchase or any blanket purchase agreement. If yes then autocreate workflow will get trigger automatically which might be schedule on your instance, which will create a purchase order for that particular supplier.
    Thanks & Regards
    Ankur Dawra

  • Strange error message getting displayed

    Hi All,
    We are facing a strange problem when we type in the following URL http://<host>:<port>/irj/blah.jsp
    The error message says that the file blah.jsp does not exist and then gives the complete directory structure for e.g. c:\usr\sap\<instance name>\JC<Instance Number>\.....irj\.....\blah.jsp does not exist.
    We want to prevent this directory structure from getting displayed and display a generic error message.
    Please let us know how this will be possible.
    Regards
    Sidharth
    Message was edited by: Sidharth Deshpande

    Hi,
    If you want to display your error message you must add in "apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\web.xml" file the following tags:
    <error-page>
    <error-code>404</error-code>
    <location>/my_error_page.jsp</location>
    </error-page>
    Now when error code 404 occurs then this my_error_page.jsp will be displayed instead of default error page.
    In my_error_page.jsp you may process the errors as you want.
    Best Regards,
    Violeta Georgieva
    Message was edited by: Violeta Georgieva

  • Error messages are displayed twice.

    Hi,
    In my application in validateEntity() method of a entitiy I do some validation like this:
    protected void validateEntity() {
    if (this.getReqType() == null)
    throw new JboException("Please select value for Rquest Type.");
    but displayed error massage displayed twice :
    1.Please select value for Rquest Type.
    2.Please select value for Rquest Type.

    See Re: duplicate error messages

  • How do I get my phone calls to be displayed in my notification bar , my apps and my messages get displayed but not my phone calls I don't know what to do

    All of my other apps show up in my drop box but when it comes to my phone calls nothing happens I have been searching and searching for an answer but I can't find one , I just want my phone calls to show up in drop box , please I need some help !!

    Did you try resetting the phone? hold power and home buttons
    till the silver apple shows up about 15 to 20 seconds.

  • Popup Message Displayed twice - Java 5.0 Swing

    Hi,
    We are upgrading our Desktop Appln. from Java 1.3.1 to 1.5.0. In many places in our aplications, we have attached Input Verifiers to JTable's, so that the columns can be validated. But in case of Java 1.5, the verifier is getting called more than Once. So, the error message pops up multiple times.
    Help Need,
    petro

    Hi,
    Thanx for the Reply,
    After a little bit of Workaround, this is the result:
    In our Appln., We have extended JTable and override the editingStopped(e) method of JTable , so that, if the input value is wrong, then the Focus should stay in the Same field after showing the error message (By default the focus moves to the next field after showing the message). For achieving above condn., we are calling Input verifier's Verify() method (Is there any way ???) in the overridden method.
    In case of Java 1.5, the JComponent's requestFocus(bool) also checks whether the input is valid by calling Input Verifier's shouldYieldFocus() method.
    So, that's why message is getting displayed twice...so what is the soln., bcoz i want the focus should not be lost if the input is wrong.
    thanx.

  • Error message in a BADI getting displayed in a popup instead of status bar

    Hello All,
    I have implemented a BADI in ECC6 to prevent the change of formula in ERP from transaction O3I8.
    The BADI gets called on clicking 'Save' from transaction o3I8.
    Within the  BADI i am giving an error message using the following command:
    Message e000(ZABC) .
    However , the message gets displayed in a pop up instead of the status bar .
    The same is for information and warning messages.
    Any suggestions on how to display them in the status bar ?
    TIA
    Regards,
    Vartika

    Hi Brad,
    The checkbox to display messages in pop-up  is already switched off.
    Still themessages are getting displayed in pop-up.
    Regards,
    Vartika

  • Forms Error Message displayed twice

    But on clicking the save button to commit the changes in the form, the validation trigger fires and the error message is displayed twice. This is once for the item and at the other at the form level.
    The error message has to be displayed only once i.e. while submitting the form by clicking the save button. Please suggest.
    Thanks in advance.
    Edited by: sri_menon on Sep 24, 2008 8:30 AM

    Do you alter the data in your Character Item through a program unit? Since you only have a WVI trigger at the item level, something in the form is causing the status of the item to become "Dirty" or "Invalid" after the WVI trigger fires. Therefore, Forms fires the WVI trigger again. Something else you can try is to turn "Debug Messages" on (go to Preferences => Runtime tab => check Debug Messages). This will display an Alert for each trigger that fires during Runtime. Then you can record all of the triggers that fire after the WVI trigger fires the first time. Once you know which trigger fire between the first execution of the WVI and the second execution of WVI then you can put break points in these triggers and then run the Form with the Debugger and see what it happening during the validate cycle. If you are using Form6i, the debugger is very easy to use. If you on Form 9 or greater, there is some setup that must be done to debug the web deployed form, but it well worth the setup to be able to debug your form.
    Hope this helps.
    Craig...
    Edited by: CraigB on Sep 25, 2008 8:18 AM

  • Strange Problem: MenuItem icon is displayed twice

    I have a simplest menu with icons. The problem is that when menu item is  clicked, the icon gets displayed twice(one on top of the other).
    i.e: The SubMenuItem A1 icon is displayed twice( along the top and left  side)
    Any ideas about how to prevent this??

    TeotiGraphix wrote:
    Hi,
    Are you using a custom menu item renderer? If not and you are using the stock Menu, this seems like a bug. It really shouldn't since a whole bunch of other people would get it as well.
    Are you using icon fields or functions?
    Mike
    No, it's the simplest menu from adobe documentation!!
    No Renderers, embeded icons.
    The code is bellow. Any ideas?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
            <mx:Script>
            <![CDATA[
                import mx.controls.Menu;
                 [Bindable]
                 [Embed(source="./assets/forward.png")]
                      public var iconEdit:Class;  
                      [Bindable]
                 [Embed(source="./assets/bank.png")]
                      public var iconEdit2:Class;  
                private function createAndShow():void {
                    var myMenu:Menu = Menu.createMenu(null, menuData, true);
                    myMenu.show(10, 10);
                [Bindable]
                public var menuData:Array = [
                    {label: "MenuItem A", children: [
                        {label: "SubMenuItem A-1", icon: "iconEdit"},
                        {label: "SubMenuItem A-2", icon: "iconEdit2"}
            ]]>
        </mx:Script>
        <!-- Button control to create and open the menu. -->
        <mx:Button x="300" y="10"
            label="Open Menu"
            click="createAndShow();"/>
    </mx:Application>
    </mx:Application>

  • JList item selected is displayed twice. Please Assist

    Folks,
    I have this strange behaviour when I select an item from the JList.
    When I select the an item, it gets displayed twice.
    Can anyone tell me why this is being displayed twice?
    I am also checking the Java Sun Swing tutorials site..but no luck as yet.
    Attached is a short class.
    If you click on Black or Blue etc ,it gets displayed twice...
    public class JListDemo extends JFrame{
    private JList colorList;
    private Container c;
    private String colorNames[] = {"Black", "Blue","Red","Green","Yellow"};
    public JListDemo() {
    super("JList Demo");
    c = getContentPane();
    c.setLayout(new FlowLayout());
    /** Create a List */
    colorList = new JList(colorNames);
    colorList.setVisibleRowCount(3);
    colorList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    c.add(new JScrollPane(colorList));
    //** Set up Event Handler.
    colorList.addListSelectionListener(
    new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e)
    System.out.println(colorList.getSelectedValue());
    setSize(1000,550);
    show();
    public static void main(String[] args) {
    JListDemo JListDemo1 = new JListDemo();
    }

    in your ListSelectionListener you must check if the event is one of multiple change events. In your case you get one event when the mouse first selects an item and possible more when you move the cursor over the other entries. If you are only interested in the final selection check if e.getValueIsAdjusting() is false.
    // not interested in events if they are not final
    if (e.getValueIsAdjusting())
        return;
    // do what ever you want
    System.out.println(colorList.getSelectedValue());
    ...Hope this helps!

  • Dynamic mandatory field error message is not getting displayed in webui

    Hi,
    In Appointment if the importance is HIGH i made Location as mandatory.For this i enhanced BT126H_APPT/ApptDetails. In the get_p_location() method of BTACTIVITYYH i have written the code.
    Now the problem is Error message for this dynamic mandatory field is not getting displayed in webui.
    I debugged in DO_FINISH_INPUT error message is getting generated but it is not getting displayed in ui.
    Can anybody tell where the problem is?
    Thanks,
    Hari.

    Hi Hari,
    Really sorry do not know how to convert this nug file to text
    How ever quick solution for your problem would be just keep your validation in 'DO_VALIDATE_INPUT' method of the view controller.
    Means even if the User clicks on SAVE , Since it fails here , it would not allow you to go further.
    Thanks,
    Rajesh P

Maybe you are looking for

  • Public folders from exchange 2007 to exchange 2013

    HI I am new to exchange, i am planning to do the migration of Exchange 2007SP3 UR10 to Exchange 2013 CU7, I want to move public folders from exchange 2007 to exchange 2013. wht is the procedure to move and wht are the commands to know how many public

  • IPod mini no longer visible on Mac or in iTunes

    My daughter's pink iPod mini is no longer visible on her iTunes, or on our Mac. My son has been to the web site, has followed all steps to reload software, restore iPod, he's been quite methodical. We have OSX 10.3.4, iPod software has been updated,

  • Pkg install fails - DW CC on Win 8.1

    My department has created an installation package for DW CC. I run the .msi file and it tells me to close 2 things, Windows Explorer and some SQL program. I do that. The installation proceeds saying it's "gathering required info" and then "wait while

  • My ipod nano touch isnt turning on or connecting to my computer

    how can i fix my ipod nano touch 6 gen..? its been like 2 weeks without my ipod, and i tried and tried to "hold the wake/sleep button and the volume down" but it doesnt work! what am i suppose to do?

  • Enter key gets out of app....

    so hello again, when i am on chatting on any application and i press enter to send the message, it takes me out of the application..... meaning that i have the conversation windows open and i press enter to send the message and it that window isnt se