Removing attributes from node

Hi,
Im creating a node and its attributes dynamically and binding it to a table to show a table dynamically. The problem is that when i load a new item, i have to rebuild the node and table because it might have different columns. The node allways has 3 fixed columns (id, name, description) so first i have to remove all of the attributes except the id, name and description. Same for the table columns. Can anyone tell me how to remove attributes from a node or how to differently solve my problem? All i see is how to remove an element but is a data right, not the model?
Much thanks,
Hugo Hendriks

Hi,
I had a similar situation, where 2 table columns were always present, and the name and type of other columns were only available runtime.
I simply deleted all data (invalidate()) and recreated the context from scratch after each model execution that impacts the table structure.
Otherwise, use the API to find the right methods for deleting Nodes and Elements.
https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/index.html
Good luck,
Roelof

Similar Messages

  • Removing Dynamic attributes from node

    Dear Experts,
      I have two nodes node1,node2,i created dynamic attributes for both the nodes.node1 attributes are displaying when the user enter into first screen.node2 table come when the user click action button.i want remove the second node attributes after user click the action.
    I tried with
    wdContext.<node>.getContext().reset();
    But above mthod deletes total dynamic attributes.is there any method to remove the partcular node attributes.
    It's urgent........
    I will provide the points.
    Thanks,
    Santhosh

    Hi,
    This method is suitable to ur requirement
    wdContext.node.invalidate ();
    As you are invalidating the node when you are performing an action .so that after each each time you press the action this invalidate method will be called.
    The data in the node if it is there it will be invalidated..
    Hope it helps you.
    any doubts get back to me.
    Thanks & regards,
    Lokesh.

  • Strange problem with removing element from node

    Hi,
    I have a problem when I removed elements from a node.
    here is the code:
    String text = "123456";
    IANode nodeA= wdContext.nodeA();
    wdContext.nodeB().invalidate();
    IBNode nodeB = wdContext.nodeB();
    for(int i=0; i<nodeA.size(); i++)
    IAElement e = nodeA.getEt_Emp_RespElementAt(i);
    if (e.getID().compareTo(text)!= 0)
         nodeB.removeElement(e);
    else
    wdComponentAPI.getMessageManager().reportSuccess(e.getID() + " was not removed");
    The node A does have a row with field "ID" equals to 123456.
    When running the application, it does write that "123456" was not removed...but it removes it....In fact my table is now empty.
    How is it possible if it didn't perform the remove operation for ID = 123456 ?
    Thanks in advance.

    David,
    Because you are iterating node in wrong direction: see my reply to your post Re: Loop problem (seems that you assigns me 2 points without reading reply, and mark it as solved just because you stop solving it
    So, in example in this thread, you must iterate node B in reverse direction, get element from B and remove it from B if it has some specific ID.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Jdev aborts when removing attribute from entity object

    Hi,
    after synchronizing my data model with my database scheme, jdeveloper 10g gave me the correct message, that there had been 1 attribute left in an entity object, that does no longer exist in the database.
    When removing the attribute from the entity object, jdev 10g aborts (first click: nothing happens, second click: abort).
    regards
    Klaus

    Thanks for bug report. This bug has been logged (3151203) and has been fixed in more recent builds.
    Ray

  • Why do I get an error msg that reads "operation not allowed" whenever I try to Remove Attributes from my timeline?

    On any given project, whenever I select everything in my timeline and try to remove all the attributes, I get an error message that reads "operation not allowed."
    If I select a smaller chuck of files on my timeline and hit remove attributes, it works, but this isn't the case if I select everything in my timeline.
    How do I fix this? Thanks!

    Have you tried trashing your Final Cut Pro preferences? It is usually the first step when FCP begins to act in unexpected ways.
    Download Preference Manager (free) from Digital Rebellion
    http://www.digitalrebellion.com/prefman/
    and use it to trash your preferences - they will be set to default the next time you open FCP.
    If that does not remedy the problem, do you have any still images in your timeline that are not RGB, or are greater than 4000 pixels in the widest dimension?
    Is your source material in an FCP7 edit friendly codec?
    MtD

  • Join Engine: Removing Attributes from Deleted CV Entry

    Platform: Solaris
    Directory: 5.1SP1
    Meta: 5.0SP1
    Issue/Question:
    I have a connector view setup to flow attributes (telephoneNumber, etc.) to entries in the meta view. The connector view joins entries using the uid. If an entry is deleted from the connector view the link to the connector view is removed however the attributes (telephoneNumber, etc.) are not. Is there a way to achieve this?
    Current Config
    Join Rules:
    Rule 1 - uid=%uid%
    Attribute Flow:
    Rule 1 - telephonenumber->telephonenumber, pager->pager, mobile->mobile
    DN Mapping Rules:
    None
    Filters:
    None
    Capabilities:
    -Attributes Flow to Meta View

    Let me explain in a bit more detail. I am using the Universal Text Connector to import phone numbers into my Meta-Directory. The telephone database contains the employees id and telephone number. When the data is bulk loaded it will add the entries to the Connector View. The Join Engine will then link the Connector View entry to the Meta View entry that has already been created by another Connector View. The attributes are added and all is well, so far. When the entry in the external data source is removed, the entry in the Connector View is removed. The Join Engine will notice that the Connector View entry has been removed and will remove all associations to that Connector View, but the attributes that were added as a result of that entry are not removed (The telephone number is still in the Meta View entry).

  • Removing attributes from infoobject 0Equipment

    I am trying to delete some attributes of 0Equipment.  When I try to activate the deletion I get the error message:
    Master data has to be activated before conversion
    Could anyone advise.  Thanks

    Hi Niten,
    If you are just removing the attributes and not deleting the attributes(info-objects) then you are fine. You need not bother about any other master data. Check for cubes/ODS/Multiproviders where the attributes might be used. Use the where used-list for the info-objects.
    Bye
    Dinesh

  • DataWriter - removing attributes from xml tag at the start of document

    Hi,
    I'm using DataWriter for generating a large XML document, however I do not want the attributees of the starting xml tag to appear in the final file.
    Eg: <?xml version="1.0" {color:#ff0000}encoding="UTF-8" standalone="yes"{color}?>I do not want to output the part highlighted in red.
    What could be the possible ways to do it? I prefer if it can be removed in the begining itself instead of parsing the document and removing in the end.
    -TIA, saum
    Edited by: nkrust on Feb 15, 2010 4:29 PM

    try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        Marshaller marshaller = new Marshaller(new OutputStreamWriter(
                                  baos));
                        marshaller.marshal(ResponseContents);
                        // Create an object of type Document from the XML document
                        // created.
                        DocumentBuilderFactory domFactory = DocumentBuilderFactory
                                  .newInstance();
                        domFactory.setNamespaceAware(false);
                        DocumentBuilder builder = domFactory.newDocumentBuilder();
                        responseDoc = builder.parse(new ByteArrayInputStream(
                                  ResponseUtils.formatXMLString(baos.toString())));
                   } catch (IOException e) {
                        e.printStackTrace();
                        System.out.println(e.getMessage());
                   }

  • Remove  Namespace from XML File except Attribute

    Hi  XI  Experts ,
    1.I have referred to the code of xslt Generic XSLT Code to Remove ALL Namespaces from XML:
    http://forums.sdn.sap.com/thread.jspa?threadID=1920630
    But this removes the Attribute : id  from the records .
    My expected output is supposed to be :
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record id="1">
           <fpdm></fpdm>
        </record>
    </data>
    </body
    But after using this XSLT code it removes :id from <record_1 id=> and generated the below code :
    The xml file now doesn't contain teh attribute :id
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record>
          1
          <fpdm></fpdm>          
           </record>
    </data>
    </body>
    Could  you please provide your input
    Plaese note : Here  XI versin iS x1 3.0 SP7 . I have tried suing the Analyzer bean for the Encoing  of Chinese : GBK Intsead of UTF-8 in the Namespace  . But AF_Modules/XMLAnonymizerBean is not comptacible with XI 3.0 SP7
    Hence i have used the following code to remove namespcae and add  Encoding :GBK instead of UTF-8:
    <?xml version="1.0" ?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output encoding="GBK"/>
    <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

    You could use exclude-result-prefixes.
    For example:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wt="http://www.example.com" exclude-result-prefixes="wt">
    </xsl:stylesheet>

  • Issue on deployment: Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''

    Hi,
    I have the following issue when deploying:
    Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''
    The solution is a farm solution (was never sandbox) and it deploys fine.
    It was updated several times with success. We did not see this issue until recently when we had some other issue (unrelated) and looked at the logs. The solution is updated without problem and updates are available for the user. But we can see this error
    in the logs at the update time. 
    Any idea what might cause this?
    Pop Anisia

    Hi,
    This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...
    You can try to redeploy the solution.
    retracted the solution,removed all the previous ref, removed dll from GAC and folder from 14\features and reset the iis, deploying it again.
    Here are some similar issue post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/72ac9a02-3a51-48b8-9e36-3b24a2d4da74/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-alertbdcwsp?forum=sharepointgeneralprevious
    https://social.technet.microsoft.com/Forums/office/en-US/331af288-5ba6-48a7-9e9d-ac4e4bc8f8fa/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-xxxwsp-assembly-?forum=sharepointdevelopmentprevious
    In additional, you can check the ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS) to get the detailed information.
    I hope this helpful.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Removing the dynamic attributes from view context

    Hi,
    I have added an attribute dynamically using the following line of code in wdDoModifyView():
    wdThis.wdGetContext().getContext().getRootNodeInfo ().addAttribute(<attributename>, <datatype>);
    Now I want to remove the dynamically created attribute from the context.
    Pls suggest me in this regard.
    Regards,
    Ramesh.

    Hi Ramesh,
    You can use the following code to remove the attribute dynamically:
    Iterator itr = wdContext.node<NodeName>().getNodeInfo().iterateAttributes();
    <i>// If the node where you are making these attributes is a context node then just do:</i>
    // <b>wdContext.getNodeInfo().iterateAttributes()</b>, <i>for iterator</i>
    while(itr.hasNext()){
         IWDAttributeInfo attrInfo = (IWDAttributeInfo)itr.next();
         attrInfo.remove();
    This will solve your problem.
    Regards
    Pravesh
    PS: Please consider rewarding points if helpful and solved.

  • How to use attributes from different context nodes in one view?

    I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
    However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
    Is this really the only way? Please advise on possible code and insertion point.

    Any suggestions?

  • Removing an attribute from a group by clause

    This concerns a web application developed by JDeveloper 10.1.2 (adf, uix). I have viewobject with a query, written in expert mode, that has a group by clause. I removed an attribute from the select statement that was included in the group by clause and removed it from the bindings of the page that displays the data from the view. When I test the application module the data is grouped correctly. But when I run the view the attribute is not shown on the page but the data is still grouped by the attribute. The same query works fine in SQL plus, it looks like JDeveloper 'remembers' the old group by clause somewhere. I checked the xml file of the view object and it looks ok. Where can the old group by clause be written? How comes it is still applied?

    joni1129 wrote:
    I am trying to place a shape on an image and remove it from the photo, creating just the picture within the shape.  When I follow instructions, I get a lovely shape around my image, but the image isn't removed.  It just sits in a white-checkered background.
    How do I get rid of the white background?
    The white-checkered background is a visual reference for transparency. (It won't print.) To keep the transparency, you need to save in a format that supports transparency, PSD, TIF (with save transparency checked), PNG, or GiF. If you save in a format such as JPG that doesn't support transparency, the transparency is replaced by white.
    Edit: If you are transferring the image into another software application, you may have to save the selection along with the image. Select<Save Selection. You'd have to also check which of the formats that application accepts.

  • How to remove elements/attributes from XML using Xpath in XSLT ??

    Hello ,
    Is there anyway or method of Xpath from which I can delete the elements and attributes from XML at runtime ??
    Like I have such XML and I have to remove per attribute highlighted below
    <person per="and">
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    And want a result like this
    <person>
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    Thanks

    To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
    your assign will look like:
    <bpel:assign>
    <bpelx:remove>
    <target variable="person" query="/person/@per" />
    </bpelx:remove>
    </bpel:assign>
    Regards,
    Melvin

  • Xpath: get attributes from first child node

    Hi,
    I have some problems by getting the attributes from the first child node, if i try to get child elements everything works fine, but whenever i need the elementvalue from a node with attributes i doesn't return anything.
    The xpath expression works fine if i want to get the element value from all childs, but not when i just want from one of them.
    This one works,
    XPathFactory factory1 = XPathFactory.newInstance();
        XPath xpath = factory1.newXPath();
        xpath.setNamespaceContext(new PersonalNamespaceContext());
        XPathExpression expr
         = xpath.compile("//default:DeviceExchange[1]/default:Status/text()");
       // gets the value of the node picked out
        Object result = expr.evaluate(doc, XPathConstants.NODESET);
        NodeList nodes = (NodeList) result;
        for (int i = 0; i < nodes.getLength(); i++) {
          names[i] = nodes.item(i).getNodeValue();
          String a = names;
    // checks if status is exchanged, if it is sets status to 1
    if (a.length() == 9){
    names[i] = "1"; }
    else{  names[i] = "0";}
    System.out.println(names[i]);This doesn'tXPathFactory factory2 = XPathFactory.newInstance();
    XPath xpath2 = factory2.newXPath();
    xpath2.setNamespaceContext(new PersonalNamespaceContext());
    XPathExpression expr2 = xpath2.compile("//default:DeviceExchange[1]/default:Field[@names='MLPKTID']/text()");
    Object result2 = expr2.evaluate(doc, XPathConstants.NODESET);
    NodeList nodes2 = (NodeList) result2;
    for (int i = 0; i < nodes2.getLength(); i++) {
    names2[i] = nodes2.item(i).getNodeValue();
    System.out.println(names2[i]);}Does anyone have any ideas? I will apreciate all help!
    Edited by: fusen on Oct 25, 2007 1:12 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sorry, solved myself. Just � typo that that i couldn't detect.

Maybe you are looking for