on 07-28-2007 11:43 AM
Hi friends
HOw to set mandatory in dropdownbyindex...
IWDMessageManager messageMgr = wdComponentAPI.getMessageManager();
Object attributeValue =
wdContext.currentdetailElement().getAttributeValue(fieldName);
IWDAttributeInfo attributeInfo =
wdContext.nodedetail().getNodeInfo().getAttribute(fieldName);
if (((String) attributeValue).length() == 0) {
messageMgr.reportContextAttributeMessage(
wdContext.currentdetailElement(),
attributeInfo,
IMessageForm.MISSING_INPUT,
new Object[] { fieldLabel },
true);
}
But this code is not triggered drop down index ....
Could you please tel me ..how to do that...
Thanks & regards
Mathi s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mathi,
First time when the page loads,show a blank value in the drop down as default (for blank index = -1). Now when the user changes this value, leadselection will be changed. Display the message(to select an entry from drop down) if the lead selection <0.
To set the value as blank by default: set the selection cardinality to 0:1
Regards
Srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mathi,
First time when the page loads,show a blank value in the drop down as default (for blank index = -1). Now when the user changes this value, leadselection will be changed. Display the message(to select an entry from drop down) if the lead selection <0.
To set the value as blank by default: set the <b>selection cardinality to <i>0:1</i></b>
Regards
Srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean with "mandatory"? Do you mean that a value must be selected before some action may be executed? If yes, just check in the action handler that there is a value selected, i.e. there is a lead selection in the node that provides the dropdown list values:
void onListEntrySelected(...)
{
if ( wdContext.node<Values>().getLeadSelection() != IWDNode.NO_SELECTION)
{
/* process action */
}
else
{
/* show message */
}
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.