aspose file tools*
The moose likes JSF and the fly likes Doubt in ajax4jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Doubt in ajax4jsf" Watch "Doubt in ajax4jsf" New topic
Author

Doubt in ajax4jsf

vidhya jayapalan
Greenhorn

Joined: Jul 14, 2005
Posts: 12
Hi,

The following code selects a value from drop down and displays the same as text/label.




Instead, i would like to display the selected value to a text box.



But, the value selected is not rendering to the text box.


Are there any attributes to be added ?

Is it possible to render a value to the text box?

Please help.

Thanks,
Vidhya
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Is it possible to render a value to the text box?


Yes it is..

but it would be better if you paste here the stack trace or any error.. in order to get help in this query..

cheers!


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
vidhya jayapalan
Greenhorn

Joined: Jul 14, 2005
Posts: 12
I dont get any error message or stack trace in the server.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

then try on firebug (a javascript debugger ).. or check into the Javascript Console inside the tool menu of Firefox.
vidhya jayapalan
Greenhorn

Joined: Jul 14, 2005
Posts: 12
Hi,

can anybody help me on the above issue. I dont see any error on the console nor as javascript error.

I am new to JSF, I have also used



but i am not able to set the selected value from the drop down to input text.

Is there any way to get handle to inputText field ? if so, please share your valueable inputs.

Thanks,
Vidhya
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
vidhya, you are 10001 guy who bumps the head to this JSF stone. This behavior is absolutely expected from the JSF point of view.

Read explanation at:
http://wiki.jboss.org/wiki/RichFacesTwoInputText
[ September 11, 2008: Message edited by: Sergey Smirnov ]
Srikanth Madasu
Ranch Hand

Joined: Sep 10, 2008
Posts: 48

Its the mischief of the converter... try adding following tag to your selectonemenu item...

<f:converter converterId="javax.faces.String"/>


If it's easy.. then everybody would do it!
 
jQuery in Action, 2nd edition
 
subject: Doubt in ajax4jsf
 
Similar Threads
selected value through select items
selectManyCheckbox
how to get the text box value
JSF Converter and h:selectOneMenu
h:selectOneMenu problem evaluating to empty String