comparison flys-artifacts/src/main/java/de/intevation/flys/exports/VisibleAttribute.java @ 1987:382e38164200

Fixed wrong usage of DOM operations in Settings Attributes. flys-artifacts/trunk@3421 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 15 Dec 2011 09:43:54 +0000
parents 3632150dbe0b
children 7a7c5cad4fe1
comparison
equal deleted inserted replaced
1986:3632150dbe0b 1987:382e38164200
1 package de.intevation.flys.exports; 1 package de.intevation.flys.exports;
2 2
3 import org.w3c.dom.Attr; 3 import org.w3c.dom.Attr;
4 import org.w3c.dom.Document; 4 import org.w3c.dom.Document;
5 import org.w3c.dom.Element;
5 import org.w3c.dom.Node; 6 import org.w3c.dom.Node;
6 7
7 import de.intevation.artifactdatabase.state.DefaultAttribute; 8 import de.intevation.artifactdatabase.state.DefaultAttribute;
8 9
9 10
30 * @return a new Node that represents this Attribute. 31 * @return a new Node that represents this Attribute.
31 */ 32 */
32 @Override 33 @Override
33 public Node toXML(Node parent) { 34 public Node toXML(Node parent) {
34 Document owner = parent.getOwnerDocument(); 35 Document owner = parent.getOwnerDocument();
35 Node node = super.toXML(parent);
36 36
37 Attr attr = owner.createAttribute("display"); 37 Element ele = (Element) super.toXML(parent);
38 attr.setValue(String.valueOf(visible)); 38 ele.setAttribute("display", String.valueOf(visible));
39 39
40 node.appendChild(attr); 40 return ele;
41
42 return node;
43 } 41 }
44 } 42 }
45 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org