Hi dear Users,

sorry, I was absent for 2 weeks, due to my exams,

I noticed following:
if "enctype="multipart/form-data"" is in form and if error occurs the
page is redisplayed with corrupt ids.
if I remove the enctype attribute, then everything is fine with IDs, but
I cannot upload a document (understandably). 
That's it. But I still do not understand this behavior and how enctype
relates to this problem.

<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>

<h:form id="documentData" enctype="multipart/form-data">
        <h:panelGrid>
                <f:facet name="header">
                        <h:outputText value="#{title}" />
                </f:facet>
                <h:panelGrid columns="1" border="0" cellspacing="5">
                        <h:outputLabel for="documentData_doc_input"
        
value="#{message.documentData_label_text}"
                                id="documentData_label_text" />

                        <t:inputFileUpload id="documentData_doc_input"
                                value="#{documentUploadBean.doc}"
storage="file" required="true"
                                size="70" />

                        <h:commandButton id="documentData_upload"
        
value="#{message.documentData_upload_button}"
        
action="#{documentUploadBean.loadAction}" />
                </h:panelGrid>
        </h:panelGrid>
</h:form>

Thank you for your answers!
BR
Vitaly

Reply via email to