I'm using Primefaces 6 and I create a fileUpload component as below:
<p:fileUpload id="myId"
styleClass="MY-STYLE"
value="#{bean.objUploadedFile}"
mode="simple"
skinSimple="true"
multiple="false"
update="@form"
label="Choose"
>
</p:fileUpload>
I must use mode=simple
so ajax is false. I add then a button to manage the upload:
<p:commandButton id="btnId"
value="Upload"
disabled="#{myBean.btnDisabled}"
process="@form"
update="@form"
ajax="false"
actionListener="#{myBean.manageUpload}"
/>
This button is loaded with disable=true
to startup.
Can I set disable=false
for this button when user click on Choose button in the fileUpload component? I tried with javascript but it does not work.
Is it possible?