Skip to Main Content

Analytics Software

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Undo drills and view prompt values warning message on a dashboard page

915764Feb 10 2012 — edited Jun 3 2013
Hi ,

I have created a dashboard with a single page containing two sections. In first section i am having a prompted report for region and a Region Dashboard prompt ,
in second section i am having two prompted reports for region , i mean region dashboard prompt drives all other reports in that page. When ever I select a region from the dashboard prompt i am seeing message on Dashboard page as **"_Undo drills and view prompt values_"**


If any one having the solution let me know in detail,How to overcome this.......

Comments

Timo Hahn

You call resetValue() on the component after you done

this.getInputFileBinding().resetValue();


Timo

Vidya Hugar

No. Its not resetting.

Timo Hahn

Works for me (using 12.1.3)

Bild 095.png

chosse file

Bild 096.png

after clicking on reset

Bild 097.png

the actionälistener

public void onReset(ActionEvent actionEvent) {

    getInfile().resetValue();

}

and this is hte page part

                    \<!-- Content -->

                    \<af:inputFile label="Label 1" id="if1" binding="#{viewScope.InputFileBean.infile}"/>

                    \<af:button text="reset" id="b1" actionListener="#{viewScope.InputFileBean.onReset}"/>

Timo

Vino Sarathy

Hi,

Try this..

use value binding variable of the inputFile to reset the value like below,

setFile(null);

AdfFacesContext.getCurrentInstance().addPartialTarget(inputFileBinding);


-Vinoth

Ashish Awasthi

User

Do as Timo Suggests

You are calling reset on ActionEvent component that means you are resetting your button not inputFile

ResetUtils.reset(actionEvent.getComponent());

Instead of this code bind your inputFile to bean and call Reset on that component binding

Ashish

Pra$hant Hole

Hi,

  check this:

            inputFileBinding.setValue(null);

            AdfFacesContext.getCurrentInstance().addPartialTarget(inputFileBinding);

Thanks,

Prashant

Vidya Hugar

I tried

  inputFileBinding.setValue(null);

            AdfFacesContext.getCurrentInstance().addPartialTarget(inputFileBinding);

also

but its taking lot of time, actually its loading . when i explicitly refresh then its fine.

even i tried ResetUtils.reset(actionEvent.getComponent());

still the same.

Vidya Hugar

I can do like theis, it works but as per my requirement i cannot add reset button

Timo Hahn

Sorry, I don't get you. I just added a button to get to the bean ad have a chance to reset the inputfile component. You can do it in your code as you are already in a bean method. You may have to ppr the inputFile component but it shoudl work.

Timo

Ashish Awasthi

2997680 wrote:

I tried

  inputFileBinding.setValue(null);

            AdfFacesContext.getCurrentInstance().addPartialTarget(inputFileBinding);

also

but its taking lot of time, actually its loading . when i explicitly refresh then its fine.

even i tried ResetUtils.reset(actionEvent.getComponent());

still the same.

Have you really read my comment ??

I am saying that you have used ResetUtils.reset(actionEvent.getComponent());  but you should not use this
Bind your inputFile to managed bean and call reset on that binding As Timo already told you

Ashish

Vidya Hugar

I gave binding to the input file and tried to reset but still its not working for me, its trying to reset.

Here is my code for that

<af:panelGroupLayout id="pgl350" layout="horizontal">

                        <af:inputFile label="Select" id="if51" value="#{ContractDocumentUploadDwn.file}"

                                      showRequired="true" binding="#{ContractDocumentUploadDwn.inputFileBinding}"/>

                        <af:button text="Upload" id="b353" action="#{ContractDocumentUploadDwn.uploadPortfolioDoc}"/>

</af:panelGroupLayout>

and JAVA class is

        genericSaveDocuments(actionEvent, iter, myfile, binding, popUpId, "Portfolio"); // Saves the Document

        setInputFileBinding(null);

As Timo suggested its works but I cannot add the reset button for resetting the input file,

Thanks

Timo Hahn

Again, you don't need a special reset button. You can reset the inputFile after you saved the document

genericSaveDocuments(actionEvent, iter, myfile, binding, popUpId, "Portfolio"); // Saves the Document

this.getInputFileBinding().resetValue();

should do.

Timo

Vidya Hugar

No. its not working for me.. next time when i try to add a record still its showing last inserted documentCapture.PNG

Timo Hahn

A you have set the value property of the inputFile, you have to set the value to null too.

Timo

Ashish Awasthi
Answer

See this line in your code

  <af:inputFile label="Select" id="if51" value="#{ContractDocumentUploadDwn.file}"

You are using a variable as value of inputFile so you have to set it's value to null

Write like this -

this.setFile(null);

// Reset inputFile component after upload

  ResetUtils.reset(inputFileBinding);


Ashish

Marked as Answer by Vidya Hugar · Sep 27 2020
Vidya Hugar

hi Timo,

I did like this.

        genericSaveDocuments(actionEvent, iter, myfile, binding, popUpId, "Portfolio");

        this.getInputFileBinding().resetValue();

        this.setInputFileBinding(null);

but still its not resetting.       

Cvele_new_account

Try with:

this.getInputFileBinding().resetValue();

this.getInputFileBinding().setValue(null);

AdfFacesContext.getCurrentInstance().addPartialTarget(getInputFileBinding());

Vidya Hugar

Thanks a lot . its working @"Timo Hahn" @ashish awasthi

1 - 18
Locked Post
New comments cannot be posted to this locked post.