on 06-01-2005 8:01 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.