Author: yradtsevich
Date: 2008-11-26 14:00:10 -0500 (Wed, 26 Nov 2008)
New Revision: 12085
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextareaTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java
Log:
RESOLVED - issue JBIDE-3242: Need template for textarea.
https://jira.jboss.org/jira/browse/JBIDE-3242
- a template class for <textarea> has been created
(org.jboss.tools.vpe.html.template.HtmlTextareaTemplate)
- method 'copyAttributes' has been moved from class
org.jboss.tools.jsf.vpe.richfaces.ComponentUtil
to class org.jboss.tools.vpe.editor.util.VisualDomUtil
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -35,7 +35,6 @@
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -332,57 +331,6 @@
}
/**
- * Copies all attributes from source node to visual node.
- *
- * @param visualNode *
- * param sourceNode the source node
- * @param sourceNode the source node
- * @param visualElement the visual element
- */
- public static void copyAttributes(Node sourceNode, nsIDOMElement visualElement) {
- NamedNodeMap namedNodeMap = sourceNode.getAttributes();
- for (int i = 0; i < namedNodeMap.getLength(); i++) {
- Node attribute = namedNodeMap.item(i);
- // added by Max Areshkau fix for JBIDE-1568
- try {
-
- visualElement.setAttribute(attribute.getNodeName(),
attribute.getNodeValue());
- } catch (XPCOMException ex) {
- // if error-code not equals error for incorrect name throws
- // exception
- // error code is NS_ERROR_DOM_INVALID_CHARACTER_ERR=0x80530005
- if (ex.errorcode != 2152923141L) {
- throw ex;
- }
- // else we ignore this exception
- }
- }
- }
-
- /**
- * Copies attributes from source node to visual node.
- *
- * @param sourceElement the source element
- * @param attributes - list names of attributes which will copy
- * @param visualNode *
- * param sourceNode * @param visualElement the visual element
- * @param visualElement the visual element
- */
- public static void copyAttributes(Element sourceElement, List<String>
attributes, nsIDOMElement visualElement) {
-
- if (attributes == null)
- return;
-
- for (String attributeName : attributes) {
-
- String attributeValue = sourceElement.getAttribute(attributeName);
- if (attributeValue != null)
- visualElement.setAttribute(attributeName, attributeValue);
- }
-
- }
-
- /**
* Returns true if sourceNode is Facet.
*
* @param sourceNode the source node
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -47,7 +47,7 @@
}
String columnClass = getColumnClass(sourceElement);
- ComponentUtil.copyAttributes(sourceNode, td);
+ VisualDomUtil.copyAttributes(sourceNode, td);
td.setAttribute(HTML.ATTR_CLASS, columnClass);
final VpeCreationData creationData = new VpeCreationData(td);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -21,6 +21,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -40,7 +41,7 @@
initStyleClasses(sourceElement);
nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
- ComponentUtil.copyAttributes(sourceNode, table);
+ VisualDomUtil.copyAttributes(sourceNode, table);
VpeCreationData creationData = new VpeCreationData(table);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -16,6 +16,7 @@
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -36,7 +37,7 @@
nsIDOMElement unorderedList = visualDocument.createElement("ul");
ComponentUtil.setCSSLink(pageContext, CSS_FILE_NAME, "richFacesDataList");
- ComponentUtil.copyAttributes(sourceNode, unorderedList);
+ VisualDomUtil.copyAttributes(sourceNode, unorderedList);
ComponentUtil.correctAttribute(sourceElement, unorderedList,
HtmlComponentUtil.HTML_STYLECLASS_ATTR,
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataOrderedListTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -16,6 +16,7 @@
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -31,7 +32,7 @@
nsIDOMElement orderedList = visualDocument.createElement("ol");
ComponentUtil.setCSSLink(pageContext, CSS_FILE_NAME,
"richFacesDataOrderList");
- ComponentUtil.copyAttributes(sourceNode, orderedList);
+ VisualDomUtil.copyAttributes(sourceNode, orderedList);
ComponentUtil.correctAttribute(sourceElement, orderedList,
HtmlComponentUtil.HTML_STYLECLASS_ATTR,
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -35,7 +35,7 @@
Element sourceElement = (Element)sourceNode;
nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
- ComponentUtil.copyAttributes(sourceNode, table);
+ VisualDomUtil.copyAttributes(sourceNode, table);
VpeCreationData creationData = new VpeCreationData(table);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -15,6 +15,7 @@
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -541,7 +542,7 @@
contentTable.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "1");
- ComponentUtil.copyAttributes(sourceElement, contentTable);
+ VisualDomUtil.copyAttributes(sourceElement, contentTable);
contentTable.removeAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
contentTable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width:
100%;");
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -15,6 +15,7 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -96,7 +97,7 @@
.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"imgStyleClass");
}
- ComponentUtil.copyAttributes(sourceNode, img);
+ VisualDomUtil.copyAttributes(sourceNode, img);
VpeCreationData creationData = new VpeCreationData(img);
return creationData;
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -201,7 +201,7 @@
nsIDOMElement tbody = visualDocument
.createElement(HTML.TAG_TBODY);
mainTable.appendChild(tbody);
- ComponentUtil.copyAttributes(sourceNode, tbody);
+ VisualDomUtil.copyAttributes(sourceNode, tbody);
for (int i = 0; i < NUM_ROW; i++) {
new RichFacesDataTableChildrenEncoder(creationData, visualDocument,
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -24,6 +24,7 @@
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilderException;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionException;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.jboss.tools.vpe.editor.util.VpeClassUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -63,7 +64,7 @@
if (parentVisualNode == null) {
parentVisualNode = curTr;
}
- ComponentUtil.copyAttributes(sourceElement, curTr);
+ VisualDomUtil.copyAttributes(sourceElement, curTr);
boolean header = false;
boolean footer = false;
@@ -104,7 +105,7 @@
curRow++;
curColumn = 0;
curTr = visualDocument.createElement(HTML.TAG_TR);
- ComponentUtil.copyAttributes(sourceElement, curTr);
+ VisualDomUtil.copyAttributes(sourceElement, curTr);
if (header) {
curTr.setAttribute(HTML.ATTR_CLASS, getHeaderContinueClass());
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java 2008-11-26
16:58:22 UTC (rev 12084)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.util;
+import java.util.List;
+
import org.eclipse.swt.graphics.Point;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMEvent;
@@ -20,7 +22,9 @@
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsISelection;
+import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -152,4 +156,55 @@
element.setAttribute(attributeName, attributeValue);
}
+
+ /**
+ * Copies all attributes from source node to visual node.
+ *
+ * @param visualNode *
+ * param sourceNode the source node
+ * @param sourceNode the source node
+ * @param visualElement the visual element
+ */
+ public static void copyAttributes(Node sourceNode, nsIDOMElement visualElement) {
+ NamedNodeMap namedNodeMap = sourceNode.getAttributes();
+ for (int i = 0; i < namedNodeMap.getLength(); i++) {
+ Node attribute = namedNodeMap.item(i);
+ // added by Max Areshkau fix for JBIDE-1568
+ try {
+
+ visualElement.setAttribute(attribute.getNodeName(),
attribute.getNodeValue());
+ } catch (XPCOMException ex) {
+ // if error-code not equals error for incorrect name throws
+ // exception
+ // error code is NS_ERROR_DOM_INVALID_CHARACTER_ERR=0x80530005
+ if (ex.errorcode != 2152923141L) {
+ throw ex;
+ }
+ // else we ignore this exception
+ }
+ }
+ }
+
+ /**
+ * Copies attributes from source node to visual node.
+ *
+ * @param sourceElement the source element
+ * @param attributes - list names of attributes which will copy
+ * @param visualNode *
+ * param sourceNode * @param visualElement the visual element
+ * @param visualElement the visual element
+ */
+ public static void copyAttributes(Element sourceElement, List<String> attributes,
nsIDOMElement visualElement) {
+
+ if (attributes == null)
+ return;
+
+ for (String attributeName : attributes) {
+
+ String attributeValue = sourceElement.getAttribute(attributeName);
+ if (attributeValue != null)
+ visualElement.setAttribute(attributeName, attributeValue);
+ }
+
+ }
}
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextareaTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextareaTemplate.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextareaTemplate.java 2008-11-26
19:00:10 UTC (rev 12085)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.html.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.mapping.NodeData;
+import org.jboss.tools.vpe.editor.mapping.VpeElementData;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author yradtsevich
+ *
+ */
+public class HtmlTextareaTemplate extends VpeAbstractTemplate {
+
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ final nsIDOMElement textarea = visualDocument.createElement(HTML.TAG_TEXTAREA);
+ VisualDomUtil.copyAttributes(sourceNode, textarea);
+
+
+ final NodeList childNodes = sourceNode.getChildNodes();
+ final int childNodesLength = childNodes.getLength();
+ for (int i = 0; i < childNodesLength; i++) {
+ final Node child = childNodes.item(i);
+ if (child.getNodeType() == Node.TEXT_NODE) {
+ final nsIDOMNode text = visualDocument.createTextNode(child.getNodeValue());
+ textarea.appendChild(text);
+ }
+ }
+
+ final VpeCreationData creationData = new VpeCreationData(textarea);
+
+ final VpeElementData textElementsData = new VpeElementData();
+ textElementsData.addNodeData(new NodeData(sourceNode.getLastChild(), textarea));
+ creationData.setElementData(textElementsData);
+
+ return creationData;
+ }
+
+ /**
+ * @see
org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext,
org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument,
org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String,
java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-11-26
16:58:22 UTC (rev 12084)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-11-26
19:00:10 UTC (rev 12085)
@@ -1929,21 +1929,21 @@
</vpe:tag>
<vpe:tag name="textarea" case-sensitive="no">
- <vpe:template children="yes" modify="no">
- <vpe:copy attrs="id,style,class,rows,cols" />
- <vpe:resize>
+ <vpe:template children="no" modify="yes"
+ class="org.jboss.tools.vpe.html.template.HtmlTextareaTemplate">
+ <vpe:resize>
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:dnd>
+ <!-- vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes">
<vpe:container-child tag-name="#text" />
</vpe:drop>
- </vpe:dnd>
+ </vpe:dnd-->
<vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
+ </vpe:textFormatting>
+ </vpe:template>
</vpe:tag>
<vpe:tag name="tfoot" case-sensitive="no">