JavaServer Faces not calling setter method

M

Martin Kess

I'm using JSF's myfaces implementation, and I've run into a problem
that I can't figure out how to fix.

My getter and setter are as follows:

public UploadedFile getUpFile() {
return this.upFile;
}
public void setUpFile(UploadedFile upFile) {
this.upFile = upFile;
}

The relevant line in my JSP file:
<x:inputFileUpload size="100" id="upFileId"
value="#{CsvUploadBean.upFile}" storage="file" required="true"/>

And the managed bean is defined as follows:

<managed-bean>
<managed-bean-name>CsvUploadBean</managed-bean-name>
<managed-bean-class>bean.CsvUploadBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>defeinedFileSize</property-name>
<value>5m</value>
</managed-property>
</managed-bean>

Now my problem is that my getter method (getUpFile) gets called when
it's supposed to, but my setter (setUpFile) never gets called.

Anyone have any idea why that could be?

Thanks in advance.
 
H

hiwa

From the tomahawk javadoc for inputFileUpload tag:
<quote>
value false false java.lang.String Initial value to set when rendered
for the first time.
</quote>
Apparently, only getter is supported ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top