Reputation: 159
I am using tomahawk file uploader functionality in my JSF 1.2 using "t:inputFileUpload" tag. But it seems tomahawk is not compatible with JSF 1.2, and it works only with JSF 2.0 and above.
Can someone confirm this. Also it would be great if someone gives pointer how to use file upload in JSF 1.2. I dont want to use RichFaces "rich:fileUpload" as it is too much fancy. I just want simple fileInput field and browse button next to it.
Upvotes: 0
Views: 6255
Reputation: 1108702
But it seems tomahawk is not compatible with JSF 1.2, and it works only with JSF 2.0 and above.
This is not true. Tomahawk existed almost as long as JSF itself. It's definitely also available in a JSF 1.2 compatible version.
Apparently you downloaded Tomahawk for JSF 2.0 instead of Tomahawk for JSF 1.2. Tomahawk has admittedly very confusing version numbers. It uses exactly the same 1.1.x version number for both JSF 1.2 and 2.0 versions.
When starting at the Tomahawk download page, you should for JSF 1.2 be downloading the version which is listed as follows:
MyFaces Tomahawk 1.1.14 for JSF 1.2 (zip) tomahawk12-1.1.14-bin.zip
and thus not the version which is listed as follows:
MyFaces Tomahawk 1.1.14 for JSF 2.0 (zip) tomahawk20-1.1.14-bin.zip
For a more detailed answer as to how to setup it, see also Uploading files with JSF (1.2).
Upvotes: 1
Reputation: 2052
tomahawk lib has no problem with jsf 1.2, example for file uploading tag,
<h:form id="uploadForm" name="uploadForm" enctype="multipart/form-data">
<table>
<tr>
<h:outputText for="photo" value="Select File: " />
<t:inputFileUpload storage="file" size="40" id="photo" value="#{patientsBackingBean.patientPhoto}"/>
<h:message for="photo" style="color: red;" />
</tr>
</table>
</h:form>
here patientPhoto
have to declare as UploadedFile
in backing bean.
Upvotes: 0