Need help with the Jdeveloper classes to create a search hitlist (BC4J, jsp) - JDeveloper and ADF

I need to create a search page and a results page. The results page would need to show only 25 records at a time(per page). There would be the need for a "Next", "Previous", "First" and "Last" hyperlink navigating to the next 25 records, previous 25 records, etc.
I can create the search page. The problem I am having is trying to use the JDev classes to present 25 records per page. I assume I would have to create a rowset from the datasource, etc. but I can't get it to work.
Can someone give me some direction about how to create a search results page programatically as opposed to the pre-built datatag wizard which scrolls through every record in the datasource.
TIA.

Related

Data Page Wizards

Jdeveloper 3.2.3 - windows 2000
Oracle 8.1.7
I have used the Data Page Wizards to create a query, edit and insert forms.
The forms are generated using the jbo: datatags. I would like to implement the following:
1. Query submit screen(hitlist)
Currently, the hitlist displays all the records in the rowset as stipulated by the RowSetIterate datatag. I need the hitlist to be a repeating page of 25 records, with links to navigate to first, next, previous, last. The left most field in the hitlist would be a hyperlink to a detail page.
I would like to implement the solution using the datatags as opposed to data webbeans.
Any information on how to manipulate any of the datatags required is appreciated.
Thanks.

Link between two JSP "Page Forward"

Friends,
Anybody knows how can I do a link between two pages that I have created with ADF using Struts. I would like to do a link between them and pass a parameter from one page to another.
Thanks!
See the "Creating a JSP Application using ADF Business Components and ADF DataBinding"
tutorial. specifically "Add Functionality to Edit Employee Records".
http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html 
Shay,
I have followed this link. But is looks like a little bit hard do to pass parameter from one page to another. My situation is: I have in a first page a form to insert departments (for exemplo) and in the secound page I have another form to insert employees for this department. But when I am inserting employees I do not want to have choose de department because it should be already choosed (inserted) in the page before. You see I want to know how can I pass from the first page (department) a parameter (the department id) to the secound page where I am inserting employees for this departament.
Thanks,
Rafael. 
If you base your data model on two related tables, then I think building a default insert form for the master table and then one for the detail table would automatically do it for you. You'll get the deptid in the detail form automatically. 
Shay,
you mean if I take the viewofdetail from beneath the viewofmaster/masterdetailFKLink folder (for example) from Data Control palette, the pk of master will be used/passed automatically from the master to the detail?
Hugs, Rafael
yes. Try it out and let us know if you have problems. 
Shay,
I did it but it do not work. Is there any other way tho pass the parameter from one jsp to another. 
This "Master Detail page using ADF" sample code from the samples page can help you here.
http://otn.oracle.com/sample_code/products/jdev/index.html
Here is what work for me with a simple Dept/Emp default ADF BC model.
1. Create a browse department datapage that has the ability to show you departments and employees.
2. In the struts visual editor, create a dataaction and drag to it the Create operation form the emp details view operation in the datacontrol palette.
3. Create a input page for the emp detail view.
4. Add a page link from the browse page to the dataaction.
5. Create a forward from the data action to the input page.
6. Run the browse page from the struts diagram.
7. When you click the link to create a new emp, it has the department id that you were on before in the field. 
Shay,
I want to pass a parameter (not the PK) from one JSP to another.
Example:
I have a table with 7 columns (the PK column is ID) to store information abou my users. For this table I build an "Input Form". I have another table (Permissions) for that I build another JSP form. I would like to pass from the first form the name of the user to the secound JSP (the jsp to insert permissions). Is there any way to do this?
Thanks!
Shay,
If I use Page Forward the parameters are passed. But it is just showsed in the secound page when I press the button create. Doing this it is showed at the input field but then when I do the commit I receive an error that say me that the field I receive from parameter and was showed just after I press create are null when it submit the SQL to the database.
It is strange because the value was showed at the input filed. The strange is that when I press execute after fill the form the value of this field desapier.
Do you know what this may be?
Thanks!

UIX: Passing a value from page with table to another page

I have two UIX pages.
The first page has 'read-only' table and user can select a radio button and then can click on 'Submit' button. This should take user to the second page.
What I need is to pass one of the fields (value) from the selected record on the first page over to the second page.
How to do this?
Please help 
Check out the simple uix search page to see how to pass a parameter from a UIX page:
http://otn.oracle.com/products/jdev/tips/shmeltzer/setwhereclause/uix.html 
Is there anyone to confirm, that the way to pass parameters between UIX pages is by adding methods (set, get) in AppModuleImpl.java?? 
Shay,
Your example shows how to take a parameter from the input field and pass it along, but how do you take the selected row? Not to hijack this thread, but I have a similar situation where I am trying to take the selected row from a read-only table in UIX (created from a vo) and forward to a data action that retrieves the current row and sends an email with data from the current row. I have tried all combinations of setCurrentRowWithKey and setCurrentRowWithKeyValue, but cannot get the current row. I know this works easily with built-in operations like delete, and my edit button works well when forwarding to an edit page for the selected row, but I've run into this block when trying to access the row programmatically in a custom DataAction. Any advice? 
I guess more people need this piece of advice here. Anyone able to help?
rade 
I got the same problem, can't get key from selected row. Please let me know if you find the solution.
-brant 
Check out the UIX tutorial on the JDeveloper Tutorials page.
I think step 3 is what you are looking for. 
Hi I just got your message. I can't find the JDeveloper Tutorials page could you post a link to page? Or the pages title or header.
thanks,
brant 
go to the JDeveloper home page http://www.oracle.com/technology/products/jdev a link to the tutorials is right there. 
You may need to override your select event in the DataForwardAction; e.g.,
public void onSelect(DataActionContext ctx){
......set where clause for viewobject used in the next page.......
.....execute query for viewobject used in the next page...
}

Can a read-only query results form be bound to a designated iterator?

To the experienced:
I am using JDeveloper 10.1.3.4 and have a question while building a search page.
I build this page by following the example in a tutorial Tutorial for Forms/4GL Developers (10.1.3.1.0) (chapter 8).
Like in the tutorial, my page has a query-by-example form and displays the query results on the same page. My page is built exactly like in the tutorial, except that the tutorial displays the query results as a read-only table, whereas in my page I tried displaying the query results as a read-only form.
The reason for using a form instead a table to display the query results is that in the tutorial, the query results may contain multiple rows, whereas in my page the query result is always one row. It is not nice page layout to display a long line in fine print and leave most of the page blank.
I am not sure if using a form is the very cause of the problem.
In the tutorial the search form is created first, then the results table is created. The search form uses one iterator which is set to be always in the find mode. After the results table is created, in the tutorial a second iterator is inserted into the executables node of the page definition, and the results table is then bound to this new iterator. So the search form and the results form each uses its own iterator, in a different mode and for a different purpose. The binding is accomplished by using the "Edit Binding" option in the menu that pops up when the table is right-clicked in the structure pane.
I did the same. The only problem is that the form for displaying the results in my page does not have such option for editing the binding.
So in my search page, whatever you type into the search fields, if a match is found when the button is clicked, just these search values are repeated in the results form. But the results form has quite a few more fields that are left blank.
Is there a way to bind the results form to the intended iterator?
Many thanks for your help!
Newman 
Hi,
there is a difference between table and form. table is jsf component that has some data model (collectionModel). form is just layout component. so you have to right-click on each field (input or output text) inside form
to get Edit binding menu option and change iterator. (outputText or inputText are again jsf components with some data model)
regards,
Branislav 
Hi, Branislav,
I tried. It works!
Thank you very much for solving the problem, and for also conceptually clarify that the form is just a layout component. You are always helpful!
Newman

Sending textfield parameters between screens in ADF

Hi All
I have a search.jspx where I provide 3 values
Those values needs to be used in the WHERE condition of the SQL and the results should be displayed in the list.jspx file.
How can i pass those values from one screen to another?
Thanks in Advance..
//J 
Please provide some more information about your environment, like jdev version and which ui technology (swing, rich faces ...) you are using.
Timo 
Dear Timo
I am using JDeveloper and exploring the ADF
What I did?
1. I created a Model object for Employees from EMPLOYEES table
2. I created a Bounded Task flow without Trains
search.jspx (providing few input parameters, employee id, emp name and email for searching) - ADF Form
list.jspx (listing out the list of employees) - ADF Read Only Table, click to edit options and pressing the update button
update.jspx (showing the individual records in editable mode) - ADF Form
then I created two Task flow Return. One for COMMIT, one for Roll back
Here in Update form, I created two buttons, one associated to COMMIT another to Rollback
My output?
From list.jspx, when I select a record from table and click Update, it goes to update.jspx
In the update.jspx, I modified some values and click Save (task flow return: COMMIT)
This flow is fine
What is the issues?
Issue 1.
The first flow, search.jspx to list.jspx I get the issues
search.jspx i enter few parameters,
I need to carry these parameters in Request object.
There, in the next list.jspx form, I want to display a table
This tabel shoudl retrieve the employees based on the values I provided in search.jspx
How to do this?
I understand, my list.jspx which is a ADF Read-only table might be wrong.
Your suggestions please?
Issue 2:
I need to implement CSS kind of styles for my ADF forms.
How can I do this?
Thanks a lot..
//J
Edited by: jaijava on Oct 30, 2010 5:15 AM 
Your setup is OK.
One easy way to accomplish your need for searching is to create a view criteria in the employees view where you define the search criteria for the search fields. Then create a method in the VO which holds the three parameters. This you publish in the client interface of the VO.
Now you should see this method as part of the data control. You now can drag this method onto your search page as adf form. This sets up the Vo for the next page (it should search the records according to the parameters). The list page just shows the records which match the criteria.
After you drop the method on the page the framework creates the needed binding parameter to transfer the data between the pages for you.
ADF rich faces use skins to shape their look and feel. You should read the part of the docs concerning skinning. Just type skin in the search filed and you get the pointers.
Timo

Categories

Resources