How to display an alert message on click of link in tableview

Hi,
Following is the code for a tableview in layout section of a BSP( i have specified only one tableview column here). The requirement is to display an alert message on click of link in the first column that is "evbeg". Can anyone please help me how to achieve this? Appreciate quick response on this.
CREATE OBJECT lr_dateiterator TYPE cl_lso_bsp_it_trdates
            EXPORTING im_application = application
            im_tform = trainingform.
        <htmlb:tableView id            = "dates"
                             table         = "<%= dates %>"
                             iterator      = "<%= lr_dateiterator %>"
                             width         = "100%"
                             rowCount      = "<%= lp_len %>"
                             footerVisible = "FALSE"
                             sort          = "SERVER" >
              <htmlb:tableViewColumn columnName    = "evbeg"
                                     type          = "user"
                                     title         = "<%= otr(LSO_FRONTEND/schedule) %>"
                                     tooltipHeader = "<%= otr(LSO_FRONTEND/schedule) %>"
                                     sort          = "TRUE" >
              </htmlb:tableViewColum>
Thanks and Regards,
Archana.

you have to code in the iterator for this.
in the render_cellstart method of the iterator you need to code.
this is for a column.
when 'MATNR'.
data: text type string.
text = 'disp_alert()'.   "this java script i placed in the page
data: lo_link type ref to cl_htmlb_link.
  create object lo_link.
     lo_link->id = p_cell_id.
     lo_link->onclientclick = text.
     lo_link->text = <fs>-matnr.
     p_replacement_bee = lo_link.
below is the java script i added in my page..
<  sc ri   pt type="text/javasc ript"   >
f u n  ction disp_alert()
a  l e  rt("helloworld");
< /s  c ript >

Similar Messages

  • How displaying an alert message called from a database procedure

    Hi,
    How can I display an alert message that is called from a database procedure.
    I've tried the following code:
    l_al_button NUMBER;
    l_al_message VARCHAR2(80);
    l_al_id ALERT;
    Set_Alert_Property(l_al_id, alert_message_text,l_al_message);
    l_al_Button := show_alert(l_al_id);
    When trying I receive an error that says that the word ALERT need to be declared.
    Any suggestions?
    Thanks

    Hi,
    leave the procedure without error handling.
    This is what you can do:
    1.Inside the database procedure-
    BEGIN
    RAISE_APPLICATION_ERROR (-20001, 'The chosen length of the Public Key Exponent ....');
    END;
    2.Into your Form -
    BEGIN
    EXCEPTION
    WHEN OTHERS THEN
    IF sqlcode = '-20001' THEN
    Display Your Messages.
    END IF;
    Monica
    END;

  • How to display the eror message in the iView

    Hi
    I want to check the user input in the client side and display an error message in the iView instead of displaying the error message as an alert
    it is ok when I tried to do it as an alert
    alert('ERROR MESSAGE');
    but the problem is how to display the error message as a text in the iView ...
    I wrote the below code..
    any one can see it and has any sugestion?
    Thanks
    =============
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <%
    String compid = "";
    String message = "";
    %>
    <hbj:content id="MyContent">
    <hbj:page title = "Selection Screen">
    <hbj:form id = "myForm">
    <br>
    <br>
    <br>
    <center>
    <H3>Benefits Statement </H3>
    <H4>Selection Screen</H4>
    <hbj:gridLayout
    id="FSSLayout"
    debugMode="False"
    width="40%"
    cellSpacing="5"
    >
    <hbj:gridLayoutCell
    rowIndex="1"
    columnIndex="1"
    width="10%"
    horizontalAlignment="LEFT"
    style="WildStyle"
    >
    <hbj:label
    id="label_inputPernr"
    required="TRUE"
    text="Personal Number:"
    design="LABEL"
    labelFor="inputPernr"
    />
    </hbj:gridLayoutCell>
    <hbj:gridLayoutCell
    rowIndex="1"
    columnIndex="2"
    width="40%"
    horizontalAlignment="LEFT"
    >
    <hbj:inputField id = "inputPernr"
    >
    <%
    compid=MyContent.getParamIdForComponent(inputPernr);
    %>
    </hbj:inputField>
    </hbj:gridLayoutCell>
    <hbj:gridLayoutCell
    rowIndex="10"
    columnIndex="1"
    width="40%"
    horizontalAlignment="CENTER"
    colSpan="2"
    >
    <hbj:button id = "myButton" text="Submit.." design="EMPHASIZED"
    tooltip="Click me to submit this form" onClick="ClickEvent" onClientClick="validRequired()">
    </hbj:button>
    </hbj:gridLayoutCell>
    </hbj:gridLayout>
    </center>
    <p font="Arial" size=20><%= message%></p>
    </hbj:form>
    <SCRIPT LANGUAGE="Javascript">
    function validRequired()
    var myvar = document.getElementById('<%=compid%>').value;
    var ivID='<%=componentRequest.getComponentContext().getContextName()%>';
    if (myvar = " ")
    message = "Enter Employee Number";
    ivuRefresh(ivID);
    htmlbevent.cancelSubmit=true;
    </SCRIPT>
    </hbj:page>
    </hbj:content>

    No problem, here is an example of some html code and javascript that you can adapt to your needs. You can display this standalone to see how it works.
    I hope this helps
    <html>
         <head>
              <script language="JavaScript">
                   function validateForm(){
                        if(document.getElementById("nameField").value == "")
                             document.getElementById("errormessage").innerHTML = "Please enter the Name";
                        else if(document.getElementById("ageField").value == "")
                             document.getElementById("errormessage").innerHTML = "Please enter the Age";
                        else if(document.getElementById("idField").value == "")
                             document.getElementById("errormessage").innerHTML = "Please enter the id";                         
                        else
                             document.getElementById("errormessage").innerHTML = "";
              </script>
         </head>
         <body>
              <table border="0" cellpadding="0" cellspacing="0">
                   <tr>
                     <td>Name</td>
                     <td><input type="input" id="nameField" name="nameField"></td>
                   </tr>
                   <tr>
                     <td>Age</td>
                     <td><input type="input" id="ageField" name="ageField"></td>
                   </tr>
                   <tr>
                     <td>Id</td>
                     <td><input type="input" id="idField" name="idField"></td>
                   </tr>
                   <tr><td><font color="red"><span id="errormessage"></span></font></td></tr>
                   <tr><td><input type="button" name="validate" onClick="validateForm()" value="Click to validate"/></td></tr>
              </table>
         </body>
    </html>

  • Display an alert message through javascript when report column item is null

    Hello,
    I have a report column item which is an select list item and now i want to display an alert message when value is null, I mean no value is selected, this alert message should be fired when update button is clicked.
    Can anyone please help me with this issue.
    Thanks,
    Orton

    You could try something like this:
    declare
      x        INTEGER;
      err_ct  INTEGER   := 0;
    begin
      x  := 5;  -- number of rows displayed
      for i in 1 ... x (
        IF wwv_flow.g_f08(i)) IS NULL THEN err_ct  := err_ct + 1;
        END IF;
      end loop;
      IF err_ct = 0 THEN
         RETURN NULL;
      ELSE
        RETURN 'Nice error message: you must supply a value.';
      END IF;This would be used with a PL/SQL validation: Function Returning Error Text.

  • Not able to display javascript alert message from within a pl/sql block

    Hello,
    Can anyone please help me out with this issue. I wanted to display an javascript alert message from within a pl/sql block for an update button. Below is sample code which i am using. P1_ITEM is my hidden item on the report.
    begin
    if :P1_ITEM IS NOT NULL then
    HTP.p ('<script type="text/javascript">');
    HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
    HTP.p ('</script>');
    end if;
    end;
    and I have made this code to be executed conditionally when request = Expression1
    Expression1: SUBMIT
    The thing is I am not able to display an alert message when the update button is clicked.
    Can anyone please help me with this one.
    Thanks,
    Orton

    varad but I also have an update statement within that block for the update button something like this i want to achieve.
    begin
    if :P1_ITEM IS NULL THEN
    update sample_tbl
    set col1 =:APP_USER,
    col2 = 'Y'
    where pk_col = ---;
    commit;
    HTP.p ('<script type="text/javascript">');
    HTP.p ('alert(''Successfully assigned an item!'');');
    HTP.p ('</script>');
    end if;
    if :P1_ITEM IS NOT NULL then
    HTP.p ('<script type="text/javascript">');
    HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
    HTP.p ('</script>');
    end if;
    end;
    thanks,
    Orton

  • Display an Alert message in PL/SQL block in APEX

    Hi,
    we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
    Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
    we tried doing this with below code:
    Begin
    INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
    exception when others then
    htp.p('<script language="javascript">');
    htp.p('alert("Exception");');
    htp.p('</script>');
    end;
    If anybody knows .... please reply.
    Thanks,
    Subarna
    Edited by: user9955252 on Apr 21, 2010 1:47 AM

    Hello,
    APEX Forum is here : Oracle Application Express (APEX)
    Regards

  • Display an Alert message from PL/SQL block in APEX

    Hi,
    we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
    Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
    we tried doing this with below code:
    Begin
    INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
    exception when others then
    htp.p('<script language="javascript">');
    htp.p('alert("Exception");');
    htp.p('</script>');
    end;
    If anybody knows .... please reply.
    Thanks,
    Subarna

    If your end goal is showing a pretty error message instead of the message that the tables unique constraint raises try the following. This logic will show a nice message and not try to insert non-unique data.
    (1) Create a validation of type "Function Returning Error Text".
    (2) Place similar code like the following in your validation. Notice that if the unique name does not exist the no_data_found returns null allowing the validation to pass.
    DECLARE
      v_error varchar2(100);
    BEGIN
      SELECT 'A person by this name already exists.'
      INTO v_error
      FROM your_table
      WHERE your_name = :P1_YOUR_NAME;
      RETURN v_error;
    EXCEPTION
      WHEN no_data_found THEN
        RETURN NULL;
    END;

  • How to fire a Alert Message in a table format

    Hi friends,
    Currently im performing an Alert. My requirement is i need to display the alert message to the user in the mail in a table format.
    But i couldnt perform that, as the alert is not displaying in a properly aligned table format.
    Can you friends propose me a right way to bring the alert in a table format with two columns.
    Thanks in Advance..
    Regards,
    Saro

    I agree w 936671, do this in PL/SQL. Much, much easier.
    However, I will recommend a different approach using PL/SQL.
    1) Create a package to send the emails. Sample code:
    create or replace package cust_fnd_utilities as
    procedure send_email(     p_sender     in     varchar2,
                   p_recipient      in      varchar2,
                   p_subject     in     varchar2,
                   p_message     in     varchar2);
    end cust_fnd_utilities;
    create or replace package body cust_fnd_utilities as
    procedure send_email(     p_sender     in     varchar2,
                   p_recipient      in      varchar2,
                   p_subject     in     varchar2,
                   p_message     in     varchar2)
    is
    v_mail_host     varchar2(30);
    v_crlf      constant varchar2(2):= chr(13)||chr(10);
    v_message     varchar2(10000);
    v_mail_conn     utl_smtp.connection;
    begin
    v_mail_host := 'localhost';
    v_mail_conn := utl_smtp.open_connection(v_mail_host, 25);
    v_message :=      'Date: ' ||
         to_char(sysdate, 'dd Mon yy hh24:mi:ss') || v_crlf ||
         'From: <'|| p_sender ||'>' || v_crlf ||
         'Subject: '|| p_subject || v_crlf ||
         'To: '||p_recipient || v_crlf || '' || v_crlf || p_message;
    utl_smtp.ehlo(v_mail_conn, v_mail_host);
    utl_smtp.mail(v_mail_conn, p_sender);
    utl_smtp.rcpt(v_mail_conn, p_recipient);
    utl_smtp.data(v_mail_conn, v_message);
    utl_smtp.quit(v_mail_conn);
    exception
    when others then
         utl_smtp.close_connection(v_mail_conn);
    end send_email;
    end cust_fnd_utilities;
    2) Build the email, then call the package from step #1. Sample code:
    create or replace package cust_fnd_monitoring as
    procedure profile_options_build_email (     p_errbuf     out     varchar2,
                             p_retcode     out     varchar2,
                             p_sender     in     varchar2,
                             p_recipient     in     varchar2);                         
    end cust_fnd_monitoring;
    create or replace package body cust_fnd_monitoring as
    procedure profile_options_build_email (     p_errbuf     out     varchar2,
                             p_retcode     out     varchar2,
                             p_sender     in     varchar2,
                             p_recipient     in     varchar2)
    is
    v_subject          varchar2(100) := 'erpgamd1 - Recent Profile Option Changes';
    v_mime_type          varchar2(100) := 'Content-Type: text/html';
    v_body               varchar2(10000);
    v_line_feed          varchar2(1):=chr(10);
    cursor profile_cur is
    select     p.user_profile_option_name,
         u.user_name,
         u.description,
         r.responsibility_name,
         v.last_update_date
    from     fnd_profile_option_values v,
         fnd_profile_options_vl p,
         fnd_user u,
         fnd_responsibility_vl r
    where     p.application_id = v.application_id
    and     p.profile_option_id = v.profile_option_id
    and     v.last_updated_by = u.user_id
    and     v.level_id = 10003
    and     v.level_value = r.responsibility_id
    and      v.level_value_application_id = r.application_id
    and     r.creation_date <= '01-NOV-2010'
    and     v.last_update_date >= sysdate-7
    and     u.user_name != '204020779'
    union all
    select     p.user_profile_option_name,
         u.user_name,
         u.description,
         'Site' responsibility_name,
         v.last_update_date
    from     fnd_profile_option_values v,
         fnd_profile_options_vl p,
         fnd_user u
    where     p.application_id = v.application_id
    and     p.profile_option_id = v.profile_option_id
    and     v.last_updated_by = u.user_id
    and     v.level_id = 10001
    and     v.last_update_date >= sysdate-7
    and     u.user_name != '204020779'
    order by 5 desc,4;
    profile_rec     profile_cur%rowtype;
    begin
    open profile_cur;
    <<profile_loop>>
    loop
         fetch profile_cur into profile_rec;
         exit when profile_cur%notfound;
         if profile_cur%rowcount = 1 then
         -- We need to confirm that we fetch at least one row. Once we have confirmed, we want to generate
         -- the email body heading only during the first pass through the loop.
              v_body := '<html>' || v_line_feed;
              v_body := v_body || '<body style="font-family:arial;font-size:10pt">' || v_line_feed || v_line_feed;
              v_body := v_body || '<table cellspacing="5">' || v_line_feed;
              -- table heading
              v_body := v_body || '<tr>' || v_line_feed;
              v_body := v_body || '<td align="left"><u>profile option name</u></td>' || v_line_feed;
              v_body := v_body || '<td align="left"><u>responsibility name</u></td>' || v_line_feed;
              v_body := v_body || '<td align="left"><u>last update date</u></td>' || v_line_feed;
              v_body := v_body || '<td align="left"><u>SSO #</u></td>' || v_line_feed;
              v_body := v_body || '<td align="left"><u>user name</u></td>' || v_line_feed;
              v_body := v_body || '</tr>' || v_line_feed;
         end if;
         -- table detail
         v_body := v_body || '<tr>' || v_line_feed;
         v_body := v_body || '<td>' || profile_rec.user_profile_option_name      || '</td>' || v_line_feed;
         v_body := v_body || '<td>' || profile_rec.responsibility_name          || '</td>' || v_line_feed;
         v_body := v_body || '<td>' || profile_rec.last_update_date          || '</td>' || v_line_feed;
         v_body := v_body || '<td>' || profile_rec.user_name                || '</td>' || v_line_feed;
         v_body := v_body || '<td>' || profile_rec.description               || '</td>' || v_line_feed;
         v_body := v_body || '</tr>'|| v_line_feed;
    end loop profile_loop;
    if profile_cur%rowcount =0 then
         -- The cursor fetched no rows.
         -- send email using utl_smtp
         cust_fnd_utilities.send_email(p_sender,p_recipient,v_subject || '. No exceptions found.','No exceptions found.');
    else
         -- Generate the end of the email body if we fetched at least one row.
         v_body := v_body || '<table>' || v_line_feed || v_line_feed;
         v_body := v_body || v_line_feed || '</body>' || v_line_feed;
         v_body := v_body || '</html>' || v_line_feed;
         -- send email using utl_smtp
         cust_fnd_utilities.send_email(p_sender,p_recipient,v_subject || v_line_feed || v_mime_type,v_body);
    end if;
    close profile_cur;
    end profile_options_build_email;
    end cust_fnd_monitoring;
    3) In your alert, do not use an email action. Rather, your action should be a SQL*Plus script that calls the package from step #2.

  • 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

  • How to display an error message in maintenace view

    Hi,
    I have following requirement.
    I have a table. In the table, there is a field named REPORT which keeps an executable report name. When adding an entry i need to fill the field with an report name, which should exist in the system. The report name should not be include objects.
    Then I use search help HELP_TRDIR with import parameter SUBC = 1.  I also create a maintenance view for the table.
    Then my question is how to display a warning message if the report I input in REPORT field doesn't exist in the system. If I need to modify the generated objects of the maintenance view, how to do it.
    The reason i don't use foreign key is that it seems filter functionality is not availabe in the case with import parameter SUBC = 1.
    Thanks in advance,
    Best Regards, Johnney.

    Hi,
    You need to add your validation in the table maintenance events:
    Use the event : 01 - Before saving data to the databse table... for this purpose
    1) Go to Menu-> Utilities->Table mainatenace generator
    2) On the table maintenance screen->Menu->Enviroement-> Modifications->Events
    3) select an event 01 and give some subroutine/form name.
    4) Add your validation in the form(Note this form should be in the Func Group of the table maintanance genetaor)
    Regarrds
    Shiva

  • How to display an error message on screen?

    Hi experts,
    In screen painter, how to display an error message in the message area just below the screen?
    Thanks!

    hi wuyia,.
    Write like this;
    Message 'Process completed Successfuly' TYPE 'S'.
    Message 'Want to Overwrite Value' TYPE 'W'.
    Message 'Press enter to continue' TYPE 'I'.
    Message 'Invalid Input' TYPE 'E'.
    S - Success
    W - Warning
    I - Information
    E - Error
    You can adjust your GUI option to display the message in a Popup or in the status bar.
    Regards
    Karthik D

  • Is it possible to display an Alert when user clicks on the X on the browser

    Hi
    Is it possible to display an Alert when user clicks on the X on the browser.I saw some threads regarding this mentioning about js.I want to do this ins the iProcurement module and dont wnat to make changes to each and every page.
    isn't there any global setup which would help to achive this?

    Are you talking about Windows close X. If yes, then to my knowledge there is nothing in OA Framework to handle it. You can check if it can be handled using javascripts.

  • How to position all alert messages in a particular position?

    Hi All,
            I have developed a Application where it contains so many Alert Messages and i want display All Alert messages in a particular position of respected screen. I have tried the following code but it works for individual alert messages. I don't want to set x and y properties individually, i want set x and y properties globally. Is there any way that i can apply for all the alert messages in my application.
    myAlert = Alert.show('Hello World');
      PopUpManager.centerPopUp(myAlert);
      myAlert.x = 0;
      myAlert.y = 0;
    Thanks in Advance

    You could override the Alert class. This would like something like:
    public class MyAlert extends Alert {
    public get x():void {
    return 0;
    public get y():void {
    return 0;

  • How to display a user message on WEBI Home page ?

    Hi all,
    How to display a user message on WEBI Home page ?
    like when ever the data gets scheduled at etl side i want to display a message a message on info view home page "new data is uploading" is this is possible to do ?

    Unfortunately this is not possible to do "out of the box".  There aren't any pre-configured options that will let you do this.  You're only real option is to try and modify the infoview source code yourself to do this.
    Regards,
    Shawn

  • How to get file from server while click on link

    Hi,
    i created on link and i gave one server path to select file from server but while clickinng on link it no displaying any thing.
    following is the Destination url that i gave for the item.
    /u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/
    please tell me how to get file from server while click on link.

    Ok I got your requirement now.
    If you are getting file names from view attribute then you should not be adding destination URI property for the link.
    Instead you can use OADataBoundValueViewObject API.
    Try below code in your controller processRequest method:
    I am assuming that you are using classic table.
    Also in below example it considers OAMessageStyleText and you can replace it with link item if you want.
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "/u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/"+"<vo attr name which stores file name for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    Regards,
    Sandeep M.

Maybe you are looking for

  • I changed my apple Id but now I can't use my iTunes. My old apple id keeps showing up to log in. How do I get my new Id to come up?

    I need help trying to delete my old apple ID that keeps popping up when I try to log In to iTunes. And my iPad won't sink with my iPhone since I changed my apple ID.

  • Help Me: Issue with "Unable to Sign In" Analytics Of OBIEE 11g

    Hi Friends, I have Installed OBIEE 11g in Windows Server 2008-64 bit.I have installed through "Software Only" and ran the "Config Script". while I was running "Config Script" , One Component was failed i.e "Executing : opmnctl start coreapplication_o

  • Portal Page refresh

    Hi, I have created portal page links and I and using the hbj:link to place them on the page.  When I click the link, I go to the proper page, but the first and second level navigation do not refresh.  What do I have to do to accomplish that so it ref

  • Pay Operating Units from different Legal Entities?

    Pay Operating Units from different Legal Entities? Hi there, This is the current scenario: Legal Entity A has Operating Unit A Legal Entity B has Operating Unit B. In R12 Payables, can payments be setup so that in the payments manager of Operating Un

  • Changing a Standard User

    Speaking from a vey low level of expertise here.  I need to change the person who's name shows up next to the little house in the finder.  Under accounts, she is a Standard User.  She no longer works here and I would like the new employee to be the p