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!

Inputstream returns null after the popup closed

adrinaJan 5 2016 — edited Jan 5 2016

Hi,

Am using jdeveloper 11.1.1.7.

I have 2 buttons [button A,button B], when clicking the button A a popup will be opened i have an af:inputfile inside popup, once the user uploaded file.

After coming to the main page when clicking the button B the inputStream gives null,

I have provided the code below for your reference.

<?xml version='1.0' encoding='UTF-8'?>

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"

          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">

  <af:outputText value="Overview" id="ot4"/>

  <af:commandButton text="Upload your CV" id="cb1">

    <af:showPopupBehavior popupId="p1" triggerType="action"/>

  </af:commandButton> 

  <af:commandButton text="Apply" id="cb2"

                    action="#{viewScope.carrersPortalBean.apply_action}"/>

  <af:popup id="p1">

    <af:dialog id="d1" title="Attach your CV" type="ok">

      <af:inputFile label="UploadFile" id="if1"

                    value="#{viewScope.carrersPortalBean.upFilePopup}"/>

    </af:dialog>

  </af:popup>

  <!--oracle-jdev-comment:preferred-managed-bean-name:carrersPortal-->

</jsp:root>

public void uploadedFile(String docname) {

     // To do code

     fileStream = upFilePopup.getInputStream(); // this is null

     /.......

}

Need your advice.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2016
Added on Jan 5 2016
9 comments
1,900 views