apex widget tabular addrow
In this post , we will be discuss about the apex
widget tabular form. apex widget tabular form has the feature which allows
users to update multiple rows in a table using only declarative programming.Apex widget tabular form is very useful and the powerful tool. In back-end of the apex widget tabular form , most of the work handled by the Java script and the PL SQL scripts. Here below i will share the detail steps and explanation about apex widget tabular addrow.
Step by Step to create apex widget tabular addrow
Step1:-
Go to Apex environment and go to your page.
Step2:-
To Create apex widget tabular form
Go
to Create Region -> Form -> Tabular Form .
Tabular form wizard will
guide you through the process of selecting the table and columns, choosing
a primary key, choosing columns to update, and adding buttons and
branching.
Run
the page, and you find that the tabular form lets you scroll thru every row in
the table. Pretty cool, but maybe you only want a subset of the
rows? So your page has an ID field, and you modify the tabular form
with the WHERE clause
select
rowid, /* Apex generates the
select */
table_key,
table_col1,
table_col2,
table_colx
where table_key = :id /* You add the where clause */
Step3:- So,
we will execute the JavaScript addRow function when the page loads by using a
dynamic action.
Here's how to do it:
create a new dynamic action and name
it Add_1_Row.Click Next.
The Event should be Page Load, don't
choose a Condition, and click Next.
The Action should be Execute JavaScript Code, the code
should be
javascript:apex.widget.tabular.addRow();
and click Next.
Then click Create
Dynamic Action.
We
need to Create a function in page header as
function addRowTop()
{
apex.widget.tabular.addRow();
apex.jQuery(apex.widget.tabular.gTabForm).find("tr").last().insertBefore(apex.jQuery(apex.widget.tabular.gTabForm).find("tr").first());
}
apex widget tabular addrow
0 comments:
Post a Comment