Display popup messages

hi,
i am using adf11g,jdeveloper 11g.in form i drag and drop one vo.
in that form,for one attribute which is used as LOV,i have written valuechangelistener method.
in that method i wrote some code for validaiton.when validaiton occur i am able to show popup messages regarding particular error.
when any validaiton occur,popup message is coming,but my data is partially submitting to form after showing that error message.
it should not submitted to form in case of any error.
please give me the solution.
IN JSFF page
<af:panelFormLayout id="pfl8" fieldWidth="100" labelWidth="150"
binding="#{GLPolicyBean.bindFormEvent}">
<af:inputListOfValues id="GlstpAcDesc"
popupTitle="Search and Select: #{bindings.GlstpAcDesc.hints.label}"
value="#{bindings.GlstpAcDesc.inputValue}"
label="#{bindings.GlstpAcDesc.hints.label}"
model="#{bindings.GlstpAcDesc.listOfValuesModel}"
required="#{bindings.GlstpAcDesc.hints.mandatory}"
columns="#{bindings.GlstpAcDesc.hints.displayWidth}"
shortDesc="#{bindings.GlstpAcDesc.hints.tooltip}"
autoSubmit="true"
partialTriggers="GlstpGlCode"
valueChangeListener="#{GLPolicyBean.glACDescChanged}">
<f:validator binding="#{bindings.GlstpAcDesc.validator}"/>
</af:inputListOfValues>
</af:panelFormLayout>
in glpolicybean.java
public void glACDescChanged(ValueChangeEvent valueChangeEvent) throws TransactionException{
// Add event code here...
System.out.println("account desc new value----------->"+valueChangeEvent.getNewValue().toString());
String accDesc=valueChangeEvent.getNewValue().toString();
System.out.println("account description1----------->"+accDesc);
System.out.println("account desc old value----------->"+valueChangeEvent.getOldValue());
ADFUtils.setBoundAttributeValue("GlstpGlSubcd", "");
XBSystemMastersServiceImpl systemImpl=(XBSystemMastersServiceImpl)ADFUtils.getDCBindingContainer().getDataControl().getDataProvider();
ViewObjectImpl glPolicyAddVO=systemImpl.getGLPolicyAddVO1();
try {
for (Row row : glPolicyAddVO.getAllRowsInRange()) {
String accDesc1 = (String)row.getAttribute("GlstpAcDesc");
System.out.println("account description1----------->"+accDesc1);
if (accDesc.equals(accDesc1)) {
throw new TransactionException("A/C Desc already entered for this setup");
}catch (TransactionException e) {
JsfUtils.addContextMessage(JsfUtils.getStringFromBundle("A/C Desc already entered for this setup"),FacesMessage.SEVERITY_WARN); }
thanks in advance,
Edited by: sravanthi on Dec 14, 2011 6:12 AM

Hi,
Try using validator.
See
http://docs.oracle.com/cd/E17904_01/apirefs.1111/e12419/tagdoc/af_inputListOfValues.html

Similar Messages

  • How to display Popup message in ABAP Web Dynpro

    Hi All,
    Is it possible to display popup messages like SAP to collect information from the user? is it possible to display information messages like SAP? If possible, Please let me know how to handle in Web Dynpro.
    Thanks & Regards,
    IA Kumar.

    Agree with the two firend on my head :).
    you can find a demo from:   SWDP_TEST&#65288;package&#65289;-->   WDR_TEST_POPUPS also.
    I have a lazy idea, two step:
    1. create a popup function module;
    2.call the function module;
    function module:--Begin--
    FUNCTION ZFUNM_CONFIRM .
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(P_API) TYPE REF TO  IF_WD_VIEW_CONTROLLER
    *"     REFERENCE(P_CMP_API) TYPE REF TO  IF_WD_COMPONENT
      DATA:
        L_WINDOW_MANAGER      TYPE REF TO IF_WD_WINDOW_MANAGER,
        L_CMP_API             TYPE REF TO IF_WD_COMPONENT,
        L_API_MAIN            TYPE REF TO IF_WD_VIEW_CONTROLLER,
        L_POPUP               TYPE REF TO IF_WD_WINDOW,
        L_TEXT                TYPE STRING_TABLE.
       wd_this               type ref to IF_MAIN,
       wd_comp_controller    TYPE REF TO IG_COMPONENTCONTROLLER.
       l_api_main = wd_this->wd_get_api( ).
    l_cmp_api = wd_comp_controller->wd_get_api( ).
      L_WINDOW_MANAGER = P_CMP_API->GET_WINDOW_MANAGER( ).
      APPEND 'POPUP text' TO L_TEXT.
      L_POPUP = L_WINDOW_MANAGER->CREATE_POPUP_TO_CONFIRM(
                  TEXT                   =  L_TEXT
                  BUTTON_KIND            = 4
                  MESSAGE_TYPE           = 1
                  CLOSE_BUTTON           = ''
                  WINDOW_TITLE           = 'messagebox Title'
                 WINDOW_LEFT_POSITION   = L_CONF_CONTEXT-WINDOW_LEFT_POSITION
                 WINDOW_TOP_POSITION    = L_CONF_CONTEXT-WINDOW_TOP_POSITION
                 WINDOW_POSITION        = L_CONF_CONTEXT-WINDOW_POSITION
                 WINDOW_WIDTH           = L_CONF_CONTEXT-WINDOW_WIDTH
                 WINDOW_HEIGHT          = L_CONF_CONTEXT-WINDOW_HEIGHT
      L_POPUP->SUBSCRIBE_TO_BUTTON_EVENT(
              BUTTON             = IF_WD_WINDOW=>CO_BUTTON_YES
              ACTION_NAME        = 'YES'
              ACTION_VIEW        = P_API
              IS_DEFAULT_BUTTON  = ABAP_TRUE ).
      L_POPUP->SUBSCRIBE_TO_BUTTON_EVENT(
              BUTTON             = IF_WD_WINDOW=>CO_BUTTON_NO
              ACTION_NAME        = 'NO'
              ACTION_VIEW        = P_API
              IS_DEFAULT_BUTTON  = ABAP_FALSE ).
      L_POPUP->OPEN( ).
    ENDFUNCTION.
    function module:--End--
    call the function module  Begin----
    METHOD ONACTIONDELETE .
      DATA:
        L_API                               TYPE REF TO IF_WD_VIEW_CONTROLLER,
        L_CMP_API                           TYPE REF TO IF_WD_COMPONENT,
        NODE_ZTAB_PROJ                      TYPE REF TO IF_WD_CONTEXT_NODE,
        ELEM_ZTAB_PROJ                      TYPE REF TO IF_WD_CONTEXT_ELEMENT,
        STRU_ZTAB_PROJ                      TYPE IF_ZV_PROJ_DISPLAY=>ELEMENT_ZTAB_PROJ,
        SELECTED_ELEM                       TYPE  WDR_CONTEXT_ELEMENT_SET .
      navigate from <CONTEXT> to <ZTAB_PROJ> via lead selection
      L_API = WD_THIS->WD_GET_API( ).
      L_CMP_API = WD_COMP_CONTROLLER->WD_GET_API( ).
      CALL FUNCTION 'ZFUNM_CONFIRM'
        EXPORTING
          P_API     = L_API
          P_CMP_API = L_CMP_API.
      IF WD_THIS->A_DEL = ''.
        EXIT.
      ENDIF.
      NODE_ZTAB_PROJ = WD_CONTEXT->GET_CHILD_NODE( NAME = IF_ZV_PROJ_DISPLAY=>WDCTX_ZTAB_PROJ ).
      IF ( NODE_ZTAB_PROJ IS INITIAL ).
        EXIT.
      ENDIF.
      ELEM_ZTAB_PROJ = NODE_ZTAB_PROJ->GET_LEAD_SELECTION( ).
      ELEM_ZTAB_PROJ->GET_STATIC_ATTRIBUTES(
        IMPORTING
          STATIC_ATTRIBUTES = STRU_ZTAB_PROJ ).
      DELETE FROM ZTAB_PROJ
      WHERE COMCODE = STRU_ZTAB_PROJ-COMCODE
        AND PROJID  = STRU_ZTAB_PROJ-PROJID.
      WD_THIS->ONACTIONSELECT(
        WDEVENT = WDEVENT                        " Ref to cl_Wd_Custom_Event
    LOOP AT selected_elem .
    ENDLOOP.
      ELEM_ZTAB_PROJ
      @TODO handle not set lead selection
      alternative access  via index
      Elem_Ztab_Proj = Node_Ztab_Proj->get_Element( Index = 1 ).
      @TODO handle non existant child
      if ( Elem_Ztab_Proj is initial ).
      endif.
      get all declared attributes
    ELEM_ZTAB_PROJ->GET_STATIC_ATTRIBUTES(
       IMPORTING
         STATIC_ATTRIBUTES = STRU_ZTAB_PROJ ).
    ENDMETHOD.
    call the function module  End----

  • Display popup message on SRM portal

    Hi,
    I need to display a popup message on the SRM portal while doing a PO confirmation. Can you please guide me how to do it?
    Do I need to modify the templates or can it be done using a BADI?
    Thanks in advance.

    Hi,
    Try using CHANGE badi.
    See these related threads also for more pointers:
    Error in pop up (dialog box)
    Customized Pop-up window in Shopping Cart
    POPUP window in shopping cart during Order
    BR,
    Disha.

  • 5800 Keeps Displaying Popup "Message: number"

    Hi,
    I've had a 5800 for nearly a year now, and love it. However, for the past 2 days, its been doing something weird, and I'm not sure why. Randomly, and for no reason at all, it will get a popup message on the screen which says 'Message: 0771xxxxx' (my mobile number). Anyone know why? I've not asked it to display, or request my number from Vodafone or anything, this just randomly pops up!
    Any suggestions on how to stop this?
    Cheers
    Ben

    does ure country have something like .. STOP or STOP ALL and send to a specific gateway? .. if so, try tat, u can disable any notification msgs from ure telco.
    I'm an Xploit - Please feel free to post your issues, feedbacks in this discussion forum and I'll do my level best to help, otherwise my knowledged friends whom are around willing to help you. Thank you !

  • Problem while displaying popup message while using inputfile component

    Hi
    I am using JDEV 11.1.1.2.0, using ADF i developed and application
    in my page i have a input file component, from which i am taking a csv file and reading it through valuechangeevent of inputfile component. I have used myfaces.trinidad-UploadedFile to get the selected file and read it using inputstream.
    I have put some validation check (validation check is done while reading the file using valuechangeevent of the inputfile component), while reading the file and incase i receive any error (validation mismatch), the reading of file stops ... and before doing that i used to display error message using below method:-
    public String ValidationCheck(String attrname, String attrvalue, int rownumber) {
    String msg="Validation error found in "+attrname+" with value "+attrvalue+" of row "+rownumber+" in the file. Please correct the file and retry/";
    FacesContext ctx = getFacesContext();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, "");
    ctx.addMessage(null,fm);
    return null;
    i have used the same method to display message in other places where its showing correctly but fails in inputfile component.
    Please help me out how can display messages from inputfile component??
    Thanks
    Sudeep
    Edited by: SKD on Feb 21, 2012 12:02 PM
    Edited by: SKD on Feb 21, 2012 4:08 PM
    Edited by: SKD on Feb 21, 2012 4:11 PM

    It works fine for me (albeit on 11.1.2.1). Here is my complete test case:
    FileUploadTest.jspx:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:document title="FileUploadTest.jsf" id="d1">
        <af:form id="f1" usesUpload="true">
          <af:inputFile label="Label 1" id="if1" valueChangeListener="#{TestBean.vcl}"/>
          <af:commandButton text="commandButton 1" id="cb1"/>
        </af:form>
        <af:messages id="m1"/>
      </af:document>
    </f:view>TestBean.java:
    package view;
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.share.logging.ADFLogger;
    public class TestBean
      private static final ADFLogger _LOG = ADFLogger.createADFLogger("view.TestBean");
      public TestBean()
      public void vcl(ValueChangeEvent valueChangeEvent)
        _LOG.severe("in the value change event");
        FacesContext ctx = FacesContext.getCurrentInstance();
        FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "This is a message", "Message");
        ctx.addMessage(null, fm);
    }adfc-config.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <managed-bean id="__1">
        <managed-bean-name>TestBean</managed-bean-name>
        <managed-bean-class>view.TestBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
    </adfc-config>John

  • Display Popup/message when refresh/close browser window

    Hi all,
    In normal ABAP programing when we exit from any transaction, a popup display with text "Are you sure to exit". I have some doubt to get this functionality in WDA.
    I am calling a popup in WDDOEXIT method of the Comp controller and when I do refresh/close the application, this method will triggered, but it does not opens a popup as the application relaod.
    Is there any way to get this functionality?
    I have also checked the thread [ABAP WebDynPro Refresh (F5) issue|ABAP WebDynPro Refresh (F5) issue;.

    >
    SANKET SETHI wrote:
    > Thanks for the reply. I have already checked this help page. Is there something in WDA iteself?
    Short answer - no.  Only the work proctect functionaltiy that can be used in the portal or the NetWeaver Business Client.  By the time WDDOEXIT fires, it is too late to produce any rendering output or stop the browser from closing.

  • How to display popup messages in webdynpro

    Hi all,
                I have an application which has continue button.if the userclicks on this button a pop has to come with the msg as "Do u want to continue" ..followed by Yes and No....
    how to show popup msgs in my webdynpro application
    Regards
    Padma N

    Hi! padma,
      please go through the following tutorial, you will get a good idea..
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#23">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#23</a>
    you need to create an object of IWDConfirmationDialog and also the eventHandle.
    regards,
    Mithileshwar Sahu

  • Error Message Displaying the status Bar not like popup message

    Hi all,
    My Requirement is while creating  invoice if pricing conditons is repeted , system should thorough the error message like (uplicate Condition Types Are Not Possible  in the status Bar but Im getting poup Error message So I want to display the same message in the status Bar.
    Please Help me any one.
    Regards,
    Prathap

    I dont want to Display the popup, I want to Display in Status Bar as a Error Message.
    Like this .
    If I put  message type 'E' its Displaying popup message , MESSAGE ' Duplicate Condition Types Are Not Possible.' TYPE 'E'.
    If I Put messge type 'I' its Displaying in Status Bar .
    Regards,
    Prathap
    Edited by: giri prathap on Sep 13, 2011 12:35 PM

  • How to display a popup message in query (through process chain)

    Hi Gurus,
    I need your help.
    I have an input query that triggers an event (through a button) and runs a process chain.
    I would like to show a popup message to inform the user when the process chain is over.
    Using function modules I've been able to show popup messages in the workbench, but I want to display this message directly in Bex Analyzer 7.0.
    Thanks
    Gabbo

    Hi,
    I'm also looking for a solution to display a custom message in the Bex Analyser at logon.
    Using function module in the logon user-exit works but only when loggin to the workbench.
    I don't want to use SM02 (which works in both cases) because I need to display a variable message depending on the user.
    If someone has an idea, I'll really appreciate.
    Best regards and happy New Year to all of you.

  • To display a popup message alongwith ALV grid

    Hi Experts,
    I have a requirement where I need to display data using ALV Grid. Also, in case there are any errors encountered during the data extraction I need to inform the user about it by using either a popup message or a status message stating that he needs to check the error log. To display the error log I have provided a push button which will take the user to another screen where he can see all the errors encountered.
    Can anyone please let me know as to how to accomplish the task of displaying a status message alongwith a ALV grid display?
    Looking forward to your reply.
    -Warm regards,
    Prajakta K.

    use exception handling and pop up.........
    try following in grid..
    *--Exception handling
    ENDIF .
    ENDIF .
    WHEN 'EU' .
    READ TABLE gt_list INDEX ls_selected_row-row_id .
    IF sy-subrc = 0 .
    CALL FUNCTION 'ZPOPUP_CONV_CURR_AND_DISPLAY'
    EXPORTING monun = 'EU'
    quant = gt_list-paymentsum.
    ENDIF .
    ENDCASE .
    ENDFORM .

  • How to display a message after button press ?

    Hi,
    I created a jspx page with a button.
    When that button is pressed, a lot of stuff is going to happen in my backing bean.
    This can take up to 30 seconds. (soap call etc ... )
    Meanwhile, the pressed button stays greyed out. When the action is finished, the button
    is available again.
    I want to display a message saying the action was succesfull or not, after that button is available again.
    Can anyone help me how I can make this ?
    Greetz.

    Why not opening a popup from your backing bean?
    Add a popup to your page:
    <af:popup id="yourID" bindings="#{yourBean.popup}">
    </af:popup>Open this in your backing bean:
        public void OpenPopup(String popupID) {
          FacesContext facesContext = FacesContext.getCurrentInstance();
          ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
          service.addScript(facesContext,"AdfPage.PAGE.findComponent('"+this.getPopup().getClientId(facesContext) + "').show();");
        }This way you can add anything you want in your popup. forms, messages, images,...

  • How to Display a message after inserting row in table............

    Hi
    I want to display a message after inserting rows in table like *'you have inserted a new row successfully*'.
    i am using the createinsert ADF Button to insert the rows in table.after that i am comitting it.
    after commiting i want to display message for the user.for this what i need to do.
    Please help me.
    Sailaja.

    user10860137
    Can you please explain me the each line in the code briefly.
    +public String saveButton_action(){+
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    +// note "!" operator has been removed from the default code.+
    +if(operationBinding.getErrors().isEmpty()){+
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage saveMsg = new FacesMessage("Record Saved Successfully");
    ctx.addMessage(null,saveMsg);
    +}+
    return null;
    +}+
    And i have requirement to show the message on favcet "status bar".not in a popup window.(from the above code the message is showing in popup window. )the Layout i am using is PanelCollection.
    can you tell me what i need to do.
    Thanks
    Sailaja.
    Edited by: sj0609 on Mar 19, 2009 8:03 AM

  • Display Error Message in ESS

    Dear all,
    I have a requirement in WEB DynPro, Our ESS system using WEB DynPro.
    In ESS leave system need to display error message.ie
    once leave approved, employees are not allowed to change the leave.
    Any idea to write code to display error message.
    Thanks.
    Shruthi.

    Error messages can be displayed in two ways:
    1. In the message area
    2. As a popup
    Below are the code snippets for it.
    1.
    * get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
        CALL METHOD lo_message_manager->report_error_message
          EXPORTING
            message_text = 'Error message'.
    2.
    "Display Popup 
      DATA:  l_popup  TYPE REF TO if_wd_window,
             l_text  TYPE string_table.
      APPEND `Error Message` TO l_text.
      l_popup = wd_comp_controller->wd_get_api( )->get_window_manager( )->create_popup_to_confirm(
        text  = l_text
        close_button = abap_false
        button_kind  = if_wd_window=>co_buttons_ok
        message_type  = if_wd_window=>co_msg_type_error
        window_title  = 'Error'
        window_position = if_wd_window=>co_center ).
      l_popup->open( ).
    Hope this helps!

  • How to add Popup message as soon as user logins to portal system?

    Hi,
    I want to display a popup message as soon as user logs on to the portal system.
    Regards,
    Anagha

    Anagha Bhat wrote:
    what do you mean by  "iView with the popup as the entry point" ?
    I think this means, iView's 'Launch in new window' property should be accordingly set..

  • I want to display a message like

    The one in c#, or windows programming environment. Is it possible?
    A dialog box should appear when needed and display a message.
    How can I achieve that?
    Thanks in advance.
    Regards.
    Deniz.

    hi,
    yes it is possbel to have a pop window but for that you need to use some function modules  some of them are mentioned below hope they help you.
    1. <b>POPUP_WITH_WARNING</b>-->this is used to display warning
    2 .<b>POPUP_TO_DECIDE</b>--> in this user gets 3 line of text and 3 options to choose
    3.<b>POPUP_FOR_CONDITIONS</b>--> this an other fm used for dynami or condition during run time
    4.<b>POPUP_TO_DISPLAY_USERDATA</b>--> this is intresting fm try it your own...
    and you can have many more
    just goto tcode <b>SE37</b> and write <b>POPUP_*</b> and then <b>F4</b> you will get a whole list of popup function module.
    hope this information will help you and don't forget to reward points.

Maybe you are looking for