Visual and functional Issues with <rich:fileUpload>
cherrera28 Oct 3, 2012 8:51 PMHello community...
Im trying to implement file upload functionality in my application. Im using RichFaces 4.x.
This is the code in my xhtml page:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j">
<h:head>
<title><h:outputText value="#{tags['spirit.appname']}"/></title>
<link href="./styles/styles.css" rel="stylesheet" type="text/css"/>
</h:head>
<h:body>
<ui:composition template="./templates/main.xhtml">
<ui:define name="content">
<rich:panel styleClass="body">
<f:facet name="header"><h:outputText value="#{tags['upload.title']}"/></f:facet>
<h:outputText value="#{tags['upload.title']}" styleClass="bodyTitle"/>
<p><h:outputText value="#{tags['upload.instructions']}" styleClass="bodyInstructions"/></p>
<center>
<p>
<h:form>
<h:panelGrid columns="2">
<h:outputText value="#{tags['upload.filename']}" styleClass="formLegends"/>
<h:inputText id="txtFileName" value="#{uploadBean.fileName}" required="true"/>
<h:outputText value="#{tags['upload.filetype']}" styleClass="formLegends"/>
<h:selectOneMenu id="cboTpMaterial" value="#{uploadBean.idTpMaterial}" >
<f:selectItems value="#{uploadBean.listaTpMateriales}" var="tpMaterial"
itemLabel="#{tpMaterial.nombre}" itemValue="#{tpMaterial.idTpMaterial}"/>
</h:selectOneMenu>
<h:outputText value="#{tags['upload.desc']}" styleClass="formLegends"/>
<h:inputTextarea id="txtDesc" value="#{uploadBean.desc}"/>
</h:panelGrid>
<br/>
<br/>
<h:panelGrid columns="2">
<rich:fileUpload id="txtUpload" fileUploadListener="#{uploadBean.uploadListener}"/>
</h:panelGrid>
</h:form>
</p>
</center>
</rich:panel>
</ui:define>
</ui:composition>
</h:body>
</html>
The issues are:
- The component appears without theme or visual aspect in the page (running).
- The visualization panel are located down in the page respect the upload component (in the showcase appears next rigth to the upload component).
- With any file i was upload, the visualization panel shows the legend "This XML file does not appear to have any style information associated with it. The document tree is shown below."
- I need to put a simple (without visualization panel) file upload component without ajax support that upload the file in the submit event with the other fields in the form. I need to disable the visualization functionality but i dont see any tag to disable this feature.
Can you help me to solve this issues.
I really appreciate your help.
Regards.