on 04-24-2007 6:05 AM
hi everyOne!!
I'm going to check table column properties(like inputfield) using <b> invalidContextAttributeException</b> in IWDMessageManager.
Is it possible? If possible, please explain required steps in detail.
Thanks.
regards bk Kim.
Hi
go thru the following link
http://help.sap.com/saphelp_nw04/helpdata/en/c1/b70041a0f2ef23e10000000a155106/frameset.htm
regards
Ambica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BUB,
In general, your code should be like this:
wdComponentAPI
.getMessageManager()
.reportInvalidContextAttributeException(
element, attrInfo, "Hey, type something valid!", false
);
If I understand correctly, the question is what <i>element</i> and <i>attrInfo</i> to use.
First is simple. Table UI control is bound to node via dataSource property, every element in node correspond to row in table. So, if you are reporting error about 15th element then use
wdContext.node<TableNodeName>().getElementAt(15)
or if you are reporting error about currently selected element then use
wdContext.current<TableNodeName>Element();
Attribute info is a bit tricker. You may use different table cell editors for every column. Every cell editor has some "default" property that is bound to data attribute. So IWDInputField has "value", IWDDropDownByKey has "selectedKey". To highlight necessary cell editor (sure, in correct column) you must use attribute that is binding source of this default property.
For example, your column uses IWDInputField as editor, and IWDInputField.value is bound to attribute with name "EmpName". Then attrInfo is
wdContext.node<TableNodeName>().getNodeInfo().getAttribute("EmpName");
So we get the following code snippet as example:
wdComponentAPI
.getMessageManager()
.reportInvalidContextAttributeException(
wdContext.current<TableNodeName>Element(),
wdContext.node<TableNodeName>().getNodeInfo().getAttribute("EmpName"),
"Hey, type something valid!", false
);
Valery Silaev
SaM Solutions
mission complete.
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.