I am currently struggling to show multiple tabular forms on one page. Oracle Apex allows only one Tabular Form on a page. I tried to follow the guide from the "Planet of Apex" blog but unfortunately it didn't work.
I didn't manage to implent the iFrame Regions to set the values of the foreign keys.
<iframe src="f?p=&APP_ID.:23:&SESSION."style="width:600px;height:600px"scrolling="no" marginwidth="0" marginheight="0"frameborder="0" vspace="0" hspace="0" />
And how do I bind the variables in the URL, like this &ITEM/COLUMN.?
The guide I followed:
https://planetoftheapex.wordpress.com/2016/12/10/multiple-tabular-forms-on-a-single-page-workaround/
Have you tried Interactive Grid? You can have several Interactive Grids on a single Apex page. Check out sample packaged application Interactive Grid -- User name DEMO and password demo -- and play around with all the features. Very powerful.
When in Application Express, you can edit an existing page, and add a "Interactive Grid" region, specify the SQL query to populate the grid. Then add another "Interactive Grid" region, etc. Or using the Create Page wizard, choose "Report" as a page type, and on the next page, choose Interactive Grid.
I've tried to use Interactive Grid but unfortunately, it didn't work well. Each instance of an IG on your page will slow your page load in about 2 seconds. In my case, I had to have 5 tabular forms (or IG) on the same page and the result was unacceptable 10 seconds.
I even did a quick demo on apex.oracle.com with 5 IG's based on emp/dept tables and the result was the same: each IG slowed the page in about 2 secs.
My guess is that if I had thousands of rows to load, the IG would still take 2 seconds, so if you have tons of rows it'd be fine. But for few rows, it doesn't work well.
Answering the original question: I've created an application item to store the Foreign Key so I don't need to pass it in my URL. That may help you.
Related
I am trying to make a page that returns header information for all employees, but when an employee is clicked it returns all details of that employee. I have drawn up an example that may better help explain what I am trying to do. I am curious on what type of regions I should choose, and if there is an example application that I could use to base mine off of. Thanks!
https://i.stack.imgur.com/lMfjH.png
Using the wizard:
create page
report
report with form
It'll create two pages:
an interactive report (you'll use to view some info for all employees on the same page, as if they are in an Excel worksheet) and
a form, which lets you show all details related to selected employee (which means that form can contain many more items than report)
I'm using APEX 5 for the first time and trying to link users to the same page from an interactive report column.
The page being linked to will display different data, depending on which row user clicked.
I don't know what data to depend on to generate the new page, my thoughts are to write (a href) statements but not sure how variables are supposed to be stored this way.
Any advice or help would be greatly appreciated!
Wrong approach, in my opinion.
You should have done this:
create a new page
choose the "Report" page type
choose "Report with Form on table"
It'll create both Interactive Report and a "linked" Form which will be used for the purpose you described. You don't even have to write a single line of code, Apex will do everything for you. You'd just click the icon at the beginning of the Interactive Report row, and it'll lead you to the Form and display values related to that very row.
I am currently working in Oracle APEX version 5.1.2. I have created an interactive grid in my application that queries data from a table stored in the Oracle database. The data being queried is just several different URLs that refer to different pages in my application. So in other words, in each cell of one of the columns in the interactive grid there is a URL.
Then on a different page in the same application, I have created an interactive report that queries all of the data from the interactive grid. One of the columns in that interactive report is set to type "Link" and the link attribute is set to #LINK#. So each cell in that column contains a hyperlink for one of the URLs stored in the interactive grid.
The problem is that when I click on the hyperlink, I lose my session state and and am redirected to the login page. When I do then login, I am directed to the page in the application that the link was supposed to direct me to. The link only works if I hard code my current session ID in the URL in the database. But I'm trying to find a suitable substitution string for the session ID so that I don't have to hard code the session ID. I have tried the substitution strings &SESSION. and :APP_SESSION and &APP_SESSION. and V('SESSION') and nothing has worked.
Does anyone have any ideas of how to achieve this so that I don't lose my session state?
Thank you in advance.
Update:
Apparently there is no problem with the url formed.
Could you inspect the element and display the generated html on the page?
I think you should not fill in the "link attributes" field, it should be blank.
Click "Target" and there put the value #LINK# in the "URL" field.
I have various tables with the following size : 12 columns and up to 1800 rows. It takes 8 seconds to render it to the user. I currently use h:dataTable. I tried ui:repeat to get the row data from a Java List object, managed by JSF. Although this works fine, the 8 seconds to render the table is unacceptable. I'm trying to find other ways to do this, but need to keep JSF as my controller for action buttons on the page. In other words I want to create the 'table markupto send to thepage myselfand then still associate actions onh:commandButtons` to the managed bean methods. Is there a way to do this?
The only ways I can think of is to use jquery or ajax to create the table markup, although I am new to technologies other than JSF for UI development.Maybe then I would somehow pass that to the client for render. The only problem is I don't know how to generate the markup from my list, and second how I would inject it between h:commandButtons that are in my XHTML file currently.
Does any one know how I can solve this without having to completely rip OFF JSF? One main problem I have is that the business requirement that says we can't page the datatable (i.e: Next / Back buttons displaying 100 at a time for example). So, possibly I was thinking I could do this by Ajax calls to the server and get 100 rows at a time after page ready, and append new rows behind the scenes to the user. This would be a "perceived" speed of load, but I don't know how to do this at all.
8 seconds isn't bad for a whopping 1800 rows on 12 columns. 10~100 rows is done in less than a second, right?
Before continuing with this, are you absolutely positive that all those 1800 rows are supposed to be shown at once? Isn't this very user unfriendly? Wouldn't the user have to need Ctrl+F to find the information it is looking for? Isn't that annoying? Why don't you introduce filtering (a search field) and pagination exactly like as Google is doing to present the zillion of results in a sane and user friendly manner?
Anyway, you could consider using "On-Demand data" option of PrimeFaces <p:dataTable>, wherein the data is loaded by ajax during scrolling via <p:dataTable liveScroll="true">. See also the showcase example. No homegrown code nor manually fiddling with jQuery necessary. PrimeFaces has done it all under the covers.
It you don't want to use PrimeFaces for some reason, then you could consider using OmniFaces <o:componentIdParam> in combination with some jQuery "live scrolling" plugin. See also the last example in its (snapshot) showcase page for a kickoff example (which should easily be adapted to be triggered by hitting the scroll bottom instead of by clicking).
I am a relative APEX noob.
I'm running APEX 4.0 against a 10gR2 database.
I've written a query that takes a few inputs (two date fields, for start and end, and a text field for further filtering) and created a dynamic report out of it that works when I pull the input variables (:START_DATE, :END_DATE, :OFFICE) out of it or replace them with static values.
I want to create a form on a page that submits those values to the dynamic report page for use in the query to filter the results the user sees when he or she hits the report.
I'm not having much luck finding a good step-by-step example of this. I created a blank page with two Date Pickers and a LOV select dropdown, but am unsure how to best translate those values into the dynamic report.
Can somebody point me at the right documentation for this?
The following was developed using Apex 4.1 but apart from some cosmetic changes the principles should be the same.
The data comes from the standard scott.emp schema.
Overview
This is page 1, the user can enter an empno and\or a hiredate.
When submit is pressed the following report on a different page is displayed:
How it works
On page 1 I have created the three items shown. The text items are called them P1_EMPNO, and P1_HIREDATE. The action for the button is "Submit Page"
Still on page 1, create a branch with the following values:
This branch navigates to page 2 (which is yet to be developed) and sets the values of items on page 2 with the values from page 1.
Create a new page, in this example this will be referred to page 2.
On page 2 create a new interactive report using the following query:
select e.*
from emp e
Next create two text items in the same region as the report and call these :P2_EMPNO and :P2_HIREDATE. I have found it useful to show these items during development so you can see that the correct values are being passed through to the page. You can always set them as hidden once you happy with the report.
Finally amend the query used by the interactive report to use the values supplied by page 1
Run the application.
You want to reference your page items in your query, which means you'll have to submit your page before your query will pick up the session state of them. What I do when I provide a small parameter form, is to put a button up there as well (i.e. labeled 'Query'), which does a submit.
In your report you can then reference your items. If for example you have 2 items P1_DATE_START and P1_DATE_END, your query could look like:
SELECT firstname, lastname, job
FROM employees
WHERE employment_start BETWEEN to_date(:P1_DATE_START) AND to_date(:P1_DATE_END);