0

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
swapnil chorghe
  • 159
  • 1
  • 5
  • 11
  • When I use tomahawk in my code, I am not able to see File upload field. Only Submit button is getting dispalyed, and in console I am getting Following warning: com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent WARNING: Unable to find component with ID file in view. When I checked the html source code, the tag is not getting converted to – swapnil chorghe Oct 03 '12 at 18:50

3 Answers3

1

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).

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

Richfaces' file upload is good enough. Its view can be customized by overriding corresponding styles, see the reference for tag, Table 6.183 and below.

nigi
  • 136
  • 5
0

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.

Jubin Patel
  • 1,959
  • 19
  • 38