How to retrieve value from Radiobutton..It always returns null inspite of selecting .
shalu buchasia
Greenhorn
Joined: Jun 04, 2004
Posts: 2
posted
0
getcolor alwauys returns null? Why? How should I retrieve value from a radio button..
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
In jsp you have to read the value of the button by getParameter()method.then that value passes to the bean to set the color. thanks.
shalu buchasia
Greenhorn
Joined: Jun 04, 2004
Posts: 2
posted
0
Where should I call getparameter in my code.....
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
1
posted
0
You have the right approach with: public void setcolor(String tp) { color = tp; } public String getcolor() { return color; } BUT you are not observing the Bean naming rule, those methods should be setColor( String x) getColor( ) The variable name part of the method name must start with an upper case letter. Bill