File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enable dynamic inputText

 
S Majumder
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi every body ,

I have created 3 radiobuttons and 3 inputText fields in a panel grid , they are divided in two separate columns .All text fields are initially disabled.When user click one radio button (say radio1) the corresponding text field (say inputText1)
will get enabled .Again if radio2 is clicked then inputText2 will become enabled.

My problem is I am not getting the proper ID value of inputText & for that reason am not enable textfield.

Here is my jsf code :



Here is my backing bean code :


please help.

regards,
SB
 
Aioria sun
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, s begri
Since you using <h:selectitems /> tag for the options in radio button, the "dataMap" from your bakcing bean could be a single SelectItem instance or collection of SelectItem instance or an array of SelectItem instance or map whose entries represent SelectItem labels and values. I guess you only want to show the radio button without the label, so you can construct your "dataMap" like this:


the above codes give every option in radio a value, starting from 1.

then you can set up several boolean properties for your textfiled component, doing like


for the your getVal method, add the following codes:



by the way, the method you wrote setChieldInternationalTextField in your bean, i never seen it before, and i can't find it anywhere in JSF package. Could you tell me where it comes from.

Hope this help cheers!!
 
S Majumder
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you dude , I solved the problem
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic