cancel
Showing results for 
Search instead for 
Did you mean: 

Binding table data with a form

Former Member
0 Kudos

Hi All,

I am working on a requirement where I need to get the customer data (first name, last name) displayed in a table. Once the data is present in the table on select of each row I need to display the customer details below in a form. This form displays existing customer data and also allows to add/update new customer data.

For existing data to show up I have binded the values in the table and form so that when I click on the table row the form data changes accordingly. This works perfect for text fields. But in the form I had a radiobuttonby key UI element which has male / Female options. I binded the attribute value that I am getting from R/3 as the selected key. But still I am not able to show the corresponding Gender value as per the selection.

Can any one please let me know what I am doing wrong or if any tutorial available please forward.

Thanks for your time and Consideration!

Madhavi

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Try this way.

Give values of 'KeyToSelect' property of radio buttons as , Key1, Key2

and bind the 'selectedKey' value to same context attribute, say 'selKey' of either boolean.

Now check use the following code.

if(wdContext.current<RetrievingModelNode>Element().get<attribute>==true)

wdContext.currentContextElement.setSelKey("Key1");

else

wdContext.currentContextElement.setSelKey("Key2");

Regards

LN

Former Member
0 Kudos

Hi All,

Got it working. I had to do this and it is working as expected:

Boolean b1 = new Boolean("true");

Boolean b2 = new Boolean("false");

values.put(b2,"Male");

values.put(b1,"Female");

Thankyou all for your time.

Madhavi

Former Member
0 Kudos

Hi

did u map the same context attribute of Radio button to ur form's gender field?

if not do the same.

Regards

Khushboo

Former Member
0 Kudos

Hi,

I am getting a value of true or False from R/3. Can we use the boolean value to map directly to the Radio button by key?

Thanks,

Madhavi

Former Member
0 Kudos

Hi

yes u can..

Regards

Khushbo

Former Member
0 Kudos

Hi,

according to me one cause is the gender values from r/3 are not matching with your form gender values.

example,

in your form radiobuttonby key is bind with simple type gender (you defined) has like this

value description

M Male

F Female

if from the r/3 you get f and m then problem occurs.So if you get M and F it success.

please verify it once.

Regards,

ramesh

Former Member
0 Kudos

Hi,

Did you add a debug message to your code to see whether you are getting the values for that specific details like Male or Female?

Thanks

Krishna