on 07-23-2007 10:09 AM
HI experts..
depends on the if condition i want to transfer the control to respective pages ..
for eg: if uname and pwd matches to admin the control have to move admin view.. or if it matches to emp then move emp view or else error view
and my doubt here is where we need write ie whether it is wdInit() or wdModify()
and how to write..
please explain in clear manner
we write it in wdModify()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raj,
Here is the code I use in an action method that's bound to a button in the app. If the password doesn't match, it issues an error message, clears the password input field and gives it input focus. If the password matches, it fires the plug that leads to the password-protected application function.
// Validate password
String password = wdContext.currentContextElement().getPassword();
if ((password == null) || ( ! password.equals("thePassword"))) {
wdComponentAPI.getMessageManager().reportException (
"Please enter administrator password", true);
// Clear the input field and give it focus.
wdContext.currentContextElement().setPassword (null);
setInputFocus();
}
else {
// Password OK. Got to admin view.
wdThis.wdFirePlugToSystemAdminView();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
best way is to create two out bound plugs and put your " if " condition in the respective action method of the button.
call the necessary plug depending upon the condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
wdDoModify() will be called whenever <b>any</b> action belonging to the view controller is processed.
So, best choice for you will be, to have a button, and in the action for the button, you can have the 'if' condition to navigate to different views.
Regards,
Prabhakar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Most probably on sybmit of button you will have the navigation.
Create two OutBound plugs. Connect one to one view and other to other view.
On Press of button, the action will be called. In the action check the "if" statement and file corressponding plug.
Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.