The below is my code. when i clicked on command link upload its calling popup and dialog tags and its script.
when i click on upload link again script is not calling. only popup and dialog are calling.
i checked with alert tag with in the script.
This code is working with <af:link> tag in oracle 12c.
I am using oracle 11g release1 and in place of <af:link> i am using <af:commandLink>
It is not working with <af:commandLink> in 11g.
I think this is versioning problem.
please help me.
<af:toolbar id="t1"> <af:group id="g1">
<af:commandLink text="Upload" id="l1" inlineStyle="font-size:medium;"
actionListener="#{viewScope.FolderTreeModelBean.getSelectedUploadePath}"
partialSubmit="true"/>
<af:spacer width="10" height="10" id="s2"/>
<af:commandLink text="Download" disabled="true" id="l2"
inlineStyle="font-size:medium;"
binding="#{viewScope.FolderTreeModelBean.linkDownload}">
<af:fileDownloadActionListener filename="#{viewScope.FolderTreeModelBean.selectedFile}"
method="#{viewScope.FolderTreeModelBean.downloadFileListener}"/>
</af:commandLink>
<af:popup autoCancel="disabled" id="p1"
binding="#{viewScope.FolderTreeModelBean.showPopUp}"
childCreation="deferred" contentDelivery="lazyUncached">
<af:dialog id="d1"
dialogListener="#{viewScope.FolderTreeModelBean.uploadListner}"
title="Upload Files to #{viewScope.FolderTreeModelBean.currentPath}" >
<f:facet name="buttonBar"/>
<af:resource type="css"
source="/css/uploadfile.css"/>
<af:resource type="javascript"
source="/js/jquery.min.js"/>
<af:resource type="javascript"
source="/js/jquery.uploadfile.min.js"/>
<af:resource type="javascript">
var pathArray = window.location.pathname.split('/');
var secondLevelLocation = pathArray[1];
var url = '/' + pathArray[1] + '/GetFileServlet';// this will give you post method call to this url
$(document).ready(function ()// standard jquery ready function
{
alert("*****");
$("#fileuploader").uploadFile( {
url : url,
allowedTypes : "jpg,bmp,ppt,pps,pptx,pdf,TXT,txt,doc,docx,rtf,odt,zip,xls,xlsx,xml,png", // you can define allowed extension type.
fileName : "myfile", // if you want to show delete icon for each uploaded file
statusBarWidth : 900,
dragdropWidth : 900,
maxFileSize : 50000 * 1024// add maximum upload size for file.
});
});
</af:resource>
<f:verbatim><div id="fileuploader">
</div></f:verbatim>
</af:dialog>
</af:popup>
</af:group></af:toolbar>