Conditional read only the rows in a table

We have a requirement only under a certain condition (which may change each line), a line can be read only or editable and are uncertain how to implement this with APEX

for example, lets say a table has the following features

columns: ID, Date, editable

1, September 12, 2015, Y

2, September 15, 2015, Y

3, 18 September 2015, N

4, 19 September 2015, N

5, 22 September 2015, Y

Thus, when this data displays on a page in a tabular presentation, the date ONLY are editable for lines 1, 2 and 5. For lines 3 and 4, the date cannot be changed

In the ADF, we get this by setting the attribute readonly on the date component to "row.bindings.Editable.inputValue =='N" ""-this would be evaluated by line and switch read only one or off for each date listed in the table.

Help, pointers would be greatly appreciated!

See you soon,.

Brent

Here is a link to a starting point: dynamic Action on a tabular presentation. Jeff Kemp on Oracle it shows how to condition the unalterable columns.  The same logic would apply only to a line level...

Thank you

Tony Miller
Los Alamos, NM

Tags: Database

Similar Questions

  • Is this a bug? HTML is not escaped in the conditional read only LOV page elements

    Then test my application for injection HTML filling HTML for each column in my data injected datamodel HTML running when a field only LOV ready, I noticed



    I have dynamic LOV in use in my form, so their share, users can select. That sometimes I don't want to make them able to change a value, they chose earlier.

    For this reason I condtionalu readonly my LOV. by using the conditional read only an option for the items on the page.



    That's when a dynamic LOV made readonly HTML code inside is done instead of escaped



    is this a bug or is it intentional?

    At least, I think I should be able to choose the behavior.



    Geert

    Geert - Thanks for the info. I think that's not a bug. With the read-only option, it displays the data as it would for a display text (does not save the State) items for which source of HTML element, that is, unescaped. If you want the text escaped by using your dynamic lov query simply use htf.escape_sc:

    Select htf.escape_sc ('data') d, 1 r of the double

    Scott

  • Restricting the views to DISPLAY ONLY the rows CreatedBy current connected user

    I want to user Oracle views - restrict the view to DISPLAY ONLY the rows CreatedBy / current OwnedBy signed / authenticated user!

    What are the different approaches, I have something with;
    setNamedWhereClauseParam, but this must be called on each ManagedBean in the constructor, as I have now!
    This approach caused the button Edit/Save which simply calls the commit to stop working. In a complete view of all the lines, there is no problem, with
    the button requesting validation the selectedRow in af: table.

    Other means?

    Thank you

    It does not appear that your view object extends the framework with custom code extension class in dealing with populating the bind variable by default.

  • cannot access the rows of a table not nested element

    What Miss me? I'm under Oracle 12 c (12.1.0.1.0)

    CREATE TYPE dim_O AS OBJECT )

    dimension_id number

    label_en varchar2()300( )

    );

    CREATE TYPE dim_T AS TABLE OF dim_O;

    DECLARE

    dims_t dim_T

    START

    SELECT CAST(MULTISET( )) 

    SELECT  DIMENSION_ID LABEL_EN

    DE    DIMENSIONTABLE -actual physical table in oracle

       DIMENSION_ID IN (3001 3002 3003()

    ) AS dim_T) "dim_rec"

    BY dims_t

    DE    DOUBLE;

    FOR I IN dims_t. FIRST... dims_t. LAST LOOP

    DBMS_OUTPUT. Put_line() dims_t() I). dimension_id);

    END LOOP;

    -exit from the loop above is

    -3001

    -3002

    -3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE ( SELECT dimension_id FROM TABLE (dims_t) ( )

    Dimension_id SET = WHERE = dimension_id 3004 3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE ( SELECT dimension_id FROM TABLE (CAST (dims_t in dim_T () ) ( )

    Dimension_id SET = WHERE = dimension_id 3004 3003


    END;

    I'm trying to understand this example very simple, but to no avail.

    Can someone tell me why I get this error?

    Thank you all in advance for your time.

    Marc

    What Miss me? I'm under Oracle 12 c (12.1.0.1.0)

    CREATE TYPE dim_O () AS OBJECT

    number of dimension_id

    label_en varchar2 (300)

    );

    CREATE TYPE dim_T AS TABLE OF dim_O;

    DECLARE

    dims_t dim_T;

    BEGIN

    SELECT CAST (TYPE MULTISET)

    SELECT DIMENSION_ID, LABEL_EN

    OF DIMENSIONTABLE -actual physical table in oracle

    WHERE DIMENSION_ID IN (3001,3002,3003)

    () AS dim_T) 'dim_rec '.

    IN dims_t

    FROM DUAL;

    I'm IN dims_t.FIRST... dims_t.Last LOOP

    DBMS_OUTPUT. Put_line(dims_t (i) .dimension_id);

    END LOOP;

    -exit from the loop above is

    -3001

    -3002

    -3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE (SELECT dimension_id FROM TABLE (dims_t))

    SET dimension_id = dimension_id = 3003 3004 WHERE;

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE (SELECT dimension_id FROM TABLE (CAST (dims_t as dim_T)))

    SET dimension_id = dimension_id = 3003 3004 WHERE;

    END;

    I'm trying to understand this example very simple, but to no avail.

    Can someone tell me why I get this error?

    You get it because dims_t is an array of OBJECTS - not a table of scalars. But your SELECT statement returns scalar.

    There IS NO such object, named "dimension_id"; It is an ATTRIBUTE of the object DIM_O. DIMENSION_ID is a SCALAR which, as says the exception, is a "No nested table element; If you cannot select/Update lines of it.

    What you do is equivalent to the following:

    DECLARE

    dims_t dim_T;

    number of dim_id;

    dim_o design;

    BEGIN

    Design: = dim_o (3, 'ghi');

    SELECT DIM_O (DIM_ID, LABEL) BULK COLLECT INTO table DIMS_T (d_o);

    end;

    /

    ORA-06550: line 7, column 59:

    PL/SQL: ORA-22905: cannot access the rows of a table not nested element

    ORA-06550: line 7, column 1:

    PL/SQL: SQL statement ignored

    This SELECTION is trying to design it as a table when it's a SCALAR - so the same exception you get.

  • Implement conditional read-only column in the set of two Tables

    Hello

    I would like to implement a mechanism of "read-only conditional" on a column in a table with two tables in total to be involved in this situation.

    I have a demo/proof of concept of the present and things work as expected in the tests I've done; However, I would like any input as to if there is a better way, etc.

    This is a far-fetched but demo that illustrates the main ingredients however. Oracle 10.2.0.4 version 64 bit on Windows Server 2008 Release 2 64-bit.

    -Table DDL and small sample data
    create table band(
      band_id   number primary key,
      band_name varchar2(20),
      status    varchar2(20)
    );
    
    create table band_member(
      band_id references band,
      member_name varchar2(20)
    );
    
    insert into band values(3, 'The Rutles', 'prefab4');
    insert into band values(4, 'The Beatles', 'established');
    commit;
    
    insert into band_member values(3, 'Ron Nasty');
    insert into band_member values(3, 'Dirk McQuickly');
    insert into band_member values(3, 'Stig O''Hara');
    insert into band_member values(3, 'Barrington Womble');
    commit;
    
    insert into band_member values(4, 'John Lennon');
    insert into band_member values(4, 'Paul McCartney');
    insert into band_member values(4, 'George Harrison');
    insert into band_member values(4, 'Ringo Starr');
    commit;
    -The rules relating to the conditional objective of read-only

    1 is not allowed to update band.band_name when band.status = 'prefab4'
    2 is not allowed to insert/update / deletion of lines of band_member when the parent a band.status row = 'prefab4'

    -The triggers used to implement the goal (current solution)
    create or replace trigger t1
    before update of band_name on band
    for each row
    when (old.status = 'prefab4' or new.status = 'prefab4')
    begin
      raise_application_error(-20010,
        'can not update band_name when status=''prefab4''');
    end;
    /
    
    create or replace trigger t2
    before insert or update or delete on band_member
    for each row
    declare
      l_status band.status%type;
      l_band_id band_member.band_id%type;
      cursor l_cursor (p_band_id number) is
      select status from band
      where band_id = p_band_id
      for update;
    begin
      if updating or inserting then
        l_band_id := :new.band_id;
      else
        l_band_id := :old.band_id;
      end if;
      open l_cursor(l_band_id);
      fetch l_cursor into l_status;
      close l_cursor;
      if l_status = 'prefab4' then
        raise_application_error(-20011,
          'can not update child when parent status=''prefab4''');
      end if;
    end;
    /
    -Quick example of test for each condition
    update band
    set    band_name = 'THE RUTLES'
    where  band_id = 3;
    
    update band
           *
    ERROR at line 1:
    ORA-20010: can not update band_name when status='prefab4'
    ORA-06512: at "DEMO.T1", line 2
    ORA-04088: error during execution of trigger 'DEMO.T1'
    
    
    update band_member
    set    member_name = 'RON NASTY'
    where  member_name = 'Ron Nasty';
    
    update band_member
           *
    ERROR at line 1:
    ORA-20011: can not update child when parent status='prefab4'
    ORA-06512: at "DEMO.T2", line 18
    ORA-04088: error during execution of trigger 'DEMO.T2'
    As I said, while my simple tests seem to show the correct results, there I was wondering if there could be a better way to implement such functionality.

    I tried to provide the information needed, but if I managed to omit something, please let me know.

    See you soon,.

    Chalfont

    Hi, Chalfont,

    user13146957 wrote:
    ...
    I'm went to the road to slider to add the clause "for update" to force the serialization on the line - i.e. the idea was to avoid the case where another session might want to update the State a moment after my extraction but before the rest of the finished code. Who is?

    No, not really. The trigger on tape prevents anyone else from ever change their status from 'prefab4' to something else (or vice versa).
    Even apart from this, you put some efforts to prevent something which will be allowed a fraction of a second later (or maybe the other way around). What is significant in that split second?

    I didn't think about other ideas rather than the approach of the trigger, but came up empty, somehow, to this day. I am open to resort to others and make some schema changes is not off the table either.

    FGA (Fine grain access), or his brothers and sisters more older VPD (virtual private database) can also do what you want, but instead of trigger an error, they ignore the illegal action. This can be an advantage or a disadvantage, depending on your needs.

    Another approach is for the owner of the table, not to grant INSERT, UPDATE or DELETE privileges to anyone: all DML must be made via a procedure (or procedures) belonging to the owner of the table, which grants EXECUTE privileges instead of other privileges.

  • Get all the rows of a table control

    Hi all

    I have a table with a column control. What function can I use to extract all lines? I have to go row by row and read each line or is it possible to do in a function?

    Thank you

    Kanu

    Assuming that Garay in the column have all of the same data type, you can retrieve the entire column with a single statement:

    GetTableCellRangeVals (Panel, control, VAL_TABLE_COLUMN_RANGE (1), array, VAL_COLUMN_MAJOR);

    The array passed must be large enough to recover all data. Alternatively, you can replace the VAL_TABLE_COLUMN_RANGE with the appropriate statement of MakeRect macro. In the event that your table was built of dynamically, you can get the naked, imber of lines using GetNumTableRows and size your table accordingly.

    The above macro is defined in userint.h as well as some other useful macros that can be used to access the data in a table.

    There are a few precautions to be taken in the case of string values or a certain type of cell (ring, combo box, button...) that are described in the hell of the function.

  • Read only the terms - master detail

    I have a page with a master detail

    I created a read only condition and the master passed to read-only, but the detail does not...

    Why? Is not possible to put the retail component 'read only '?

    Hello

    If I understand, you want to the form is editable when the user is an admin user

    and read only when the user is a normal user.

    You can solve this problem by the use of dynamic actions

    to enable and disable some elements of this region (s)

    make this condition (standard user = admin = enable and disable)

    Another solution

    When do the master / detail with the wizard choose change details on a different page

    On the link change, you can set a condition (visible only when the user is ADMIN)

    Kind regards

    Frank

  • Popup is not refreshing based on the current value of the row in a table

    Hi all

    1.I have created an entity object View for the Table Emp

    2. then I created an editable view object based on the EMP table

    3. create a Page like jspx

    4 drag and drop the View object as read-only Table in this homepage

    5 drag and drop the view even object as in this homepage

    6 goto the shape and dressing with Popup

    7. then create a dialog inside the pop-up window

    8. then, go to the Table and then surround with a collection of panels

    9. create a button in the toolbar of the collection Panel name it as edit

    10. drag and drop the showpopupbehaviour the button change

    When I run the application. It displays all records in the emp table. If I'm in line 6. It shows the values of line 6 in the pop-up window, but if I moved to the next line which is the 7th and then press the button to change is to always show the 6th place of the values only.how to display the values in the pop-up window based on the cursor line .pls guide me in this.

    Thanks in advance
    C.Karukkuvel

    Hello

    Make sure you use contentDelivery = "lazyUncached" in the context menu

    Gabriel

  • Read only the SPI using the box USB-8451

    I am using the NI USB-8451 box to read the SPI of a Honeywell digital pressure transducer data.  The difficulty comes from that part of Honeywell uses only the SPI in half-duplex mode, meaning that it only transmits data, but does not require anything beyond the appropriate chip select signal and SCLK to start transmitting its 32-bit sensor data.  To facilitate experimentation with the sensor, I bought a USB-8451 SPI Interface thinking I could easily configure the 8451 to read data from the sensor.

    However, if I understand the situation, there is a problem.  The 8451 considers full duplex data, i.e. a data word must first be sent to the SPI device in question before the unit will start to transmit back data of its own.  And since the MOSI data writing periods, since this particular device starts transmitting immediately once a clock is applied, synchronizing the unused address data will cause the unit will return its data before the 8451 begins listening for data in return.  The call used by the 8451 to write read action can be divided into the individual reading and actions of writing of any kind that I could discover.

    Can someone tell me if I missed something in this operation or if there is some quick tips, that I could use to be able to use the 8451 therefor?  Thank you!

    Doug G.

    Exactly correct. It's nice when things are easier than expected. Hope it works as easy as it sounds.

  • Change to read only the "Hosts" file get an error, that you have not permission to save in this location

    Original title: change read only document___

    In Windows7 Home 64 bit, I'm editing a document "Hosts" in System32 > drivers > etc >

    It comes up with "you don't have permission to save in this location...".

     

    I am registered as an administrator and I can't seem to change the blue box 'read only '.

     

    I went to the command line using "attrib" but the answer is "no recognized internal or external command".

     

    Help!

     

    John


    Hi John,.

    Step 1: Follow the steps mentioned in the article below, which deals with a similar question

    You cannot change the Hosts file or the Lmhosts file in Windows Vista and Windows 7

    http://support.Microsoft.com/kb/923947

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Format/erase how to read only the sd card.

    The card had already switch to unlock. When try to formatting so that send the message that this is a read-only. The map equipped with old data GPS which must erase and reuse the card.

    Rastafario

    So it is probably locked by Ford for GPS use only.

  • Read only the af:inputText rendered as "merged" instead of read only entry

    I use JDeveloper 11.1.1.6.0

    I noticed that when you use components such as "af:inputText" and "af:inputDate" with the attribute "readOnly" set to true, rendering resulting is a label as a "< span >" as opposed to a read only < input > element which I expected. I see the behavior expected if I use the component 'h:inputText' of JSF with "readOnly" set to true, however, I can't use the JSF component because it is not as if I can get the 'autoSubmit' behavior to work with the JSF component then it will not work. To add to the strangeness of the behavior, if the af: inputText has its lines attribute, the value is greater than 1, it will be rendered as a read-only < input > element as opposed to a label.

    In addition, default readOnly to the af form: inputText seems obvious when using the simple skin or other skin based on simple. It adds a box which surrounds the exact length of the text in the inputText rather than the amount of space the inputText would have used if it wasn't in "read only" mode.

    Is it possible to get the af correctly: inputText to make as a reading introduced only as opposed to the label that he is displayed as?

    Thank you.

    Hello

    It's a decision taken by the rendering of the component. If it is a problem for you and if you have a support contract client then you can file a service request for a change.

    Frank

  • Read only the virtual disk?

    Hello-

    I have Vmware Server 2 x86_64 installed on my Hardy Heron Ubuntu 8.04.2 Server x86_64 and it seems to work very well.  I have created a virtual machine for Slackware 12.2 and put the DVD iso, Slackware in the right directory.  The virtual machine starts the DVD fine and I started the Slackware Setup.  However, when I went to set up the hard drive with cfdisk (part of the standard installation process Slackware) I noticed two things:

    1. the drive has been turned ReadOnly, so that I could not score; and

    2. I created a virtual disk of 11 GB, but in cfdisk he only appear only 4.7 GB.

    What I am doing wrong?  Any help would be greatly appreciated.

    Thanks in advance.

    Well, I'm just guessing because I haven't worked on the software you're talking--can be the partition its display corresponds to the DVD player itself as the DVD is normally read-only and the size of the disc is 4.7 GB. .. You can check it out please.

    Points of reward if you find useful response

  • How increase automatically the rows in a table

    Dear friends,

    In apex 4.1 I don't see Adding line in the process due to which i m unable to increase the lines in a table automatically when you click on the button to add a line. Can u please help me in this regard how improve rows in apex 4.1?

    Concerning
    Kamran

    Hi Keita,

    To do this, you must create a separate process for the tabular presentation.

    Please check that you remove it

    javascript.addRow () in the box add row button and change to submit the page.

    Create a process page, select form---> Data Manipulation---> add lines of tabular presentation---> give the necessary lines as you wish (5).

    Brgds,
    Mini

    ----------------------
    Mark responds promptly

  • Export only select rows in a table in excel sheet

    Hello


    I have a listener to export a table. Is there a way to export only the selected lines in the table rather than all the lines?

    for the exportCollectionListener the exportedRows the value = "selected".

    
                    
                
    

    check
    http://download.Oracle.com/docs/CD/E12839_01/apirefs.1111/e12419/tagdoc/af_exportCollectionActionListener.html

Maybe you are looking for

  • Copy photos on hard disk

    I can see all the photos from my iphone to icloud.  How can I copy them (one at a time) or a whole bunch at once on the hard drive of my PC?  I'm on Windows 10.

  • How to export the bookmarks from Firefox 4.0b3

    How to export 4.0b3 favorite Internet Explorer, because the traditional "bookmarks" tab no longer appears?

  • Spare part for serpOpen.vi

    I recently downloaded some old software drivers for a RS232 instrument.  When I open the front panel of high level, it gets stuck looking for serpOpen.vi in serial.llb.  The latest version of serial.llb (installed in C:\Program NIUninstaller Instrume

  • How can I restore my sound?

    Since I reinstalled XP Pro I have not been able to get the sound on my lap top.  Everything is grayed out on my audio site... IE: no volume or speaker control. Looking at devices it shows the audio it and a solid legacy he and indicate both, they wor

  • Why BSD on Google Earth.

    It is my first computer that refuses to launch Google Earth. I upgraded my ram to 3gigs... no help... I always get BSD 78% zoom in you are looking for a rental. Any ideas? 3000N200, duo 1.7ghz, ram 3 GB, XPP v2002 sp3, 105 GB of free hard drive 44 gb