Sven
On 6/16/06, pokkie <[EMAIL PROTECTED]
> wrote:
Hello all,
For some reason, when my form is submitted, the setter in my backing bean
that is tied
to my inputFileUpload component isn't called, and subsequently, any attempt
of
retrieving a reference is also returned as 'null'
JSP
-----
<h:form id="createEmailForm" enctype="multipart/form-data">
<f:verbatim>
E-Mail Attachment (1) :
</f:verbatim>
<t:inputFileUpload id="uploadFile1" value="#{emailBean.uploadFile1}"
storage="file" size="30" style="width:305px; background:#f5f5f5;"/>
<t:commandButton id="updateEmailDetails"
value="Update E-Mail Details"
actionListener="#{emailBean.updateEmailDetails}"
styleClass="submit"
rendered="#{emailBean.emailDetails}"/>
</h:form>
Backing Bean
-------------------
private UploadedFile uploadFile1;
public UploadedFile getUploadFile1() {
logger.debug("getter is invoked, upload 1");
return uploadFile1;
}
public void setUploadFile1(UploadedFile uploadFile1) {
logger.debug("setter is invoked, upload 1");
this.uploadFile1 = uploadFile1;
}
// Form ActionListener
public void updateEmailDetails(ActionEvent actionEvent) {
logger.debug ("file upload is : " + getUploadFile1()); // returns
null
}
web.xml
------------
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class> org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/home/behemoth/temp</param-value>
</init-param>
</filter>
I am using the latest, 16 June 2006, snapshot versions of tomahawk and
myfaces.
Originally I was using tomahawk 1.1.2 and a snapshot of myfaces 30 April
2006, but
since the replacement, the problem stays the same. Furthermore, I have
enabled logging
on myfaces and the apache packages with level of DEBUG and neither have
releaved
any clues as to why this is not working.
Any help would be much appreciated,
-- Pokkie
--
View this message in context: http://www.nabble.com/InputFileUpload-UploadedFile-returns-null-t1799337.html#a4903754
Sent from the MyFaces - Users forum at Nabble.com.
--
Sven Haiges
[EMAIL PROTECTED]
TEL +49 89 420 958 993 | SIPgate 8008878 | Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de

