cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message for a Specific Table Cell

MVar
Explorer
0 Kudos

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;
}

Accepted Solutions (1)

Accepted Solutions (1)

MVar
Explorer
0 Kudos

Valery,

Were do you reward points on this issue.

Mike

Former Member
0 Kudos

Mike,

First select your root question (the very first and thread) and make sure that "Mark as question" check box is selected.

Next select my answer and assign points here.

VS

MVar
Explorer
0 Kudos

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

Former Member
0 Kudos

Mike,

Seems that SDN team roll-out yet another update that disables points-rewarding system for some time.

Check the same functionality tomorrow, hope it will work

VS

Former Member
0 Kudos

Just marked it as question.

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

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

MVar
Explorer
0 Kudos

Valery,

Thanks for you response. I used


IWDAttributeInfo attributeInfo = wdContext.element.getChild("Zstk_Stock_Noms").getAttribute("Rsawaamt");

Mike