• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql

advanced table in oa framework

Advanced Table events and their handling

October 28, 2012 by techhoneyadmin

An advancedTable is capable of HTTP Post opearation hence while creating an advancedTable be sure that it’s a recursive child of the pageLayout region and the “Form” property of the pageLayout region is set to “True”.

All the events generated by advancedTable are HTTP requests are can be caught and handled in processFormRequest method of the controller.

Some of the events of advancedTable can be summarized as below:

Navigation – Occurs when a user clicks on the “next” or “previous” link on the top of the table to navigate to other set of rows than that being currently displayed in the advancedtable region.

Sorting – Occurs when a user selects a highlighted column heading to sort that column in ascending or descending order.

Insertion of a new row – A very important event in advancedTable and it occurs once a user clicks the “Add Another Row” button.

Recalculate column Total – Another important event and this one occurs once a user selects the Recalculate button to update the column total.

Detail Disclosure – this event occurs once the user selects the Hide or Show link to collapse or expand the detail disclosure region.

All the events that get fired by advancedTable can be captured using the hidden fields that are UIX attributes in the UIConstants interface. These hidden fields are parameters that are set once an event is fired by advancedTable region.

The parameters can be summarized as:

SOURCE_PARAM: This parameter designates the event source, in other words, this is the parameter which tells the source from which an event has been fired or generated. It has the name attribute of the webbean that has produced the event.

To check whether the event has been generated by table just refer the lines below

if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))

{

….Your business logic to handle the condition

}

EVENT_PARAM: This is the parameter which tell that which event has been generated, the possible list of values that this parameter can have is:

  1. GOTO_EVENT– this is the value of the EVENT_PARAM when a user clicks on the “next” or “previous” link of the advancedTable.
  2. SORT_EVENT: as the name suggests that this value pertains to the event when a user clicks on a sort-able column for ascending or descending order of values.
  3. HIDE_EVENT: EVENT_PARAM attains this value when the “Hide” link of a detail disclosure is selected.
  4. SHOW_EVENT: EVENT_PARAM attains this value when the “Show” link of a detail disclosure is selected.
  5. ADD_ROWS_EVENT: once the user clicks on the “Add Another Row” button the EVENT_PARAM gets this value.
  6. UPDATE_EVENT: The pressing of “Recalculate” button generates this value.
  7. VALUE_PARAM: This is a different type of parameter which tracks the value relevant to a particular event. Let’s discuss this further.
    1. When a hide show in a detail disclosure is selected then this parameter has the value of the row index whose corresponding hide/show link was selected.
    2. When “next” or “previous” link on top of the advancedTable is selected then this parameter has the value of index of the first row that is currently being displayed on the screen e.g. suppose your advanced table displays 12 rows at once, now when the advancedTable region is loaded initially to display the first 12 rows then VALUE_PARAM has the value of 1. Once the next link is clicked and the advancedTable region displays rows from 13 to 24 (if available) then the VALUE_PARAM has the value of 13.

SIZE_PARAM: This parameter indicates the number of rows that are currently being displayed by the table. This parameter gets the value only in the case of navigation event and is applicable to navigation event only.

STATE_PARAM: This parameter is used to indicate the current sorted state of the column, hence applicable only for sort event.

A Small event handling example:

Suppose you want to check if the Add Another Row button has been clicked on the AdvancedTable then you just need to write a code similar to the one shown below:

if (advancedTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))

&& ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))

{

.. Your business logic as per the requirement

}

Hope that you find this post to be informative…

Thanks for reading 🙂

Filed Under: Regions Tagged With: advanced table in oa framework, advanced table in oaf, advancedTable, advancedTable events, events in advancedTable, OAAdvancedTableBean

Advanced Table Region In OAF

October 28, 2012 by techhoneyadmin

It was earlier that OA Framework used OATableBean to render tables but
now things have changed and OAAdvancedTableBean extends
OATableBean. The best part of this is that with advancedtable provides declarative support for the functionalities which required programming with simple table.
The magic doesn? ends here, OAAdvancedTableBean also provides declarative support to many of the new features that were not available with OATableBean, just for an example features like column span in a table column header were not available with OATableBean but is now declaratively supported by OAAdvancedTableBean.

Advanced table has many rich features, some of which can be like a table can now have an instruction text and even a tip, also table can have a navigation bar, selection column, add rows button, control bar, recalculate and many more.

Advanced table even allows you to brand the table so that it looks more beautiful once it? displayed. The branding options include:
1. RowBranding
2. ColumnBranding
3. NoBranding
By default ?oBranding?option will be active.

Row Branding: Once you set the branding style in the property palette of advancedTable region and run the page, you will note that the alternative rows of the table are in grey bands of color. Even you have the option to choose the branding interval, by default the branding interval is 1 and hence alternative row is displayed in grey brand color, if you choose 2 as branding interval then the grey band row will appear after every 2 rows.

Column Branding: This is similar to row banding except that now rather that rows the columns of your advanced table will be in the grey band branding style.

No Branding: This is the default branding style that? selected if you don? choose other styles, in this style neither rows nor columns will be branded and all the rows and tables of the advanced table will be displayed as mentioned in Oracle BLAF.

Some more features of advanced table are:

Text: This is the text that will be displayed on the top of the table once the OA Framework page is rendered.

Records Displayed: This property can limit the number of records that can be displayed on the screen once the advanced table is rendered. Be default the number of records displayed is 10.

Width: this is another important property of advancedtable. Here as the name suggests you can enter the width of the table once the table is rendered. You can either enter the width in pixels or in percentage. In order to enter the width of the table in pixel enter 500 or 600 in the property palette. In order to enter the width of the table in percentage enter 70% or 80% in the palette.
Once you enter the width of table to be 100% the navigation links (Next and Previous) will be displayed on top of the table. These links allow you to navigate to the other rows, apart from those being displayed on the OA Framework page currently.

Controller Class: This is an optional property. If you want to perform some runtime action then only you need to create a controller class where you will be handling the events and navigations performed on the advancedTable.

Admin Perosnlization: Set to true if you want the admin to be able to personalize the advancedTable region else false.

User Personalization: Set to true if you want the user to be able to personalize the advancedTable region else false.

Filed Under: Regions Tagged With: advanced table in oa framework, advanced table in oaf, OA Framework Advanced Table, OAAdvancedTableBean, OAF Advanced Table, What is Advanced Table in OAF

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in