on 07-03-2007 5:11 PM
Hello,
I have a LinktoAction UI element, which navigates to Group UI element. Now, if there are any errors in the Group, I have to make this LinktoActionUI Element bold at runtime.
can you help how to achieve this?.
Thanks,
Sunita.
This sounds like a strange requirement to me. A bold link to indicate errors?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Armin,
Actually its not just one Link-to-Action, there are 4 navigation links I need to provide. But with tree, can I hide and show the image(when there is a error) accordingly?. I think if there is an error, I will provide data source otherwise nothing. Can I do like that?.
Also, I have looked into the tree view several times, I dont understand it and got errors. If you dont mind, Can I ask for a sample code for 4 static tree items?.
Thanks,
Sunita.
Create a context node "Actions" with attributes "Name", "DisplayName", "Icon" (string) and "Design" (TreeNodeDesign).
Add a Tree to the view, add a TreeItemType under the tree.
Binding:
Tree.dataSource = "Actions"
TreeItemType.dataSource = "Actions"
TreeItemType.text = "Actions.DisplayName"
TreeItemType.iconSource = "Actions.Icon"
TreeItemType.design = "Actions.Design"
Fill the node with 4 elements containing the action name, display text and design.
Assign an action "NodeSelected" to the "onAction" event of the TreeItemType, map event parameter "nodeElement" to an action parameter "treeNode" of type IActionsElement.
Action handler:
void onNodeSelected(..., IActionsElement treeNode)
{
if ( "Action1".equals(treeNode.getName()) )
{
/* tree node for "Action1" selected */
...
}
}
To make the tree node for "Action1" bold, use code like
wdContext.nodeActions().getActionsElementAt(0).setDesign(WDTreeNodeDesign.EMPHASIZED);
To set an icon:
wdContext.nodeActions().getActionsElementAt(0).setIcon("~sapicons/<icon_name>.gif");
This should give you the idea.
Armin
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.