HI,
Jdev 12.1.3
I have a table which stores blob object.

I am using a fileDownloadActionListener for downloading the file.
<af:column headerText="Download" id="c3">
\<af:link text="#{row.FileName}" id="l1">
\<af:fileDownloadActionListener filename="#{row.FileName}"
method="#{downloadBean.downloadBlobFile}"
contentType="#{row.MimeType}"/>
\</af:link>
\</af:column>
Code to download the file:
public void downloadBlobFile(FacesContext facesContext, OutputStream outputStream)
{
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("Image");
if (attr != null)
{
BlobDomain blob = (BlobDomain) attr.getInputValue();
try
{ // copy hte data from the blobDomain to the output stream
IOUtils.copy(blob.getInputStream(), outputStream);
blob.closeInputStream();
outputStream.flush();
}
catch (IOException e)
{
// handle errors
e.printStackTrace();
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY\_ERROR, e.getMessage(), "");
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
}
AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("Image");
The above line is returning null;
This is working fine in my other project. But not able to find out what is missing.
Cheers
AJ