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!

Setting a Button's Disabled Property dynamically on runtime

GadoFeb 8 2017 — edited Feb 13 2017

Hello experts,

I'm using JDev 11.1.1.7.0.

My App has a login page and a MainPage ... both are in a TF called Main-TF.

In my MainPage i have a tabbed panel with tabs ... each tab contains a TF.

Each Tab's task flow on the default activity has 3 button : View , New and Edit.

SO what I'm trying to achieve here is to disable each Tab and each Button to a value returned from the database.

I'm already doing it by using a service method in the AM that uses a JDBC connection ... then store the values in a POJO.

Then i call this method From the Main page ... store them in Variables.

You Can find more details here:What is the appropriate way to use SQL and JDBC conn in JSF/ADF Applications

But I think there might be an easier way:

What i have in mind is to create a method in the AM that accepts two variables UserId and Tab Name.

Using those variables instead of using JDBC it will use them as bind variables to execute a view object UserTabs_VO

Then expose the service method as a client Interface and call it from the button's disabled property using EL.

I did all of this but i don't know about the calling part.

How can i pass those variables to the service method? ... I have the UserID in a session variable the TabName is view controller bundlle.

and how will i bind the result to button's property?

Or Is this even achievable ?

Thanks for your time.

Gado

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2017
Added on Feb 8 2017
9 comments
487 views