How to Use JavaScript in Controller Class...

Hi All,
Can any one tell me how to use JavaScript in Controller Class.
Requirement is:
I have
Radio Group(RG1),
Two Radio Buttons(RB1,RB2),
Two messageTextInput(MTI1,MTI2),
if i click RB1 i should Prompt to the end user to "Enter value for MTI1" or
If i click RB2 i should prompt "Enter value for MTI2" while submitting page.
Please let me know the steps to use JavaScript and the above client validation...
Regards
Alem...

Using javascript is against the standard. I can tell you a workaround instead of you setting the javascript, check if that would be acceptable.
You can use PPR and set the required property on the messageTextInput on clicking of the radio button. By doing this you will let UIX generate the javascript for you to handle the client side validation. But the validation will happen only on click of the submit button. The visual indicator is good enough to tell that the value has to be entered to the item.

Similar Messages

  • How to Use getDBTransaction() in Controller Class

    I am using the below code.
         OADBTransaction tx = (OADBTransaction)getDBTransaction();
                             java.sql.Connection pConncection = tx.getJdbcConnection();
                   ConcurrentRequest cr = new ConcurrentRequest(pConncection);
    But receiving the below error method getDBTransaction not found in class cust.oracle.apps.pos.changeorder.webui.extendViewOrderPGCO
    Should I extend AM and use this code in AM or can I use this code in extended Controller.
    Thanks for your help.
    HP.

    OADBTransaction tx = (OADBTransaction)getDBTransaction();
    java.sql.Connection pConncection = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(pConncection);
    Connection conn = (Connection)oapagecontext.getApplicationModule(oawebbean).getOADBTransaction().getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(conn);http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
    Thanks
    --Anil
    http://oracleanil.blogspot.com

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use Javascript to load random pages?

    I wonder if anyone knows how to use Javascript to load a list
    of links stored in the text file.
    Every address will take a line, and the Javascript will
    randomly select one of the addresses to load.
    The user will click the button "random" and access the page
    randomly selected by the script.

    Addition note:
    I forgot to say this because my computer froze......(how
    lame)
    I got the code for random accessing the links.
    But now the problem is, is there anyway to parse a text file
    into the array in Javascript?

  • How to use JavaScript in Web bean generated JSP

    I want to do some simple JavaScript validations (for example, checking if a particular field is empty) in the JSP page rendered by the data web bean. Because the HTML is rendered by the bean, I'm not able to refer to the HTML controls in the JSP page. I'm not even able to refer to the form with the following standard piece of JavaScript code - "document.forms[0].control_name".
    Is anybody aware of how to use JavaScript with these rendered JSP pages?

    You just have to add it like and applet , including this line in your JSP or JSF
    <script src="http://dl.javafx.com/dtfx.js"></script>Then add the applet
    <script>
        javafx(
                  archive: "./resources/jar/Draw.jar",
                  width: 400,
                  height: 200,
                  code: "Draw",
                  name: "Draw"
    </script>./resources/jar/Draw.jar - is the path and the name of the jar

  • How to use Javascript in OBIEE?

    Hi all,
    can any one tell how to use javascript in OBIEE. i.e steps to follow to insert the javascript in OBIEE 11g or 10g

    If you are trying to display total number of pages in a report, Add the below formula in the column of the report and hide that column in the report.
    FX = sum(count(1))/25
    You can then reference the column in the narrative view like this: "Total pages in the report are @5" and out put may be "Total Pages in the report are 30".
    Or
    You can also use something like the below:
    To calculate them use fi:
    CEILING(CAST(RCOUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the page number
    CEILING(CAST(COUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the total pages
    Put the above formula in the column and reference it in the narrative view like I mentioned in the previous example.
    If you are report view is pivot, then please refer to this link: http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    Hope this helps.
    Thanks,
    -Amith.

  • How to use JavaScript Zoom in on the layer

    How to use JavaScript Zoom in on the layer

    yeah, i talking about zooming in on a 3D object,do you have a solution

  • How to use JavaScript in Dynamic commandLink

    Hi All,
    In my JSF application, I am able to get the dynamic CommandLink with the below mentioned code.
    commandLink.setActionExpression(createActionExpression("#{myBean.myMethod}", String.class));
    The above code is navigating to the page mypage.jsp properly (the page which is returned by method myMethod).
    My Question is: Instead of navigation (as mentioned above) I want to generate a popup window using JavaScript on click of commandLink.
    Please suggest me on how to proceed on this?

    Hers is my JavaScript:
    function showPopupWindow(action) {
    formId=action.form.id;
    //features="height=300,width=250,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";
    features="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=900,height=500,top=80,left=80";
    winId=window.open('Mypage.faces','list',features); // open search window
    winId.focus();
    This works perfectly with the onclick attribute of the commandbutton as shown below:
    <h:commandButton value="Open Popup" onclick="showPopupWindow(this); return false;"></h:commandButton>
    {color:#ff0000}
    But I tried same thing with the onclick attribute of the commandLink, that did not work.
    <h:commandLink value="Open Popup" onclick="showPopupWindow(this); return false;"></h:commandLink>
    {color:#0000ff}As per my requirement, I tried using setOnclick attribute in the following manner, that failed to open the popup:
    commandLink.setOnclick("{color}{color}*{color:#0000ff}showPopupWindow(this); return false;{color}*{color:#ff0000}*{color:#0000ff}");{color}*
    {color}

  • How to use JavaScript to Open a link automatically

    Is there a method (using JavaScript) to allow a user clicked link to open the link through a “intermediary” page?
    For example, say I have a web page with a embedded Flash file that contains links to several different (outside) web pages. The behavior I want is that the user clicks a link (within the Flash file), a HTML window opens (over the 1st HTML/Flash window) with the new content, leaving the original Flash/HTML window displayed in the background. The user reads the new content. The user can then close the newer window and be back at the displayed HTML/Flash file.
    The twist is that the link embedded in the referring Flash/HTML file goes to a “intermediary page”. Call that the “collector” page. I control that page. On that page I have collected (in a list) all the actual outside URLs (I do this so that I can easily change the URLs using HTML rather than having to edit the Flash file.) The Flash file contains essentially the same URL for each outside location (plus a variable unique to a specific URL).
    The user should not ever actually see this intermediary/collector page. Instead, they click the link, a variable is passed from the referring page to the collector page and fires the corresponding link automatically (replacing the content in the newly created window). Since the link fires automatically the content in the new window (initially created by the collector page) changes to the destination content.
    Is this possible?
    What JavaScript functions are used?
    How are the referring links constructed in the Flash so the variable is passed to the collector page?
    How does the “collector” page auto open the actual content?
    If anyone can point me to descriptions on how this might be done I’d certainly appreciate it.
    TPK

    >is there a way i can call javascript without security checking?
    It wouldn't be security if you could just bypass it. Did you read all
    the security notes? You might be able to do something with trusted
    functions, but I'm not sure how that would integrate with a plug-in.
    Aandi Inston

  • How to use Javascript, C#, or Java to automatically fill out a PDF file using ACROBAT PRO

    Hi.
    I have purchased a copy of acrobat pro and am currently using it to try to create a method of populating certain fields in a PDF file.
    This particualar scenerio is a printable cerficiate, it has a spot for the persons First Name, Last Name, and other basic info.
    So we have an exisiting editable PDF, a database with the user's info, and a ASP.NET web server, and of course Acrobat Pro.
    How can I use these components to create an auto fill script?
    Ideally, we'd genereate these certs on the fly, and allow users to download them.
    A code sample would be awesome.
    Thanks!
    --shawn

    I've discovered that you can create a "PDF Form" and edit that form with Javascript.
    My question now is, what is the prefered method for controlling the pdf form?
    I would like to include the PDF file in an HTML page and edit the form fields using javascript in that HTML page.
    I think that this is how developers are meant to work with dynamic pdf files.
    In the acrobat javascript reference, it only shows an example using the acrobat javascript console.
    If anyone has used Javascript with PDFs, I would highly appricate some input.
    Thanks,
    -- shawn

  • How to use javascript code in a plugin ?

    Hi,
    I'd like to use javascript in my plugin but after reading the JS API reference, i still don't understand where the code should be placed, and to call it from my plugin.
    I'm quite new in Acrobat SDK and developping applications in Acrobat using Javascript, so I hope it's not a dumb question...

    >is there a way i can call javascript without security checking?
    It wouldn't be security if you could just bypass it. Did you read all
    the security notes? You might be able to do something with trusted
    functions, but I'm not sure how that would integrate with a plug-in.
    Aandi Inston

  • How to use javascript in oracle portal

    I want to add a dynamic menu portlet using javascript and the javascript is in .js file ho do I call it...

    Can you please explain to me off line my email address is [email protected], How did you do it.
    I get javascript error when I use DHTML menu into JSP page, which I developed as a portlet and trying to add this portlet onto users page.
    In a way I can understand why, the reason could be the similar to why we can not use frames in HTML portlet or any other portlet objects that we use, and customize HTML ( stylesheet, look and feel etc.). Since portal gathers all the pages (ultimately HTML's) dynamically and bring them as a single page to the user.
    So, even if for you it may have shifted to bottom, still it seems it is working for you.
    Appreciate your help.

  • How to use these method of class CL_GUI_PDFVIEWER

    how to use these methods in the class CL_GUI_PDFVIEWER
    1) CREATE_ANNOTATION
    2) GET_ANNOTATION_INFO
    3) SET_ANNOTATION_SETTINGS

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10926572&messageID=1803295
    Regards
    Kiran

  • How to use commit work in class cl_bls

    Hi,
    When i have used commit work after email sent,
    it goes into dump.
    Here is the code segment:
      try.
        -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
        -------- create and set document -------------------------------
          pdf_content = cl_document_bcs=>xstring_to_solix( pdf_tab ).
          document = cl_document_bcs=>create_document(
                i_type    = 'PDF'
                i_hex     = pdf_content
                i_length  = bytecount
                i_subject = sub ).  "#EC NOTEXT
        add document object to send request
          send_request->set_document( document ).
        --------- add recipient (e-mail address) -----------------------
        create recipient object
          recipient = cl_cam_address_bcs=>create_internet_address( recip-recip ).
        add recipient object to send request
          send_request->add_recipient( recipient ).
        ---------- send document ---------------------------------------
          sent_to_all = send_request->send( i_with_error_screen = 'X' ).
         commit work.
          if sent_to_all is initial.
            message i500(sbcoms) with recip.
          else.
            message s022(so).
          endif.
      ------------ exception handling ----------------------------------
      replace this rudimentary exception handling with your own one !!!
        catch cx_bcs into bcs_exception.
          message i865(so) with bcs_exception->error_type.
      endtry.
    What could be the reason?
    Is there any way to use commit work in class while sending email as in SO_NEW_DOCUMENT_ATT_SEND_API1 fm?
    Thanks.

    Hi,
    I have used
    submit program.....
    but in update task i have used it.
    "Z_SD_ORDER_UPDATE".    program is a print driver program.
    However error says:
    There is probably an error in the program
    "Z_SD_ORDER_UPDATE".  
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    I used submit as:
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                      WITH output = ' '
                    AND RETURN.
    Instead of submit i want to use commit work but i also get a dump after commit work too.
    How can i use commit work in above code?
    Thanks.

  • How to use javascript to print on the client side

    hi all,
    Now i'm facing a problem:
    I want to use javascript to print something(for example, a table) on the client side. So i must get a connection with the printer installed in the client computer.
    some says that getObject() function can do this,but i don't know how?
    Who please help me!

    window.print();

Maybe you are looking for

  • Can not find location of method in Flash example

    The issue that I am having is that I have search high and low to find where the method "flashmo_graphic()" is defined in the example that can be found here: http://www.flashmo.com/preview/flashmo_158_heart_effect I also attached folder.  There is a "

  • How to Find out the from which table we can get the following fields?

    The following fields are from invoice data How to  know or from which table we get the following fields: Header Details: Manifest:, Finance Control #:, Alternate SID:, Carrier:, Container/Trailer #:, Hazmat Code:, Harmonizing Code, Freight Forwarder,

  • Form 6i problem

    I am facing the following problems in oracle 8i database. 1. I have installed the oracle 8i database on windows2000. oracle 8i database is working right after that I have installed the form 6i on same stand along PC. When I make new form or open old

  • C309g-m printer, prints too dark

    My printer always prints too dark. The prints never come out  like they look on the screen. I can manually change the lightness of the photo to compensate, but it would be nice if there were settings I could change in the printer instead. Any advice

  • Translation - XLF file with the UTF-8 BOM at the head of the file

    Using APEX 3.2, I'm trying to get translations loaded for an application that I'm working on. We are going through the process of generating XLIFF files, sending them to a translator to translate, and then importing the data back in rather than manua