cancel
Showing results for 
Search instead for 
Did you mean: 

Bold Text at Runtime

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This sounds like a strange requirement to me. A bold link to indicate errors?

Armin

Former Member
0 Kudos

Ya, thats strange. Its according to the Usability Engineers. Also, client is developing prototyping in .Net. Web Dynpro has to beat .Net, thats the situation here?

Armin,

Can I use Treeview instead of LinktoAction, I think we can the treeview as bold, at runtime. Thanks.

/Sunita.

Former Member
0 Kudos

Seems like bold LinkToAction is not available in NW 7.0 (it is in NW 7.1), so you might consider some other solution. What about an icon that indicates the errors?

Armin

Former Member
0 Kudos

Armin,

Whats your opinion on using Tree View, can I make it bold?. They also want an icon to notify the error. I am displaying it by visibility property.

Valery has some blogs on text formatting and seems somebody discussed it earlier. Anymore help is appreciated.

Thanks,

Sunita.

Former Member
0 Kudos

Yes, you can have bold tree nodes (design=EMPHASIZED). But I don't see why one should use a tree to replace a single link.

Armin

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Answers (0)