Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JavaServer Faces not calling setter method

Reply
Thread Tools

JavaServer Faces not calling setter method

 
 
Martin Kess
Guest
Posts: n/a
 
      12-20-2005
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.

 
Reply With Quote
 
 
 
 
Danno
Guest
Posts: n/a
 
      12-20-2005
what does your jsp page look like?

 
Reply With Quote
 
 
 
 
hiwa
Guest
Posts: n/a
 
      12-20-2005
>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 ...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: NitroX JavaServer Faces IDE cchang@m7.com Java 0 05-19-2005 08:00 PM
JUnit Testing with JavaServer Faces Roger Java 0 09-01-2004 12:12 PM
javaserver faces and dynamically created form elements Ittay Dror Java 0 04-19-2004 03:54 AM
JavaServer Faces (JSF) Question ranma79 Java 1 04-07-2004 09:48 PM
JavaServer Faces one Java 2 12-08-2003 02:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57