Author: estherbin
Date: 2008-08-04 11:29:34 -0400 (Mon, 04 Aug 2008)
New Revision: 9497
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
Log:
Fix 2582 issue.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2008-08-04
15:28:29 UTC (rev 9496)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2008-08-04
15:29:34 UTC (rev 9497)
@@ -14,32 +14,49 @@
import java.util.Map;
import java.util.Set;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.IEditableTemplate;
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.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Attr;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
/**
- * general class for jsf templates
+ * general class for jsf templates.
*
* @author Sergey Dzmitrovich
- *
*/
-public abstract class AbstractEditableJsfTemplate extends VpeAbstractTemplate {
+public abstract class AbstractEditableJsfTemplate extends VpeAbstractTemplate implements
IEditableTemplate {
- // general jsf attributes
- static private Map<String, String> attributes = new HashMap<String,
String>();
+ /**
+ * Gets the output attribute node.
+ *
+ * @param element the element
+ *
+ * @return the output attribute node
+ */
+ public Attr getOutputAttributeNode(Element element) {
+ return null;
+ }
+ // general jsf attributes
+ /** The attributes. */
+ static private Map<String, String> attributes = new HashMap<String,
String>();
+
static {
attributes.put("style", HTML.ATTR_STYLE); //$NON-NLS-1$
attributes.put("styleClass", HTML.ATTR_CLASS); //$NON-NLS-1$
}
/**
- * copy general
+ * copy general.
*
- * @param visualElement
- * @param sourceElement
+ * @param sourceElement the source element
+ * @param visualElement the visual element
*/
protected void copyGeneralJsfAttributes(nsIDOMElement visualElement,
Element sourceElement) {
@@ -55,12 +72,12 @@
}
/**
- * copy attribute
+ * copy attribute.
*
- * @param visualElement
- * @param sourceElement
- * @param sourceAttributeName
- * @param targetAtttributeName
+ * @param sourceElement the source element
+ * @param targetAtttributeName the target atttribute name
+ * @param sourceAttributeName the source attribute name
+ * @param visualElement the visual element
*/
protected void copyAttribute(nsIDOMElement visualElement,
Element sourceElement, String sourceAttributeName,
@@ -71,5 +88,7 @@
.getAttribute(sourceAttributeName));
}
+
+
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-08-04
15:28:29 UTC (rev 9496)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-08-04
15:29:34 UTC (rev 9497)
@@ -42,7 +42,7 @@
* @param element
* @return
*/
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_VALUE))
return element.getAttributeNode(JSF.ATTR_VALUE);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java 2008-08-04
15:28:29 UTC (rev 9496)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java 2008-08-04
15:29:34 UTC (rev 9497)
@@ -151,7 +151,7 @@
}
@Override
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_ITEM_LABEL))
return element.getAttributeNode(JSF.ATTR_ITEM_LABEL);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java 2008-08-04
15:28:29 UTC (rev 9496)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java 2008-08-04
15:29:34 UTC (rev 9497)
@@ -199,7 +199,7 @@
}
@Override
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_ITEM_LABEL))
return element.getAttributeNode(JSF.ATTR_ITEM_LABEL);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-08-04
15:28:29 UTC (rev 9496)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-08-04
15:29:34 UTC (rev 9497)
@@ -168,7 +168,7 @@
}
@Override
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_ITEM_LABEL))
return element.getAttributeNode(JSF.ATTR_ITEM_LABEL);
Show replies by date