File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Field display problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Field display problem" Watch "Field display problem" New topic
Author

Field display problem

jaisai vijay
Ranch Hand

Joined: Dec 17, 2009
Posts: 70
Hi,

I am trying a simple application. Here is my JSF page



When I render this page I am getting this value #{LoginForm.userName} in the text field. Please find the attachment for the screen shot.

Thanks for your help in advance.




[Thumbnail for login.JPG]

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
Take out the value attribute
jaisai vijay
Ranch Hand

Joined: Dec 17, 2009
Posts: 70
Hi Davie,

In that case how can I bind the value to bean property?

Thanks,
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
to bind that value to the backing bean
you use binding, not value.

Plus, you don't have to use binding attribute to get the value, you can use FaceContext.
jaisai vijay
Ranch Hand

Joined: Dec 17, 2009
Posts: 70
Hi Davie,

I was following Rich Faces example in roseindia. I think we can do this way but I tried as you said I got the following exception



Thanks in advance.
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
have you remove the value attribute? do you understand why the exception?
jaisai vijay
Ranch Hand

Joined: Dec 17, 2009
Posts: 70
Yes I have removed the value attribute. I guess in the bean we have to declalre the property as HtmlInputText when you use binding attribute. I am not sure I was looking at online example.

Sorry I am quite new to JSF I just started couple of days back.
jaisai vijay
Ranch Hand

Joined: Dec 17, 2009
Posts: 70
Hi,

I don't know what is wrong with tomcat it works in Jboss. When I deploy the same application in jboss I get the empty text fields as I expected.

Please help to get this done in tomcat.
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
post your relevent code
jaisai vijay
Ranch Hand

Joined: Dec 17, 2009
Posts: 70
Hi,

I have attached my full code.

my login.jsp



faces-config:



web.xml



LoginForm:



Thanks for the help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Field display problem