on 04-22-2006 12:21 PM
Hi Friends,
I developed one application using Radio Buttons. I strucked up at Event Handling. Actually i created one out bound plug and navigated it to two inbound plugs of two diffrent views.
If i click on one radio button it should navigate it to first view orelse if click on second radio button it should to second view.
how can i trigger the particular view based on the radio button i have clicked.
could you people concern this one and give me a bright answer.
If you use single radio buttons (not RadioButtonGroup):
There is an event RadioButton.onSelect which is triggered when a radio button is selected.
This event has a parameter "key" which contains the key representing the selected radio button.
Assign an action to event "onSelect" and define an action parameter "selectedKey".
Map event parameter "key" to action parameter "selectedKey" e.g. by writing the following code inside wdDoModifyView():
if (firstTime)
{
IWDRadioButton radio = (IWDRadioButton) view.getElement("ID-of-radio-button");
radio.mappingOfOnSelect().addSourceMapping("key", "selectedKey");
}
The effect is that at runtime, parameter "selectedKey" will contain the key of the selected radio button. In the action handler method you can now use the "selectedKey" parameter to decide which view should be navigated to.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you must make two out bound plugs, one for each in bound.
in Event put
if(<condition>)
{
wdThis.wdFire<nameOfFirstPlug>();
}
else
{
wdThis.wdFire<nameOfSecondPlug>();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.