Problem displaying an error message

I'm having a trouble displaying text stored in a session scope variable, and I'll try to explain this here with a small example. ps: I'm using IBM's RAD (Eclipse Enhanced IDE) to develop JSF.
Let's just say I take the following steps:
1 - I create a new Dynamic Web Project Called Test
2 - I add a new Faces JSP File called index.jsp (into WebContent folder of
course)
3 - I add a command button to the page (using the extended
hx:commandExButton tag, inside a form and, inside a scriptcollector,
this is all added automatically)
4 - I add an output text component to the page (outside the form but still
inside the scriptcollector tag, and visually below the button)
5 - I add a new java.lang.String Session Scope Variable called test
6 - I add to the command button tag the atribute action with the value
"#{pc_Index.proceedAction}"
7 - I check faces-config.xml for the correct mapping between pc_Index and
the Index.jsp backing bean
8 - I create a new method in the corresponding pagecode file (backing
bean) - public void proceedAction () - with only one line:
getSessionScope().put("test","xpto");
which should put the String object "xpto" into the test variable
9 - I drag and drop the test variable to the outputText in the IDE (i believe all
it does is to add value="#{sessionScope.test}" to outputText tag)
And everything runs ok, the message is displayed when the button is clicked, just as I wanted. The thing is, I have a slightly more complex application in JSF on which I can't make this work.
Basicly i have radio buttons and different destinies upon click of a "next" button. And an error message in an output field should be displayed when no radio button is selected, since the page remains the same. but I can't make the message appear, it only appears when I click "Previous" on another page to get back to the first one. Then the message magicly appears (and it shouldn't even appear those times...)
Any ideas? Any help would be most apreciated, thanks.

I'm having a trouble displaying text stored in a session scope variable, and I'll try to explain this here with a small example. ps: I'm using IBM's RAD (Eclipse Enhanced IDE) to develop JSF.
Let's just say I take the following steps:
1 - I create a new Dynamic Web Project Called Test
2 - I add a new Faces JSP File called index.jsp (into WebContent folder of
course)
3 - I add a command button to the page (using the extended
hx:commandExButton tag, inside a form and, inside a scriptcollector,
this is all added automatically)
4 - I add an output text component to the page (outside the form but still
inside the scriptcollector tag, and visually below the button)
5 - I add a new java.lang.String Session Scope Variable called test
6 - I add to the command button tag the atribute action with the value
"#{pc_Index.proceedAction}"
7 - I check faces-config.xml for the correct mapping between pc_Index and
the Index.jsp backing bean
8 - I create a new method in the corresponding pagecode file (backing
bean) - public void proceedAction () - with only one line:
getSessionScope().put("test","xpto");
which should put the String object "xpto" into the test variable
9 - I drag and drop the test variable to the outputText in the IDE (i believe all
it does is to add value="#{sessionScope.test}" to outputText tag)
And everything runs ok, the message is displayed when the button is clicked, just as I wanted. The thing is, I have a slightly more complex application in JSF on which I can't make this work.
Basicly i have radio buttons and different destinies upon click of a "next" button. And an error message in an output field should be displayed when no radio button is selected, since the page remains the same. but I can't make the message appear, it only appears when I click "Previous" on another page to get back to the first one. Then the message magicly appears (and it shouldn't even appear those times...)
Any ideas? Any help would be most apreciated, thanks.

Similar Messages

  • Problem in BADI, error message not getting displayed

    Hello Experts,
    I am facing a strange problem in BADI.
    The requirement is that the user should not be allowed to change the plant field
    on the screen of standard MM transctions for PO/PR amendment.
    I have written the code in separate BADIs for PO and PR.
    I am displaying an error message if the user tries to change the field.
    For PO, it is working fine.But for PR, the same code is not working.
    The control is going over to the BADI for PR and rest of the code is working fine.
    But the error message is not getting displayed for PR amendment.
    Can anybody please suggest the possible cause of problem and some solution to it.
    Thanks in advance.

    Hi
    See the sample BADI code for PR which raises an exceptions and do accordingly
    BAdI Name: ZPUR_RFQ (Implementation name) Purchase Requisitions
    Definition Name: ME_REQ_POSTED
    Interface Name : IF_EX_ME_REQ_POSTED
    Implementing Class: ZCL_IM_PUR_REQ
    Method :            POSTED
    METHOD if_ex_me_req_posted~posted .
      DATA : v_mtart TYPE mtart.
      DATA l_s_eban TYPE ueban.
      LOOP AT im_eban INTO l_s_eban.
        IF l_s_eban-estkz NE 'B'.
          CLEAR v_mtart.
          SELECT SINGLE  mtart INTO v_mtart FROM mara WHERE matnr = l_s_eban-matnr.
          IF v_mtart EQ 'ZERS' OR v_mtart EQ 'FHMI' OR v_mtart EQ 'UNBW'.
            MESSAGE e000(zm_msg) WITH 'You are not allowed' 'to create PR for stock items'.
          ENDIF.
        ENDIF.
        IF  l_s_eban-knttp NE 'F' OR l_s_eban-pstyp NE '9'.
          IF l_s_eban-knttp NE 'A'.
            IF ( l_s_eban-pstyp NE '9' AND l_s_eban-pstyp NE 'D' ) 
               AND l_s_eban-matnr EQ space.
              MESSAGE e000(zm_msg) WITH 'You cannot create'
                'a PR without material number'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMETHOD.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to not display the error message ?

    hi everybody,
    I would like to know if it is possible to not display the error message in BO XI R2 when I try to refresh my reports ?
    (like "the query bla bla does not fetch any data...")
    Thanks for your help,
    Mario

    I've found this method to not display this error message but  the problem is that the prompt message when you refresh the report are not displayed:
    Has someone an idea ?
    Private Sub Document_BeforeRefresh(Cancel As Boolean)
    Application.Interactive = False
    End Sub
    Private Sub Document_AfterRefresh()
    Application.Interactive = True
    End Sub
    Edited by: Pascolo Mario on Oct 22, 2008 4:35 PM

  • Have a Sony Viao E series and get an "imcompatible display driver" error message

    Get an "Incompatible Display Driver" error message when attempting to use Adobe Premiere Elements 12 on a Sony Vaio E series laptop.
    How to solve this problem?
    Thanks

    I Googled, and Sony says that is a discontinued model, so I can't find a specification page
    Amazon does have a couple models, and BOTH say motherboard integrated Intel graphics adapter
    That makes me think the laptop discussed here has Intel AND AMD graphics adapters
    To the OP (Original Poster) Go to the Windows Control Panel and select Hardware and Sound and then select Device Manager... In Device manager you click the + sign to the left of Display Adapters... and see if 2 are listed
    If YES, read below
    -http://helpx.adobe.com/premiere-pro/kb/error---preludevideo-play-modules.html
    -http://forums.adobe.com/thread/1001579
    -Use BIOS http://forums.adobe.com/thread/1019004?tstart=0
    -link to why http://forums.adobe.com/message/4685328
    -http://www.anandtech.com/show/4839/mobile-gpu-faceoff-amd-dynamic-switchable-graphics-vs-n vidia-optimus-technology/2

  • ICI - How to display custom error messages in SAP CRM

    Hello,
    we are working on a custom Contact Center which interfaces with SAP CRM Version 7 with Enhancement Package over ICI.
    The basic call functions like accepting, hanging up, holding and retrieving are fully implemented and are working already.
    Our goal is to display error messages in the CRM so that clients know there is something wrong, for example why he can't be log in successfully (e.g. the telephony server isn't reachable).
    We already found the ICI Documentation file which provides us the CRM SOAP error codes and tried to send SOAP Fault messages, but never got
    them to screen.
    Please find an attached example screenshot what we mean exactly, reproduced by trying to make a call with CRM user while BCM CDT isn't
    running in the background.
    Regarding to this topic we've the following questions:
    - Is it possible to display custom error messages on the CRM or is this functionality limited to SAP?
    - Could you provide us some further information on how to use this feature exactly (implementation details?) and how the SOAP XML should look like to get it work?
    Thank you in advance!
    Best regards
    René Holy

    NewUser7 wrote:
    Please correct me if I am wrong
    I need to create an entity adapter and attach an error handler with the adapter? or can i handle that in the event handler itself. I coulnt find any api for handling errorsYou can do it both ways but since we are talking about event handler now, then in 9.x you need to extend com.thortech.xl.client.events.tcBaseEvent class for creating a event handler. In tcBaseEvent class there are various flavors of handleError method. So use that as per my note earlier and you should be good.
    HTH

  • Display Custom Error Message in OIM 11g

    Hi,
    I'm trying to display an error message from a validation event handler but seems that am missing something. When the "oracle.iam.platform.kernel.ValidationFailedException" is thrown from a validation handler an error message is displayed: "An error occurred". If an error code is provided (see code below) then the message looks like: "An error occurred. The corresponding error code is ERR-0001". I guess that some resource bungle with corresponding messages should be provided.
    the code used:
    package test;
    public class UserGeneralValidationHandler implements oracle.iam.platform.kernel.spi.ValidationHandler
    @Override
    public void validate(long processId, long eventId, Orchestration orchestration)
                   throws ValidationException
    String errorCode = "ERR-0001";
    String message = "Simple validation message.";
    ValidationFailedException ex = new ValidationFailedException(message);
    ex.setProcessID(processId);
    ex.setErrorCode(errorCode);
    throw ex;
    Q:
    1.What is missing for complete solution?
    2.What is the algorithm that used by OIM to find default or non default resource bundle?
    3.How to change out-of-box validation messages? For a sample "The organization ABC does not exist." message is shown if non existing organization is provided during user creation and I'd like to have a different one.
    Regards
    Serge

    rename OIMUI.jar  to OIMUI.zip
    find logging_en and loggin.properties.
    Modify the "IAM-2050512" error message with your custom message
    Find Agent and agent_en.properties.
    Find Note[ERROR_SUBMITTING_REQUEST].text.  Modify the message. Make sure the message must be the same with in logging.properties("IAM_2050512")
    Deploy
    change the  OIMUI.zip to jar
    replace the existing OIMUI.jar
    login to weblogic  and redeploy OIM (oim.ear)
    no need to restart OIM server.
    Test:
    create a request in web console again, you must see the custom message when you hit the submit button
    hope this helps.
    -rad

  • Displaying Custom Error Message in ALV

    Hello Experts,
    Usually, when an error occurs in editable ALV, the standard WD ALV functionality marks the particular error cell in red and displays the error message.
    I want the same functionality for custom error messages in event ON_DATA_CHECK. I'm able to display the message, but looking for a way to mark cells as well.
    Please help....

    Hello friend,
    I think this link will help you much more clear on the coloring of the ALV concepts.
    http://help.sap.com/saphelp_smehp1/helpdata/en/5f/ec57c72a1349c8bfdda56d976e9399/frameset.htm
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393?QuickLink=index&overridelayout=true
    Thanks,
    Sri Hari

  • Display custom error message in enhancement spots

    Hi all,
    Is there someone here who've encountered having the need to display custom error message in an enhancement spot? Could you help me please.. I can't find any reference from the net.
    Thanks in advance
    Regards,
    Aris

    Hi,
    The error message can be only displayed in enhancement spots based on thr program flow.
    You have to determine where its getting called for ex: in PBO or PAI etc.....
    You have to find the right place to display the error messages . for ex: using a memory id ......

  • Display an error message during a few seconds

    Hi!
    When submitting a form, I am displaying a error message saying that the actions performed work fine. Afterwards I would like this message to disappear after a few seconds. How can I do that ?
    in the function called by my action button that submit the form i have:
    public void saveForm() {
    // .... operations ....
    context.addMessage(null,new FacesMessage("Everything is ok"));
    }

    Hi,
    I doubt if there is anything you can do from the action method
    saveForm(), however this you can do it from the client side just
    put some seconds delay in onload method in javascript and
    redirect to some other page.
    Thanks
    Ansar

  • ADF-BC/JSF How to display acustom error message from a backing bean

    Hi all
    Can anybody provide an example of how to manipulate the list of error messages from a JSF backing bean.
    In my code I use a different navigation case and this directs the user to the page displaying the error message but I am sure that there must be a more elegant way.
    Thanks in advance
    Thanassis

    Thanks Kris
    I think you 've put me on the right track here, it's just that in my case what I really want to do is prevent my users from editing records not belonging to their own group. This is done via a selectOne table component and then the backing bean code tests if the value #{row.UserGroup} matches the #{bindings.LoggedOnUserGroup.inputValue}. If the values are equal then the beans returns the navigation case to the edit page. Otherwise it returns the navigation case for the "cannot edit" page.
    So what I am thinking is to return null and somehow raise the right kind of exception in order to display the error in the af:messages tag.
    Thanassis

  • Displaying an error message with a link to the error field

    By default, ADF validation usually displays an alert with an error message and a link to the error field.
    I have some custom validations where I finally display the error message with this:
      public static void MessageError(String messageText){
        //String messageText="No se han encontrado estos datos";
        FacesMessage fm = new FacesMessage(messageText);
         * set the type of the message.
         * Valid types: error, fatal,info,warning
        fm.setSeverity(FacesMessage.SEVERITY_ERROR);
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(null, fm);
    My customer is asking for displaying a link to the error field in this kind of error alerts as standard errors do.
    Is there any way to get this ?

    Can't you include this in your message?
    You may want to check Duncan's blog https://blogs.oracle.com/groundside/entry/get_more_from_your_messages whichgives more inside on what you can do
    Timo

  • ITunes displays -48 error message when syncing iPod Nano on Windows XP

    My girlfriend's mom's iPod Nano ran out of charge while jogging so she decided to charge it on her daughter's iHome. The next day she went to use her iPod but it was totally empty of all music and files. When she tried to sync it to iTunes, she received an eror message stating, "An unknown error has occurred (-48)" from iTunes and a Windows message stating that some iPod folder/file was corrupted.
    If anyone receives such a message, I was able to correct it by:
    -Plugging in your iPod to your PC
    -Ignore the error messages
    -Go to My Computer
    -Find your iPod's drive letter (ie. G:)
    -Right-click on it and select Properties
    -Go to Tools Tab >Error-checking and select Check Now
    You should be able to sync your iPod as before. I do not claim to be an expert so be warned that it may not work for you. Good luck!

    Hey ermides,
    Thanks for the question. The following resource provides information if you are receiving a -50 error message when syncing:
    iTunes displays -50 error message when syncing iPod on Windows XP - Apple Support
    http://support.apple.com/en-us/ts1539
    Thanks,
    Matt M.

  • ITunes displays -50 error message when syncing iPod on windows 7

    I am trying to sync my ipod and appears this error
    iTunes displays -50 error message when syncing iPod

    Hey ermides,
    Thanks for the question. The following resource provides information if you are receiving a -50 error message when syncing:
    iTunes displays -50 error message when syncing iPod on Windows XP - Apple Support
    http://support.apple.com/en-us/ts1539
    Thanks,
    Matt M.

  • Display an error message in Portal during creation of Object Link

    Hi,
    I have a requirement where I need to throw an error message in Portal during creation of Object Link.
    The requirement is whenever the user clicks on Item and try to create a Object Link for Material-Plant combination, if the Mat-Plant combination exist, than I have to throw/display an error message.
    I tried for some enhancements in BAPI_BUS2172 but it does not work out.
    Please help.
    Thanks in advance.
    Arbind

    Hi,
    If you include the UI, it will display at the top of the screen..
    Please see below how to create a message in the message editor.
    http://help.sap.com/saphelp_nw04/helpdata/en/72/1d6526263ff24995016a152705eab2/frameset.htm
    and this is how you access the error message in the application ti display it to the end user
    http://help.sap.com/saphelp_nw04/helpdata/en/72/1d6526263ff24995016a152705eab2/frameset.htm
    Regards,
    Ganesh N

  • How to display an error message after validation in Formatted Search?

    Hi SBO experts,
    if an error is detected on validation in a Formatted Search, how to display an error message to the user entering the data?
    Thanks & Regards,
    Raghu Iyer

    i created a formatted search query & attached it to the field 'Quantity' at Line Item level in Sales Order screen. just for testing purpose, i eneterd the following code lines in the query validating 'Quantity'
    if $[$38.11.0] > 50
    begin
    select @error = 1
    select @error_message = 'Vendor code cannot begin to X sign.'
    end
    the system throws the error : Internal error (8180) occurred [Message 131-183]
    actually, i need to display an error message to the user if Quantity is not in multiples of the OITM.SalFactor2
    if $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0]) > 0
    begin
    select @error = 1
    select @error_message = 'Error in Quantity.'
    end
    but, this expression to get the remainder itself seems to have some error
    $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0])
    i guess, % operator is used for modulo (to find the remainder of one number divided by another.) ? am i right ?
    Regards,
    Raghu Iyer

Maybe you are looking for

  • How to open a text file without using dialog box

    I can open a file using dialog box but I want to open a file without using any dialog box for writing. With the following commands a new file is created. File outputFile = new File("outagain.txt"); FileWriter out = new FileWriter(outputFile); I want

  • How to make JFileChooser's directory as a droptarget?

    i able to drop file in the current directory of JFileChooser (on the "look in" of it e.g look in c:\) but when i drop my file to JFileChooser any of the directories which jfilechooser shows mouse cursor shows the disable symbol which indicates that t

  • HP Envy 4500 won't print from computer

    Hi, My HP Envy 4500 has been working perfectly for quite some time now.  Unfortunately, it has stopped printing from my Dell laptop, running Windows7. It scans to the laptop just fine.  It copies fine, and it prints from my iPhone fine. I have looked

  • I want to sync IPhone 5 with itunes, but I can't upgrade itunes nor mac os.

    I just got the iPhone 5 and I would like to sync it to my itunes to upload music. However, apparently I need to buy the snow leopard os for $200 to do so. I am not willing to pay $200 just to upload music on my phone. There has to be another way to d

  • PO field values at the time of Rlease.

    Hai folks,   I want to know the values for fields at the time of PO release.. LIke if i create a PO and Release it and change it and release it(so on many times) How will I know the values of fields at each release time.. My report has to display all