ReadOnly row in a table

Hello

I know the question on reading only rows in tabular form have been asked several times here on the forum, but I couldn't find something that could help me with my problem. My effort to read-only works 90% correct. It does not change the line to read-only. But it changes the line to read only, regardless of the value is selected in the list. I want only the line to be read-only if there is selected in the select list. Anyone know what I am doing wrong?

I use APEX 4.2.6.00.03

I created a tabular presentation that contains 3 columns.

Colours n ° 1: line no.

Col 2: Description of the sector

Col 3: Type. (This column is a selection list containing only two values (W, N))

For all existing data, I would like to implement the following rule: If Col 3: Type has the value is then the line containing the Col 2: Description of the line must be read-only. If Col 3: Type has a value of N, then I don't want the line to be read-only.

So far, I did the following:

1. I added the code on my page of tabular presentation below > header HTML

< style >

{.textinputdisabled}

color: black;

background-color: gray;

}

< / style >

2. in the form of table of the form report attributes > Col 3: Type > I set the attributes of the element: class = "TypeSelect.

3. I have created a momentum for Action

Event: change

Selection type: jQuery Selector

jQuery Selector: .typeselect

Condition: No strings attached

Real Action

Action: Run the JavaScript Code

ROW_ID = $(this.triggeringElement).attr('id').substr (4);

If ($(this.triggeringElement) .val () == 'Y')

{

$(«#f05_» + row_id) prop ('readOnly', 'readonly');

$(«#f05_» + row_id) prop ("class", "textinputdisabled");

for (var i = 5; i < 6; i ++)

5 is the number of Col 2: Description of the sector

6 is the number of Col 3: Type

{

column_id = ('0' + i).slice(-4);

$(«#f» + column_id + «_» row_id) prop ("readOnly", false);

$(«#f» + column_id + «_» row_id) prop ("class", false);

}

}

on the other

{

$(«#f05_» + row_id) prop ("readOnly", false);

$(«#f05_» + row_id) prop ("class", false);

for (var i = 5; i < 6; i ++)

{

column_id = ('0' + i).slice(-4);

$(«#f» + column_id + «_» row_id) prop ('readOnly', 'readonly');

$(«#f» + column_id + «_» row_id) prop ("class", "textinputdisabled");

}

}

Hi dekoke_i,

I made the change in the sample application, now there is a readonly

Please take a look,

This is the updated code.

function makeRowReadOnly() {
  $('select[name="f04"]').each(function() {
    var row_val = $(this).val();
    var row_id = $(this).attr('id').substr(4);
    if (row_val == 'PRESIDENT') {
      $("#f03_" + row_id).attr("readonly", true).addClass('row_item_disabled');
    } else {
      $("#f03_" + row_id).attr("readonly", false).removeClass('row_item_disabled');
    }
  });
}

Kind regards

Jitendra

Tags: Database

Similar Questions

  • Remove the checksum of each row in the table

    Hallo

    I got out as table and since I have just read the data with the checksum

    For example, I have to neglect the last 2 bytes in each row of the table. I tried several times but I can't succeed. It would be nice if someone help me to go around this problem.

    thanking you

    Best regards

    Karine

    Hi Karine,.

    have you tried really 'several times' to remove the last two characters of each string? Using an autoindexing FOR loop?

  • get a row in a table 2D-TestStand

    What is the syntax to get a row in a table 2D-TestStand

    NEITHER told I have to recursively or outside.

    Here is my approach to get a rank of recursively in TS.

    PreExpression:

    Parameters.Row = {}, Locals.i = 0, / / initialize variable

    GetArrayBounds (Parameters.Array2D, Locals.loBounds, Locals.hiBounds),

    Locals.columnQty = 1 + Val (Mid (Locals.hiBounds, Find (Locals.hiBounds, "]") + 2, Len (Locals.hiBounds) - 3 - Find (Locals.hiBounds, "]")));

    Locals.WhileExpr = Locals.i «»< locals.columnqty",="" set="" condition="">

    Locals.DoExpr = "Parameters.row += {Parameters.Array2D [Parameters.rowIndex] [Locals.i]} ++ Locals.i" / / defines the expression to run recursively

    The Expression:

    Evaluate (locals. RcrExpr)

    where Locals.RcrExpr is:

    Evaluate (locals. WhileExpr)? (Evaluate (Locals.DoExpr), Evaluate (Locals.RcrExpr)):

  • Best way to update the individual rows of a Table?

    I took a quick glance at a few examples, but did not get a clarification on this.  I am looking to have something close to a listbox control or the table to where I can update just one column of values to line a 1 time per second pace.  I'm looking to display our acquisition of data values in a table or a listbox control.  The single list box seemed to work well for that, but I couldn't use the row headers to list the names of channel beside the channel values.  I thought to link the values of cursor in two areas of list to do this, but did not find any info on it for the single list box.

    I have a few questions:

    (1) I have a 1 d table to where I want to use this data to constantly update the first column (with a multitude of lines) of a table.  I'm looking for the best route to not take too much time for treatment by doing this.

    What is the best way to update the individual rows of a table?   Invoke the node "Value of the cell value"... or is there another method?

    (2) why is that, after each iteration else, row values are deleted?

    Also, for adding additional channels originally arrray... it is better to use the 'Array' subset then the function "Construct the table" or function "Subset of the table" and "insert table"?

    See the attached example.

    Thank you.

    Jeff· Þ· Bohrer says:

    (2) why is that, after each iteration else, row values are deleted?

    Classic race condition.  dump the loop and node-p and just wire the 2D table on the terminal Board. !

    I don't see the race condition.  What I see is the table once the last element has been written for it all run the oil.  I saw looked it with point culminating performance on.

    But I agree entirely with writing to the Terminal.  It is a 1 d array, so you will need to use an array of generation and convert a 2D array in order so that he could write correctly.

  • Highlight the row in a table hint

    Hello!

    I'm evaluating the LabVIEW and try to do a few simple steps. Now, I have a table hint that contains all the values of frequency of 50-60. I need to calibrate for each frequency, and I would like to insist on each row of the table. Well, I use SelSize and SelStart property nodes, and it works very well the selected line is displayed. But I have only about 20 lines visible, and to see the rest I need to scroll through the table. How to change the position of scroll programmatically? Or maybe you can suggest the best way to highlight the lines?

    Found the solution: the IndexVals property node defines the line/column numbers to be displayed in the upper left corner of the table hint.

    Kudo goes to AndrewAlford for his reply in this topic:

    http://forums.NI.com/T5/LabVIEW/highlight-a-row-in-table/m-p/320036#M165245

  • How to set Max number of rows in a table?

    Hello
    I'm working on a SCADA interface. In this application, there are different tables with vertical scroll bar.
    I prefer to make it visible only initialized lines (I've initialized 40 empty rows in a table with an array of strings). Since the window contains all 40 lines, but only 20 rows, I put the number of lines in the "table properties window" at 20; So I added a vertical scroll bar.

    Now, when a user, do scroll the scroll bar, it can check not only the initializated 40 lines, but any number of lines.
    There is a way to view only a limited number of lines?

    Thanks in advance!


  • Hide columns in Table B, based on values LOV in another row of the table:

    Hello

    Jdev 12.2.1.0

    I have two tables A and B and I hide columns b based on the value of row of table A LOV. For example, I have a line in A table that has a column with the x, y, z values lov. Now, if I select the row in the table has and change the LOV to x, I had to hide some of the columns in the table (B) is there a way to get this feature? Any help would be appreciated.

    Thank you

    Assume:

    1 table a call "DepartmentId" column this column has LOV.

    B 2-table a column "ColumnInB" this column will be visible depending on the value of "DepartmentId".

    Try to do the following:

    1 - from data controls, drag "DepartmentId" attribute and drop it on the page as inputText then together make this inputText to false (you can remove it, but don't forget the corresponding binding in pageDef. not deleted).

    2. copy the value of the inputText which will be as "#{bindings." DepartmentId.inputValue}"and go to the"ColumnInB"column and visible property beyond the copied value.

    3 - the ColumnInB visible will be the condition as:

    4-set DepartmentId autoSubmit = 'true '.

    5-set table partialTriggers table B has id and id of DepartmentId LOV

  • number of rows in the table

    Hi master,

    I have a requirement. During the passage of a table, I need to get the number of rows in this table. Sometimes, when I spend 2 or more table names, I need to get the same count of result of lines. I got the below function. but it shows all the rows in the table. I want pariticular tabels only. How I can I get it.

    Select table_name, num_rows from all_tables where table_name in ('EMP', 'Department');  I tried.  I need to a procedure or function. who will pass the name of the table as a parameter and 1 or more than the name of a table if I pass, I need to display information from table name and number of lines.

    CREATE OR REPLACE

    TYPE t1_obj AS OBJECT)

    table-name VARCHAR2 (30),

    CNT NUMBER

    )

    /

    CREATE OR REPLACE

    TYPE t1_obj_tbl AS THE t1_obj TABLE

    /

    CREATE OR REPLACE

    FUNCTION (f1)

    p_schema_name VARCHAR2

    )

    RETURN t1_obj_tbl

    PIPELINED

    IS

    v_retval t1_obj: = t1_obj (null, null);

    BEGIN

    FOR v_rec IN (SELECT table_name FROM dba_tables where owner = upper (p_schema_name) and nvl (iot_type, 'X')! = "IOT_OVERFLOW") LOOP

    v_retval.table_name: = v_rec.table_name;

    RUN IMMEDIATELY "SELECT COUNT (*) FROM" | p_schema_name | '.' || v_rec.table_name

    IN v_retval.cnt;

    PIPE ROW (v_retval);

    END LOOP;

    RETURN;

    END;

    Select * from table (f1 ('scott'));

    The above function returns information from the table in SCOTT scheama. I need only perticular table info.

    Please notify.

    AR.

    Hi Sven,

    Front end people ask me the requirement. They wanted a proc or function as I want.

    Please help me.

    Concerning

    AR

  • ValueChangeListener empty all rows in a table

    Hi I have a view with the transient attributes DEST_ATTR1 and DEST_ATTR2 object.

    In a .jspx page I developed a pop-up window that contains an after a source and a destination

    Panelbox. The panelbox source has two choicelists source_attr1 and source_attr2, while

    panelbox destination has a table of dest_attr1 and dest_attr2 (also choicelists)

    I want when I change the source_attr1 do null all the fields for each row in the table on the shortcut menu.

    I developed the onSourceAttr1Changed method I use valueChangeListner, but

    only the first line of the table is made void

    Could you help me to do?

    class A {
            public static final String SOURCE_ATTR1  = "FromAttr1";
            public static final String SOURCE_ATTR2  = "FromAttr2";
            public static final String DEST_ATTR1    = "ToAttr1";
            public static final String DEST_ATTR2    = "ToAttr2";
        }
      
    
    
    public void onSourceAttr1Changed(ValueChangeEvent valueChangeEvent) {
                 ADFUtils.findControlBinding(A.SOURCE_ATTR2).setInputValue(null);
                 ADFUtils.findControlBinding(A.DEST_ATTR1).setInputValue(null);
                 ADFUtils.findControlBinding(A.DEST_ATTR2).setInputValue(null);
    
                 refreshComponent(getPanelBoxTop());
                 refreshComponent(getPanelBoxBottom());
             }
    

    Hello

    You must iterate through the rows in the table and the appropriate field, the null value

    somethings like this:

            DCIteratorBinding bindings = ADFUtils.findIterator("Copy1Iterator");
            RowSetIterator iterator = bindings.getRowSetIterator();
            while (iterator.hasNext()) {
                Row row = iterator.next();
                row.setAttribute("attr", null);
            }
    

    Kind regards

    Habib

  • I have a table of the adf, I added a column that contains a button that I created, when I click it must remove this row in the table, but it is not, please help

    I have a table of the adf, I added a column that contains a button that I created, when I click it must remove this row in the table, but it is not, please help

    I don't understand. You use vo and eo for you to use business components.

    Again, this kind of code call in trouble.

    You must post the changes to make them visible to the eo find vo. You must then run the query for the changes in the business layer strips then you must update the iterator he table is based on.

    In your code I see that happen, hooch maybe because it is more often than not formatted and undocumented.

    My advice is to do a small test case that you can manage with easy sql. Once you get it to run transfer you the results to the actual application.

    Timo

  • Exception of null on the list pointer implementing values when there are n rows in the table

    Hi Experts,

    I use JDev 11.1.1.7.

    I have a VO that I defined a LOV with no search box. In my page, I've added it as af:inputListOfValues, but when there is no rows in the table that I will meet with NPES

    < AdfcExceptionHandler > < handleException > ADFc: when Manager application exception exception handling threw a new exception.

    java.lang.NullPointerException

    at oracle.jbo.uicli.binding.JUCtrlListBinding.findOrCreateLOVDialogIteratorBinding(JUCtrlListBinding.java:5188)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding.getSearchBinding(FacesCtrlLOVBinding.java:204)

    to oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ ListOfValuesModelImpl.getSearchRegion (FacesCtrlLOVBinding.java:2001)

    to oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ ListOfValuesModelImpl.getQueryModel (FacesCtrlLOVBinding.java:1612)

    to oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase$ InternalLaunchPopupListener.processLaunch (SimpleInputListOfValuesRendererBase.java:1560)

    at oracle.adf.view.rich.event.LaunchPopupEvent.processListener(LaunchPopupEvent.java:108)

    Excerpt from JSFF:

    < af:inputListOfValues id = "xxx" popupTitle = "" search and select: XXX ""

    simple value = "#{pageFlowScope.SearchBean.xxx}" = 'true' "

    model = ' #{bindings. " XXXLOV.listOfValuesModel} "columns ="30"

    searchDesc = "Select XXX" >

    < / af:inputListOfValues >

    PageDef:

    < listOfValues StaticList = 'false' use = "LOV_XXX".

    IterBinding = "XXXIterator".

    ID = "XXXLOV" / >

    Is - this bug?

    Surprisingly, it works very well if there are lines in the table that the VO is querying.

    -Soham

    Soham,

    I think you just create this LOV page by simply moving the VO, right?

    You can select the box to tick 'Include no. Selection' in your VO, and see if that helps?

    See you soon

    AJ

  • problem of adjustment of height of the rows in the tables in CS6

    I read all the debates devoted to setting the height of the rows in the tables and I can't find the answer to my problem.

    I placed a table that was created in Word.  I've done several times, but now I can not adjust the heights of less than 5mm line without losing the text in the line.  I went up to line on "exactly".  As soon as I try to reduce the height of the text disappears, but there is plenty of space above and below the text.   Hoping someone can help.

    Check the cell INSET on the cell options.

  • Rows in the table LT until merger of all workspaces

    Database 11.2.0.4

    In our environment, we ran a few important updates in the workspaces and then merged these live workspaces.  Up to 25% of the data has been updated in those workspaces.  When these update batch workspaces have been created, previous workspaces exist who are not yet ready for the merger.

    I noticed that the underlying tables of the LT now have about 25% more lines than the live view.  We have now discovered that dbms_wm.refreshWorkspace works really poor.  This statement is used to take seconds or minutes to the maximum, but can now take half an hour or more.

    We recorded a support with Oracle request and provided details of the plan to see if we can get some resolution/advice explaining.

    In the meantime, I have a question for the forum help my understanding of the works of the Manager of the workspace.

    In the example below, I have table "wm_test_table", "test_workspace1" and "test_workspace2".  In "test_workspace1", I update all rows in the table - the table LT now has 2 rows for each record.  I merge 'test_workspace1' live and LT still has 2 rows for each record.  The other lines are not removed until "test_workspace2" is merged and removed.


    SQL> -- Create a test table
    SQL> create table wm_test_table (
      2     id integer primary key,
      3     name varchar2(100));
    
    
    Table created.
    
    
    SQL> -- Insert 1,000 rows
    SQL> insert into wm_test_table (
      2     select rownum, 'before'
      3     from dual
      4     connect by level <= 1000);
    
    
    1000 rows created.
    
    
    SQL> commit;
    
    
    Commit complete.
    
    
    SQL> -- Version enable it
    SQL> execute dbms_wm.enableVersioning('wm_test_table');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- Create two workspaces
    SQL> execute dbms_wm.createWorkspace('test_workspace1');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> execute dbms_wm.createWorkspace('test_workspace2');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- Go to test_workspace1 and update all the rows
    SQL> execute dbms_wm.goToWorkspace('test_workspace1');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> update wm_test_table set name = 'after';
    
    
    1000 rows updated.
    
    
    SQL> commit;
    
    
    Commit complete.
    
    
    SQL> -- Check how many rows in wm_test_table_lt - we expect 2,000 as we haven't merged yet
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          2000
    
    
    SQL> -- Merge and remove test_workspace1
    SQL> execute dbms_wm.goToWorkspace('LIVE');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> execute dbms_wm.mergeWorkspace('test_workspace1', remove_workspace=>true);
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- Check how many rows in wm_test_table_lt
    SQL> -- I'd hope there'd only be 1,000 but there is 2,000
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          2000
    
    
    SQL> -- Let's see if compressWorkspace will get rid of them
    SQL> execute dbms_wm.compressWorkspace( -
    >       workspace => 'LIVE',   -
    >       auto_commit => true,   -
    >       remove_latest_deleted_rows => true);
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- They're still there
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          2000
    
    
    SQL> -- Now merge test_workspace2
    SQL> execute dbms_wm.mergeWorkspace('test_workspace2', remove_workspace=>true);
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- and the additional 1,000 rows are removed
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          1000
    

    Is it possible to safely remove the extra lines in LT without waiting until we merged the workspaces that existed before the update batch has been done?  I hope that it will so improve the performance of refreshWorkspace.


    I thought that something like this can do, but it does not remove the other ranks, is:

    execute dbms_wm.PurgeTable(
     table_id => 'test.wm_test_table', 
     archive_table => null, 
     where_clause => 'id not in (select id from test.wm_test_table)', 
     instant=>null, 
     workspace => 'LIVE', 
     purgeAfter => false);
    

    This question is similar to

    Lines left in the table LT after removal of the direct workspace and the removal of all workspaces

    and

    How to delete soft deleted records?

    but I'm still not sure.

    Thank you

    John

    Hello

    This behavior is expected and it is due to the test_workspace2 workspace.  A compression operation will not allow compressed range to include a backup implicit point that is created for a child workspace.  This is done to preserve the integrity of this workspace.  The initial 1000 lines are all lines that are visible from test_workspace2.  Removal of these lines would leave test_workspace2 will 0 lines in there.  Lines 1000 updates are the lines that do not appear on LIVE.  So, given that the two sets of lines are needed, none of the lines can be deleted physically.  A compression operation will never change the view of data for any workspace.  It only removes the unnecessary records.  The two options in order to be able to compress these lines is to either delete (as you did) or refresh test_workspace2.  The refresh operation would move the implicit savepoint for the workspace to a version that isn't after all 2000 lines in the table _LT and allow the dressing to remove first half of them because they are no longer needed by any child workspace.

    With respect to the performance of RefreshWorkspace, I would need to see a trace of the transaction file.  But who should rather get through the SR you filed.

    Kind regards

    Ben

  • ADF: Double in taskflow Page Navigation click on the row in the table on the page .jsff

    Hi all

    My 11.1.1.7 Jdev.

    I have a taskflow with two fragments (.jsff) pages. On the first page, I have a table when I double click on the row in the table that I want to go to the next page.

    I tried to call java script but I do not understand. How can I get it?

    handleNavigation is the only thing that you should not use in the adf. Read 'How to navigate in the stubborn workflow' in this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/nov2010-otn-harvest-190744.pdf.

    Timo

  • Select the row in the table to change in a form

    Hi all

    I use Jdeveloper 12.1.3.0.0 on windows internet explore 10.

    I have the following form and the read-only table. the form and the table that are both on the same object from view.

    click_edit.png

    When the user clicks a row in the table, I want to choose this line in the form above for editing purpose.

    How would I do that? the first column of the table is a primary key.

    I followed shayjdev vedio http://www.youtube.com/watch?v=e0IcnXLJUgU

    but the problem is that when I click the button CreateInsert (5th button left in my case), never clear the form for the opening of new record, instead, he put the table in input mode.

    kindly help me with this.

    Thank you.

    To create a new line, you drag the operation createInsert of the data control on the create new"" button. This should create the new row.  If you like the new line being the last of them using the link from dvohra21 to https://blogs.oracle.com/jdevotnharvest/entry/how_to_add_new_adf

    In this case, you must change the listener to the button action to point to the generation of listener action code of Frank.

    Timo

Maybe you are looking for

  • Cannot export 2.7 k

    I edit clips in 2.7 k resolution (from GoPro), but when you export I can choose only 1080 p 60 fps... I'm sure that I exported even 4 k of iMovie before. I can't figure out how to get the k 2.7 return option in the selection of the export. Thanks in

  • How can I force sort a digital table

    I use a numbers spreadsheet [Version 3.6.2 (2577)] on a [Version OS X El Capitan 10.11.3] IMac for the sorting of items in stock by using our own numbering system.  For example 5/132/5 or 5/39/2 when I sort the tables using ascendant stock numbers do

  • OR SWITCH Soft Front Panel

    Hello I have a few questions in the following way: 1. After installing the Switch Executive 3.6 (evaluation software), I have very large window for OR Soft Front Panel SWITCH to cover all 4 monitors. It is difficult to see. Do I have to uninstall 3.6

  • Not all installed programs appear in "programs and features".

    A few days ago, I installed GTA IV with all components like Rockstar Social Club, Games for Windows and things related as update for .net 3.5 SP1 and so on. Since then, whenever I open the "programs and features" dialog box (I dunno if it's the corre

  • icons Windows stuck at one place in desktop

    Hi friends, I am on pc windows 7, when I'm trying to drag an icon to another location in the office, it does not move on the contrary it stucks at the same place, help me why this problem occur? and what to do to solve it? Please can someone help me.