Deactivation of specific attributes in a table after insertion of line

Hello

I'm relatively new to Apex and me has encountered a problem. I'm trying to disable a few fields in the list of attributes in the form after the insertion is made. I want first two attributes to be read-only once they are inserted in the database, so that the user cannot change them. Any idea on how to do this? (Only one field is a LOV selection and the second is a date picker).

Thanks in advance,
Luka

Ideally, you want to do it differently. Having a dynamic action that works on the loading of the page only works on the first page of the tabular presentation and not on other pages.
Change the action dynamic event "After Refresh" on the region in a table.
As a real action choose 'run javascript '. Check 'Fire on page load '.
Note that my code will only change existing lines. It will remove the functionality of datepicker among elements on these lines, but not delete it form will add lines. DatePicker ("Destroy") is the standard way to remove a widget in jQuery UI, such as the date picker and returns the element to its 'pre-init State' (= the normal input field).
An alternative to deactivation and activation of the elements, you can consider using just "readonly", because this will not be a change but sends his State on the server. Of course, it is not the same aspect as a disabled element, but it is something you can change by applying CSS to them.

//select all input items with name attribute set to f10, within the context of the triggering element (=tabular form)
//remove the widget state from each of the matched elements
//set the readonly property (or disabled) to true. Similar to .attr("readonly","true") but better
$("input[name='f10']", this.triggeringElement)
.datepicker("destroy")
.prop("readonly",true);  //or use .prop("disabled",true) to disable the item.

Tags: Database

Similar Questions

  • Updating of the table after insert shows empty cells

    Hello experts,

    I'm trying to insert some custom values of certain fields in a table displayed on my page. The table comes a VO based entity with a sequence number and a few constraints.

    The sequence numbers batteries managed automatically by the database.

    The entry fields are related to a bean managed to get the value with 'GetValue' and then I create a string for the entry. The string then gets cut in the VO as some attributes with the following SQL calculation example:

    REGEXP_SUBSTR (attribut3, "[^,] +' 1, 5")

    But it is on the ViewObject/database layer.

    After I call the method of the VO Impl to create the new line like this:

    Managed bean:

    OperationBinding operationBinding = bindings.getOperationBinding ("addRow");

    operationBinding.getParamsMap () .put ("Value1", someInt);

    operationBinding.getParamsMap () .put ("Value2", someIntToo);

    operationBinding.getParamsMap () .put ("Value3", someString);

    operationBinding.execute ();


    Impl VO:


    ' public void addRow (integer value1, value2 Integer, String value3) {}


    ViewObject vo = this;

    NewRow row = vo.createRow ();


    newRow.setAttribute ("attribut1", value1);

    newRow.setAttribute ("attribut2", value2);

    newRow.setAttribute ("attribut3", value3);


    vo.insertRow (newRow);

    this.getDBTransaction () .commit ();

    }

    I capture without exception again, but when I place everything correctly and trigger the code bean managed via a button action, the table shows the new line with the correct integers, but the channel cut in two by the calculation of SQL from the top shows only blank cells. After that research with the filter of the table and remove the search filter once again, the strings appear correctly.

    For example, after you insert:

    table1.PNG

    Then, after 'refreshment' with the filter:

    table2.PNG

    What can I do about it? I can't really put the data through the InsertWithParams, because I need build the string with the Java Code.

    It only does not show data after insertion, PartialTrigger (s) also will not work.

    You must re-run the sql query after validation (with: vo.executeQuery ())

    Dario

  • After inserting a line using vo.insertRow (row), I get this line right after insertion, i.e. before committing.

    Hello

    I am facing a problem in which I want to extract a line newly entered into the database table but impossible to recover before as I have post the transaction.

    I created a VO based on an OA. I inserts a new row into the table by using vo.insertRow (row). I am able to get the data that is stored in an object by using the Get accessor methods. But I want back the newly input line, which I am unable to get that returns a null value. The line is returned only when I put the only.

    Can someone help me, how do I retrieve this record before committing?

    Concerning

    Rahul

    Hello

    Thanks for your reply. I found the solution for this.

    The new inserted row is not displayed in the database table until it is committed.

    I used the necessary line RowImpl object, and I do changes to this object in row after insertion, but before the transaction is committed.

    Thanku

  • 1 table D inserting excel lines

    I have a VI that writes to a worksheet.  I generate a time table the first 1 d executing the VI which is placed in a spreadsheet.  If I do it directly I enter the table in its entirety only 1 cell

    If I said to transpose by writing to the spreadsheet, I get a single value for each row in the first column.

    The second time I run the code the the VI reads the original table in excel and then adds the new data in the table and overwrites the file.  I want to do two things.

    I would like to either as the data to be written vertically with each new game is added to the next column or I want new data write horizontally on the columns and add new data into new lines. I prefer to have just the data to write to individual cells of the same line fixing the issue of the right to the top image.  The main problem is that I want one value per cell in excel.  I have attached the VI and this survey data sheet.  The way it works is you put the name of the file you want to save.  Then run you it once.  You can then update the desired section, run it again and it should save in the file again.  Any ideas would be appreciated.

    If you want to write data in each cell separately, you must set the separator (comma).

    Check this code snippet. You get an idea. BTW, write to spread sheet vi also do same thing (internally).

    Below excerpt written new data at the end (e.g., line-by-line). If you want to write data column wise, you must read all the data from your old file & add new data to write again. But this isn't a good idea. Simple reading of old data (without doing anything) is not a good way.

    If you really want to do this, use Excel (Report generation toolkit) & set your cell value.

  • Need help with creating table that inserts the lines according to the amount of data

    Hello

    I try to create a table for supervisors to enter their subordinates of information and inserts lines for supervisors with several of his subordinates.  This form is not be connected to a data source, the supervisors will be simply fill out the form and print.  I want it sort of look like this:

    Name Position # Ranking Hours

    I really appreciate any help.  Thank you!

    Hi Laura,

    It's very strange. I downloaded a new version on the site and it works perfectly. The script is in the right place.

    I can sugggest you right click on the download link and select "save a copy as" the alternative menu. This should save the form locally and from there, you should be able to open it in Acrobat.

    If you are a Mac, make sure that the form opens in preview from Apple.

    Also make sure that Javascript is enabled in Acrobat (in the preferences window).

    Niall

  • SQL to retrieve the specific attributes of an x 509 digital certificate

    I'm curious to know if there is a way to use SQL to retrieve the specific attributes of an x 509 digital certificate. I know how to make using openssl - no problem. But what happens if the pem file is stored in a datebase column and I need to extract the expiration date. Since the openssl command line, I can just do this to extract the date of expiry of the certificate:

    OpenSSL x 509 - noout - in certificate.pem - dates | grep notAfter | AWK-f = '{print $2} '.
    (retrieves only the dates | take only the line with the expiration date | print only the second column of the row delimited =)

    But if certificate.pem is stored in an Oracle database on the ground, how to achieve the same result? Y at - it something like "DBMS_OPENSSL"?

    I got to thinking of V$ PORTFOLIO in an Oracle database. Only columns here are CERT_ID, DN, serial_num, TRANSMITTER, KEYSIZE and STATE - no certificate, which suggests that it is stored elsewhere. As you can tell, I am new to this.

    Thanks for your help!

    You can use a small procedure stored Java to extract the required fields.

    http://docs.Oracle.com/javase/6/docs/API/Java/security/cert/CertificateFactory.html
    http://docs.Oracle.com/javase/6/docs/API/Java/security/cert/X509Certificate.html

    SQL> create table cert_storage (id integer, cert clob);
    
    Table created
    
    SQL> insert into cert_storage values (1,
      2  '-----BEGIN CERTIFICATE-----
      3  MIIDljCCAn4CCQD2F4J0d4f7rTANBgkqhkiG9w0BAQQFADCBjDEMMAoGA1UEChMD
      4  V0dVMQ0wCwYDVQQLEwRNU0lBMR4wHAYJKoZIhvcNAQkBFg90d2lsbDYzQHdndS5l
      5  ZHUxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MQswCQYDVQQIEwJVVDELMAkGA1UE
      6  BhMCVVMxGjAYBgNVBAMTEVRob21hcyBDIFdpbGxpYW1zMB4XDTEyMTExNjA2NTEx
      7  OFoXDTEzMTExNjA2NTExOFowgYwxDDAKBgNVBAoTA1dHVTENMAsGA1UECxMETVNJ
      8  QTEeMBwGCSqGSIb3DQEJARYPdHdpbGw2M0B3Z3UuZWR1MRcwFQYDVQQHEw5TYWx0
      9  IExha2UgQ2l0eTELMAkGA1UECBMCVVQxCzAJBgNVBAYTAlVTMRowGAYDVQQDExFU
     10  aG9tYXMgQyBXaWxsaWFtczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
     11  ALzwniQTgM79kwIOIqo2GE+Ufl56F0E/Rg956Ho6FoT9tBhvvQfI1SDvRzsrMGYP
     12  2VDAT7I7HEUnwFPMF7YAiLbK/6LlKDv0D+JyP3q9k/ENsZd0Z33KZ3HrJV1sdZZK
     13  iCv7isHKJ7xJgxQq+9ecpBG2Y9Vr5rLg8WPqnjvnaI60PN+NEsWnFNr/u6rBfv9R
     14  CQBtbLG6nhq5rxd67cWYR1hLpQg/S40AYcJBMIOApDN96YzDFXUM269JdHLSMgbt
     15  ZN8F4XeGljNbuVT8BTKOSydDUWWNJA593GLMSQ+OJVzVuwF99JzUwG0TcmPYgcQn
     16  Vav2t9igeXq7bUspcFTHQX8CAwEAATANBgkqhkiG9w0BAQQFAAOCAQEAAoOfoSSo
     17  sN78pSuDAAD95AgATzmCFxLvV9LWrIkFOF6mLwpnvR9UvjoOfQRWjVNnHKZ+1SPw
     18  oRo9KnMaWBltnXgKktfNYsSqCgZ889VaFlZfOL7TTq+jWqG9sRNXcJHkC+o07cxS
     19  IZSXNwjV+c6NMXUJWTf6OWKLcBmQ3Ze0hwiyW06QZvSd7psYqAH4AJHyiOXROG44
     20  eNtbFWxQ5Gg/tgXnEr/vbr2twXuflmmoNkjh94mR9Vf0QJY6/1I6qYkJ4n+xX2kR
     21  yisfvWztlYT+1m/z8jzeJtAkxRIloTIacLrIjaQKpKKsL4rAb0Fd0SUPP6HkIt72
     22  +vQ4jwHbxRhV7g==
     23  -----END CERTIFICATE-----')
     24  ;
    
    1 row inserted
    
    SQL> commit;
    
    Commit complete
     
    
    SQL> create or replace and compile java source named testx509src as
      2  import java.security.cert.*;
      3  import java.io.*;
      4  import java.sql.*;
      5  import oracle.sql.CLOB;
      6  import oracle.sql.TIMESTAMPTZ;
      7
      8  public class TestX509 {
      9      public static TIMESTAMPTZ getExpirationDate(CLOB cert)
     10              throws SQLException, IOException, CertificateException {
     11
     12          Connection conn = (Connection) DriverManager.getConnection("jdbc:default:connection:");
     13          BufferedInputStream is = new BufferedInputStream(cert.getAsciiStream());
     14
     15          CertificateFactory cf = CertificateFactory.getInstance("X.509");
     16          X509Certificate c = (X509Certificate) cf.generateCertificate(is);
     17          is.close();
     18
     19          return new TIMESTAMPTZ( conn, new Timestamp(c.getNotAfter().getTime()) );
     20
     21      }
     22  }
     23  /
    
    Java created
    
    SQL> CREATE OR REPLACE FUNCTION CERT_GetExpirationDate(cert in clob)
      2  RETURN timestamp with time zone
      3  AS LANGUAGE JAVA
      4  NAME 'TestX509.getExpirationDate(oracle.sql.CLOB) return oracle.sql.TIMESTAMPTZ';
      5  /
    
    Function created
     
    
    SQL> select CERT_GetExpirationDate(cert)
      2  from cert_storage
      3  where id = 1;
    
    CERT_GETEXPIRATIONDATE(CERT)
    --------------------------------------------------------------------------------
    16-NOV-13 07.51.18.000000000 AM +01:00
     
    

    If you need to access the fields again, it would be best to wrap them in an Oracle object type and have the Java method return an instance of this object.

  • Analyze tables after creating indexes

    Hi all

    I created new clues on the production environment, we must analyze tables after creating indexes. Why and what analysis do?

    Thanks for the help.
    Select * from V$version;
    
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    There are so many different options and you'll certainly want to tweak your stats based on your system.
    The best thing to do is to read about dbms_stats:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14211/stats.htm#PFGRF30102
    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_stats.htm#CIHEHDFB

    Here are a few examples to give you an idea of what they look like and how to perform:

    BEGIN
      DBMS_STATS.GATHER_TABLE_STATS(OWNNAME          => 'schema_name',
                                    TABNAME          => 'table_name',
                                    ESTIMATE_PERCENT => DBMS_STATS.AUTO_SAMPLE_SIZE, --> For really big tables oracle can just do a specific percent
                                    METHOD_OPT       => 'for all columns size 1', --> Defines Histograms, size one disables histograms
                                    DEGREE           => 12, --> The degree of parallelism so you'll see 12 parallel threads gathering stats
                                    CASCADE          => TRUE); --> gather stats on the table's indexes also
    END; 
    
    BEGIN
      DBMS_STATS.GATHER_INDEX_STATS(OWNNAME          => 'schema_name',
                                    INDNAME          => 'index_name',
                                    ESTIMATE_PERCENT => 50,
                                    DEGREE           => 4);
    END; 
    

    You can also do

    DBMS_STATS.gather_schema_stats
    DBMS_STATS.gather_database_stats

    and much more...

    I really want to focus on the need to do your homework on them,
    read the docs I linked and adjust your statistical parameters to fit your db objects and how they are accessed/used.
    Having accurate and meaningful statistics are very important to the performance of the database.

  • HOWTO updating table after closing a popup

    With the help of JDev 11.1.1.3

    I have a table and a popup. The table is filled with chronogram a datacontrol.
    The popup has a form indicating the details of the selected record in the table. I also use this popup to create new records.

    I have problems when you press the 'OK' button in the dialog box. The record is saved in the database, a commit is executed but my table does not show the new record. I need to press F5 before recording.
    I tried to set a partialTrigger at the table of the popup, but it does not work.

    This is the dialogEvent code:
        public void enqueteListener(oracle.adf.view.rich.event.DialogEvent dialogEvent) {
           if(dialogEvent.getOutcome() != DialogEvent.Outcome.no) {
             BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
             OperationBinding operationBinding = bindings.getOperationBinding("Commit");
             operationBinding.execute();
             
             operationBinding = bindings.getOperationBinding("Execute");
             operationBinding.execute();
           }
           else {
             BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
             OperationBinding operationBinding = bindings.getOperationBinding("Rollback");
             operationBinding.execute();
           }
        }
    As you can see that the commit is executed and after that I run the Execute to refresh the table, but it doesn't seem to work...

    How can I get that I have is more useless to press F5 if the record show upward directly in the table after click on the OK button in the pop-up?

    You add partial trigger to the table in your code. If your table is related to an attribute in the bean you can add

    RequestContext.getCurrentInstance().addPartialTarget(getTable());
    

    where getTable() returns the component "richeTableau". If you do not link the table to the bean, you can search the tree of components for the id of the table to get the part.

    Timo

  • What is the best way to refresh the table after autosubmit (10.1.3.4)

    What is the best way to refresh the table after autosubmit?

    I have a page that contains a table where if one of the fields is changed it autosubmitted where the view object changes some attributes, based on the field having been changed. I need these modified attributes that appear in the table. But without doing anything, the only way to see these values is to cause the iterator updated table.

    I've been refreshing the table is having a method in a grain of beacking called "getSystemSettingIter.getCurrentRow ();". This seems to be a bit of a hack for me and I was wondering if there is a better way to get the table to update.

    Thanks in advance!

    Have you tried setting between the two partial page refresh?
    http://www.Oracle.com/pls/as111120/lookup?ID=ADFUI385

    http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/web_form.htm#CACEIEEI

  • Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?

    Mr President.

    Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?

    Concerning

    You want to show serial No. on the page for all the lines?

    Check once-

    Blog of Ashish Awasthi (Jdev/ADF): Add the serial number to the table of the ADF, column to auto-increment in the table to the ADF

    Actually transitional attribute loses its value when page refreshes or viewObject is not appropriate in this case if your use case is different, so please tell us

    Ashish

  • How to add a transient attribute of a table values in the new attribute group wise transient that is to say wise customer?

    Mr President.

    How to add a transient attribute of a table values in the new attribute group wise transient that is to say wise customer?

    as below

    custwisevalue.png

    Concerning

    Hello world

    for an overview in the following form

    This is the sql query that reach this format

    SELECT c.name customer_name,
            p.name product_name,
            sl.sal_qty,
            sl.unit_sal_price,
            sl.sal_qty*sl.unit_sal_price AS salesvalue,
            CASE
              WHEN ROW_NUMBER () OVER (partition by c.cust_id order by p.prod_id desc,sl.sal_id desc) = 1 THEN
                  SUM (sl.sal_qty*sl.unit_sal_price) OVER (PARTITION BY c.cust_id)
            END totals
    FROM customer c INNER JOIN sales s ON s.cust_id = c.cust_id
    INNER JOIN salesline sl ON sl.sal_id = s.sal_id
    INNER JOIN product p ON p.prod_id = sl.prod_id
    ORDER BY c.cust_id,p.prod_id,sl.sal_id
    

    Cheers and enjoy

    Respect of

  • Is Acrobat Pro just for us. We have an employee handbook that needs editing. A part is current pdf, some of an earlier version. You want to get all in a manual, the table of contents automatically adjust and links to specific pages of the table of content

    Is Acrobat Pro just for us. We have an employee handbook that needs editing. A part is current pdf, some of an earlier version. You want to get all in a manual, the table of contents automatically adjust and links to specific pages of the table of contents.

    Acrobat Pro is certainly not the right tool for editing. You want to change the manual using the source - MS Word files for example. Once you have the full changes including OCD work as you want, Acrobat Pro is the tool to convert the source document to PDF format, and ensure the accessibility requirements of 508 - and preferably ISO 14289 (PDF/UA) - are met.

  • How to pass the form on a table after a query?

    With the help of Oracle 11.2 and Apex 4.1.
    1. I use a form on a table with buttons: QUERY, INSERT, DELETE and CANCEL.
    2. after INSERT and DELETE, the shape is erased.
    3 but I would remove the form after the QUERY. Well, I want to clarify when the user wants to that he erased!
    4. and, in fact, I have a process to clear the Cache for the button CANCEL.
    5. when I click on CANCEL, there is a flash like redraws the screen.
    6 and I think this is the case, is that after the cache is cleared, the variable RCD_ID of the page has the prior value and treatment of the "table row" retrieves the file once more.
    7 so I return values that I wanted to clear! Looks like I'm being undermined by the functionality of the ARF. (ARF, ARF!)

    1. I tried to change the "Go to page nn" to clear the cache for the page, but that seemed to make no difference.
    2. I tried to adjust the page RCD_ID variable to "as I do after DELETION, but that has not worked either to CANCEL.

    Thoughts?

    I guess it's just me, but the extremely annoying part of the APEX is that some simple obvious things – like the form of compensation - have no obvious simple solution. I would say, there are a few obvious approaches, but none seems not to work. You would think that a 'CLEAR' button would be a standard button or CANCEL to had an option to clear the form and or clear a list of items on the page.

    Howard

    Howard (DBA in training) wrote:

    For the button CANCEL, 1) I clear the cache of the page and 2) I put the variable RCD_ID (P2_RCD_ID) ". But without effect. When I consider the debug report, I don't see any indication that CANCEL was pressed or that these processes have been executed. So, maybe they are not running. I see the record being extracted again - which is what I want to avoid.

    Processes are not executed because the page is not submitted. The Cancel button does a redirect, not a shipment:

    apex.navigation.redirect('f?p=21997:2:13040303230582::NO:::')
    

    Change the button action to present, with the value of the request as "CANCEL".

    By default, generated by the wizard Cancel button will be created to perform a redirect. The anticipation is that the behavior required to navigate to another page in the application without changes to session state or process.

  • trigger after insert in tables MASTER DETAILS, adding bonuses to employees

    Hi Experts, I am a beginner in PL/SQL and triggers
    =========================
    I have two tables:
    MASTER (DOC_NO, DOC_DATE, BONUS)
    DETAILS (EMP_NO, EMP_NAME, EMP_BONUS)

    I need to distribute the (BONUS) column in table (MASTER) to column (EMP_BONUS) in DETAILS

    by equal parts.

    I need it in (trigger after insert)


    EMP_BONUS: is BONUS count (EMP_NO);.

    example:
    BONUS = 100
    No EMP_NO = 20

    This means (EMP_BONUS = 100/20 = 5).


    I use the 6.0 with 9i DB form
    Help, please

    RARA says:
    Hi Experts, I am a beginner in PL/SQL and triggers
    =========================
    I have two tables:
    MASTER (DOC_NO, DOC_DATE, BONUS)
    DETAILS (EMP_NO, EMP_NAME, EMP_BONUS)

    I need to distribute the (BONUS) column in table (MASTER) to column (EMP_BONUS) in DETAILS

    by equal parts.

    I need it in (trigger after insert)

    EMP_BONUS: is BONUS count (EMP_NO);.

    example:
    BONUS = 100
    No EMP_NO = 20

    This means (EMP_BONUS = 100/20 = 5).

    I use the 6.0 with 9i DB form
    Help, please

    If you want to do after insertion and forms... You can use the trigger to insert after and try something like this

    declare
     a number;
    begin
    select count(emp_no) into a
    from master;
    update details
    set emp_bonus=:bonus/a;
    commit;
    end;
    

    Hope this helps

    If someone useful or appropriate, please mark accordingly.

  • Add line before or after the selected line in af:Table

    Hello

    Please let me know how we can add a line before or after the selected line in the display: table.

    Currently I have a table with 2 buttons on toolbar. 1. Add 2. Add after.

    The user selects the row and click a button AddBefore and after... then, a blank line must have added in the table according to the clicked button.

    Please suggest me your entries.

    Thank you
    Kiran

    chk this
    http://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/

Maybe you are looking for