Creating radio buttons in table coloumn.
Please share any documents available on how to
create and implement radio buttons in table coloumns .
And please also share how to read the enabled or diaabled radio buttons
Here is a guide to provide this feature:
The context:
- Persons (Node)
-- Name (Attribute)
-- SelectedKey (Attribute, String)
-- Selection (Node, cardinality: 0..1, selection: 1..1, supplyFuntion selectPerson)
--- KeyToSelect (Attribute, String)
Layout:
- Add table with dataSource propertie: Persons
- Tablerow TextView with propertie text: Persons.Name
- Tablerow RadioButton with propertie keyToSelect: Persons.Selection.KeyToSelect, selectedKey: Persons.SelectedKey, onSelect: SelectPerson
Code:
public void selectPerson(......) {
ISelectionElement el = node.createSelectionElement();
node.addElement(el);
el.setKeyToSelect(parentElement.getName());
public void onActionSelectPerson(.....) {
for (int i=0; i < wdContext.nodePersons().size(); i++) {
if (i != wdContext.nodePersons().getLeadSelection()) {
wdContext.nodePersons().getElementAt(i).setAttributeValue("SelectedKey", null);
Method above is for not getting a multiple select (work-around)
If you have a button in your layout that submits the selection, you can read the selected row with:
String key = wdContext.nodePersons().currentPersonsElement().getSelectedKey();
wdComponentAPI.getMessageManager().reportSuccess(key);
Regards,
Björn
Paresh,
Does this guide solved your problem?
Message was edited by: B. van Prooijen
Similar Messages
-
Create Radio button dynamically in Table column.
HI All
I have used following code to create radio button dynamically. but it's getting dump saying that Could not find attribute STATUS.
Here STATUS is the attribute of the node in View context. But why this dump is coming.
Please correct me if any thing worng.
DATA: lr_radio TYPE REF TO cl_wd_radiobutton.
DATA: lr_containr TYPE REF TO cl_wd_transparent_container.
DATA: lr_data TYPE REF TO cl_wd_flow_data.
IF first_time = abap_true.
lr_containr ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_radio = cl_wd_radiobutton=>new_radiobutton(
view = view
id = 'RADIO'
text = 'Enroll'
bind_selected_key = 'STATUS'
key_to_select = 'STATUS' ).
lr_data = cl_wd_flow_data=>new_flow_data( element = lr_radio ).
lr_radio->set_layout_data( lr_data ).
lr_containr->add_child( lr_radio ).
ENDIF.
Thank you very much
RamHi Rama,
I solved it.check this code.
i think u did mistake in creating radio button you are not passing the
BIND_KEY_TO_SELECT
instead you are passing KEY_TO_SELECT.
data:lr_column2 type ref to cl_wd_table_column,
lr_radio type ref to cl_wd_radiobutton.
lr_column2 = obj_table->get_column(
id = 'TABLE1_PLANETYPE'
* INDEX = INDEX
lr_radio = cl_wd_radiobutton=>new_radiobutton(
* BIND_ENABLED = BIND_ENABLED
BIND_KEY_TO_SELECT = 'STATUS'
* BIND_KEY_VISIBLE = BIND_KEY_VISIBLE
* BIND_READ_ONLY = BIND_READ_ONLY
bind_selected_key = 'STATUS'
* BIND_STATE = BIND_STATE
* BIND_TEXT = BIND_TEXT
* BIND_TEXT_DIRECTION = BIND_TEXT_DIRECTION
* BIND_TOOLTIP = BIND_TOOLTIP
* BIND_VISIBLE = BIND_VISIBLE
* ENABLED = ABAP_TRUE
* EXPLANATION = EXPLANATION
ID = 'RAD1'
* KEY_TO_SELECT = KEY_TO_SELECT
* KEY_VISIBLE = KEY_VISIBLE
* ON_SELECT = ON_SELECT
* READ_ONLY = READ_ONLY
* STATE = E_STATE-NORMAL
TEXT = 'Test'
* TEXT_DIRECTION = E_TEXT_DIRECTION-INHERIT
* TOOLTIP = TOOLTIP
* VIEW = VIEW
* VISIBLE = E_VISIBLE-VISIBLE
lr_column2->set_table_cell_editor( the_table_cell_editor = lr_radio ).
Thanks,
Suman -
How to create radio button between two slection screen
hello all.
could you please guide me how to create radio button between two SELECTION-SCREEN in screen painter.
Thank you,
srinivashi
SEE THIS CODE
REPORT ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
******DATA DECLARATIONS**********
DATA : BEGIN OF IT_PLANT OCCURS 0,
MATNR LIKE MARA-MATNR,
WERKS LIKE MARC-WERKS,
PSTAT LIKE MARC-PSTAT,
EKGRP LIKE MARC-EKGRP,
END OF IT_PLANT.
DATA : BEGIN OF IT_PONO OCCURS 0,
EBELN LIKE EKKO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
LGORT LIKE EKPO-LGORT,
END OF IT_PONO.
TABLES EKKO.
********END OF DATA DECLARATIONS*********
********SELECTION SCREEN DESIGN ***********
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R3 RADIOBUTTON GROUP G2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R3.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R4 RADIOBUTTON GROUP G2.
SELECTION-SCREEN COMMENT 5(20) TEXT-004 FOR FIELD R4.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******END OF SELECTION SCREEN DESIGN****************
<b>rEWARD IF USEFULL</b> -
What is the diffrence between "Key to Select" and "Selected Key" while creating Radio Buttons?
While creating radio buttons there is a confusion regarding two properties "Key to Select" and "Selected Key".Can anybody explain it with example?
Thanks,
VimalHi Vimal,
Please find my explanation as below
Key to Select: This is the unique key for each radio button to identify which one is selected
Selected Key: This holds the "KEY" of selected radio button
Example:
Let us say we have 2 radio buttons : Male & Female
Create a context attribute SELECTED_KEY of type STRING.
Create an action ON_SELECT for radio button select event
Now,
the properties for "MALE" radio button as below
KEY_TO_SELECT = 'M'
SELECTED_KEY = "bind to the context attribute SELECTED_KEY
OnSelect = 'ON_SELECT'.
The properties for 'Female" radio button as below
KEY_TO_SELECT = 'F'
SELECTED_KEY = "bind to the context attribute SELECTED_KEY
OnSelect = 'ON_SELECT'.
If we select radio button 'Male', we get the key as 'M' and for 'Female' radio button 'F'.
check inside the event handler method ONACTIONON_SELECT, you get the 'KEY' of selected radio button.
So, the context attribute 'SELECTED_KEY' gets filled with the key of selected radio button
Hope this helps you in distinguishing the 'KEY TO SELECT' & 'SELECTED KEY' .
Regards,
Rama -
How to create radio button in module pool
Hi All,
Please tell me step by step procedure for creating radio button in module pool.give code for two radiobutton and at a time only one should be selected.
Thanks
NarendraHi naren,
In the layout of screen painter click on radiobutton option in the left icons and create in the layout and give name as Radio1 and again select the radiobutton icon and create another and give the name as radio2 and by dragging the cursor select the 2 radiobuttons and goto menubar->edit->grouping->radiobuttons grouping->define.
Double clcik on the 2 radiobuttons and give FCT code for the coding purpose of the 2 radiobuttons.
Cheers!!
VEnk@ -
Adding Radio buttons to table cell
Hi,
Im a beginner in JAVAFX, i would like to add a radio button to table cell.
Please could anybody help us on this.
Thanks,
DhanrajHi,
Im a beginner in JAVAFX, i would like to add a radio button to table cell.
Please could anybody help us on this.
Thanks,
Dhanraj -
Creating radio buttons in XML Forms Builder
Hi everyone,
I can't seem to find any instructions on how to create Radio Buttons in XML Forms builder, anyone has a link or instruction on how to?
Thanks,
SamerHi Samer,
So taking the example for the slides, you need first to create a new child under DataModel for the DataSchema. You can name it "Gender".
Click on the Radio Button in the Toolbar and drag "Gender" from the left hand site into the Edit Form.
It should have already a first radio button and in the box on the bottum right you should see the reference in the Schema Reference field (/DataShema/DataModel/Gender).
You can now drag a second button from the toolbar and place it behind the first one. Make sure you add the same value in the Schema Reference field.
On the Show form or RenderListItem you need a Control Selector as mentioned on slide 18. You can just use right mouse click -> Add. Go on the new item on the right hand side, and click on "Add Multiple Labels". You can choose now how many radio buttons you have, here 2.
In our example enter in one Label "Condition" = "true" and "Label" = "Male" and in the other "Condition" = "false" and "Label" = "Female".
Finally, make sure that the Control Selector has the Schema Reference also as defined above (/DataShema/DataModel/Gender).
Hope this helps,
Robert -
How to create radio button in reports
Hi Friends,
Can any body please tell how to create radio button in reports.
Thanks,
NagendraHi Nagendra,
But why do u need a single radio button, any specific reason...
try this
REPORT ZCHA1.
PARAMETERS : P_RAD1 RADIOBUTTON GROUP RAD,
P_RAD2 RADIOBUTTON GROUP RAD.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P_RAD2'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
Creating radio button and make it ennable
Hello All ,
Please help me out in creating radio button and make it ennable in web dynpro in java application .
If Possible please send the sample code as well.
Thanks
jyothi.Hi Venkat,
The default value needs to be set manually as John has suggested. To be more precise, if the context node is "RadioButtonValues" and the context attribute is 'RadioBtnVal', then in wdDoInit() method, include the following:
wdContext.currentRadioButtonValuesElement.setRadioBtnVal("Male");
Regards,
Pavithra -
Creating radio buttons and text box in the screen
Hi Guys,
Need help asap. I am writing a report and I have to create text box for user to input GL account numbers for two types of customer. I have to make these fields required and take the data back from the screen and write it in a file. The second thing that I have to do is to make radio buttons for the user to select whether he wants the file written on the application server or the presentation server. and process the report accordingly. Now can somebody please given some code and tell me how I should do this. Both the things have to be done for the same report. Please help.
Thanks,
MinalHi,
TABLES: likp,
lips.
TYPES: Begin of ty_likp,
vbeln like likp-vbeln,
end of ty_likp.
TYPES: Begin of ty_lips,
vbeln like lips-vbeln,
posnr like lips-posnr,
end of ty_lips.
DATA: i_likp TYPE STANDARD TABLE OF ty_likp,
i_lips TYPE STANDARD TABLE OF ty_lips,
w_lips TYPE ty_lips,
w_likp TYPE ty_likp.
SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_delno FOR likp-vbeln,
s_type FOR likp-lfart,
s_ship FOR likp-vstel,
s_date FOR likp-erdat.
SELECTION-SCREEN END OF BLOCK b_0.
SELECT vbeln
FROM likp INTO TABLE i_likp
WHERE vbeln IN s_delno
AND lfart IN s_type
AND vstel IN s_ship
AND erdat IN s_date.
IF sy-subrc <> 0.
MESSAGE i000 WITH text-002.
" No valid deliveries for the selection parameters entered.
STOP.
ENDIF.
IF NOT i_likp[] IS INITIAL.
SELECT vbeln
posnr
FROM lips INTO TABLE i_lips
FOR ALL ENTRIES IN i_likp
WHERE vbeln = i_likp-vbeln.
ENDIF.
format color 1 on intensified on.
WRITE: /01(46) 'Following are the Hanging Deliveries/Invoices:'.
format color off intensified off.
skip.
format color 1 on.
WRITE: SY-ULINE(27).
WRITE: /1 SY-VLINE,
3(12) 'Document No.',
16 SY-VLINE,
17(8) 'Item No.',
27 SY-VLINE.
write:/1 sy-ULINE(27).
format color off.
sort i_lips by vbeln posnr.
LOOP AT i_lips INTO w_lips.
Read table i_likp into w_likp with key
vbeln = w_lips-vbeln
posnn = w_lips-posnr.
if sy-subrc <> 0.
format color 2 on.
WRITE: /1 sy-vline,
3(12) w_lips-vbeln,
16 sy-vline,
17(8) w_lips-posnr,
27 sy-vline.
write:/1 sy-uline(27).
format color off.
clear w_lips.
endif.
ENDLOOP.
Try this one with ur own example.
Thanks & Regards,
Judith. -
Creating Radio buttons in search
Hi,
My requirement is to have a radio group which will have two radio buttons; the user can select one of them.
I created a view Accessor with the fixed values Y and N and attached this under one of my attribute;;
This is displaying it on the search screen but not as a radio group. it displays as a drop down.
Can anyone help me how can I achieve this.
Thanks
AnoopHi Nitish,
I have chosen as Radio Group only. But even it is displaying as drop down.
I checked the blog http://dstas.blogspot.com/2012/03/adf-radio-group-inside-af-tree-table.html as well. This has the example of Tree table; I want to show the search criteria as radio group.
Thanks
Anoop -
Grouping Of radio Buttons in table Control
Hi All,
I have one problem in my table control.I am using some radio buttons in the table control.I want that in one row only one button is selected.I have grouped them.But iam not getting mutual exclusivity row wise.Infact I am getting it column wise i.e i am not able to select more than one button in one column but i can select multiple buttons in one row.
Please suggest.
Thanks In Advance,
SaketHi ,
The above mentioned is the way of creating a radio button in a table control . Can u elaborate on the issue i.e input field disabled. -
How to put a radio button ina table
Hi Frndz..
I want to show a radio button in a table which table contains multiple rows, so with this radio button user can select only one row out of multi rows.
My table like this am getting the data from RFC...
PONum BarCode OptionButton
100032 rnsnsv-e3r radiobutton
100043 sae489-q3 radiobutton
100034 fs88a7-df4 radiobutton
So with the option of radio button user can select only one row..
while using Insert Table cell editor am adding a radio button but am not able go ahead...suggest me if u have any ideas.
Thanks in Advance
Regards
RajeshHi Rajesh,
Try this:
Step1: Right click on RootUIElementContainer and manually insert the Table
Step2: Now right click on Table and Insert the TableCoulmn Group
Step3: In the TableColumnGroup Insert TableColumn
Step4: Now Insert TableCellEditor Radio Button Type.
Step5: Bind the value attributes to the Radio Button property called selectedKey and KeyToSelect and deploy the application
Thanks
Krishna -
Hi,
I need to insert a radio button in a table toolbar. Is this possible in WD ABAP.
Regards
AzadNot available in NW04s SP8.
In the view element heirarchy, right click on the Toolbar inside the table.
Then choose insert element.
The popup has only those elements supported.
Toolbar_toggle_button is the closest option.
but no radio button.
Cheers
Phil. -
Hai Experts,
How to create a simple radio button through UI , how to assign values for the attributes selected key and key to select..explain in detail.
Thanks in advance,
Regards,
R.Jude Silvester.Hi Jude,
Basically you have 3 types of radio button objects:
1. Stand Alone radio button ( RadioButton)
2. Radion button group selected by index(RadioButtonGroupByIndex) - the most usefull one, I think
3. Radio button group selected by key ( RadioButtonGroupByKey) like RadioButtonGroupByIndex but index which is integer key is replaced by more general concept of key.
In order to use it you simply define radio button group(RadioButtonGroupByKey for example) then take context node and bind one of it's attributes to key and another one to value.Then you can use them.
For tutorial on how to use it please see help on:
SAP Web AS for Java Applications\Reference Manual\Standard Library of UI Elements\ RadioButtonGroupByIndex. It has the usage example inside it.
Hope it helps.
Regards.
Rajat
Maybe you are looking for
-
SAPSQL_ARRAY_INSERT_DUPREC Runtime error
I am getting following error what could be the error please suggest me. Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC Exception CX_SY_OPEN_SQL_DB Date and Time 18.08.2010 20:39:30 Short text The ABAP/4 Open SQL array insert
-
Since the demile of Mobile Me my Photos screen saver on Apple TV gives me the options of Neo Geo, Amimals, Flowers, Flickr, Photo Stream and Album Artwork. Can i get my iPhoto albums to reappear somehow?
-
Quality Notifications IDOC??
I am looking for <b>Quality Notifications</b> IDOC?? Thanks in advance. Sanjeet Rai
-
Hi guys. I'am looking for a tiny MTA only to forward my user mails to my real mailbox. Perhaps there is a smarter solution than using a MTA daemon. A script using msmtp/ssmtp or so... Thanks in advance Andreas Last edited by echasslau (2010-08-30 21:
-
Data sending receiving question...
I was wondering if even with push notifications turned off, email checking set to manuel, why my data use is still increasing little by little. Why is this? Every month I pass my limit of 100 mb data traffic in my account without even using it. And i