RadioButton and InputText
Hey Guys!
I was wondering...does anybody know
how to set a radioButton to a list of input Texts in a nice way?
I'll try to explian better,i need it for setting four answers to a question.
The Admin user will enter his four answers in four InputTexts
and will press the radioButton to determine which one is correct.
Thanks!
how to set a radioButton to a list of input Texts in a nice way?In a nice way? Can you please clarify the problem? What are you occurring and what do you want to approach?
Similar Messages
-
Data Types for RadioButtons and PushButtons
Is there a data type for representing radioButtons and pushButtons in the Oracle tables? If not, what is the alternative to using these controls?
nullHello,
The data type of your field is smallmoney or you want to convert a int or varchar value to smallmoney?
Hugs!
Bruno Destro
Dicas de programação em .net, C# e SQL - http://smcode.com.br/blog.aspx -
Clear the SelectOneChoice and InputText
Hi,
I am using Jdev10g.
In my search page there are 3 selectOneChoice fields and InputText fields.
Before search button clicking if i select any value from selectOneChoice lovs its clearing by rollback button.
But if once click on search button(ExeWithParms) its not clearing by rollback button.
Is there any way or any seperate button to clear.
Thanks
NRHi,
No its not working.
I need to write any code to this button?. I simply drag and drop on my page. but it working before going to search button same as rollback.
Thanks
NR -
Radiobutton and checkboxes in modulepool
Hi all,
I have drag and dropped 3 radiobuttons and 3 checkboxes in the layout.
My requirement is if i selected the first radio button first checkbox should be checked likewise the rest.
When i tried to execute it is displaying all the radiobuttons checked..im unable to select any radiobutton..how to set the properties in layout so that only one radiobutton can be selected at a time..pls help me out.
regards
swapnaHi,
select all the radiobuttons --> right click --> define --> group.
Take the function group of all radiobuttons as CS and function type as S .
And use code in PAI:-
module user_command_8001.
if rad1 = 'X'
chk1 = 'X'.
chk2 = ' '.
chk3 = ' '.
elseif rad2 = 'X'
chk1 = ' '.
chk2 = 'X'.
chk3 = ' '.
elseif rad3 = 'X'
chk1 = ' '.
chk2 = ' '.
chk3 = 'X'.
endif.
endmodule.
Hope this helps you.
Regards,
Tarun
Edited by: Tarun Gambhir on Feb 27, 2009 11:33 AM -
Radiobuttons and the focus event
This is in AS2.
Is there a 'onFocus' event for individual radio buttons, or is it limited to the radiobutton group ?
If there is a focus event for the buttons, how to I set it up ? I've set up an event listener with an 'onFocus' event, 'gotFocus' event, 'focus' event and nothing is triggered.....
Regards,
RichIf you look thru the help documents, all of the events associated with the radio button class are listed. There is a focusIn event that the radio button inherits from the UIComponent class. Here is an example for using it...
var listenerObject:Object = new Object();
listenerObject.focusIn = function(eventObj:Object) {
trace("radiobutton1 just got focus");
radiobutton1.addEventListener("focusIn", listenerObject); -
Behaviour of radiobutton and mandatory fields in a selection screen
Hello all
In the selection screen in a report , I have one mandatory field F1 and 2 radio button p_val and p_prov. there's no relationship between p_prov, p_val & F1.
I have 2 others fields p_dom and p_seg which are active when I select p_val : they are also mandatory when selecting p_val.
p_prov is the default radiobutton so p_dom and p_seg are inactive when the screen appears
I have 2 problems :
1 - First I select p_val (the message for F1 as mandatory appears -> normal) so p_val appears selected but The 2 fields p_dom and p_seg are not active. I would like them to be active even I have not filled F1.
2- I fill F1then I select p_val, so p_dom and p_seg are active, I fill only p_dom but not p_seg : I select radio button p_prov (the message for p_seg as mandatory appears -> normal) : p_prov appears selected but I don't want it.
Thanks for your help.
below the code of selection screen with event at selection-screen output :
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_val RADIOBUTTON GROUP GR2 USER-COMMAND radio.
SELECTION-SCREEN COMMENT 4(37) text-132.
SELECTION-SCREEN END OF LINE.
PARAMETERS : p_dom TYPE GSBER OBLIGATORY MODIF ID SC1.
PARAMETERS : p_seg TYPE FB_SEGMENT OBLIGATORY MODIF ID SC1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_prov RADIOBUTTON GROUP GR2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(37) text-133.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
IF p_prov = 'X'.
SCREEN-INPUT = '0'.
SCREEN-REQUIRED = '0'.
ENDIF.
IF p_val = 'X'.
SCREEN-INPUT = '1'.
SCREEN-REQUIRED = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.hello Jerome,
Here you go.
2 things to remember:
1. Remove the obligatory addition from all fields.
2. Remove the input required while changing the screen elements.
PARAMETER: f1 TYPE c LENGTH 10.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_val RADIOBUTTON GROUP gr2 USER-COMMAND radio.
SELECTION-SCREEN COMMENT 4(37) text-132.
SELECTION-SCREEN END OF LINE.
PARAMETERS : p_dom TYPE gsber MODIF ID sc1.
PARAMETERS : p_seg TYPE fb_segment MODIF ID sc1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_prov RADIOBUTTON GROUP gr2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(37) text-133.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
IF p_prov = 'X'.
screen-input = '0'.
ENDIF.
IF p_val = 'X'.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
CHECK sy-ucomm <> 'RADIO'.
IF p_val = 'X'.
IF p_dom IS INITIAL OR p_seg IS INITIAL.
MESSAGE 'Fill Mandatory fields' TYPE 'E'.
ENDIF.
ENDIF.
IF f1 IS INITIAL.
MESSAGE 'Fill F1' TYPE 'E'.
ENDIF.
Thanks,
Jinesh. -
How to call a radiobutton from radiobutton and how to add in webdynpro abap
first i have created my first radio buttonkey rgp and nrgp.my requirement is that when i selected RGP radiobutton then then another radiobutton group PO and NON PO is opened..how to do that in webdynpro abap..Please its very urgent ..see the attached photo
DEAR HAWKINS,
how can i solve it..pleasee help me to resolve this
select of first radio buttoon rgp method,
method ONACTIONON_SELECT .
DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.
DATA lo_el_radio_a TYPE REF TO if_wd_context_element.
DATA ls_radio_a TYPE wd_this->Element_radio_a.
DATA lv_radio1 TYPE wd_this->Element_radio_a-radio1.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_visibility TYPE wd_this->Element_context-visibility.
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
* alternative access via index
* lo_el_radio_a = lo_nd_radio_a->get_element( index = 1 ).
* @TODO handle not set lead selection
** IF lo_el_radio_a IS INITIAL.
** ENDIF.
* get single attribute
lo_el_radio_a->get_attribute(
EXPORTING
name = `RADIO1`
IMPORTING
value = lv_radio1 ).
* get element via lead selection
lo_el_context = wd_context->get_element( ).
IF lv_radio1 = 'x'.
lv_visibility = 02.
else.
lv_visibility = 01.
ENDIF.
* @TODO handle not set lead selection
** IF lo_el_context IS INITIAL.
** ENDIF.
* @TODO fill attribute
* lv_visibility = 1.
* set single attribute
lo_el_context->set_attribute(
name = `VISIBILITY`
value = lv_visibility ).
endmethod.
select of second radio button nrgp
method ONACTIONON_SELECT1 .
DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.
DATA lo_el_radio_a TYPE REF TO if_wd_context_element.
DATA ls_radio_a TYPE wd_this->Element_radio_a.
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
ls_radio_A-key_to_select = ' x '.
ls_radio_A-radio1 = ' '.
ls_radio_A-radio2 = ' x '.
* @TODO handle not set lead selection
** IF lo_el_radio_a IS INITIAL.
** ENDIF.
* @TODO fill static attributes
* ls_radio_a = xxx->get_yyy( ).
* set all declared attributes
lo_el_radio_a->set_static_attributes(
static_attributes = ls_radio_a ).
endmethod.
and THE WDDOINIT METHOD
method WDDOINIT .
DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.
DATA lo_el_radio_a TYPE REF TO if_wd_context_element.
DATA ls_radio_a TYPE wd_this->Element_radio_a.
DATA lv_radio1 TYPE wd_this->Element_radio_a-radio1.
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
ls_radio_A-key_to_select = ' x '.
ls_radio_A-radio1 = ' x '.
ls_radio_A-radio2 = ' '.
* @TODO handle not set lead selection
** IF lo_el_radio_a IS INITIAL.
** ENDIF.
* @TODO fill static attributes
* ls_radio_a = xxx->get_yyy( ).
* set all declared attributes
lo_el_radio_a->set_static_attributes(
static_attributes = ls_radio_a ).
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
* alternative access via index
* lo_el_radio_a = lo_nd_radio_a->get_element( index = 1 ).
* @TODO handle not set lead selection
* IF lo_el_radio_a IS INITIAL.
* ENDIF.
* get single attribute
lo_el_radio_a->get_attribute(
EXPORTING
name = `RADIO1`
IMPORTING
value = lv_radio1 ).
endmethod... -
Hello folks,
how are you guys doing? Hopefully good. I have a question that might be a lil simple for some of you. I need to create a radiobutton (selection screen) in which I can select a date range. Can anyone advise on how to handle this is BSP?
Any ideas ? Please kindly provide with some code examples if you have any...
Thanks in advance.
Ol.Hi Ol,
Have a look at the sample BSP application 'SBSPEXT_HTMLB'. Further look at pages <b>RadioButtonGroup.bsp</b> and <b>InputField.bsp</b>. this application will give you a fair idea how tyo achive your goal.
cheers
Amandeep. -
About RadioButton and CheckBox
Can we change the color of the small rectangle which appears in CheckBox and the color of the circle which appears in RadioButton?
Regards,
Ch. S Ranga Reddy.Don't think you can without changing the UI. Check out MetalCheckBoxUI, or MetalRadioButtonUI, or BasiceRadioButtonUI to see how the painting is done.
-
Checkbox-radiobutton and help next to it
Hi All,
I am trying to create a 3 radio buttons under a checkbox. I could create them. Now, I need a printer destination next to 2 of the radio buttons and one file location next to another radio button. Please let me know how i can write this for a report and a dialog program.
Checkbox1 dest: default printer
Checkbox2
radiobutton1 dest: default printer
radiobutton2 dest: file location
radiobutton3 dest: default printer
checkbox3 dest : default printer
the selection screen should be appearing exactly as shown above. it would have 3 fields/text in the same line,
ie: checkbox1, dest: , default printer .
Could anyone please help me ... It is urgent!! Full points will be rewarded for detailed and exact reply.
Thanks so much.SELECTION-SCREEN BEGIN OF LINE.
Checkbox1 dest: default printer
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
Checkbox2
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
radiobutton1 dest: default printer
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
radiobutton2 dest: file location
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
radiobutton3 dest: default printer
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
checkbox3 dest : default printer
SELECTION-SCREEN END OF LINE.
u need to play with the numbers like in the below case with 3(10)
where 3 is the starting column in the selection screen the length of 10 columns. then u can start another one from 3+10 = 13 +1 = 14th column only.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: pa_cs1 AS CHECKBOX.
SELECTION-SCREEN COMMENT 3(10) text-001.
PARAMETER: pa_cs2 AS CHECKBOX.
SELECTION-SCREEN : COMMENT 16(10) text-002.
PARAMETER: pa_cs3 AS CHECKBOX.
SELECTION-SCREEN : COMMENT 29(10) text-003.
PARAMETER: pa_cs4 AS CHECKBOX.
SELECTION-SCREEN : COMMENT 42(10) text-004.
PARAMETER: pa_cs7 AS CHECKBOX.
SELECTION-SCREEN : COMMENT 55(10) text-005.
SELECTION-SCREEN END OF LINE.
PARAMETER: pa_life AS CHECKBOX.
PARAMETER: pa_swo AS CHECKBOX.
SELECTION-SCREEN END OF LINE. -
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 :
<h:panelGrid columns="2" >
<h:selectOneRadio id="radio" layout="pageDirection"
value="#{multiSiteBacking.radioVal}" immediate ="true" valueChangeListener="#{multiSiteBacking.getradioVal}" >
<f:selectItems value="#{multiSiteBacking.dataMap}"/>
<a4j:support event="onchange" reRender="form" focus="radio"/>
</h:selectOneRadio>
<h:panelGrid width="100%" >
<c:forEach var='item' items='#{multiSiteBacking.dataList}'>
<h:inputText id="#{item.id}" value="#{item.value}" size="30" disabled="#{multiSiteBacking.textField}"/>
</c:forEach>
</h:panelGrid>
</h:panelGrid>Here is my backing bean code :
//private property
private boolean textField=true;
//action
public void getVal(ValueChangeEvent valueChangeEvent) throws Exception
this.setChieldInternationalTextField(false);
//Getter & setter
* @return the
public boolean istextField() {
return textField;
* @param
public void settextField(boolean textField) {
this.textField= textField;
}please help.
regards,
SBIs my question is to hard to ANSWER ?
-
Using javascript to make a text box invisible by clicking a radiobutton
hi
my radiobuttons are for a persons title eg Mr Miss Mrs Ms and value 5 is for other.
when i click other i want a text box to appear that a user can write in, and if the user changes their mind after writing in the box i want the text box to disappear
you may of noticed i am new to java. this is the code i have used for my text box
topmostSubform.Page1.titleother::calculate - (JavaScript, client)
if (titlebox.rawValue == 5)
this.presence = "visible";
else
this.presence = "invisible";
this.rawValue;
i have tried variations of this script but it still doesnt work the way it should. i tried searching forums and help files but couild not find an answer to this simple problem... can anyone helpthnaks for your post thomas i appreciate your help on this :)
yes it did put 'other' in my text box.
i managed to overcome the proble using a workaround, it isnt ideal but it works. i put a clickevent in the radiobuttons and changed the text box from calculated to optional -
Links to websites in emails take me to Windows Explorer, not Mozilla. Is this changeable and how?
I think you meant to say, Links always take you into Internet Explorer, not Windows Explorer (that is the file manager, it is not a real browser). This is a Windows setting - Mozilla cannot make Outlook to behave, but Windows can. But first, open your Mozilla browser on any old website, and have Internet Explorer closed. Next, open Add or Remove Programs (it is opened from its item in Windows Control Panel - if the W.C.P. is not in your START-button menu, open the Control Panel via My Computer) and look for the left-side menu bar. Left-click on the icon marked "Set Program Access and Defaults." Left-click the "Custom" radiobutton, and it will show you the list of Defaults that Microsoft has already set for you, or maybe you will need to click on the little double-down arrow at upper right, to see the list. [Microsoft always has it set to Internet Explorer, for the browser.] You want to change that, so, if Mozilla or Firefox be shown here, select its radiobutton; if not shown, select the radiobutton for the "current Web browser." Leave the checkmark in the checkbox for Internet Explorer - you might need to run it in event Mozilla crashes or comes down with a virus - some time in the future. You can also review the other settings there, and fix them the way you want them. Happy browsing!
-
Populating an inputtext after immediate action
I'm having a problem trying to implement this functionality:
I have one page on which I have a data table with (for example) cars. Underneath I have a panel grid with outputtext (labels) and inputtext fields which allow the user enter all the details necessary to add a new car.
But what I'm trying to do is have the data table entries (car names) be links, which when clicked will populate all of the inputtext fields with the values of the car details, and then allow the user to edit the details.
How I've tried to do this, is to value bind the inputtext values to a car object that is in my backing bean class. The car links are set to immediate (so that the empty inputtext fields won't validate), and the method that is called sets the car object which the fields are value bound to, to populate based on the row data of the selected row in the data table (the car).
Debugging shows that the car object IS populated correctly with all the values, but when the page re-renders, all of the inputtext fields are blank, they are not populated with the values of the car object they are bound to.
Does someone know what I'm missing, or how this is supposed to be done?
Thanks.
Edit: I should specify that I'm using JSF 2.0
Edited by: a-rex on Feb 25, 2010 6:25 AMI hope this code will solve your problem
import java.io.*;
import java.util.*;
public class ReadDVDFile
String MName;
String Gener;
String Actor;
ReadDVDFile(String m, String g, String a){
MName = m;
Gener = g;
Actor = a;
public static void main(String[] args){
ArrayList al = new ArrayList();
try{
File dvd = new File("e:\\DVDInfo.txt");
BufferedReader br = new BufferedReader(new FileReader(dvd));
String s;
while((s = br.readLine()) != null){
String[] result = s.split("/");
al.add(new ReadDVDFile(result[0],result[1],result[2]));
} // end of while
catch(Exception e){
System.out.println(e);
Iterator i = al.iterator();
int j = 1;
System.out.println("printing contents of ArrayList");
while(i.hasNext()){
ReadDVDFile rd = (ReadDVDFile) i.next();
System.out.println(j + " " + rd.MName + ";" + rd.Gener + ";" + rd.Actor );
j++;
} -
Want a better solution for radiobutton code
I am using radio buttons the code works but it seems very long winded any ideas how I can cut down the code?
// code snippet
//basicly decare some JRadioButton
//set action command
currentaccount = new JRadioButton("Current Account");
currentaccount.setMnemonic(KeyEvent.VK_C);
currentaccount.setSelected(true);
currentaccount.setActionCommand(currentACString);
panelRadioButtonAC.add(currentaccount);
savingaccount = new JRadioButton("Saving Account");
// Group the radio buttons.
ButtonGroup group = new ButtonGroup();
group.add(currentaccount);
group.add(savingaccount);
// Register a listener for the radio buttons.
RadioListener myListener = new RadioListener();
currentaccount.addActionListener(myListener);
currentaccount.addActionListener(myListener);
//here is the code check which is very long winded
/* I am checking each radiobutton and then determining if it is true, since I have used a button group isn't there a way I can find out which is chosen????
/** Listens to the radio buttons. */
class RadioListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
if ( e.getActionCommand().equals("Current Account") )
{ curAC = true;
savAC = false;
if( e.getActionCommand().equals("Saving Account") )
{ savAC = true;
debAC = false;
Please helpSee my answer in
http://forum.java.sun.com/thread.jsp?forum=54&thread=196354
... and please don't post a question 20 times...
Doug
Maybe you are looking for
-
Hi Experts I am looking for a report which should display the unrestricted stock of a material in a Particular Plant / storage location. They have an existing Z report for the ATP Quantity for a material taking into consideration of all Open Sales Or
-
Choose for Selection option in ALV report
Hi SAP experts, There is a requirement of using the functionality of Settings->Field for selection functionality in our ALV report. Please suggest some way to implement it. I am attaching the screenshot. This functionality i need to use in alv report
-
I'd like to carry my system, applications and files on a portable Thunderbolt ssd drive and boot from it. I have a Mac Pro in the office, iMac at home, a MacBook Air for when I'm on the road, all with TB. Can a single external TB drive boot all thr
-
Best approach to report on ports in use during the month
I have been asked to come up with a report once a month outlining the network devices ports that are in use per cust omer location. I see the report device manager but it doesnt appear to give the simple number of ports in use by the device during th
-
Hi all, I have created custom info type and its working properly, but problem is that,when user first time create record in pa30 all fields shud enable for him, but in a cahnge mode some fields should disable for him. pls help me how can i d