on 02-18-2006 1:35 PM
Hello All,
I created a table were one column is defined as an input field. This field needs to be validated against certain rules. When validation fails, I want to highlight just the cells that are in error. The way I have it coded now, when validation fails, all the cells under that column show as if there is an error in all the cells even though only one cell is in error.
Below is the way I have it coded. This method is performed in a loop, so the element has the index number.
Thanks in advance for all your help.
Mike
public int getZstk_Stock_NomsSoawaamt(IPrivateStockNominationsCust.IZstk_Stock_NomsElement element)
{
int soawa = 0;
if(element.getRsawaamt() > 0)
{ {
if(( element.getRsawaamt() >= element.getRsminamt() ) && ( element.getRsawaamt() <= element.getRsmaxamt() ))
{
soawa = element.getRsawaamt() * element.getRsmaxamt() / 2;
}else{
IWDMessageManager messageMgr = wdThis.wdGetAPI().getComponent().getMessageManager();
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getChild("Zstk_Stock_Noms").getAttribute("Rsawaamt");
messageMgr.reportContextAttributeMessage(
wdContext.currentZstk_Stock_NomsElement(),
attributeInfo,
IMessageStockNominationsComp.NOT_BETWEEN_MIN_MAX,
new Object[] { null },
true);
}
}
return soawa;
}
Valery,
Were do you reward points on this issue.
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Valery,
I do not see the checkbox that says "Mark as question".
The only thing I see different on the main thread and the responses is the radio button solved on my own.
I can send you a screen shot of what I see if you wish.
Regarding the solution you suggested. It works fine. The problem now I am getting is that if I click on a blank cell, the messages below the table are displayed multiple times, but still referring to the one cell that is in error.
Any ideas?
Thanks,
mike
Mike,
In your code there is a statement "wdContext.currentZstk_Stock_NomsElement()," for report target. It seems that this element is always the same. (you do not move lead selection outside function call).
So use something like wdContext.node_Stock_Noms().getZstk_Stock_NomsElement(idx) -- where idx parameter passed to function or calculated somehow.
VS
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 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.