on 12-09-2007 7:27 AM
Hello there
Last week I posted a thread regarding implementing Radio buttons in my table and never got a solution.
So this is the problem please try to help, I have a table getting it's data from a backend system, now I add a column with a radio button as a cell editor, and connect the attributes KeyToSelect to and attribute with numbers which presents the row number and the SelectedKey to an attribute which holds the number selected, the thing is I am getting the radio buttons marked and disabled, which is not good
The radio buttons for now don't have to mean a thing except then to make it easier to the customer to pick a line in the table, So please try to help me
Thanks a lot, and happy Hanuka 2007 from Israel
Hi Oren,
Try this:
Say your RFC output is as follows.
Output (node)
---> I_Rfq (node, table from RFC)
-
> Ebeln (a row from the table).
Table:
Your table data source should be: <rfc name>.Output_I_Rfq
Your 'selection mode' should be none.
Radio Button column:
keyToSelect - <rfc name>.Output.I_Rfq_Ebeln
Create a string value in the context (let's call it: selectedRadioButtonKey)
selectedKey - selectedRadioButtonKey (from the context).
Happy Hanuka
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oren,
Try this:
1) Assume your RFC context looks like this:
Z_RFC_Name
--> Output
-
> Table_Name
-
> Table_Row
2) Add a value attribute called 'SelectedKey' to the context
3) Add a table UI element to the view
Table should have two columns:
A) column 1 - TextView
The 'text' propery should be bind to Z_RFC_Name.Output.Table_Name.Table_Row (from the context).
B) column 2 - Radio Button
The 'keyToSelect' property should be bind to Z_RFC_Name.Output.Table_Name.Table_Row (from the context).
The 'selectedKey' property should be bind to SelectedKey (from (2))
4) Add an action 'rowSelected' and bind it to the radio button 'onSelect' event
5) On 'rowSelected' implementation you can get the key selected by writing:
wdContext.currentContextElement().getSelectedKey();
(from (2))
Regards,
Omri
Hey Omri
Yes I know they are not related, but now when you have radio buttons in a table you would assume that they will be the selecting UI, now my question is how would I let the table understand that when selecting a radio I change the lead selection, and set the focus on some field in the table??? I got it working on "onLeadSelect" but when try to do the same in the radios it wont work
Hi Oren,
I still don't understand what's the problem.
Say your context looks like this:
Z_RFC_Name
--> Output
-
> Table_Name
-
> Field1
-
> Field2
-
> Field3
-
> Field4
In the event handler of the <b>radiobutton</b> you can write:
String field1 = wdContext.currentTable_NameElement().getField1();
String field2 = wdContext.currentTable_NameElement().getField2();
Current table element is current row...
Regards,
Omri
Hey Omri
First thanks for the paitiant,
The basic problem was implemanting the radio buttons but your answer was helpfull and I got it.
Now the problem is that when I pick a row it should set focus on one of the input fields, and it works fine in the leadselect or onEnter, but on the radio buttons it wont work, so I figurde I should setLeadSelection on the raw that was selected by the radio how would I do that??/
Hi Oren,
Based on your question ...
You can try these follwoing steps :-
1. Create a Context attribute for key selected ( which u have already done) in the contrioller.
2. In the context property use supply function ...this may solve ur purpose.
thanks
Pankaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My recommendation is to use the table as designed and not simulate the single-selection by radion buttons. Just set the selection cardinality of the data source to 0:1 and use the predefined selection buttons in the first column.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.