on 04-19-2007 4:35 PM
Hi,
i have create a node and put in it some attributes, but i don't know how i can add a value to a new attribute.
/** create a node **/
IWDNodeInfo parent = wdContext.getNodeInfo();
resourceNode = parent.addChild("resoureNode",null,true,true,true,false,false,true,null,null,null);
/** create some attributes **/
for (int i = 0; i < node.size(); i++)
resourceNode.addAttribute("FileResource"+i,"com.sap.ide.webdynpro.uielementdefinitions.Resource");
/** add value to a created attribute**/
????
regards,
sharam
Hi ,
wdContext.getChildNode("nodename",0).getElementAt().setAttributeValue("attrname",attr value)
P.S : Dynamic loading of file stream data ought to have a simpler method.. Will get back to u on that
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sharam,
Solved your Issue ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharam,
Try this,
<b>Syntax:</b>
<NodeName>.getCurrentElement().setAttributeValue("AttributeName","Value");
<b>Example:</b>
resourceNode.getCurrentElement().setAttributeValue("FileResource1","sap.txt");
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
as you have created node "resourceNode" and directly added to context, which has attribute "FileResource", to set its value code as follow,
IWDNode node = wdContext.getChildNode("resourceNode",0);//a node name &
//element no of of that nodes element collection
IWDNodeElement nodeElement = node.getCurrentElement();
// to set the attribute value do as follows
nodeElement.setAttributeValue("FileResource",<its value>); //set its value here
you can also take use of this doc for dynamic querie,
hope it helps
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.