H:messages - Display order

Hi,
I have a form where the user enters *(1.zipcode 2.phone number 3.email address)* and i am using h:messages to display the messages at the top of the page. I would like the error messages to be displayed in the order of input field validations. JSF1.2 is displaying error messages in random order.
Scenario:+
User leaves all the fields blank and clicks submit.
Error messages are displayed in some order by JSF1.2:
Please enter email address.
Please enter phone number.
Please enter zipcode.
I want them to be displayed in this order:
Please enter zipcode.
Please enter phone number.
Please enter email address.
Is there a way i can specify to JSF to display the error messages in the order of input field validations?
Appreciate your help.
Thanks
vamsi

The standard messages component will output the messages in the order they are queued by the code. Do you have something unusual happening that would change the order of the component validation?
In any case, some potential solutions:
1) Use <h:message> with the for attribute and place the messages in the order you desire.
2) Create a custom messages component, which provides a sorting interface.
3) Use a PhaseListener to rebuild the message queue in the correct order before the Render Response phase (depends on the Iterators returned from FacesContext.getMessages() being modifiable).

Similar Messages

  • Error message display for PO creation with reference to internal orders

    Sir,
    While creating PO with Tcode ME21N (item category I) with reference to ' Internal Order with Funds provided (Tcode KO12), system displaying error message  when Budget is exceeded.
    But when Funds provision is not mentioned (Funds value is initial in KO12) , error message is not being given by the system during Po creation with ME21N.
    Where should I configure in img(Tcode SPRO) , so that system will throw error mesage while creating PO without Budget Provision (Funds not mentioned ) in Internal Orders.
    Regards,
    Srinivasa Murthy

    Hi Anupam,
    The error message display as follows. (when the PO Price exceeds the Planned Funds kept for internal order)
    This error comes during PO creation Process and PO can not be saved. This error message display is correct.
    Item 001 Order 600643 budget exceeded
    Message no. BP604
    Diagnosis
    In document item 001 Order 600643, budget  for fiscal year 2009 was exceeded by 99,960,000.00 INR.
    But  my question is 'when funds have not at all been mentioned for the internal order' then system has to throw the same error as mentioned above. But it is not happening. System is allowing the PO to save which is not correct.
    Regards,
    Srinivasa Murthy

  • h:messages tag display order

    From my observations, it seems that messages displayed by the messages tag show up with the messages created first at the end of the list (or table). On the surface, this makes sense --new messages are thrown on the pile, so to speak.  But this is the complete reverse order from how the fields show up on the form. Fields at the top of the form, which are validated first, show up on the bottom of the list. Fields at the bottom of the form, show up first. Not very intuitive for the user.
    Here are the options as I see them:
    1) write a custom component extending the messages component with the desired sorting behavior
    2) abandon the messages component, and code a panelGrid of message components for every field on the form (in the desired order).
    3) find a third party component... this seems basic enough so maybe this is already part of myFaces or ADF. So far, I've been getting by with the components included in the RI. Will something this trivial force me to switch?
    What are the approaches that I've missed?

    Here is an easy solution without having to create a custom component. I have a superclass bean for all of my backing beans with common functionality. In the validate() of my superclass bean I check for any messages to determine navigation and also capture all messages into a list if there are any.
         protected String validate() {
             String result = "success";
             FacesContext context = FacesContext.getCurrentInstance();
                        if(context.getMessages().hasNext()){
                 Iterator i = context.getMessages();
                 while(i.hasNext()){
              FacesMessage message = (FacesMessage)i.next();
              errorMessages.add(message.getDetail());
                 result = null;
             return result;
         }On the jsp I use JSTL to list the messages.
    <span style="width:100%">
         <h:outputText value="#{appBundle.ERR_HEADER}<br/>" escape="false" rendered="#{SelectAccountBean.messages == true}" styleClass="title"/>     
         <c:forEach items="${SelectAccountBean.errorMessages}" var="msg">
              <c:out value="<span class='message'>${msg}</span>" escapeXml="false"/>
         </c:forEach>
         <h:outputText value="<br/>" escape="false" rendered="#{SelectAccountBean.messages == true}"/>          
            </span>Edited by: minicpt on Jul 31, 2008 2:05 PM

  • Any way to change order of messages displayed?

    How can the order of messages displayed be changed?  Can the time and dates be removed?

    SSorry there is no feature for that, so you can't change it.

  • "Internal error: An unexpected exception has occurred" error message displayed when browsing a cube.

    “Internal error: An unexpected exception has occurred“ error message displayed when browsing a cube.
    The error behaviour is quite irregular and does not occur for specific condition.
    Will cumulative update 9 for SQL Server 2008 R2 (SP1) installation help to fix the issue which is provided on the below link:
    (http://support.microsoft.com/kb/2152148)
    The current version of SQL Server I am using is as below:
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)   Jun 17 2011 00:54:03   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    Thanks in advance for the help!

    Hi Mon,
    The hotfix you said is for Microsoft SQL Server 2008. So it will not work on your scenario since you are using SQL Server 2008 R2.
    Based on the limited information, we cannot give you the exact reason that cause this issue. In order to narrow down this issue, you can apply the latest Service Pack and Cumulative Update as GregGalloway said. Besides, you can troubleshoot this issue by
    using the Windows Event logs and msmdsrv.log.
    You can access Windows Event logs via "Administrative Tools" --> "Event Viewer".  SSAS error messages will appear in the application log.
    The msmdsrv.log file for the SSAS instance that can be found in \log folder of the instance. (C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Log)
    Here is a blog about data collection for troubleshooting Analysis Services issues, please see:
    Data collection for troubleshooting Analysis Services issues
    Regards,
    Charlie Liao
    TechNet Community Support

  • Clone MEMASSPO and disable messages display (display po: output) in ME23N

    Hi SAP Gurus,
    I have created a clone for transaction MEMASSPO. My problem is how will I modify the program of the clone (ZMEMASSPO) so that when I save the PO, it will not generate an output in transaction ME23N in 'Messages' (Display Pur. Order:: Output).
    Points will be rewared. Thank you.

    Hi Frankie,
    To ensure that there is no output generated you can implement the BADI (Business Add-in) ME_BAPI_PO_CUST. Here you need to change the parameter CH_NO_MESSAGING (BAPI parameter "NO_MESSAGING") to 'X'. However, this should be (even though it is only a temporary modification) done in way that only the logic which enters the BAPI from MEMASSPO is touched.
    This can be achieved by doing something like the following coding as the implementation in the BAPI- BADI:
    FIELD-SYMBOLS <l_subrc> LIKE sy-subrc.
    DATA: lf_name(128).
    CONCATENATE '(' 'SAPLEIMASS' ')sy-subrc' INTO lf_name.
    ASSIGN (lf_name) TO <l_subrc>.
    IF <l_subrc> IS ASSIGNED.
      ch_no_messaging = 'X'.
    ENDIF.
    This checks if the current program went through the SAPLEIMASS include before. This means that the BAPI was called by the MASS transaction. Therefore ch_no_messaging is set to 'X' and message output should be prevented.
    Hope it gives you some point to start.
    Best regards,
    Rodrigo

  • Assigning display order to prompts designed in universe

    Hi,
    Is there a way assigning display order to prompts designed in universe?
    Currently I have achieved it though appending numeric numbers like 1, 2...at the begining of the prompt text. But when I added a new prompt it is coming in between of the existing prompts where as I have already added a numeric value to it.
    For ex: I have following 4 existing prompts.
    1. Select Granularity
    2. Enter Data/Time
    3. Select Network View
    4. Select BSC Name
    The new prompt I have designed as 5. Select Time Zone Offset. Now this prompt is coming in between 3. Select Network View and 4. Select BSC Name prompt.
    I am surprised with this behavior. Is there a solution for this?
    Thanks,
    Sus.
    Edited by: SUS_India on Apr 20, 2009 4:18 PM

    If this is the case then "Prompt Order works as per the user:xx parameter in @prompt". As user:xx is reserved for Webi only, we can not use it in the universe while designing the prompts and can not achieve the prompt display order.
    That's why I have appended the Numeric numbers in the prompts message to achieve the order, but the behavior is different in some cases.
    For Ex:
    @Prompt('1. Select granularity','A',{'Weekly','Daily','Hourly'},mono,constrained,persistent)
    @Prompt('2. Enter date/time(mm/dd/yyyy hh24:mi:ss)','D',,mono,free,persistent)
    @prompt('3. Select Network View','A','Radio Error\NV Names Path',Mono,constrained,Persistent)
    @Prompt('4. Select BSC Name','A','RE BSC Dim\Ref BSC Name',mono,constrained,persistent)
    @Prompt('Select Time Zone Offset','A','Time Shift\Time Zone Offset',mono,constrained,persistent)
    I expect that the 'Select Time Zone Offset' prompt should come at the end as numeric values have higher priority. But I am getting this in between '3. Select Network View' and '4. Select BSC Name'.
    I don't know why:(
    Even I tried the 'Select Time Zone Offset' prompt message by appending a number like ''5. Select Time Zone Offset'. Then also it is getiing displayed in between 3rd and 4th prompt.
    -Sus.
    Edited by: SUS_India on Apr 21, 2009 10:35 AM

  • How to resove the "smart hard disk error" problem occured message displayed while starting up?

    Dear HP Technician
    My HP laptop showing me a "Smart Hard disk Error" while starting up the computer when I press power button on.
    The message displayed on black screen is as below:
    Smart hard disk error
    The smart disk check has detected an imminent failure. To ensure not data loss, please backup the content immidiately and run the Hard Disk Test in system Diagnostics.
    Hard Disk 1 (301)
    F2 system Diagnostics
    Enter-continue startup
    Fore information, please visit:
    www.hp.com/go/techcenter/startup
    I already did the Hard disk self test and it showed all the test were passed.
    Please help me to resolve this problem
    thank you
    regards
    neeraj
    +61 0432247152

    There are 2 ways of running a test on your hard drive . One way is through BIOS (F10) and other is through HP System diagnostics(F2). How exactly was test initiated from your end ?
    The SMART imminent failure for Hard drive is an indication that your Hard drive is on verge of failure or might fail anytime depending on usage. I would recommend you to backup your files immediately because your hard drive might die at any moment and I'm pretty sure its needs to be replaced.
     Kindly check the instructions over here in order to run the test for your hard drive
    //Click on Kudos and Accept as Solution if my reply was helpful and answered your question//
    I am an HP employee!!

  • Profit Center message display in MV45AFZZ

    In include MV45AFZZ  USEREXIT_SAVE_DOCUMENT_PREPARE I have added code to display information message if profit centre is initial/blank for any line item.
    Suppose there are 3 line items for a sales order with line item 20 & 30 having profit centers as initial/blank. I get my information message displayed as Profit centre not maintained for line items: 20, 30. Then I press enter and it allows me to add profit centers for the missing line items.
    I assign profit centre for line item 20 only and for line item 30 I want it to be blank. Then I save it.
    Here comes my issue :
    Again information message displays as u201C Profit centre not maintained for line item 30u201D. Unless I enter profit center value in line item 30 the message displays. If I enter some value and save it then document is saved.
    I need the message to be displayed only once and user can enter missing profit centre for any line item & save it. Now its mandatory to enter profit center for all line items.
    IF FLAG IS INITIAL.
    LOOP AT xvbap.
      IF xvbap-prctr IS INITIAL.
         lv_posnr = xvbap-posnr.
         CONDENSE lv_posnr.
         CALL FUNCTION 'BKK_DELETE_LEADING_ZERO'
            CHANGING
              c_field       = lv_posnr.
          IF lv_text IS NOT INITIAL.
            CONCATENATE  lv_text lv_posnr into lv_text SEPARATED BY ','.
          ELSE.
            lv_text = lv_posnr.
          ENDIF.
      ENDIF.
      CLEAR lv_posnr .
    ENDLOOP.
    IF lv_text IS NOT INITIAL.
          fcode = 'ENT1'.
          CONCATENATE zmsg_txt lv_text INTO zmsg.
          message i000(ZZ) WITH zmsg.
             FLAG = 1.
             fcode = 'ENT1'.
             LEAVE TO SCREEN 4001.
       ENDIF.
    ENDIF.
    ~Arya
    Edited by: arya soumya on Feb 1, 2012 10:36 AM

    Hi Soumya,
    Giving a thought about the scenario you have explained, you need Message if profit centre is initial/blank for any line item.
    I would suggest you another approach i do not know how far will it suffice your requirement,
    Taking your example Suppose there are 3 line items for a sales order with line item 10, 20 & 30 having profit centers as initial/blank.
    You want to assign profit centre for line item 20 only but not for line item 30 since you want it to be blank.
    When you code anything with respect to the Profit Center of the Line Item, it will check for
    if PC is not initial immaterial whether you want it to be blank or not and in all cases it will give you the message
    Instead, create a program which will capture the Line Item number.
    1) Give the Line Item numbers to the new Z program, and inside the program export the values to a memory id.
    2) Import the same value in MV45AFZZ and then in XVBAP you already have the POSNR for which you want to SAVE inspite it is BLANK
    3) if xvbap-posnr = g_import_posnr
        then dont give the error message.
        else.
        give the error message.
        endif
    Revert for further clarification or is there any mistake in my understanding.
    Thanks
    Sri
    endif.

  • Message sort order

    I want to change the default message sort order so messages are listed by most recent first, instead of oldest first in the mailbox.
    I've been reading about modifying the message list here:
    http://docs.sun.com/source/816-6010-10/uicst.htm#13511
    and just want to confirm that if I modify the meSortOrder variable in the main.js file, will that change the default message list for all existing mailboxes displayed in webmail?
    Also, does anyone know for sure whether the variable to list the newest messages first is meSortOrder=last or meSortOrder=L ???
    My system specs:
    iPlanet Messaging Server 5.1 Patch 1 (built Jun 6 2002)
    libimta.so 5.1 Patch 1 (built 06:07:28, Jun 6 2002)
    HP-UX wwcc B.11.00 A 9000/879 674411361 two-user license
    Thank you - Forrest

    Yes, thank you Jay - and I am working towards that now - in part due to the information you shared.
    But the question I am faced with will remain, can I change the default webmail message display from "oldest first" to "oldest last" on the system level. And at this time, I'm not sure if a newer version will change that default.
    So, from what I've read, in part from this Messenger Express customization guide:
    http://docs-pdf.sun.com/816-5986-10/816-5986-10.pdf
    you need to change the SortOrder variable to 'last' in the main.js.
    From my tests, this does not work. There seem to be preset variables options, and 'last' is not one of them. However, there are two more variables that look like they could affect this change: 'sorting' and 'orgSort'. Does anyone know how to change this setting to have the newest messages displayed first?
    Thank you,
    Forrest

  • Text Message display on Curve 9360

    Hi...just got a new Curve 9360. The default text message display shows all messages i.e. if I've sent a text most recently that is what I see at the top. What I want it to do is show the SMS Inbox (which I can navigate to via the folder options, but I can't find a way to set it as a default). Can't work out how to do it either on the device or when connected to the PC. Any suggestions...?...R

    Do you mean that currently ALL of your email messages and SMS text messages are mixed in one folder when you view, and you want to see a folder on your homescreen of ONLY your SMS text messages? And your email messages in another folder?
    If so, on your device, open that Messages folder > press the Menu key > Options > Inbox Management and check the box on "Text Messages", and save. That will put an SMS Text message folder on your screen.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Custom MBean - Attribute Display Order & Documentation

    Hi All,
    I've implemented custom security providers for one of our customers. All Providers are working very well. However I've problems about displaying attributes of my MBeans in WLS console. Attributes of my custom mbean definitions are displayed in console in unsorted manner. They're not sorted as I put them in mbean definition file and as I know there is also no display order attribute specified in "commo.dtd". I also checked [MBean Definition|http://download.oracle.com/docs/cd/E15523_01/web.1111/e13718/mdf_ref.htm#i1035144] . Is there a way to specify display order of managed bean attributes that placed in mbean definition file ?
    My second question is about generating description to display WLS console. I first tried to use "Description" attribute of MBeanAttribute element. It didn't worked. So I checked out out-of-the-box security providers to how they've done this before. I created "-doc.xml" files that uses "commodoc.dtd" schema and my attribute element's "Description" attributes as "See ...-doc.xml" in mbean definition file. It also didn't worked. I need to find a way to put my descriptions in WLS console . Any help would be appreciated.
    I'm including sample mbean definition, mbean documentation definition and my mbean generation ant comments. By the way I'm trying all this by using WLS 10.3.2 environment with Sun JDK 1.6.0.18.
    Thanks in advance.
    ANT TASK
    <java classname="weblogic.management.commo.WebLogicMBeanMaker" fork="true"
    failonerror="true" >
         <jvmarg line=" -DdoCheckDescription=true -Dfiles=${build_dir} -DMDFDIR=${build_dir} -DMJF=${build_dir}/${myproviderjar} -DtargetNameSpace=${namespace} -DcreateStubs=true -Dverbose=true"/>
    </java>
    MBEAN DEFINITION
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE MBeanType SYSTEM "commo.dtd">
    <MBeanType Name="SpnegoCredentialMapper" DisplayName="SpnegoCredentialMapper"
         Package="com.dflora.security.wls.cm.spnego" Extends="weblogic.management.security.credentials.CredentialMapper"
         PersistPolicy="OnUpdate" Description="See SpnegoCredentialMapper-doc.xml.">
         <!-- Standard values -->
         <MBeanAttribute Name="ProviderClassName" Type="java.lang.String"
              Writeable="false"
              Preprocessor="weblogic.management.configuration.LegalHelper.checkClassName(value)"
              Default="&quot;com.dflora.security.wls.cm.spnego.SpnegoCredentialMapperProviderImpl&quot;"
              Description="See SpnegoCredentialMapper-doc.xml." />
         <MBeanAttribute Name="Description" Type="java.lang.String"
              Writeable="false"
              Default="&quot; DFlora's Identity Assertion Provider for Spnego Tokens &quot;"
              Description="See SpnegoCredentialMapper-doc.xml." />
         <MBeanAttribute Name="Version" Type="java.lang.String"
              Writeable="false" Default="&quot;1.0&quot;" Description="See SpnegoCredentialMapper-doc.xml." />
         <!-- Extended Attributes -->
         <MBeanAttribute Name="Debug" Type="boolean" Writeable="true"
              Default="false" Description="See SpnegoCredentialMapper-doc.xml." />
         <MBeanAttribute Name="ForwardTicket" Type="boolean"
              Writeable="true" Default="true" Description="See SpnegoCredentialMapper-doc.xml." />
    </MBeanType>
    MBEAN-DOC
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MBeanType SYSTEM "commodoc.dtd">
    <?xml-stylesheet alternate="yes" href="commodoc.css" type="text/css"?>
    <MBeanType Name="SpnegoCredentialMapper"
    Package="com.dflora.security.wls.cm.spnego">
    <Description>
    <Lead>
    <p>This MBean represents configuration information for the Spnego credential mapper.</p>
    </Lead>
    <Detail>
    Deprecation of MBeanHome and Type-Safe Interfaces
    <p>Additional description about mbean </p>
    </Detail>
    </Description>
    <MBeanAttribute Name="Debug">
    <Description>
    <Lead>
    <p>Enables Disables Debug</p>
    </Lead>
    <Detail>
    <p>Detailed description of debug attribute.</p>
    </Detail>
    </Description>
    </MBeanAttribute>
    </MBeanType>

    Yes the description attribute doesnt work anymore the way it used to work in prev versions.
    On further research it was found that the Mbean required for generating description was missing.
    A bug was filed with the engineering the engineering team. I am not sure what happend after that.
    Let me try to find out.
    If the mean while if any one of u guys have a support contract, you can go ahead and open a case with Oracle.
    As for the order on display in the console, it shows in the order in which its defined in the MDF, m not sure why its behaving differently in your case.
    -Faisal
    http://www.weblogic-wonders.com/weblogic/

  • In Mail 3.6 remote images in HTML messages display as blue squares with ? even though checked in viewing references.

    In Mail 3.6 remote images in HTML messages display as blue squares with ? even though checked in viewing references.

    Nurit,
    The point is that that button should not be there, if the preference setting is as you say. This indicates the preference setting is stuck, and that is what I was trying to help you resolve.
    The full purge is done as follows:
    Quit Mail, and in the Finder open Home/Library and locate the Mail folder. Control-click over the Mail folder, and choose Duplicate -- then drag the resulting copy to the Desktop for temporary backup. Next, open Home/Library/Preferences and find the com.apple.mail.plist file and drag it to the desktop.
    Relaunch Mail, which will open as though new, and when prompted to import anything DECLINE. Instead, re-enter your account info, and Mail will re-discover the account folders for your accounts, and all should be well, after setting preferences as you desire.
    Ask any needed questions, and keep us posted.
    Ernie

  • How can I re-arranging the Email display order?

    I have multiple E-mail accounts which all display nicely under MAIL / MAILBOXES. I'd like to re-arrange their display order in "Inboxes" and "Accounts" which both scroll within the same screen. Is there any way to do this other than delete them all and re-enter in the order I'd like to see them?

    In a word, no.

  • I have three email accounts and want to know how to change the display order.

    I have three email accounts and want to know how to change the display order.

    Install this add on.
    https://addons.mozilla.org/en-US/thunderbird/addon/manually-sort-folders/?src=search

Maybe you are looking for

  • How to connect my Satellite P300D to the TV?

    My computer is Toshiba Satellite P300D, and I want to connect my TV via HDMI, because there are 2 HDMI input port. So what kinds of cable do I have to buy to connect HDMI? Do I have to download some software? How about the audio? Cheers

  • Modifying the data type of existing field in CC&B

    Hi , In log tab of Customer Contact page in CC&B there is a field (Trigger Date) which stores only date.I want to modify it so that it can store date and time also. Can anybody guide me how can i do this ?? Thanks sunil

  • Hide field based in process type - GS_CM Component

    Hello. Currently, we need to hide a field in GS_CM/AddDoc view of component GS_CM, because it have to be based on process_type. In CMBO node context, we have the object_type of the transaction (TYPEID attribute), but we need the process type to evalu

  • Trying to understand long sync time after 4 update :re blurry photos

    hi i wanted to take out the 1 photo album that was blurred/grainy after update and then re-install them so that they are optimized. however when i sync it is taking hours. the album in question has 800 photos in it, but it should delete right away. i

  • Layout & printing of avery labels...

    I am trying to figure out how to layout & print avery labels...5160 with a picture/symbols. I do not want to print from address book...I want to be able to print an entire page of the same symbol like I could on a pc in word!