Using pl/sql to access non-apex HTML items on page

how would i use pl/sql to access html items on a page. the items are not apex items.
i want to loop through a set of html items on the page and do a database update on these values. the method i am using to distinguish these items from others on the page is using a custom attribute of type. i am then going to use the id as the primary key for the database.
using javascript i can traverse through all items however i require to do it in pl/sql. i realise that i could use javascript to put all values in one apex hidden field but this would be sloppy and i want to avoid doing this.

Hello,
When a form submits the server never sees any custom attributes one way or the other, (this in any web environment) all anything on the server side will ever see is the value of the form item submitted. The only way to do what you want is to use javascript to collect the extra information and place it in a form item visible to APEX (a regular APEX Item).
The javascript route isn't a work around its the only way this will work the way you want. In the product itself we use custom attributes in an htmldb: namespace so the attribute does looks like htmldb:something="value", (you should make your own namespace don't use htmldb:)
I recommend using the namespace on your attributes instead of just shoving it in there as it will be closer to valid html or xhtml, it will still fail validation but at least you have the argument that "Hey xhtml is xml and xml allows for custom namespaces and custom attributes for that namespace so it's still good xml" not that I've ever used the argument or anything.
Carl
Message was edited by:
Carl Backstrom

Similar Messages

  • Are there any risks to use native sql in ABAP to access external DB

    here is a requirement to use native sql in abap program to access external DB to load some data into sap. Are there any risks and effects which SAP not recommend ?
    Can anybody show some official document to me because I want to know some risks and dangerous to report to my manager..thanks very much.

    hi Anversha s 
    thank you for your reply
    I means what's the risk when to use native sql to access external DB..
    can you show me some examples about open sql which is used to access external DB...
    Now I am investigating the technique about the connection
    between SAP (by abap program) and external DB...the supporter suggestion is to use native sql to access external DBs.but my manager is afraid of the risks when to use native sql,So I have to report the effective document (example: SAP official document) to explain  to my manager.
    thanks very much

  • How to generate formated (defined position) text and image using pl/sql and

    Hello,
    I need to use pl/sql to create a dynamic html page (or image , if possible) with defined positions for text and bar code. It is necessary because the page will be printed and it should be able to be read by one other process , OCR, that needs to have all the data in defined positions.
    Any suggestion are welcome.
    Thanks in advance,
    Emilio

    I don't think it's that easy. Notice that if you put the insert into an actual pl/sql block, you don't get the correct column pointer anymore.
    BEGIN insert into bob(col1, col2) values (123.12, 12345.12); END;
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    ORA-06512: at line 1
    Richard

  • Can you use nested sql statements in jsp??

    HI, I was wondering if you can use nexted sql statements...
    example...
    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="forum.DataAccess" %>
    <%
         // Create a new instance of the DataAccess Class
              DataAccess d = new DataAccess();
         // This call the database connection method from the DataAccess Class
              d.ConnectDatabase();
         /* This gets the threads from database for the categories */
              // This is initilzing the variables
                   String threadname = null;
                   int threadid = 0;
              // This sets the sql variable to nothing
                   String sql = "";
                   String sql1 = "";
              // This sets the rs variable to null
                   ResultSet rs = null;
                   ResultSet rs1 = null;
              // This is doing a SELECT on the thread table based on the category id
                   sql += "select * from forum_threads where ft_catid = 2";
                   rs = d.SQLQuery(sql);
         /* End of categories */
         while (rs.next()){
                                       threadid = rs.getInt("ft_threadid");
                                       threadname = rs.getString("ft_threadname");
         sql1 += "select * from forum_messages where fm_catid = 2 and fm_threadid = " + threadid + "";
         rs1 = d.SQLQuery(sql1);
    %>
    THis is the error I get.....
    javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
    I know what that is.. it is because I am trying to open another result set before the first one is closed... but I need that one open cause I need to loop through the ids and run it against the second query??
    Any suggestions...

    I am not positive but it seems from your error message you will not be able to use the nested SQL. Another option would be to store the values of the ResultSet in a Vector (or Array), and then close your ResultSet and loop through the vector or array instead...
    Zac

  • How to create dynamic HTML page using PL/SQL code in APEX.

    hello,
    I am woking on one APEX application in which i want to create one dynamic HTML page on button press using PL/SQL code.
    Thanks

    It is possible to create HTML page with dynamic content. One way would be creating hidden field (e.g. P1_HTML on page 1) with dynamic HTML and on button click you redirect to page 2 and pass P1_HTML item value to item P2_HTML on page 2. On page you must have PL/SQL region. You can then render your dynamic HTML with code:
    htp.p(:P2_HTML);
    Don use APEX URL for passing HTML value. Problem and solution is described here: http://blog.trent-schafer.com/2011/04/03/dont-pass-string-parameters-in-the-url-in-apex-its-a-bad-idea/
    Edited by: MiroMas on 3.2.2012 3:20

  • How to use Oracle SQL Developer 4.0 to connect to Ms Access file with .accdb extension

    Hi all,
    I am using Oracle SQL Developer 4.0 and Ms Access 2013 under Windows 7 (64 bits)
    After browsing and selecting MS Access file with accdb extention, I got  an error message  :[Microsoft] " Data source name not found and no default driver specified".
    On Administravitve Tools=> ODBC Data Source Administrator=>Drivers I have                                                File                                date
    Name :                                                                               Version
    Microsoft Acess Driver (*.mdb, *accdb)                                 12.00.4518.1014                                        ACEODBC.DLL                    26/10/2006
    Would you please advise?
    Thank you very much in advance

    That MS Access driver is 64-bit, I think.  If SQL Developer, or JDK is 32-bit you need to use the 32-bit driver.   You can see if you have a 32-bit driver installed using  c:\windows\system32\odbcadm32.exe

  • I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work

    Hi,
    I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work
    (fault number -2147217900)
    I want to search for a value in a ms access table , if it exist i want to update it, if not i want to insert a new row.
    Working with LabView 7.1, database con. toolset.
    Who can HELP?
    Thanks a lot
    Marco

    Hello,
    I think that If exist is not a standar SQL command (I know it exists I think in Oracle and SQL server), MS access doesn't support it, so I think the best way to do it is first make a Select and then either an Update or an insert, sorry...
    Paulo

  • Accessing MySQL InnoDB tables via JDBC using Oracle SQL Developer

    I had posted a problem in the Oracle SQL Developer forum with how that application (v1.1) accesses MySQL InnoDB tables and someone replied that the "[data migration] team created the integration with MySQL", so I am posting here in hopes of learning more about the problem.
    Here's a summary:
    When I use Oracle SQL Developer to query MySQL InnoDB tables, I need to issue a "commit" before I do each query to ensure that I am getting current results. Otherwise, it appears to be using a snapshot as-of the last commit. Is this a problem with SQL Developer, or a JDBC configuration, or MySQL problem even?
    The full details are here:
    Re: MySQL InnoDB tables

    Hi,
    I've posted a response to your original thread.
    Regards,
    Dermot.

  • How validate HTML using PL/SQL

    Hi,
    I try validate HTML using PL/SQL that user inputs.
    I did create below function for that purpose
    CREATE OR REPLACE
    FUNCTION validate_html(
      p_html IN VARCHAR2
    ) RETURN BOOLEAN
    AS
      l_comment  XMLTYPE;
      xml_parse_err EXCEPTION;
      PRAGMA EXCEPTION_INIT (xml_parse_err , -31011);
    BEGIN
      l_comment := xmlType.createXML('<root><row>' || p_html || '</row></root>');
      RETURN TRUE;
    EXCEPTION WHEN xml_parse_err THEN
      RETURN FALSE;
    END;
    Function works ok and return true if I run e.g.
    BEGIN
      IF validate_html('<p>Hello</p>') THEN
        dbms_output.put_line('OK');
      ELSE
        dbms_output.put_line('Not valid HTML');
      END IF;
    END;
    And return false if I enter not valid HTML like
    BEGIN
      IF validate_html('<p>Hello') THEN
        dbms_output.put_line('OK');
      ELSE
        dbms_output.put_line('Not valid HTML');
      END IF;
    END;
    But it return false also if I run below
    BEGIN
      IF validate_html('<p>Hello &nbsp</p>') THEN
        dbms_output.put_line('OK');
      ELSE
        dbms_output.put_line('Not valid HTML');
      END IF;
    END;
    Problem seems to be that &nbsp (there is ; in end but do not know how post it without forum convert that to space) witch is valid HTML for me.
    I know that HTML is not XML, but can I use Oracle database XML functions for validating HTML?
    How I should validate user inputted HTML?
    I'm currently developing this using Oracle XE 11G database.
    Regards,
    Jari

    Not an elegant way:
    But try this.........
    CREATE OR REPLACE FUNCTION validate_html (p_html IN VARCHAR2)
       RETURN BOOLEAN AS
       l_comment       XMLTYPE;
       xml_parse_err   EXCEPTION;
       PRAGMA EXCEPTION_INIT (xml_parse_err, -31011);
    BEGIN
       l_comment :=
          xmlType.createXML (
             '<root><row>'
             || CASE
                   WHEN INSTR (p_html, '&') > 0 THEN
                      UTL_I18N.escape_reference (p_html)
                   ELSE
                      p_html
                END
             || '</row></root>');
       RETURN TRUE;
    EXCEPTION
       WHEN xml_parse_err THEN
          RETURN FALSE;
    END;
    SET DEFINE OFF
    SET SERVEROUTPUT ON
    BEGIN
       IF validate_html ('<p>Hello') THEN
          DBMS_OUTPUT.put_line ('OK');
       ELSE
          DBMS_OUTPUT.put_line ('Not valid HTML');
       END IF;
    END;
    SET DEFINE OFF
    SET SERVEROUTPUT ON
    BEGIN
       IF validate_html ('<p>Hello &nbsp</p>') THEN
          DBMS_OUTPUT.put_line ('OK');
       ELSE
          DBMS_OUTPUT.put_line ('Not valid HTML');
       END IF;
    END;
    Cheers,
    Manik.

  • : Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))

    hi all can anyone help me i am geting Exception while starting LCES server
    : Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))

    hi all can anyone help me i am geting Exception while starting LCES server
    : Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))

  • Can you access non-Oracle database with HTML DB?

    Can you access non-Oracle database with HTML DB? If not, will this be possible in the future?
    I realize HTML DB is not an open-source product. However, it is necessary sometimes to get non-Oracle database info. JDeveloper supports this. It does not appear to me that HTML DB does. This is a major drawback to it being a product for more potential applications that rely on other database technology such as MySQL, etc.
    If it is possible, is this brain surgery to do it. HTML DB offers fast simplified development and it would be good if it was built in. Does anyone know of an example of accessing non-Oracle database that is available?

    12282,
    In general, HTML DB gives you access to Oracle database facilities. These include heterogeneous services. Please search this forum for keyword "heterogeneous" and you can follow the threads that interest you.
    As for the comparison with brain surgery, I'd rank them about the same in terms of raw thrill.
    Scott

  • Disable Html button in validation process using pl/sql

    Hi,
    I need to disable a html page button. It gets re-enabled afer a validation process is run on the page and errors for the form are returned. I need a way of writing a validation process using pl/sql returning boolean, that can disable the button again.
    I've tried:
    IF lname > 0 THEN
    Return TRUE;
    Else
    htp.p('<script type="text/javascript">');
    htp.p('document.getElementById("NEW_ENTRY").disabled=true');
    htp.p('</script>');
    Return FALSE;
    End If;
    The button id is NEW_ENTRY, but this is ignored and the buttons remains enabled.
    Any ideas on how to change the code to work?

    You have to create after region process that will be triggered on some condition.
    htp.p('
    <script type="text/javascript">
       document.getElementById("NEW_ENTRY").disabled="true";
    </script>
    ');

  • Can you use Object Relational SQL to access XML content ?

    Is there a possibility to use the generated object types and collection types to conveniently access the xml data?

    Technically there is nothing to prevent you from using the object types generared when an XML Schema is registered to access and manipulate the contents of the instance documents that conform to the Schema. This would be done using the notation x.xmldata.attribute In this case x would be the object table, xmldata is the name of the instance of the SQL object type associated with the table in question.
    However we do not encourage or recommend this approach. Currently XML DB provides the application developer with DML / DDL independence. This holds true as long as you use XPATH expressions to express your DML operations. Using XPATH expressions to access the content of an XML document maintains an abstraction between the DML (XPATH) and the underlying Object Relational Storage Structure derived from the information in the corresponding XML Schema. Whereever possible, when you express a query using an XPATH expression, under the covers we attempt to re-write the query into Object Relational SQL, based on the meta data contained in the Schema, as access v
    If you use the object notation to access the content of the document you break this abstraction. Your application now needs to be aware of the physical (object relational) storage model being used to manage the instance documents.
    One of the key features of XML DB is that it allow a developer to use Schema Annotations to alter the storage model used to manage the instance documents. The most common example of this is using annotations to control the way in which collections are managed. Depending on the annotation in the schema you can store collections as a VARRAY, as a NestedTable or as a separate XMLType table. Dependong on the technique chosed the objects that are generated during the XML Schema registration process will change.
    If you use the XPATH expressions to accesss the content of your documents, and you decided to change the annotations in your schema so as to revise the way your documents are stored, XML DB will ensure your code should continue to work unchanged, regardless of which objects are generated during Schema registration. On the other hand, if you use the object notation to access the content of the documents, and then change the annotation you will have to change your code.
    I hope this clarifies the situation..

  • Using pl/sql in forms to access rs232 information

    Does anyone know how to capture information receved from serial port (example: serial code) using pl/sql with forms.
    THX.

    What you need is a 3rd party comm ocx or ole
    control like SAXCOMM,PDQCOMM etc.
    Once this is loaded on your machine , then using forms goto the programs "import OLE libray interfaces" option and load the commms control you are using. You must choose the events and methods. Once this is done then the programme units should be updated with the procs (methods) you can call.
    I hope this helps.

  • How to download a SOAP attachment using pl/sql

    Gurus,
    I have a custom pl sql application that is web services based. The custom pl sql application invokes the external web services and updates Oracle Field Service application.
    One of the new requirements is to get the signatures from SOAP Attachments (a binary file) and attach it to Field Services transactions in Oracle.
    Does anyone has an example of how to download the SOAP attachment file from web service using pl/sql.
    The pl sql program uses UTL_HTTP to access web services.
    Much Thanx.

    I think you may be in the wrong forum, but anyways...
    What I think your looking for is the htp.print('insert html here'); function. It's plsql, and writes out html to the web server that calls it.
    if you search for htp.print you should find loads of examples.
    hope this helps.
    Merv.

Maybe you are looking for

  • FED UP WITH BT SERVICE

    I am glad I am off work on holiday because it is taking me all day to try and get this service sorted. Decided to get all my services together as had tv on Sky , phone on BT and internet from talk talk. Was told it would all be sorted by July 8th. He

  • IC_C03- Slow Moving

    HI Experts, I need to genrate slow moving report based on movement type-- Like Last usage date - this would be calculated based on the date of last movement type. and i would like to know where the Quantity on hand will be derived from this Infocube.

  • T43 2687-d3u bsod determined to be short in bridge connecting hdd to mobo now what?

    Greetings, So I got the BSOD. Initially thought my hdd died. Purchased a new hdd, still no luck. Determined that the bridge connecting the hdd to the motherboard is loose, presumably from holding the laptop with only 1 hand on the right side of the m

  • Ever since new version was downloaded, firefox crashes, why

    just keeps saying reload tab and is slow

  • Basic questions about hosting

    hi everyone, i hope i am posting in the correct forum... i have just finished a website (designed with dreamweaver) and i am ready to upload it online. the website is very simple (html), has no flash or animations, only pictures and has a total 50MB