on 11-13-2008 1:36 PM
hii,
I have a value node 'Ctx_vn_Manager' and corresponding value attribute 'UserID' in both the UICust and view....This node fetches a list of values for managers in f4valuehelp.The code for fetching values in f4 is as follows:
public void populateManagers( )
{
//@@begin populateManagers()
wdThis.wdGetTdc_UICustController().fetchManager();
IPublicTdc_UICust.ICtx_vn_ManagerNode managerNode = wdThis
.wdGetTdc_UICustController()
.wdGetContext()
.nodeCtx_vn_Manager();
IPublicTdc_UICust.ICtx_vn_ManagerElement managerEle = null;
IPrivateTdc_AddProjectView.ICtx_vn_ManagerNode PMNode = wdContext.nodeCtx_vn_Manager();
IPrivateTdc_AddProjectView.ICtx_vn_ManagerElement PMEle = null;
for(int i=0; i<managerNode.size(); i++)
{
managerEle = managerNode.getCtx_vn_ManagerElementAt(i);
PMEle = PMNode.createCtx_vn_ManagerElement();
PMEle.setUserID(managerEle.getUserID());
PMEle.setUserName(managerEle.getUserName());
PMNode.addElement(PMEle);
}
wdThis.wdGetTdc_UICustController().attachManagerF4(wdContext.nodeCtx_vn_Manager().getNodeInfo()
.getAttribute(IPrivateTdc_AddProjectView
.ICtx_vn_ManagerElement
.USER_ID));
//@@end
}
This method is being called at wdInit() of View...There is a 'Add' button in View which adds details of a project before which it checks the validation of UserID field .The code for validation is written in addmethod of View .The code is as follows:
if(wdContext.nodeCtx_vn_Manager().currentCtx_vn_ManagerElement().getUserID()==null)
{
wdComponentAPI.getMessageManager().reportException("Please enter Project Manager",true);
return ;
}
But this code is not working...itz adding the details even if userID field is empty...even the 'return' statement is not working as well....!!!
Please do suggest.
HI,
Could you try changing the condition to
if(wdContext.nodeCtx_vn_Manager().currentCtx_vn_ManagerElement().getUserID()==null || "".equals(wdContext.nodeCtx_vn_Manager().currentCtx_vn_ManagerElement().getUserID()))
{
wdComponentAPI.getMessageManager().reportException("Please enter Project Manager",true);
return ;
}
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try
if(wdContext.nodeCtx_vn_Manager().currentCtx_vn_ManagerElement().getUserID()==null)
{
wdComponentAPI.getMessageManager().reportException("Please enter Project Manager", false);
return ;
}
reportException("Please enter Project Manager", true) will not include next statement (return) call.
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
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.