7 Replies Latest reply: Jun 1, 2012 12:04 PM by ionutvaidianu RSS

Rich Faces File Upload issue - RichFaces is not defined

ionutvaidianu Newbie

PROBLEM: The "rich:fileUpload" associated component is not rendered correctly and not functional.

 

ENVIRONMENT:

Eclipse Indigo

JBoss Tools Development snapshot

RichFaces 4.2.0

JBoss AS 7.1.1 Final

 

STEPS TO REPRODUCE:

1. Get Eclipse with JBoss tools - Indigo Development Snapshot - (http://download.jboss.org/jbosstools/updates/development/indigo/)

2. Fron JBoss Central view click on RichFaces Project, follow the default steps to create a RichFaces project.

3. Create an empty .XHTML page alog with the pages that already exist in the start project.

4. Fron the Palette (in the right) expahd JBoss RichFaces and select fileUpload component

5. Add basic information in the dialog with the properties / attributes that is opened. You do not even need a bean at this stage behind the component.

6. Finish the creation of the component.

7. Open the page you jsut created -> the file upload component is not rendered correctly.

 

ADDITIONAL INFORMATION:

The pages created by the start project are rendered correctly and functional, the only page / component that is not rendered correctly is the one containing the fileUpload component.

 

In FF you can see in the error console a mesage telling you "RichFaces is not defined" (see bellow).

richfaces not defined.png

 

The source of the page in FF is

"<div class="rf-fu " id="j_idt2" title="File Upload"><div class="rf-fu-hdr"><span class="rf-fu-btns-lft"><span class="rf-fu-btn-add"><span class="rf-fu-btn-cnt-add"><span class="rf-fu-inp-cntr"><input class="rf-fu-inp" type="file" /></span>Add</span></span><span class="rf-fu-btn-upl"><span class="rf-fu-btn-cnt-upl">Upload</span></span></span><span class="rf-fu-btns-rgh"><span class="rf-fu-btn-clr"><span class="rf-fu-btn-cnt-clr">Clear All</span></span></span></div><div class="rf-fu-lst" style="height: 210px"></div><div class="rf-fu-cntr-hdn"><iframe name="j_idt2"></iframe><div class="rf-pb" id="j_idt2_pb"><div id="j_idt2_pb.rmng" class="rf-pb-rmng"><div class="rf-pb-prgs" id="j_idt2_pb.prgs" style="width: 0%"></div><div class="rf-pb-lbl" id="j_idt2_pb.lbl"></div></div><script type="text/javascript">new RichFaces.ui.ProgressBar("j_idt2_pb",{"resource":"\/richfaces\u002Dwebapp\/rfRes\/fileUploadProgress.jsf?ln=org.richfaces"} );</script></div></div><script type="text/javascript">new RichFaces.ui.FileUpload("j_idt2",{"clearLabel":"Clear","maxFilesQuantity":"10","noDuplicate":true} );</script></div>"

 

The exploded WAR under JBoss is attached.

The Eclipse project is attached.

 

Is this a bug or a problem of configuration / missing dependencies?

Any help / information is appreciated,

 

Thanks!