[jbosstools-commits] JBoss Tools SVN: r6398 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf: META-INF and 9 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Feb 18 11:23:42 EST 2008


Author: svasilyev
Date: 2008-02-18 11:23:42 -0500 (Mon, 18 Feb 2008)
New Revision: 6398

Added:
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.classpath
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.project
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/about.html
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/build.properties
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.properties
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/
   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/JsfSelectManyListbox.java
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/
   trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1687

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.classpath
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.classpath	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.classpath	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.project
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.project	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/.project	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.jboss.tools.jsf.vpe.jsf</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: JSF support for JBoss Visual Page Editor Plug-in
+Bundle-SymbolicName: org.jboss.tools.jsf.vpe.jsf;singleton:=true
+Bundle-Version: 2.1.0
+Bundle-Activator: org.jboss.tools.jsf.vpe.jsf.JsfTemplatePlugin
+Bundle-Vendor: Red Hat, Inc.
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.jboss.tools.common,
+ org.jboss.tools.vpe,
+ org.mozilla.xpcom,
+ org.jboss.tools.jst.jsp,
+ org.eclipse.wst.sse.core
+Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.jsf.vpe.jsf.template

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/about.html
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/about.html	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/about.html	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>&copy;2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in 
+("Content"). Unless otherwise indicated below, the Content is provided to you 
+under the terms and conditions of the Eclipse Public License Version 1.0 
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. 
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the 
+Content is being redistributed by another party ("Redistributor") and different 
+terms and conditions may apply to your use of any object code in the Content. 
+Check the Redistributor's license that was provided with the Content. If no such 
+license exists, contact the Redistributor. Unless otherwise indicated below, the 
+terms and conditions of the EPL still apply to any source code in the Content 
+and such source code may be obtained at
+  <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/build.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/build.properties	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/build.properties	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               templates/

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.properties
===================================================================

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/plugin.xml	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<plugin>
+   <extension
+         point="org.jboss.tools.vpe.templates">
+      <templates
+            name="JSF Reference Implementation"
+            path="templates/vpe-templates-jsf.xml"/>
+   </extension>
+</plugin>

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/JsfTemplatePlugin.java	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,50 @@
+package org.jboss.tools.jsf.vpe.jsf;
+
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class JsfTemplatePlugin extends BaseUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.jboss.tools.jsf.vpe.jsf"; //$NON-NLS-1$
+
+	// The shared instance
+	private static JsfTemplatePlugin plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public JsfTemplatePlugin() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static JsfTemplatePlugin getDefault() {
+		return plugin;
+	}
+
+}

Added: 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	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,162 @@
+/******************************************************************************* 
+* Copyright (c) 2007 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
+*
+* Contributors:
+*     Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+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.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * @author sdzmitrovich
+ * 
+ * template for radio select item
+ * 
+ */
+public class JsfRadioSelectItemTemplate extends VpeAbstractTemplate {
+
+	// type of input tag
+	private static final String ATTR_TYPE_VALUE = "radio"; //$NON-NLS-1$
+
+	// common part of the name of element
+	private static final String ATTR_NAME_VALUE = "radio_name_"; //$NON-NLS-1$
+
+	// name of attribute which need represent
+	private static final String ITEM_LABEL_ATTR = "itemLabel"; //$NON-NLS-1$
+
+	// style of span
+	private static final String SPAN_STYLE_VALUE = "-moz-user-modify: read-write;"; //$NON-NLS-1$
+
+	/**
+	 * 
+	 */
+	public JsfRadioSelectItemTemplate() {
+
+		// TODO Auto-generated constructor stub
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+	 *      org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+	 */
+	public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+			nsIDOMDocument visualDocument) {
+
+		// create span element
+		nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+		// add title attribute to span
+		span.setAttribute(HTML.ATTR_TITLE, getTitle(sourceNode));
+		span.setAttribute(HTML.ATTR_STYLE, SPAN_STYLE_VALUE);
+
+		// create radio element
+		nsIDOMElement radio = visualDocument.createElement(HTML.TAG_INPUT);
+		radio.setAttribute(HTML.ATTR_TYPE, ATTR_TYPE_VALUE);
+
+		// set title
+		radio.setAttribute(HTML.ATTR_TITLE, getTitle(sourceNode));
+
+		// set name
+		radio.setAttribute(HTML.ATTR_NAME, ATTR_NAME_VALUE
+				+ getNameSuffix(sourceNode));
+
+		// add radio to span
+		span.appendChild(radio);
+
+		// get label for element
+		String label = getLabel(sourceNode);
+
+		// label exist
+		if (null != label) {
+			// add label to span
+			nsIDOMText text = visualDocument.createTextNode(label);
+			span.appendChild(text);
+		}
+
+		return new VpeCreationData(span);
+	}
+
+	/**
+	 * generate title of element
+	 * 
+	 * @param sourceNode
+	 * @return
+	 */
+	private String getTitle(Node sourceNode) {
+
+		String tagString = " <" + sourceNode.getNodeName(); //$NON-NLS-1$
+		NamedNodeMap attrs = sourceNode.getAttributes();
+		if (attrs != null) {
+			tagString += attrs.getLength() > 0 ? " " : ""; //$NON-NLS-1$ //$NON-NLS-2$
+			for (int i = 0; i < attrs.getLength(); i++) {
+				Node attr = attrs.item(i);
+				tagString += attr.getNodeName() + "=\"" + attr.getNodeValue() //$NON-NLS-1$
+						+ "\"" + (i < (attrs.getLength() - 1) ? " " : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+		}
+		tagString += (sourceNode.hasChildNodes() ? "" : "/") + "> "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+		return tagString;
+	}
+
+	/**
+	 * get Label of element
+	 * 
+	 * @param sourceNode
+	 * @return
+	 */
+	private String getLabel(Node sourceNode) {
+
+		// get value of "itemLabeL" from jsf tag
+		Node attrNode = sourceNode.getAttributes()
+				.getNamedItem(ITEM_LABEL_ATTR);
+
+		// if attribute exist return value
+		if (attrNode != null)
+			return attrNode.getNodeValue();
+
+		return null;
+	}
+
+	/**
+	 * generate unique suffix of name for radio as unique suffix use start
+	 * position of parent tag ( "h:selectOneRadio" or "x:selectOneRadio")
+	 * 
+	 * @param sourceNode
+	 * @return
+	 */
+	private String getNameSuffix(Node sourceNode) {
+
+		String name_suffix = ""; //$NON-NLS-1$
+
+		// get parent element
+		Node parent = sourceNode.getParentNode();
+
+		if (parent.getNodeType() == Node.ELEMENT_NODE) {
+			
+			ElementImpl element = (ElementImpl) parent;
+
+			// get start position of parent
+			name_suffix = String.valueOf(element.getStartOffset());
+		}
+
+		return name_suffix;
+
+	}
+
+}

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectManyListbox.java	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,155 @@
+/******************************************************************************* 
+* Copyright (c) 2007 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
+*
+* Contributors:
+*     Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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.HTML;
+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 Sergey Dzmitrovich
+ * 
+ * template for selectOneListbox select item
+ * 
+ */
+public class JsfSelectManyListbox extends VpeAbstractTemplate {
+
+	/**
+	 * "size" attribute
+	 */
+	private static final String ATTR_SIZE = "size"; //$NON-NLS-1$
+
+	/**
+	 * "size" attribute
+	 */
+	private static final String ATTR_MULTIPLE_VALUE = "multiple"; //$NON-NLS-1$
+	/**
+	 * list of visible children
+	 */
+	private static List<String> CHILDREN_LIST = new ArrayList<String>();
+
+	static {
+		CHILDREN_LIST.add("selectItem"); //$NON-NLS-1$
+		CHILDREN_LIST.add("selectItems"); //$NON-NLS-1$
+	}
+
+	/**
+	 * list of copied attributes
+	 */
+	private static List<String> ATTR_LIST_COPY = new ArrayList<String>();
+
+	static {
+		ATTR_LIST_COPY.add("style"); //$NON-NLS-1$
+		ATTR_LIST_COPY.add("styleClass"); //$NON-NLS-1$
+	}
+
+	/**
+	 * 
+	 */
+	public JsfSelectManyListbox() {
+
+		// TODO Auto-generated constructor stub
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+	 *      org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+	 */
+	public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+			nsIDOMDocument visualDocument) {
+
+		// create select element
+		nsIDOMElement select = visualDocument.createElement(HTML.TAG_SELECT);
+
+		Element element = (Element) sourceNode;
+
+		// import attributes from source
+		for (String attributeName : ATTR_LIST_COPY) {
+
+			// get attribute
+			String attr = element.getAttribute(attributeName);
+
+			// add attribute to "select"
+			if (attr != null)
+				select.setAttribute(HTML.ATTR_STYLE, attr);
+
+		}
+
+		// set "multiple" attribute
+		select.setAttribute(HTML.ATTR_MULTIPLE, ATTR_MULTIPLE_VALUE);
+
+		// get "size" attribute
+		String size = element.getAttribute(ATTR_SIZE);
+
+		// add "size" attribute to "select"
+		if (size != null)
+			// if source has "size" attribute import it
+			select.setAttribute(HTML.ATTR_SIZE, size);
+		else
+			// count size
+			select.setAttribute(HTML.ATTR_SIZE, String
+					.valueOf(countSize(element)));
+
+		return new VpeCreationData(select);
+	}
+
+	/**
+	 * Count size for "select" (size = number of "selectItem" and "selectItems"
+	 * children )
+	 * 
+	 * 
+	 * @param sourceNode
+	 * @return size of select (1 or more)
+	 */
+	private int countSize(Node sourceNode) {
+
+		NodeList children = sourceNode.getChildNodes();
+		int size = 0;
+		for (int i = 0; i < children.getLength(); i++) {
+
+			Node child = children.item(i);
+			// if children is one of visible items
+			if (CHILDREN_LIST.contains(child.getLocalName()))
+				size++;
+		}
+		// if 'size' == 0 return 1 else 'size'
+		return size == 0 ? 1 : size;
+
+	}
+
+	/**
+	 * 
+	 */
+	public void removeAttribute(VpePageContext pageContext,
+			Element sourceElement, nsIDOMDocument visualDocument,
+			nsIDOMNode visualNode, Object data, String name) {
+
+		// get DOMElement(root element is select)
+		nsIDOMElement select = (nsIDOMElement) visualNode
+				.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+		// remove attribute
+		select.removeAttribute(name);
+	}
+
+}

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneListbox.java	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,147 @@
+/******************************************************************************* 
+* Copyright (c) 2007 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
+*
+* Contributors:
+*     Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.template;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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.HTML;
+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 Sergey Dzmitrovich
+ * 
+ * template for selectOneListbox select item
+ * 
+ */
+public class JsfSelectOneListbox extends VpeAbstractTemplate {
+
+	/**
+	 * "size" attribute
+	 */
+	private static final String ATTR_SIZE = "size"; //$NON-NLS-1$
+
+	/**
+	 * list of visible children
+	 */
+	private static List<String> CHILDREN_LIST = new ArrayList<String>();
+
+	static {
+		CHILDREN_LIST.add("selectItem"); //$NON-NLS-1$
+		CHILDREN_LIST.add("selectItems"); //$NON-NLS-1$
+	}
+
+	/**
+	 * list of copied attributes
+	 */
+	private static List<String> ATTR_LIST_COPY = new ArrayList<String>();
+
+	static {
+		ATTR_LIST_COPY.add("style"); //$NON-NLS-1$
+		ATTR_LIST_COPY.add("styleClass"); //$NON-NLS-1$
+	}
+
+	/**
+	 * 
+	 */
+	public JsfSelectOneListbox() {
+
+		// TODO Auto-generated constructor stub
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+	 *      org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+	 */
+	public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+			nsIDOMDocument visualDocument) {
+
+		// create select element
+		nsIDOMElement select = visualDocument.createElement(HTML.TAG_SELECT);
+
+		Element element = (Element) sourceNode;
+
+		// import attributes from source
+		for (String attributeName : ATTR_LIST_COPY) {
+
+			// get attribute
+			String attr = element.getAttribute(attributeName);
+
+			// add attribute to "select"
+			if (attr != null)
+				select.setAttribute(HTML.ATTR_STYLE, attr);
+
+		}
+
+		// get "size" attribute
+		String size = element.getAttribute(ATTR_SIZE);
+
+		// add "size" attribute to "select"
+		if (size != null)
+			// if source has "size" attribute import it
+			select.setAttribute(HTML.ATTR_SIZE, size);
+		else
+			// count size
+			select.setAttribute(HTML.ATTR_SIZE, String
+					.valueOf(countSize(element)));
+
+		return new VpeCreationData(select);
+	}
+
+	/**
+	 * Count size for "select" (size = number of "selectItem" and "selectItems"
+	 * children )
+	 * 
+	 * 
+	 * @param sourceNode
+	 * @return size of select (1 or more)
+	 */
+	private int countSize(Node sourceNode) {
+
+		NodeList children = sourceNode.getChildNodes();
+		int size = 0;
+		for (int i = 0; i < children.getLength(); i++) {
+
+			Node child = children.item(i);
+			// if children is one of visible items
+			if (CHILDREN_LIST.contains(child.getLocalName()))
+				size++;
+		}
+		// if 'size' == 0 return 1 else 'size'
+		return size == 0 ? 1 : size;
+
+	}
+
+	/**
+	 * 
+	 */
+	public void removeAttribute(VpePageContext pageContext,
+			Element sourceElement, nsIDOMDocument visualDocument,
+			nsIDOMNode visualNode, Object data, String name) {
+
+		// get DOMElement(root element is select)
+		nsIDOMElement select = (nsIDOMElement) visualNode
+				.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+		// remove attribute
+		select.removeAttribute(name);
+	}
+}

Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml	                        (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml	2008-02-18 16:23:42 UTC (rev 6398)
@@ -0,0 +1,1203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<vpe:templates>
+	<vpe:template-taglib uri="http://java.sun.com/jsf/html" prefix="h"/>
+	<vpe:template-taglib uri="http://java.sun.com/jsf/core" prefix="f"/>
+
+    <vpe:tag name="f:loadBundle" case-sensitive="yes">
+	    <vpe:template children="no" modify="no">
+			<vpe:load-bundle/>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="f:verbatim" case-sensitive="yes">
+	    <vpe:template children="yes" modify="yes">
+			<span title="{tagstring()}" />
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes"/>
+			</vpe:dnd>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:inputText" case-sensitive="yes">
+	    <vpe:template children="no" modify="no">
+			<input type="text" value="{jsfvalue(@value)}" class="{@styleClass}" style="{@style}" title="{tagstring()}" size="{@size}" />
+			<vpe:resize>
+				<vpe:width width-attr="style.width" />
+				<vpe:height height-attr="style.height" />
+			</vpe:resize>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="converter" />
+					<vpe:container-child tag-name="convertNumber" />
+					<vpe:container-child tag-name="convertDateTime" />
+					<vpe:container-child tag-name="validator" />
+					<vpe:container-child tag-name="validateDoubleRange" />
+					<vpe:container-child tag-name="validateLongRange" />
+					<vpe:container-child tag-name="validateLength" />
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:inputTextarea" case-sensitive="yes">
+	    <vpe:template children="yes" modify="no">
+			<textarea class="{@styleClass}" style="{@style}" rows="{@rows}" cols="{@cols}" title="{tagstring()}">
+				<vpe:value expr="{jsfvalue(@value)}"/>
+			</textarea>
+			<vpe:resize>
+				<vpe:width width-attr="style.width" />
+				<vpe:height height-attr="style.height" />
+			</vpe:resize>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:inputSecret" case-sensitive="yes">
+	    <vpe:template children="no" modify="no">
+			<input type="password" value="{jsfvalue(@value)}" class="{@styleClass}" style="{@style}" title="{tagstring()}" size="{@size}" />
+			<vpe:resize>
+				<vpe:width width-attr="style.width" />
+				<vpe:height height-attr="style.height" />
+			</vpe:resize>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="converter" />
+					<vpe:container-child tag-name="convertNumber" />
+					<vpe:container-child tag-name="convertDateTime" />
+					<vpe:container-child tag-name="validator" />
+					<vpe:container-child tag-name="validateDoubleRange" />
+					<vpe:container-child tag-name="validateLongRange" />
+					<vpe:container-child tag-name="validateLength" />
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:inputHidden" case-sensitive="yes">
+	    <vpe:template children="no" modify="no">
+			<input type="text" value="{jsfvalue(@value)}" title="{tagstring()}"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="converter" />
+					<vpe:container-child tag-name="convertNumber" />
+					<vpe:container-child tag-name="convertDateTime" />
+					<vpe:container-child tag-name="validator" />
+					<vpe:container-child tag-name="validateDoubleRange" />
+					<vpe:container-child tag-name="validateLongRange" />
+					<vpe:container-child tag-name="validateLength" />
+				</vpe:drop>
+			</vpe:dnd>
+		</vpe:template>
+    </vpe:tag>
+
+<!-- Проблема с указанием в качестве value HTML-тега (25 of 4) -->
+    <vpe:tag name="h:outputText" case-sensitive="yes">
+		<vpe:if test="attrpresent('value')">
+			<vpe:template children="no" modify="yes">
+				<span class="{@styleClass}" style="{@style}" title="{tagstring()}">
+					<vpe:value expr="{jsfvalue(@value)}"/>
+				</span>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+					<vpe:drop container="yes">
+						<vpe:container-child tag-name="converter" />
+						<vpe:container-child tag-name="convertNumber" />
+						<vpe:container-child tag-name="convertDateTime" />
+						<vpe:container-child tag-name="validator" />
+						<vpe:container-child tag-name="validateDoubleRange" />
+						<vpe:container-child tag-name="validateLongRange" />
+						<vpe:container-child tag-name="validateLength" />
+					</vpe:drop>
+				</vpe:dnd>
+				<vpe:textFormating>
+					<vpe:format type="UnderlineFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="BoldFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="ItalicFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="FontNameFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="FontSizeFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="BackgroundColorFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="ForegroundColorFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				</vpe:textFormating>
+			</vpe:template>
+		</vpe:if>
+		<vpe:if test="attrpresent('binding')">
+			<vpe:template children="no" modify="yes">
+				<span class="{@styleClass}" style="{@style}" title="{tagstring()}">
+					<vpe:value expr="{jsfvalue(@binding)}"/>
+				</span>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+					<vpe:drop container="yes">
+						<vpe:container-child tag-name="converter" />
+						<vpe:container-child tag-name="convertNumber" />
+						<vpe:container-child tag-name="convertDateTime" />
+						<vpe:container-child tag-name="validator" />
+						<vpe:container-child tag-name="validateDoubleRange" />
+						<vpe:container-child tag-name="validateLongRange" />
+						<vpe:container-child tag-name="validateLength" />
+					</vpe:drop>
+				</vpe:dnd>
+				<vpe:textFormating>
+					<vpe:format type="BlockFormat"
+							handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
+					<vpe:format type="UnderlineFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="BoldFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="ItalicFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="FontNameFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="FontSizeFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="BackgroundColorFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="ForegroundColorFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				</vpe:textFormating>
+			</vpe:template>
+		</vpe:if>
+		<vpe:template children="yes" modify="yes">
+			<span class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="converter" />
+					<vpe:container-child tag-name="convertNumber" />
+					<vpe:container-child tag-name="convertDateTime" />
+					<vpe:container-child tag-name="validator" />
+					<vpe:container-child tag-name="validateDoubleRange" />
+					<vpe:container-child tag-name="validateLongRange" />
+					<vpe:container-child tag-name="validateLength" />
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="BlockFormat"
+						handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler" />
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+<!-- Проблема с подстановкой значений вложенных параметров (26 of 4) -->
+    <vpe:tag name="h:outputFormat" case-sensitive="yes">
+		<vpe:template children="no" modify="yes">
+			<span title="{tagstring()}" style="{@style}" class="{@styleClass}" >
+				<vpe:value expr="{jsfvalue(@value)}"/>
+			</span>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:graphicImage" case-sensitive="yes">
+		<vpe:if test="attrpresent('value')">
+			<vpe:template children="no" modify="yes">
+				<img src="{src(jsfvalue(@value))}" width="{@width}" height="{@height}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+				</vpe:dnd>
+				<vpe:resize>
+					<vpe:width width-attr="width" />
+					<vpe:height height-attr="height" />
+				</vpe:resize>
+			</vpe:template>
+		</vpe:if>
+		<vpe:template children="no" modify="yes">
+			<img src="{src(jsfvalue(@url))}" width="{@width}" height="{@height}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+			<vpe:resize>
+				<vpe:width width-attr="width" />
+				<vpe:height height-attr="height" />
+			</vpe:resize>
+		</vpe:template>
+    </vpe:tag>
+
+<!-- Проблема с адресацией от приложения (30 of 4) -->
+    <vpe:tag name="h:commandButton" case-sensitive="yes">
+		<vpe:if test="not(attrpresent('image'))">
+			<vpe:if test="@type=''">
+				<vpe:template children="no" modify="no">
+					<input type="submit" value="{jsfvalue(@value)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+					<vpe:resize>
+						<vpe:width width-attr="style.width" />
+						<vpe:height height-attr="style.height" />
+					</vpe:resize>
+					<vpe:dnd>
+						<vpe:drag start-enable="yes"/>
+					</vpe:dnd>
+					<vpe:textFormating>
+						<vpe:format type="UnderlineFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="BoldFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="ItalicFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="FontNameFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="FontSizeFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="BackgroundColorFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="ForegroundColorFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+					</vpe:textFormating>
+				</vpe:template>
+			</vpe:if>
+			<vpe:if test="(@type='button')|(@type='reset')|(@type='submit')">
+				<vpe:template children="no" modify="no">
+					<input type="{@type}" value="{jsfvalue(@value)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+					<vpe:resize>
+						<vpe:width width-attr="style.width" />
+						<vpe:height height-attr="style.height" />
+					</vpe:resize>
+					<vpe:dnd>
+						<vpe:drag start-enable="yes"/>
+					</vpe:dnd>
+					<vpe:textFormating>
+						<vpe:format type="UnderlineFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="BoldFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="ItalicFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="FontNameFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="FontSizeFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="BackgroundColorFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+						<vpe:format type="ForegroundColorFormat">
+							<vpe:formatAttribute type="style"/>
+						</vpe:format>
+					</vpe:textFormating>
+				</vpe:template>
+			</vpe:if>
+		</vpe:if>
+		<vpe:if test="attrpresent('image')">
+			<vpe:template children="no" modify="no">
+				<input type="image" src="{src(@image)}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+				<vpe:resize>
+					<vpe:width width-attr="style.width" />
+					<vpe:height height-attr="style.height" />
+				</vpe:resize>
+				<vpe:textFormating>
+					<vpe:format type="UnderlineFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="BoldFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="ItalicFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="FontNameFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="FontSizeFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="BackgroundColorFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+					<vpe:format type="ForegroundColorFormat">
+						<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				</vpe:textFormating>
+			</vpe:template>
+		</vpe:if>
+    </vpe:tag>
+
+<!-- Проблема с вложенным параметром (31 of 4) -->
+    <vpe:tag name="h:commandLink" case-sensitive="yes">
+	    <vpe:template children="yes" modify="yes">
+			<span class="{@styleClass}" style="color:blue;text-decoration:underline;{@style}" title="{tagstring()}">
+				<vpe:value expr="{jsfvalue(@value)}"/>
+			</span>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="outputText"/>
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+			<vpe:pseudoContent/>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:outputLink" case-sensitive="yes">
+	    <vpe:template children="yes" modify="yes">
+			<a href="javascript:return false;" class="{@styleClass}" style="{@style}"/>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat" setDefault="true">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:outputLabel" case-sensitive="yes">
+	    <vpe:template children="yes" modify="yes">
+			<label style="{@style}" class="{@styleClass}" title="{tagstring()}" for="{@for}">
+				<vpe:value expr="{jsfvalue(@value)}"/>
+			</label>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="outputText"/>
+				</vpe:drop>
+			</vpe:dnd>
+		    <vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectBooleanCheckbox" case-sensitive="yes">
+		<vpe:if test="@disabled='on'">   <!-- Gavr --><!-- added x: 15.02.05 -->
+		    <vpe:template children="no" modify="no">
+				<input type="checkbox" disabled="on" checked="{@value}" class="{@styleClass}" style="{@style}" border="{@border}" title="{tagstring()}"/>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+					<vpe:drop container="yes">
+						<vpe:container-child tag-name="selectItem"/>
+						<vpe:container-child tag-name="selectItems"/>
+					</vpe:drop>
+				</vpe:dnd>
+		    </vpe:template>
+		</vpe:if>
+		<vpe:template children="no" modify="no">
+			<input type="checkbox"  checked="{@value}" class="{@styleClass}" style="{@style}" border="{@border}" title="{tagstring()}"/>
+	    </vpe:template>
+    </vpe:tag>
+
+<!--
+	Проблема с вложенными f:selectItem (42 of 4) и f:selectItems (50 of 4)
+	Возможна проблема с нечувствительностью к регистру lineDirection/pageDirection (44 of 4)
+-->
+    <vpe:tag name="h:selectManyCheckbox" case-sensitive="yes">
+		<vpe:template children="yes" modify="yes">
+			<vpe:grid layout="{@layout}" border="{@border}" title="{tagstring()}" style="{@style}" class="{@styleClass}"/>
+			<vpe:breaker type="ignore"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+						<vpe:container-child tag-name="selectItem"/>
+						<vpe:container-child tag-name="selectItems"/>
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectOneRadio" case-sensitive="yes">
+		<vpe:template children="yes" modify="yes">
+			<vpe:grid layout="{@layout}" border="{@border}" title="{tagstring()}"/>
+			<vpe:breaker type="ignore"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+						<vpe:container-child tag-name="selectItem"/>
+						<vpe:container-child tag-name="selectItems"/>
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectOneListbox" case-sensitive="yes">
+    	<vpe:template
+    		class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneListbox"
+    		children="yes" modify="yes">
+    		<vpe:dnd>
+    			<vpe:drag start-enable="yes" />
+    			<vpe:drop container="yes">
+    				<vpe:container-child tag-name="selectItem" />
+    				<vpe:container-child tag-name="selectItems" />
+    			</vpe:drop>
+    		</vpe:dnd>
+    		<vpe:textFormating>
+    			<vpe:format type="UnderlineFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="BoldFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="ItalicFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="FontNameFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="FontSizeFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="BackgroundColorFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="ForegroundColorFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    		</vpe:textFormating>
+    	</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectManyListbox" case-sensitive="yes">
+    	<vpe:template children="yes" modify="yes"
+    		class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyListbox">
+    		<vpe:dnd>
+    			<vpe:drag start-enable="yes" />
+    			<vpe:drop container="yes">
+    				<vpe:container-child tag-name="selectItem" />
+    				<vpe:container-child tag-name="selectItems" />
+    			</vpe:drop>
+    		</vpe:dnd>
+    		<vpe:textFormating>
+    			<vpe:format type="UnderlineFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="BoldFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="ItalicFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="FontNameFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="FontSizeFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="BackgroundColorFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    			<vpe:format type="ForegroundColorFormat">
+    				<vpe:formatAttribute type="style" />
+    			</vpe:format>
+    		</vpe:textFormating>
+    	</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
+		<vpe:template children="yes" modify="yes">
+			<select style="{@style}" class="{@styleClass}" title="{tagstring()}"/>
+			<vpe:resize>
+				<vpe:width width-attr="style.width" />
+				<vpe:height height-attr="style.height" />
+			</vpe:resize>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+						<vpe:container-child tag-name="selectItem"/>
+						<vpe:container-child tag-name="selectItems"/>
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectManyMenu" case-sensitive="yes">
+		<vpe:template children="yes" modify="yes">
+			<select style="{@style}" multiple="multiple"  class="{@styleClass}" title="{tagstring()}" size="1"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes">
+						<vpe:container-child tag-name="selectItem"/>
+						<vpe:container-child tag-name="selectItems"/>
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+					</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="f:selectItem" case-sensitive="yes">
+		<vpe:if test="hasinparents('h:selectManyCheckbox')|hasinparents('x:selectManyCheckbox')|hasinparents('t:selectManyCheckbox')">
+			<vpe:template children="no" modify="yes">
+				<span title="{tagstring()}">
+					<input type="checkbox" />
+					<vpe:value expr="{jsfvalue(@itemLabel)}"/>
+				</span>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+				</vpe:dnd>
+				<vpe:breaker type="selectItem"/>
+			</vpe:template>
+		</vpe:if>
+		<vpe:if test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
+			<vpe:template children="no" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfRadioSelectItemTemplate">
+					
+			</vpe:template>
+		</vpe:if>
+		<vpe:if test="hasinparents('h:selectOneListbox')|
+						hasinparents('h:selectManyListbox')|
+						hasinparents('h:selectOneMenu')|
+						hasinparents('h:selectManyMenu')|
+						hasinparents('t:selectManyMenu')|
+						hasinparents('x:selectOneRadio')|
+						hasinparents('x:selectOneMenu')">   <!-- Gavr --><!-- added x: 8.02.05 -->
+			<vpe:template children="no" modify="yes">
+				<option value="{@itemValue}" title="{tagstring()}">
+					<vpe:value expr="{jsfvalue(@itemLabel)}"/>
+				</option>
+			</vpe:template>
+		</vpe:if>
+    </vpe:tag>
+
+    <vpe:tag name="f:selectItems" case-sensitive="yes">
+		<vpe:if test="hasinparents('h:selectManyCheckbox')|hasinparents('x:selectManyCheckbox')"> <!-- added x: 8.02.05 --><!-- Gavr -->
+			<vpe:template children="no" modify="yes">
+				<span title="{tagstring()}">
+					<input type="checkbox"/>
+					<vpe:value expr="{jsfvalue(@itemLabel)}"/>
+				</span>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+				</vpe:dnd>
+			</vpe:template>
+		</vpe:if>
+		<vpe:if test="hasinparents('h:selectOneRadio')">
+			<vpe:template children="no" modify="yes">
+				<span title="{tagstring()}">
+					<input type="radio"/>
+					<vpe:value expr="{jsfvalue(@itemLabel)}"/>
+				</span>
+				<vpe:dnd>
+					<vpe:drag start-enable="yes"/>
+				</vpe:dnd>
+			</vpe:template>
+		</vpe:if>
+		<vpe:if test="hasinparents('h:selectOneListbox')|
+						hasinparents('h:selectManyListbox')|
+						hasinparents('h:selectOneMenu')|
+						hasinparents('h:selectManyMenu')|
+						hasinparents('x:selectOneMenu')">   <!-- Gavr -->
+			<vpe:template children="no" modify="yes">
+				<option value="{@itemValue}" title="{tagstring()}">
+					<vpe:value expr="{jsfvalue(@value)}"/>
+				</option>
+			</vpe:template>
+		</vpe:if>
+    </vpe:tag>
+
+    <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
+	    <vpe:template children="yes" modify="no">
+			<select  >
+			</select>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+			</vpe:dnd>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:panelGroup" case-sensitive="yes">
+		<vpe:template children="yes" modify="yes">
+			<span style="{@style}" class="{@styleClass}" title="{tagstring()}"/>
+			<vpe:breaker type="ignore"/>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:panelGrid" case-sensitive="yes">
+		<vpe:template children="yes" modify="yes">
+			<vpe:panelgrid border="{iif(@border='','0','@border')}" style="{@style}" class="{@styleClass}" width="{@width}" frame="{@frame}" rules="{@rules}"
+						columnClasses="{@columnClasses}" footerClass="{@footerClass}" headerClass="{@headerClass}" rowClasses="{@rowClasses}"
+						cellspacing="{@cellspacing}" cellpadding="{@cellpadding}" bgcolor="{@bgcolor}" title="{tagstring()}"
+						table-size="{@columns}"/>
+			<vpe:resize>
+				<vpe:width width-attr="width" />
+			</vpe:resize>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes"/>
+			</vpe:dnd>
+			<vpe:breaker type="ignore"/>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+			<vpe:pseudoContent defaultText="yes"/>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:dataTable" case-sensitive="yes">
+		<vpe:template children="yes" modify="no">
+			<vpe:datatable width="{@width}" bgcolor="{@bgcolor}" border="{@border}"
+							cellpadding="{@cellpadding}" cellspacing="{@cellspacing}"
+							columnClasses="{@columnClasses}" footerClass="{@footerClass}" headerClass="{@headerClass}"
+							rowClasses="{@rowClasses}"
+							frame="{@frame}" rules="{@rules}" class="{@styleClass}" style="{@style}" title="{tagstring()}"/>
+			<vpe:resize>
+				<vpe:width width-attr="style.width" />
+				<vpe:height height-attr="style.height" />
+			</vpe:resize>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes" />
+				<vpe:drop container="yes">
+					<vpe:container-child tag-name="column"/>
+				</vpe:drop>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="BlockFormat" addChildren="deny"/>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+			<vpe:pseudoContent defaultText="yes"/>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:column" case-sensitive="yes">
+		<vpe:if test="parentname()='h:dataTable'|parentname()='x:dataTable'|parentname()='t:dataTable'|parentname()='t:newspaperTable'|parentname()='t:tree'">  <!-- Gavr --><!-- added x: 8.02.05 -->
+			<vpe:template children="yes" modify="yes">
+				<vpe:column title="{tagstring()}"/>
+			</vpe:template>
+		</vpe:if>
+		<vpe:if  test="parentname()='rich:columnGroup'|parentname()='rich:dataTable'|parentname()='rich:orderingList'|parentname()='rich:listShuttle'"> 
+			<vpe:template children="yes" modify="yes" namespaceIdentifier="org.jboss.tools.jsf.vpe.richfaces" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesColumnTemplate">
+			</vpe:template>
+		</vpe:if>
+    </vpe:tag>
+
+    <vpe:tag name="f:facet" case-sensitive="yes">
+		<vpe:if test="@name='popup'">
+			<vpe:template children="yes" modify="yes">
+			</vpe:template>
+		</vpe:if>
+		<vpe:if test="parentname()='h:dataTable'|parentname()='t:tree'">
+			<vpe:template children="yes" modify="yes">
+				<vpe:facet/>
+			</vpe:template>
+		</vpe:if>
+		<vpe:template children="yes" modify="yes">
+			<div/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes"/>
+			</vpe:dnd>
+			<vpe:pseudoContent defaultText="yes" attrName="name"/>
+		</vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="f:view" case-sensitive="yes">
+	    <vpe:template children="yes" modify="yes" haveVisualPreview="no">
+			<div style="border:1px dotted #FF6600;padding: 5px;" title="{tagstring()}"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes"/>
+			</vpe:dnd>
+			<vpe:pseudoContent defaultText="yes"/>
+			<vpe:textFormating>
+				<vpe:format type="BlockFormat" addParent="deny" addChildren="allow"
+					handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
+				<vpe:format type="BoldFormat" addParent="deny" addChildren="allow" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler" />
+				<vpe:format type="ItalicFormat" addParent="deny" addChildren="allow" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler" />
+				<vpe:format type="UnderlineFormat" addParent="deny" addChildren="allow" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler" />
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="f:subview" case-sensitive="yes">
+    	<vpe:template children="yes" modify="yes" haveVisualPreview="no">
+			<div style="border:1px dotted #FF6600;padding: 5px;" title="{tagstring()}"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes"/>
+			</vpe:dnd>
+			<vpe:pseudoContent defaultText="yes"/>
+			<vpe:textFormating>
+				<vpe:format type="BlockFormat" addParent="deny" addChildren="allow"
+					handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
+				<vpe:format type="BoldFormat" addParent="deny" addChildren="allow" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler" />
+				<vpe:format type="ItalicFormat" addParent="deny" addChildren="allow" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler" />
+				<vpe:format type="UnderlineFormat" addParent="deny" addChildren="allow" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler" />
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:form" case-sensitive="yes">
+    	<vpe:template children="yes" modify="yes" haveVisualPreview="no">
+			<div style="border:1px dotted #FF6600;padding: 5px;{@style}" class="{@styleClass}" title="{tagstring()}"/>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes"/>
+				<vpe:drop container="yes"/>
+			</vpe:dnd>
+		<vpe:textFormating>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>	
+    </vpe:tag>
+
+    <vpe:tag name="f:attribute" case-sensitive="yes">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:param">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:phaseListener">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:phaseListener">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:setPropertyActionListener">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:valueChangeListener">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:convertDateTime">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:convertNumber">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:validator">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:validateDoubleRange">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:validateLength">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="f:validateLongRange">
+	    <vpe:template children="no" modify="no"/>
+    </vpe:tag>
+
+    <vpe:tag name="h:message">
+	    <vpe:template children="no" modify="no">
+		    <span class="{@styleClass}" style="{@style}">
+				Error Message
+		    </span>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes" />
+				<vpe:drop container="no"/>
+			</vpe:dnd>
+		    <vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+    <vpe:tag name="h:messages">
+	    <vpe:template children="no" modify="no">
+		    <span class="{@styleClass}" style="{@style}">
+				Error Messages
+		    </span>
+			<vpe:dnd>
+				<vpe:drag start-enable="yes" />
+				<vpe:drop container="no"/>
+			</vpe:dnd>
+			<vpe:textFormating>
+				<vpe:format type="UnderlineFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BoldFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ItalicFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontNameFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="FontSizeFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="BackgroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+				<vpe:format type="ForegroundColorFormat">
+					<vpe:formatAttribute type="style"/>
+				</vpe:format>
+			</vpe:textFormating>
+	    </vpe:template>
+    </vpe:tag>
+
+<!--
+	Проблема с селектированием элемента: в мозилле селектируется заголовок а не рамка
+-->
+	<vpe:template children="yes" modify="no">
+		<vpe:any value="{name()}" title="{tagstring()}"/>
+	</vpe:template>
+</vpe:templates>
\ No newline at end of file




More information about the jbosstools-commits mailing list