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!

Why does the value of my boolean variable resets to false when executing a method from a Bean?

FredericoSBDec 12 2013 — edited Dec 12 2013

Hey everyone,

I'm using JDeveloper 12.1.2.0.0.

As my title says, my boolean variable resets to false when i execute a method from my bean class.

In my bean class i have this variable:

private boolean store = false;

public void onDimStoreSelect(SelectionEvent selectionEvent) {

...

store = true;

FactSalesHUB(selectionEvent);

...

}

public void onDimSellerSelect(SelectionEvent selectionEvent) {

....

FactSalesHUB(selectionEvent);

}

   public void FactSalesHUB(SelectionEvent selectionEvent) {

        GenericTableSelectionHandler.makeCurrent(selectionEvent);

        if (product != true)

            matchEmFromJavaScriptProducts();

        if (store != true)

            matchEmFromJavaScriptStore();

        if (seller != true)

            matchEmFromJavaScriptSeller();

        if (project != true)

            matchEmFromJavaScriptProject();

        if (customer == false)

            matchEmFromJavaScriptCustomer();

        if (coin != true)

            matchEmFromJavaScriptCoin();

    }

So i execute the onDimStoreSelect, and after that, if i execute the onDimSellerSelect, the value of the variable customer is already set to false and it will make my matchEmFromJavaScriptStore() executes when i don't want it to.

Why doesn't he store the value as false since i've done it in the previous method?? Any idea?

If the problem isn't well explained or if this is not well explained just say.

Regards,

Frederico.

This post has been answered by 931325 on Dec 12 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2014
Added on Dec 12 2013
11 comments
919 views