Node - Changing an attribute of few elements

Dear Experts,
Greetings.
We have a table which has multiple editable rows...first colum is a check box.... and second column is "Group Name"  If user selects few check boxes and presses " add group name button" a pop up comes and aks for group name...upon giving the group name....and clicking on save...the given group name should appear in all the selected rows.
We tried the following logic...but it didn't work out
For  ( from 0 to nodesize)
If (select == true)
set lead selection to i.
element = getelement at (i);
gname = get the name from comp. controller.
element.setGname(gname).
But it saids the value only for the first row.....regardless of the no of checks......but the loop is perfect...
it enters the IF codition for all the ticked check boxes.
Kindly prvide Ur suggestion
Sathya

Try adding a node->invalidate() to your code.
PS. I think you don't have to change the lead selection in the code.

Similar Messages

  • How to change general attribute of text element

    hi
    who now how to change general attribute of text element on screen dinamically? I wish to change text value dinamically for example.

    Hi Denis,
    I am not too sure on what you want.
    If you require that the text value be different based on some conditions you can declare as many text elements as conditions and call the relevant text element.
    But I dont think that you can assign dynamic texts to a single text element.
    Regards,
    Saurabh

  • Change Background Attribute of Body Element?

    hi,
    i want to change the backgound attribute of body tag i am not able to do it with setCharacterAttributes method but i could do it for other elements which are leaf eg Image,etc,
    SetCharacterAttribute method states that the getStartOffset method will return the offset of the first child if the element happens to be non leaf element ,if so how do i get the offset??
    I have searched the forum on the above issue but didnt get any feasable solution!!
    Thanks in Advance
    Nawaz

    Hello, there are meanings, but not very easy...
    1)
    First, search and get the Element named body.
    get attributes and cast them to javax.swing.text.MutableAttributeSet.
    then you can set theAttribute.add(...) to set the attribute you want
    But :( this method need get a write lock of HTMLDocument.
    But :(( writeLock() and writeUnlock() method are protected. Then you must override them to set them public
    and use
    try {
       doc.writeLock()
       attr.add(---);
    finally
       doc.writeUnlock()
    }Before do this check if the backgound attribute works on JTextPane by opening a such document...
    2) get the HTML code, modify it and replace it

  • Can we change the property of each element of an array using property node or by other methods?

    Hello all,
    Can we change the property of the elements of an array. For example:
    I have an array of combo-boxes. Can i have such a scenario that different combo-boxes of the array will have different items to select an item.
    I am able to set the different "values" in different combo-boxes bu using "to be more specific class" property node.
    But i could not set the different item list in different combo-boxes.
    Please give me the solution.

    Thanks a million dave!!!!!
    I have learnt a very new and innovative thing...
    I just wanna ask you one more question in the above context.
    Can i have listbox or combo-box in a table just like in an excel sheet where we can have listbox by using "data validation" property for different cells having different list.Can i have this in labview. Because for this i have to super-impose the combo-boxes on the table and treat them separately.
    We have to take those combo-box values and put in table and then store it.I have attached one VI to show the scenario.
    And this is the alternative solution of the array problem which u have already given. So please suggest me between the two or any alternative solution.
    Thanks,
    Ankit Madaan
    Attachments:
    Recording _Table.vi ‏19 KB

  • File name from an attribute of an element of the payload

    Dear Experts,
    Could you suggest the syntax for specifying the file name from a variable in the file receiver communication channel? I need to grab the file name from an ATTRIBUTE of an element of the payload.
    Thanks a lot.
    Example: Need to pass the attribute "descReceipt" of the element "promotionEvent" to the variable in the following payload:
    <?xml version="1.0" encoding="UTF-8"?>
    <promotionExport>
    <promotionEvent eventIdentifier="30" status="A" descReceipt="FILE1">

    The scenario is IDOC to FILE. I need to get the value of the receiving partner.
    The message header has the node "DynamicConfiguration". Please see the xml below. I need to grab the key RCVPRN (0000002104) from this and pass as the file name in the receiver file adapter.
    How do I setup my receiver file adapter for this? I tried changing the values for the variable, and also enabling the adapter specific message attributes. No solution yet.
    <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPOR">LXDCLNT250</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRT">LS</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRN">0000002104</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPOR">SAPLCD</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRN">LCDCLNT220</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="CIMTYP" />
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="IDOCTYP">WPDBBY01</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="MESTYP">WPDBBY</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRT">KU</SAP:Record>
      </SAP:DynamicConfiguration>

  • How to change the attributes of an XML file

    hi peeps 'ope you can help me here i need to change the attributes of an xml file, i parse it first using a DOM parser but i cant find a way to change the attributes in the XML file, setAttribute() works only at runtime and doesn't change the attribute in the file itself. I can't find a method that will answer my question. I've searched through the forum and found similar threads....they say in order to write and change the attribute i must use the write() method of the XmlDocument class defined in com.sun.xml.tree.XmlDocument. But, i found another thread, and it says that com.sun.xml.tree.XmlDocument is not safe to use and i should use org.apache.crimson.tree.XmlDocument.....i can't find the XmlDocument class and the API for this package so i really dont know where to start...hope you guys can help me! thnx

    thanks for responding roland....i already found the solution...i didn't use the XmlDocument class because i can't find any documents about it except for JAXP 1.0 here is my code snippet...i used the TransformerFactory and Transformer class to write
    import org.w3c.dom.*;
    import org.w3c.dom.traversal.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    Document doc = null;
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    dbf.setValidating(false);
    doc = db.parse(fileGetFile); //this is the XML file
    n1 = (Node)doc.getDocumentElement();
    e1 = (Element) n1;
    NodeList nodeList = doc.getElementsByTagName ("File");
    //just insert whatever you want to do with the XML...parse it..set/change the attribute..etc....sample snippet below changes the attribute downloaded to "no"
    for(int iWriteFailed = 0; iWriteFailed <nodeList.getLength() ; iWriteFailed ++){     
    n2 = nodeList.item(iWriteFailed);
    e2 = (Element) n2;          
    e2.setAttribute("downloaded", "no");}
    try{
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.transform(new DOMSource(doc), new StreamResult ( new FileOutputStream ( fileGetFile) ) );}
    catch(Exception trans){}
    thanks for responding and keeping the information interchange alive here in the forum...
    Pau

  • Flex 3 - How to change an attribute name ?

    like this
    <item code="1" />
    to
    <item id="1" />
    thanks

    Hi Alex,
    You can use setName to change the attribute name:
    Here for example change all your id attributes with code:
    var xmlTest:XML=<r><item id="1"/></r>;
    for each (var node:XML in xmlTest.item.descendants("@id"))
    node.setName("code");
    trace(xmlTest);
    Thanks,
    Bhasker

  • How to insert multiple attributes to root elements

    Hi,
    I have to costruct a request to a service in which all the multipul ements shold be populated as attributes.
    The elements should be retrived from response from an intermediate service callout.
    Is there any function to do that..

    Try this. Be careful that your element does not go deeper than 1 desendant or else you will get concatenating data.
    for $mydoc in $root
    return element { node-name($mydoc) } (: element constructor notation :)
    { $mydoc/@*, (:add existing attributes :)
         for $el in $mydoc/* (: element constructor sub-nodes :)
    return attribute {local-name($el)}{data($el)}
    I used http://www.xqueryfunctions.com/xq/functx_add-attributes.html as a guide.

  • Change the attribute "src" to "href" before importing an XML

    I need to change the attribute "src" to "href" (<img scr="....">) before importing an XML document. I think you could do with XSLT, so you can add a script to import XML documents. But I do not know much about XSLT ...
    Does anyone could give me an idea?
    Thanks in advance...!!!

    Piece of cake. Here is an identity transform, except that it filters out "src" attributes:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" >
    <xsl:template match="node()|@*">
      <xsl:copy>
        <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    <xsl:template match="@src">
      <xsl:attribute name="href">
          <xsl:value-of select="."/>
       </xsl:attribute>
    </xsl:template>
    </xsl:stylesheet>
    See http://stackoverflow.com/questions/2679443/how-do-i-rename-an-attribute-using-xslt

  • Query column value as attribute for an element

    I want to select out a column to be an attribute for an element in my XML file. I know that if I use "@column_name" I will get an attribute but it will be for the row's element. In this case I don't want. In my example below I want a column called DATE_TYPE to be the attribute for the column DATE that is an element. How would I do this? If I select out @DATE_TYPE I get it as an attribute of the <element1> node.
    <element1>
    <element2>VALUE</element2>
    <date>2003-09-02</date>
    </element1>

    As Darrin said, it just matters which element is considered the "active" element.  So in your second example, you actually wrote to it a 3 and then a 1 (classic race condition).  You can set the active element with a property of the array (having trouble finding it at the moment).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Change the description of standard element

    Hi,
       I need to change the description of (VBAP-MVGR1 'Material Group 1') field, which system is using in Transaction Code VA01,VA02 & VA03  (Additional data as per item level).  Pls suggest me how to change it's description. Clients wants to add his own description here.
      Should i change the description of data element directly with access key?
      pls suggest.
    Thanks in advance.
    Pradeep

    Hi,
    gothrough this, it will help you..
    Creating Your Own Keywords and Short Texts
    You can use the enhancement concept to create your own keywords for data elements stored in the ABAP Dictionary. The system uses keywords on screens to identify entry fields. Data elements can have up to three keywords of varying lengths.
    The data element BBBNR, for example, identifies the first part of a customer’s international company number. The standard keywords for this data element in the ABAP Dictionary are:
    Company no. 1
    Comp. no.1
    Company number 1
    You might want to change these keywords to reflect your company’s own terminology. Instead of ‘Company number 1,’ you might want to identify the field as ‘Corporate ID.’ If you change the keywords using the enhancement concept, your new texts will appear in all SAP screens where any field directly refers to the data element your altered. If SAP deliberately modifies a keyword on a standard screen, direct reference to the original data element is dissolved. Any changes you make to a keyword with the enhancement concept will not appear in standard screens that do not retain a direct reference to the modifed data element.
    You can identify such screen-specific modifications by looking in the Screen Painter. Display the field’s screen attributes and examine the field Modific. If an ‘x’ appears, the SAP developer modified the data element’s key word. Your own keyword will not appear.
    The enhancement concept also allows you to alter a data element’s short description (short text). This brief text appears whenever a user calls up online help for that field with F1 . To create your own keyword and short text documentation, proceed as follows:
    Enter the Project management transaction by choosing Utilities ® Enhancements ® Project management from the ABAP Workbench menu
    Choose Text enhancements ® Key words ® Change.
    The system displays a dialog box.
    Enter the name of data element.
    If you want to see a list of all the screens where this data element appears, choose Ref. to screen before proceeding to the next step. The reference list shows you how many standard R/3 screens your new documentation will affect.
    Choose Change from the application toolbar.
    Edit the data element’s keywords and short text.
    Save your changes.
    If you want to list all the data elements in your system that you have created customer-specific key words for, return to the main screen of the Project management transaction and choose Text enhancements ® Key words ® Display. The system displays all altered data elements and shows which changes were made.
    Restoring SAP and Customer Versions
    At some point you may want to restore all standard SAP keywords and short texts for data elements that you may have altered. You can restore the standard texts from the main screen of the Project management transaction. Choose Text enhancements ® Key words ® Restore SAP version. Specify the SAP release from which the texts are to be restored.
    The restoration function is carried out by a special program that runs in the background. This program goes through all data elements in your SAP System and restores the standard texts where required.
    Creating Your Own Online Documentation
    The enhancement concept allows you to create your own online documentation for all data elements in the ABAP Dictionary. The system displays this documentation whenever a user chooses F1 to get more information about a screen field.
    The standard documentation for the R/3 data element BBBNR reads: ‘Here, you enter the first 7 digits of the international location number’. You can enhance this documentation with additional information that your users may need. To write your own field documentation, proceed as follows:
    Call the Project management transaction by choosing Utilities ® Enhancements ® Project management from the ABAP Workbench menu.
    Choose Text enhancements ® Data elements ® New DE cust. docu.
    The system displays a dialog box.
    Specify the data element’s name.
    If you want to see a list of all the screens where this data element appears, choose Ref. to screen before proceeding to the next step. The reference list shows you how many standard R/3 screens your new documentation will affect.
    Choose Change from the application toolbar.
    On the next screen, ensure that the checkbox labelled Make available SAP documentation in the form of an INCL is activated.
    Choose Create.
    Write your own documentation.
    Save your changes.
    -suresh

  • Changing HTML attributes

    Hi,
    My application can display HTML pages in a JTextPane. It can highlight parts of the text to make them stand out. But this is a problem when the HTML document has the same color that is used for highlighting the text. It makes the text look invisible!
    So I would like to be able to change the background color to white, no matter what is in the original HTML document. (Later, I will also be wanting to change the font color to black, and maybe remove/change some other attributes, but one thing at a time!)
    A StyledDocument is created with this code: EditorKit ek = new HTMLEditorKit();
    StyledDocument myDoc = (StyledDocument)ek.createDefaultDocument(); The HTML from the file is then read into myDoc with the "Read" method of the EditorKit. This StyledDocument will be used in another class which displays it on the JTextPane. But I want to change it BEFORE it goes on the JTextPane.
    Because the JTextPane accesses myDoc, I made a temporary StyledDocument called tempDoc to read the HTML into, then **hopefully** make my changes to, so that the very last line can be myDoc = tempDoc to make sure that myDoc only gets the very final changes.
    I use a Javax.Swing.Text.ElementIterator over the StyledDocument to get all of the elements and see if it's the body element using the Element.getName() method. This part works, because I have lots of println's in to see what is happening.
    I then use a SimpleAttributeSet and construct it using (bodyElement.getAttributes()). Then I tell it this: SimpleAttributeSet sas = new SimpleAttributeSet(bodyElement.getAttributes());
    sas.removeAttribute(sas.getAttribute(HTML.Attribute.BGCOLOR));
    sas.addAttribute(HTML.Attribute.BGCOLOR, "white");
    tempDoc.setCharacterAttributes(0, tempDoc.getLength(), sas, true); For the last line in particular, I feel like I've tried everytthing! Many different combinations.
    What I notice happening is that often the HTML document in the JTextPane displays the original document. Or else, all of the Elements, including content, are replaced with the <body bgcolor=white"> tag. (I make the EditorKit write out the resulting HTML file to see what's going on!). In the JTextPane, the original bgcolor remains, even if the content disappears. In the Browser, the bgcolor is the right color (with the content still missing.)
    Please do not tell me to edit the HTML files themselves as they are the client's, and it's a nicer solution for the program to handle them rather than tell the people to manually edit all of the files. Plus, the files are machine-generated, so there might not be anyone who even knows HTML!
    I have also tried using StyleConstants to change the colors, but this only changes the colors right behind the text. So the bgcolor is still displayed, but it looks like someone has run a white highlighter over the text. Quite ugly!
    I hope I have explained this well. The code is quite complicated (and messed up right now because I have been playing with it all day) so I haven't posted it. If you have any questions to clarify it, please ask!
    Thanks in advance to anyone who takes a look and attempts to help. (There are Dukes cuz everyone seems to like them, even though I don't really know what they do. A ranking system?)

    Ok, I deleted all of my changes and started again. This time, I set the Paragraph attributes instead of Character Attributes (I read the API properly and it said that set Character Attributes changes all of the content element attributes). That would explain why all of the text disappeared, lol! It doesn't explain why the original document was still being displayed in the JTextPane, but when I set Paragraph attributes, the document with the correct color background appears.
    There are still a couple of funny things happening. Cuz I'm lazy I'll post the resulting and original HTML files here:
    ORIGINAL:
    <html>
    <head>
    <title>A Test Document</title>
    </head>
    <body bgcolor=red>
    A red document
    <p>
    New paragraph
    </body>
    </html>
    RESULTING:
    <html>
    <head>
    <body bgcolor="white">
    <title>A Test Document </title>
    </body>
    </head>
    <body bgcolor="red">
    <body bgcolor="white">
    A red document
    </body>
    <body bgcolor="white">
    New paragraph
    </body>
    </body>
    </html>
    It would be nice if only the <body bgcolor=red> tag would be replaced with <body bgcolor="white"> instead of getting inserted everywhere (even in the HEAD tag). I tried setting the Paragraph attributes to bodyElement.getStartOffset and getEndOffset() but it didn't work either.

  • Can I change colors of the UI Elements related to WebDynPro Java

    Can I Change the colors of the UI Elements which are embedded in the view, for ex., Button, Label, Tray, etc... and Can I change other attributes like font style, size, etc...

    hi,
    just check out these links , may not be precise to your question but are useful
    Changing the colours of Table and Group Headers in Web Dynpro
    How to change color of label in web dynpro?
    /people/sap.user72/blog/2006/04/25/colourful-table-in-web-dynpro
    Regarding Design of background color in a Web Dynpro Table
    Colors in WD - Java
    displaying color for a particular column item in a table
    hope it helps
    regards

  • Parsing XML Node with href attribute

    Hi,
    I have the following XML that has to be parsed using JSP DOM. All fine except for one. The only problem that i have is when to parsing the Node with href attribute.
    I am using the following method, and it returned with weird result
    currNode.getAttributes() ====> the result is com.sun.org.apache.xerces.internal.dom.AttributeMap@111ae04
    currNode.getNodeValue() ====> the result is null
    currNode.TextNode ===> it returned *2*
    Can anyone please let me know what did I miss here? What should I do to parse the href attribute into the jsp page?
    The below is the xml.
    <MovieList>
    <Movie href="DarkKnight.xml">
       <head>
             <Title>Batman Dark Knight</Title>
             <Genres>
                   <Genre>Action</Genre>
                   <Genre>Sci-Fi</Genre>
             </Genres>
             <Description>Movie Details here</Description>
       </head>
    </Movie>
    </MovieList>Thanks

    I am not sure what "JSP DOM" is exactly. In the W3C DOM supported since SUN Java 1.4 if you have an element node and want to access an attribute value you can simply use String href = movieElement.getAttribute("href"); You might need to cast your Node to Element first e.g.Element movieElement = (Element)currNode;

  • How can i change my email address on elements 10.

    Hi
    I am trying to change my email address on Elements 10 so when i send an email it will be the one i want.
                                                                                                                                 Thanks
                                                                                                                                               Rich

    Thank you very much have a great day.
                                                                           Rich.

Maybe you are looking for

  • In the latest version of iMovie how do you change the duration of the clips

    In the latest version of iMovie how do you change the duration of each clip?

  • Advice required on SAP FI/CO

    Dear All, I have done my MBA in Finance with bachelors in Accounting. I was working in Project Finance for 2.5 years in various sectors. Currently working as a Consulant-Financial Management for e-governance projects. I want to pursue SAP FI/CO. Kind

  • Fact and Dimention

    Dear All , Can any one help me  what is this '#'  symbol represenatation for the table in the OBIEE admin tool .How the OBIEE admin tool will understand the table as fact and Dimenstion tables in RPD . Please share the above detiails Thanks

  • Passport screen freezes after a long call

    Hello, I've got my PassPort since fall october. Although I am quite happy with it, I have noticed that after a long call, say 15min or more, the screen becomes slowly responsive. It doesn't fully freeze, though it is very slow to bring back the unloc

  • Deleting Emails when there status is Draft

    Hi, I have a requirement where, I have 3 users User1,User2 and User3 - everyone has delete permissions. Now when Only user2 deletes the Email which is in draft status, need to delete that record, apart from User2 if any user tries to delete the recor