Forum Stats

  • 3,874,152 Users
  • 2,266,674 Discussions
  • 7,911,744 Comments

Discussions

Behaviour of columns vs items

MMNonApex-Oracle
MMNonApex-Oracle Member Posts: 36 Employee
edited Dec 27, 2017 11:58AM in APEX Discussions

Hi,

Despite my age, I am a newbee on Oracle Apex. A long time ago I used to dev with Oracle Forms

I would like to know why the behaviour of columns (Interactive report/grid) is so different from items. On the wed, articles are often speaking of items rarely of columns

For example : Rich text Editor does not exists for columns (Wrong ?).

Another thing, it seems impossible to me to set in session state/access the value of a column (especially do trigger some queries : POST QUERY in the  Forms' old times on anther region)

In others words how can i copy the value of a column (interactive report/grid) to an item that will be accessible for use in sql : so far i am unable to do something like this : apex_util.set_session_state ('<item_name>', v('column_name'))

Well i am really lost...

Thank in advance you for your clever answers and pointers to docs that could help me.

Michel

Tagged:

Answers

  • LA County APEX
    LA County APEX Member Posts: 637 Gold Badge
    edited Dec 13, 2017 11:46PM

    You may not need to use apex_util.set_session_state. You can try something likes $s('Px_ITEM',value);

    And create a dynamic action based on Px_ITEM change.

    Request a workspace from here and try a few --> https://apex.oracle.com/pls/apex/f?p=4550

    In regard to the report column, you can capture events such as click, value changed, key released  (select list, text, and text area).

    For example:

    select apex_item.text(1,col1,10,30,'onKeyUp="javascript:alert(this.value);"') col1 from tbl

  • John Snyders-Oracle
    John Snyders-Oracle Member Posts: 1,436 Employee
    edited Dec 14, 2017 6:54PM

    Hi Michel,

    An item (specifically a page item) is an APEX component that defines/represents/handles a form control such as a text field or select list. It is implemented by an item plug-in. There are native item plugins that are built into APEX and you can build your own or find 3rd party item plug-ins. An [item] plug-in has two parts: the server side PL/SQL code and typically client side JavaScript code. The page item handles the transfer of a data value between the client  and server session state.

    The reason you hear/read mostly about items is that they have been around since the beginning of APEX and columns are new. In the past APEX added tabular forms for editing tabular data. Tabular forms are still supported. They have a draw back in that they have a fixed limited set of form controls. They don't use items and this includes 3rd party item plugins. Tabular forms have other limitations.

    In 5.1 we added Interactive Grid and with it the concept of a column item. We wanted to allow any item plug-in to be used in IG editing. A column item is an APEX component that is essentially the same as a page item. An item plug-in can be implemented such that it works for both forms and in IG. The main difference is that an item used as a column item does not use session state on the server. Currently it can only be processed with an IG region and Interactive Grid - Automatic Row Processing (DML) process.

    In general any item can be implemented so that it works with IG but there are technical difficulties in making some of them work and that is why Rich Text Editor does not work in IG (we hope to get it working in the future). Also many 3rd party item plug-ins have not [yet] been re-written to work as a column item. Again because IG and column items are new in 5.1.

    Here is a good starting point for info about IG

    https://github.com/mgoricki/orclapex-ig-cheat-sheet

    Regards,
    -John

  • MMNonApex-Oracle
    MMNonApex-Oracle Member Posts: 36 Employee
    edited Dec 27, 2017 11:58AM

    Hi from France,

    Sorry for the delay and Thank you John for these explanations. I understand better what i can do or cannot do. I did not read yet the cheat sheet you recommend but i will asap. May be i will found how to "influence" a query on the server side with data on the client side.

    Regards

This discussion has been closed.