Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can navigation decision be made programmatically without user clicking?

J. NewmanMay 19 2009 — edited May 20 2009
I am using JDeveloper 10.1.3.4, and have a question about custom page flow -- programmatically forking to one of the pages based on user data.

I have a table that contains a number of columns storing data about users. I created a view object (LoggedInStudent) from this table and overrode the prepareSession() method in the application module.

When a student logs in, the first thing the application does is that the prepareSession() method passes the student's user ID to the LoggedInStudent view object's SQL statement to reduce the view cache to just one row that belongs to the logged-in student.

The very next thing the application needs to do is to navigate the user to one of five pages based on the data in that one row of LoggedInStudent. And this is where I get stuck.

In the faces-config.xml diagram, I added a JSF page (welcome.jsp) with a navigation case from welcome.jsp to each of the other five pages, put a command button on the welcome.jsp page, and in the context menu of this button chose "Create Method Binding for Action".

In the Welcome.java file, whichever navigation from-outcome name the commandButton1_action() method returns, is the next page the user will be navigated to, very nicely. All that needs to be done is to get that row of LoggedInStudent, examine the attributes in it, write the logic and return the right from-outcome name. The only problem is: how to get that row in this Welcome.java class?

Or, could page flow navigation be done from the application module? How? In the application module that one row of the LoggedInStudent is available at finger tips.

I am a newby with JDeveloper. 10.1.3 is page-centric and navigation seems to be neater and easier then in 10.1.2. In the demos online all navigation is event-driven: if there are five pages the user can go to from the current page, there are probably five buttons or links, it is the user who makes the decision which one to click. I believe JDeveloper should also support programmatically making the decision on which next page to navigate to.

I would appreciate it a lot if some experienced developer can help me out, and many thanks in advance.



Newman
This post has been answered by Branislav Nemec on May 19 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2009
Added on May 19 2009
3 comments
591 views