cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying selection from RadioButtonGroupByKey in a Dialog Box

Former Member
0 Kudos

Hello All,

Can someone advise on how do I achieve the above ?

I am experimenting with the RadioButtons and is wondering how do i display the value of my selected radiobutton on a popuup confrmation dialogbox. I have got the dialog box to pop-up whenever I select a radio button however, I am not able to display the value of my selected radiobutton on the dialogbox as well. Anyone ? Thanks.

from

Kwok Wei

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,,

I got ur problem.. You have said ,

value : qualify_key

description : qualified ,I approve.

Enumeration is designed in a way such that for this description which is displayed in the screen the corresponding "value" for that "description " will be passed.

So if u want the description u have given to be displayed use the same stuff in value also..

like ,

value : qualified ,I approve

description : qualified ,I approve.

Hope this is useful.

Regards

Bharathwaj

Former Member
0 Kudos

Hello Bharathwaj ,

Thank you very much !!!!! You have been most helpful.

from

Kwok Wei

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Can you put it in more detail.. Are you storing the descriptions anywhere.If yes.. where are u storing it.??

(And i dint get any screen shots till now )

Regards

Bharathwaj

Message was edited by: Bharathwaj R

Former Member
0 Kudos

Hello Bharathwaj

The description is stored in the "Simple Type Enumeration" but I do not seem to be able to get the description to be displayed.

ps: btw, is your email address the same one that is described in your business card ?

from

Kwok Wei

Former Member
0 Kudos

Hi Kwok Wei,

The simple type bizclasspolicy is mapped to a context attribute say "selectedKey".

Now the selected key property has to be mapped to this attribute.

property : selectedKey - > context attr : selectedKey.

Have u done this.(You have said that u have matched the simpletype to the selectedproperty .. You cant do it directly,.have i misunderstood u ?)

Now the getter method for context attribute shud be available..

Regards

Bharathwaj

Message was edited by: Bharathwaj R

Former Member
0 Kudos

Hello Bharathwaj

I have sent some screen shots to your email (as I am unable to upload pictures in SDN). Your knd asiatnce will be appreciated. I will post back the solution should your suggestion works. Thanks again.

from

Kwok Wei

Former Member
0 Kudos

Hello Bharathwaj

You are correct !! I am not able to map it directly.. I am now able to display the selectedKey value on my dialog box. However, do you have any idea how am I able to to display description instead of the value key of my RadioButton ?

For eg: approve_key (value) = "Approved. Plese go ahead with the purchase." (description). I am currently able to display the value but not the description. There does not seems to be any methid for calling the descrioption.

from

Kwok Wei

from

Kwok Wei

Former Member
0 Kudos

Hi,

First create a attribute in the context of the particular view controller. Its name should be "selectedKey".

There is a property called selectedkey for a radio button. Map this attrinbute to this property.

NOw when we say getSelectedKey this will get the context attribute s value.

Since this value is mapped to the radio button property "selectedkey" the correct radio button value will be available in the attribute.

(When we say getSelectedKey u r accessing the getter method of a value attribute and not a radio button... Hope u got it)

Regards

Bharathwaj

Message was edited by: Bharathwaj R

Former Member
0 Kudos

Hello Bharathwaj

Apologies for asking such a dumb question...I have mis-read you reply

Let me try again : I already have a context attribute defined and that points to a Simple Type called "BizClassPolicy". The selectedKey property is also mapped to same Simple Type "BizClassPolicy". However, I am having some difficulty in displaying the selected items. Any further help will be appreciated.

from

Kwok Wei

Former Member
0 Kudos

First, if your popup window view & originating view are in the same component, then:

1. Create attribute for <b>selectedKey</b> radio button element in component controller.

2. Map this attribute from both view controllers (you have to add Component Controller to view controllers on their "Properties" tab first).

3. You are done -- both views now refer to the same attribute and stay in sync.

Next, as far as you are using *ByKey control it is not so enough to display value using TextView in popup. As one option you may use read-only DropDownByIndex. Or create calculated attribute in popup view controller to get DisplayText from simple value services. And bind TextView to this calculated attribute.

VS

Former Member
0 Kudos

Hi ,,

Get the selected key attribute and set it as the first parameter of the confirmation window.

String disp = wdContext.currentContextelement.getSelectedKey();

IWDConfirmationDialog dialog = wdThis.wdGetEmailController().wdGetAPI().getWindowManager().createConfirmationWindow(disp,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("ok"),"OK");

dialog.open();

Regards

Bharathwaj.

Former Member
0 Kudos

Hello Bharathwaj

Thanks for the reply. I was trying out your solution (since that matches my current solution closely) but got an error on "String disp = wdContext.currentContextelement.<i><b>getSelectedKey()</b></i>;

" NDS is complaining that the method is undefined. Do you have any idea what may be wrong ?

from

Kwok Wei

Former Member
0 Kudos

Hi

I think u need to assign a value Attirbute to the selected Key of Radio Button and call the getter method of the Value Attribute there if i am right