JBoss Tools SVN: r13522 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-02-06 12:00:33 -0500 (Fri, 06 Feb 2009)
New Revision: 13522
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java
Log:
connection labels are editable after creation of the connection
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeEditPart.java 2009-02-06 17:00:04 UTC (rev 13521)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeEditPart.java 2009-02-06 17:00:33 UTC (rev 13522)
@@ -1,7 +1,11 @@
package org.jboss.tools.flow.jpdl4.editpart;
+import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.requests.DirectEditRequest;
import org.jboss.tools.flow.common.editpart.NodeEditPart;
+import org.jboss.tools.flow.common.wrapper.ModelEvent;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
import org.jboss.tools.flow.jpdl4.policy.ProcessNodeGraphicalNodeEditPolicy;
public class ProcessNodeEditPart extends NodeEditPart {
@@ -11,6 +15,17 @@
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ProcessNodeGraphicalNodeEditPolicy());
}
+ public void modelChanged(ModelEvent event) {
+ super.modelChanged(event);
+ if (event.getChange() == Wrapper.ADD_INCOMING_CONNECTION) {
+ Object object = getViewer().getEditPartRegistry().get(event.getChangedObject());
+ if (object != null && object instanceof SequenceFlowEditPart) {
+ getViewer().select((EditPart)object);
+ ((SequenceFlowEditPart)object).performDirectEdit();
+ }
+ }
+ }
+
// make performDirectEdit public
public void performDirectEdit() {
super.performDirectEdit();
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java 2009-02-06 17:00:04 UTC (rev 13521)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java 2009-02-06 17:00:33 UTC (rev 13522)
@@ -4,6 +4,7 @@
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.requests.DirectEditRequest;
import org.jboss.tools.flow.common.editpart.ConnectionEditPart;
import org.jboss.tools.flow.common.policy.ElementDirectEditPolicy;
import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
@@ -19,19 +20,19 @@
public void performRequest(Request request) {
if (request.getType() == RequestConstants.REQ_DIRECT_EDIT) {
- performDirectEdit(request);
+ performDirectEdit();
} else {
super.performRequest(request);
}
}
- protected void performDirectEdit(Request request) {
+ protected void performDirectEdit() {
ConnectionWrapper connectionWrapper = getElementConnection();
LabelWrapper labelWrapper = connectionWrapper.getLabel();
if (labelWrapper != null) {
EditPart editPart = (EditPart)getViewer().getEditPartRegistry().get(labelWrapper);
if (editPart != null) {
- editPart.performRequest(request);
+ editPart.performRequest(new DirectEditRequest());
}
}
}
15 years, 2 months
JBoss Tools SVN: r13521 - trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-02-06 12:00:04 -0500 (Fri, 06 Feb 2009)
New Revision: 13521
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ElementEditPart.java
Log:
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ElementEditPart.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ElementEditPart.java 2009-02-06 16:59:28 UTC (rev 13520)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/editpart/ElementEditPart.java 2009-02-06 17:00:04 UTC (rev 13521)
@@ -104,6 +104,7 @@
} else if (event.getChange() == NodeWrapper.REMOVE_INCOMING_CONNECTION) {
refreshTargetConnections();
} else if (event.getChange() == NodeWrapper.ADD_OUTGOING_CONNECTION) {
+ System.out.println("first: " + System.currentTimeMillis());
refreshSourceConnections();
} else if (event.getChange() == NodeWrapper.REMOVE_OUTGOING_CONNECTION) {
refreshSourceConnections();
15 years, 2 months
JBoss Tools SVN: r13520 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-02-06 11:59:28 -0500 (Fri, 06 Feb 2009)
New Revision: 13520
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
Log:
externalize english strings small fix
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-02-06 16:54:21 UTC (rev 13519)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-02-06 16:59:28 UTC (rev 13520)
@@ -461,6 +461,7 @@
public static String ConsoleConfigurationMainTab_project_must_be_jpa;
public static String ConsoleConfigurationMainTab_cp_not_specified;
public static String ConsoleConfigurationMainTab_project_must_be_set;
+ public static String ConsoleConfigurationMainTab_mode_must_be_used;
public static String ConsoleConfigurationMappingsTab_add_hbm_xml_file;
public static String ConsoleConfigurationMappingsTab_add_hibernate_mapping_file;
public static String ConsoleConfigurationMappingsTab_additional_mapping_files;
@@ -507,6 +508,7 @@
public static String GeneralExceptionStatusHandler_generating_code;
public static String PathHelper_does_not_exist;
public static String PathHelper_has_invalid_variable_references;
+ public static String PathHelper_not_directory;
public static String PathHelper_has_to_be_folder_or_project;
public static String PathHelper_project_for_is_closed;
//
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-02-06 16:54:21 UTC (rev 13519)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-02-06 16:59:28 UTC (rev 13520)
@@ -452,6 +452,7 @@
ConsoleConfigurationMainTab_project_must_be_jpa=Project ''{0}'' must be a JPA project
ConsoleConfigurationMainTab_cp_not_specified=Connection profile for project ''{0}'' not specified
ConsoleConfigurationMainTab_project_must_be_set=Project must be set to JPA project
+ConsoleConfigurationMainTab_mode_must_be_used={0} mode must be used for jpa project configured connection
ConsoleConfigurationMappingsTab_add_hbm_xml_file=Add hbm.xml file
ConsoleConfigurationMappingsTab_add_hibernate_mapping_file=Add a Hibernate Mapping file
ConsoleConfigurationMappingsTab_additional_mapping_files=Additonal mapping files (not listed in cfg.xml)
@@ -498,6 +499,7 @@
GeneralExceptionStatusHandler_exception_while_generating_code=Exception while generating code
GeneralExceptionStatusHandler_generating_code=Generating code
PathHelper_does_not_exist={0} does not exist [{1}]
+PathHelper_not_directory=The path {0} is not a directory
PathHelper_has_invalid_variable_references={0} has invalid variable references [{1}]
PathHelper_has_to_be_folder_or_project={0} has to be a folder or project [{1}]
PathHelper_project_for_is_closed=Project for {0} is closed [{1}]
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2009-02-06 16:54:21 UTC (rev 13519)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2009-02-06 16:59:28 UTC (rev 13520)
@@ -401,7 +401,7 @@
return false;
}
JpaDataSource ds = jpaProject.getDataSource();
- if (ds == null || "".equals(ds.getConnectionProfileName())){
+ if (ds == null || "".equals(ds.getConnectionProfileName())){ //$NON-NLS-1$
setErrorMessage(NLS.bind(HibernateConsoleMessages.ConsoleConfigurationMainTab_cp_not_specified, getProjectName()));
return false;
}
@@ -415,7 +415,7 @@
if (ConnectionProfileCtrl.JPA_CONNECTIN_NAME.equals(cpName)){
if (!jpaMode.getSelection()){
- String out = NLS.bind("{0} mode must be used for jpa project configured connection", jpaMode.getText());
+ String out = NLS.bind(HibernateConsoleMessages.ConsoleConfigurationMainTab_mode_must_be_used, jpaMode.getText());
setErrorMessage(out);
return false;
}
15 years, 2 months
JBoss Tools SVN: r13519 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-02-06 11:54:21 -0500 (Fri, 06 Feb 2009)
New Revision: 13519
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java
Log:
JBIDE-3768
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java 2009-02-06 16:40:56 UTC (rev 13518)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/PathHelper.java 2009-02-06 16:54:21 UTC (rev 13519)
@@ -103,9 +103,14 @@
IPath path = pathOrNull(resolve(strpath));
- if (checkFilesystem) {
- if (path != null && new File(path.toOSString()).exists()) {
- return null;
+ if (checkFilesystem && path != null) {
+ File file = new File(path.toOSString());
+ if (file.exists()) {
+ if (file.isDirectory()) {
+ return null;
+ }
+ String out = NLS.bind(HibernateConsoleMessages.PathHelper_not_directory, path);
+ return out;
}
}
15 years, 2 months
JBoss Tools SVN: r13518 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-02-06 11:40:56 -0500 (Fri, 06 Feb 2009)
New Revision: 13518
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java
Log:
RESOLVED (part 2) - issue JBIDE-3734: style and styleClass attrs don't work in a4j:page
https://jira.jboss.org/jira/browse/JBIDE-3734
- support of id attribute has been added
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java 2009-02-06 16:40:40 UTC (rev 13517)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java 2009-02-06 16:40:56 UTC (rev 13518)
@@ -27,6 +27,7 @@
private static final Map<String, String> ATTRIBUTES_MAP = new TreeMap<String, String>();
{
ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_DIR, HTML.ATTR_DIR);
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_ID, HTML.ATTR_ID);
ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_STYLE, HTML.ATTR_STYLE);
ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_STYLE_CLASS, HTML.ATTR_CLASS);
}
15 years, 2 months
JBoss Tools SVN: r13517 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-02-06 11:40:40 -0500 (Fri, 06 Feb 2009)
New Revision: 13517
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java
Log:
- make wrappers implement IPropertySource
- add change property event
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java 2009-02-06 16:40:25 UTC (rev 13516)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowEditPart.java 2009-02-06 16:40:40 UTC (rev 13517)
@@ -8,6 +8,7 @@
import org.jboss.tools.flow.common.policy.ElementDirectEditPolicy;
import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
import org.jboss.tools.flow.common.wrapper.LabelWrapper;
+import org.jboss.tools.flow.common.wrapper.ModelEvent;
public class SequenceFlowEditPart extends ConnectionEditPart {
@@ -35,4 +36,8 @@
}
}
+ public void modelChanged(ModelEvent event) {
+ refresh();
+ }
+
}
15 years, 2 months
JBoss Tools SVN: r13516 - in trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common: wrapper and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-02-06 11:40:25 -0500 (Fri, 06 Feb 2009)
New Revision: 13516
Removed:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultLabelWrapperPropertySource.java
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultLabelWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java
Log:
- make wrappers implement IPropertySource
- add change property event
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -1,11 +0,0 @@
-package org.jboss.tools.flow.common.properties;
-
-import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
-
-public class DefaultConnectionWrapperPropertySource extends WrapperPropertySource {
-
- public DefaultConnectionWrapperPropertySource(ConnectionWrapper wrapper) {
- super(wrapper);
- }
-
-}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultLabelWrapperPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultLabelWrapperPropertySource.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultLabelWrapperPropertySource.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -1,22 +0,0 @@
-package org.jboss.tools.flow.common.properties;
-
-import org.jboss.tools.flow.common.wrapper.DefaultLabelWrapper;
-
-public class DefaultLabelWrapperPropertySource extends WrapperPropertySource implements IPropertyId {
-
- private DefaultLabelWrapper wrapper = null;
-
- public DefaultLabelWrapperPropertySource(DefaultLabelWrapper wrapper) {
- super(wrapper);
- this.wrapper = wrapper;
- }
-
- public void setPropertyValue(Object id, Object value) {
- if (NAME.equals(id)) {
- if (value instanceof String) {
- wrapper.setText((String)value);
- }
- }
- super.setPropertyValue(id, value);
- }
-}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -59,6 +59,7 @@
public void setPropertyValue(Object id, Object value) {
if (elementPropertySource != null) {
elementPropertySource.setPropertyValue(id, value);
+ wrapper.notifyListeners(Wrapper.CHANGE_PROPERTY, id);
}
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/AbstractWrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -3,6 +3,8 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.flow.common.model.Element;
public abstract class AbstractWrapper implements Wrapper {
@@ -25,14 +27,57 @@
public void removeListener(ModelListener listener) {
listeners.remove(listener);
}
-
- protected void notifyListeners(int change, Object object) {
+
+ public void notifyListeners(int change, Object object) {
ModelEvent event = new ModelEvent(change, object);
for (ModelListener listener: listeners) {
listener.modelChanged(event);
}
}
+ public Object getEditableValue() {
+ if (getPropertySource() != null) {
+ getPropertySource().getEditableValue();
+ }
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (getPropertySource() != null) {
+ return getPropertySource().getPropertyDescriptors();
+ }
+ return null;
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (getPropertySource() != null) {
+ return getPropertySource().getPropertyValue(id);
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (getPropertySource() != null) {
+ return getPropertySource().isPropertySet(id);
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ if (getPropertySource() != null) {
+ getPropertySource().resetPropertyValue(id);
+ }
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (getPropertySource() != null) {
+ getPropertySource().setPropertyValue(id, value);
+ notifyListeners(CHANGE_PROPERTY, id);
+ }
+ }
+
+ protected abstract IPropertySource getPropertySource();
+
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
if (adapter == Element.class) {
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -9,12 +9,12 @@
import org.jboss.tools.flow.common.model.Connection;
import org.jboss.tools.flow.common.model.DefaultConnection;
import org.jboss.tools.flow.common.model.Node;
-import org.jboss.tools.flow.common.properties.DefaultConnectionWrapperPropertySource;
+import org.jboss.tools.flow.common.properties.WrapperPropertySource;
public class DefaultConnectionWrapper extends AbstractConnectionWrapper {
- private DefaultConnectionWrapperPropertySource propertySource;
+ private IPropertySource propertySource;
public Connection getConnection() {
return (Connection)getElement();
@@ -79,19 +79,19 @@
return result;
}
+ protected IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new WrapperPropertySource(this);
+ }
+ return propertySource;
+ }
+
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
- return getPropertySource();
+ return this;
}
return super.getAdapter(adapter);
}
- private IPropertySource getPropertySource() {
- if (propertySource == null) {
- propertySource = new DefaultConnectionWrapperPropertySource(this);
- }
- return propertySource;
- }
-
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -124,19 +124,19 @@
}
}
+ protected IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new DefaultContainerWrapperPropertySource(this);
+ }
+ return propertySource;
+ }
+
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
- return getPropertySource();
+ return this;
}
return super.getAdapter(adapter);
}
- private IPropertySource getPropertySource() {
- if (propertySource == null) {
- propertySource = new DefaultContainerWrapperPropertySource(this);
- }
- return propertySource;
- }
-
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -62,19 +62,19 @@
this.acceptsElementStrategy = strategy;
}
- @SuppressWarnings("unchecked")
+ protected IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new DefaultFlowWrapperPropertySource(this);
+ }
+ return propertySource;
+ }
+
+ @SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
- return getPropertySource();
+ return this;
}
return super.getAdapter(adapter);
}
- private IPropertySource getPropertySource() {
- if (propertySource == null) {
- propertySource = new DefaultFlowWrapperPropertySource(this);
- }
- return propertySource;
- }
-
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultLabelWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultLabelWrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultLabelWrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -2,40 +2,43 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.flow.common.properties.IPropertyId;
+import org.jboss.tools.flow.common.properties.WrapperPropertySource;
-public class DefaultLabelWrapper extends AbstractLabelWrapper {
+public class DefaultLabelWrapper extends AbstractLabelWrapper implements ModelListener {
private IPropertySource propertySource;
public DefaultLabelWrapper(Wrapper owner) {
if (owner != null) {
- propertySource = (IPropertySource)owner.getAdapter(IPropertySource.class);
setElement(owner.getElement());
}
}
public void setText(String text) {
- if (propertySource != null) {
- propertySource.setPropertyValue(IPropertyId.LABEL, text);
- notifyListeners(CHANGE_VISUAL, text);
- }
+ getPropertySource().setPropertyValue(IPropertyId.LABEL, text);
}
public String getText() {
- String result = null;
- if (propertySource != null) {
- result = (String)propertySource.getPropertyValue(IPropertyId.LABEL);
- }
- return result;
+ return (String)getPropertySource().getPropertyValue(IPropertyId.LABEL);
}
+ public void modelChanged(ModelEvent event) {
+ notifyListeners(event.getChange(), event.getChangedObject());
+ }
+
+ protected IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new WrapperPropertySource(this);
+ }
+ return propertySource;
+ }
+
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class && propertySource != null) {
- return propertySource;
+ if (adapter == IPropertySource.class) {
+ return this;
}
return super.getAdapter(adapter);
}
-
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -107,19 +107,19 @@
((DefaultConnectionWrapper) connection).getConnection());
}
+ protected IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new DefaultNodeWrapperPropertySource(this);
+ }
+ return propertySource;
+ }
+
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
- return getPropertySource();
+ return this;
}
return super.getAdapter(adapter);
}
- private IPropertySource getPropertySource() {
- if (propertySource == null) {
- propertySource = new DefaultNodeWrapperPropertySource(this);
- }
- return propertySource;
- }
-
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java 2009-02-06 16:35:31 UTC (rev 13515)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/Wrapper.java 2009-02-06 16:40:25 UTC (rev 13516)
@@ -1,10 +1,11 @@
package org.jboss.tools.flow.common.wrapper;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.flow.common.model.Element;
-public interface Wrapper extends IAdaptable {
+public interface Wrapper extends IAdaptable, IPropertySource {
int ADD_INCOMING_CONNECTION = 1;
int REMOVE_INCOMING_CONNECTION = 2;
@@ -13,6 +14,7 @@
int CHANGE_VISUAL = 5;
int ADD_ELEMENT = 6;
int REMOVE_ELEMENT = 7;
+ int CHANGE_PROPERTY = 8;
@@ -21,6 +23,6 @@
void addListener(ModelListener listener);
void removeListener(ModelListener listener);
+ void notifyListeners(int changeId, Object changedObject);
-
}
15 years, 2 months
JBoss Tools SVN: r13515 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-02-06 11:35:31 -0500 (Fri, 06 Feb 2009)
New Revision: 13515
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
RESOLVED - issue JBIDE-3734: style and styleClass attrs don't work in a4j:page
https://jira.jboss.org/jira/browse/JBIDE-3734
- Base class for templates of body, h:body, a4j:page has been created
- Support of style and styleClass attributes has been added
- <f:facet name='head'> now supports CSS-links
- JUnit tests have been created
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -18,5 +18,8 @@
public final class Ajax4JSF {
public static final String ATTR_ELEMENT = "element"; //$NON-NLS-1$
public static final String ATTR_URI_ATTRIBUTE = "uriAttribute"; //$NON-NLS-1$
+ public static final String ATTR_ID = "id"; //$NON-NLS-1$
+ public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
+ public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -10,85 +10,32 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.ajax4jsf.template;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-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.template.VpeTemplateManager;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
- * The template intended for processing {@code <a4j:page>} elements.
- *
+ * The template intended for processing {@code <a4j:page>} elements.
+ *
* @author dmaliarevich
* @author yradtsevich
*/
-public class Ajax4JSFPageTemplate extends VpeAbstractTemplate {
+public class Ajax4JSFPageTemplate extends VpeAbstractBodyTemplate {
- private static final String FACET_TEMPLATE_NAME = "f:facet"; //$NON-NLS-1$
- private static final String ATTR_NAME = "name"; //$NON-NLS-1$
- private static final String HEAD_FACET_NAME = "head"; //$NON-NLS-1$
-
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- Element sourceElement = (Element) sourceNode;
-
- nsIDOMElement bodyContainer = visualDocument.createElement(HTML.TAG_DIV);
- VpeCreationData creationData = new VpeCreationData(bodyContainer);
-
- // Mozilla renders HEAD nested in HEAD pretty well, so we are nesting these elements
- nsIDOMElement headContainer = visualDocument.createElement(HTML.TAG_HEAD);
- pageContext.getVisualBuilder().getHeadNode().appendChild(headContainer);
-
- VpeChildrenInfo headChildrenInfo = new VpeChildrenInfo(headContainer);
- creationData.addChildrenInfo(headChildrenInfo);
-
- VpeChildrenInfo bodyChildrenInfo = new VpeChildrenInfo(bodyContainer);
- creationData.addChildrenInfo(bodyChildrenInfo);
-
- NodeList childNodes = sourceElement.getChildNodes();
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node child = childNodes.item(i);
-
- if (isHeadFacet(pageContext, child)) {
- Element headFacet = (Element) child;
-
- NodeList headFacetChildren = headFacet.getChildNodes();
- for (int j = 0; j < headFacetChildren.getLength(); j++) {
- headChildrenInfo.addSourceChild(headFacetChildren.item(j));
- }
- } else {
- bodyChildrenInfo.addSourceChild(child);
- }
- }
-
- return creationData;
+ private static final Map<String, String> ATTRIBUTES_MAP = new TreeMap<String, String>();
+ {
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_DIR, HTML.ATTR_DIR);
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_STYLE, HTML.ATTR_STYLE);
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_STYLE_CLASS, HTML.ATTR_CLASS);
}
/**
- * Returns {@code true} if and only if the {@code node} is a head facet.
+ * {@inheritDoc}
*/
- private static boolean isHeadFacet(VpePageContext pageContext, Node node) {
- String templateName = VpeTemplateManager.getInstance().getTemplateName(pageContext, node);
- if (FACET_TEMPLATE_NAME.equals(templateName)) {
- Element element = (Element) node;
- String name = element.getAttribute(ATTR_NAME);
- if (HEAD_FACET_NAME.equals(name)) {
- return true;
- }
- }
- return false;
- }
-
@Override
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
+ protected String getTargetAttributeName(String sourceAttributeName) {
+ return ATTRIBUTES_MAP.get(sourceAttributeName);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-06 16:35:31 UTC (rev 13515)
@@ -1,301 +1,297 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates xmlns:vpe="http://org.jboss.org/tools/vpe/template"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <vpe:template-taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" />
- <vpe:template-taglib uri="http://richfaces.org/a4j" prefix="a4j" />
-
- <vpe:tag name="a4j:page" case-sensitive="yes">
- <vpe:template children="yes" modify="yes" hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFPageTemplate">
- <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:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:region" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" class="{@styleClass}" style="{@style}" title="{tagstring()}">
- </div>
- <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:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:ajaxListener" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:keepAlive" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:support" case-sensitive="yes">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="a4j:poll" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:commandLink" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
- style="{@style}" dir="{@dir}" title="{tagstring()}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormatting>
- <vpe:pseudoContent/>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:commandButton" case-sensitive="yes">
- <!-- This is a very big if-statement.
- Its goal is to add support of 'disabled property'
- DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
- <vpe:if test="(@disabled='true')">
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled="disabled"/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled="disabled"/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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()}"
- disabled="disabled"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <!--else-->
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <!--end-of-else-->
- </vpe:tag>
-
- <vpe:tag name="a4j:outputPanel" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" style="{@style}" dir="{@dir}"/>
- <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:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:actionparam" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:status" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFStatusTemplate">
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:loadBundle" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- <vpe:load-bundle/>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:loadStyle" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- <vpe:link rel="stylesheet" href="{href(@src)}" />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:loadScript" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:jsFunction" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:mediaOutput" case-sensitive="yes">
- <vpe:template children="no" modify="no"
- class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFMediaOutput">
-
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:log" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:form" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" class="{@styleClass}" style="{@style}" title="{tagstring()}">
- </div>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:htmlCommandLink" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
- style="{@style}" title="{tagstring()}" dir="{@dir}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="BlockFormat"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormatting>
- <vpe:pseudoContent/>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:include" case-sensitive="yes">
- <vpe:template children="yes" file="{@viewId}" class="org.jboss.tools.vpe.editor.template.VpeIncludeTemplate"/>
- </vpe:tag>
-
- <vpe:tag name="a4j:repeat" case-sensitive="yes" haveVisualPreview="no">
- <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFReapeatTemplate">
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:portlet" case-sensitive="yes">
- <vpe:template children="yes" modify="no">
- <span>
- </span>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:push" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <!-- Since RichFaces 3.3.0 -->
- <vpe:tag name="a4j:queue" case-sensitive="yes">
- <vpe:if test="tld_version('min=3.3')">
- <vpe:template children="no" modify="no">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no"/>
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-</vpe:templates>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<vpe:templates xmlns:vpe="http://org.jboss.org/tools/vpe/template"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <vpe:template-taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" />
+ <vpe:template-taglib uri="http://richfaces.org/a4j" prefix="a4j" />
+
+ <vpe:tag name="a4j:page" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFPageTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:region" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <div id="{@id}" class="{@styleClass}" style="{@style}" title="{tagstring()}">
+ </div>
+ <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:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:ajaxListener" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:keepAlive" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:support" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="a4j:poll" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:commandLink" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ style="{@style}" dir="{@dir}" title="{tagstring()}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText"/>
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormatting>
+ <vpe:pseudoContent/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:commandButton" case-sensitive="yes">
+ <!-- This is a very big if-statement.
+ Its goal is to add support of 'disabled property'
+ DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
+ <vpe:if test="(@disabled='true')">
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled="disabled"/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled="disabled"/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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()}"
+ disabled="disabled"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <!--else-->
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <!--end-of-else-->
+ </vpe:tag>
+
+ <vpe:tag name="a4j:outputPanel" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <div id="{@id}" style="{@style}" dir="{@dir}"/>
+ <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:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:actionparam" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:status" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFStatusTemplate">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:loadBundle" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ <vpe:load-bundle/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:loadStyle" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ <vpe:link rel="stylesheet" href="{href(@src)}" />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:loadScript" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:jsFunction" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:mediaOutput" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
+ class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFMediaOutput">
+
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:log" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:form" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <div id="{@id}" class="{@styleClass}" style="{@style}" title="{tagstring()}">
+ </div>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:htmlCommandLink" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ style="{@style}" title="{tagstring()}" dir="{@dir}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText"/>
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="BlockFormat"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormatting>
+ <vpe:pseudoContent/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:include" case-sensitive="yes">
+ <vpe:template children="yes" file="{@viewId}" class="org.jboss.tools.vpe.editor.template.VpeIncludeTemplate"/>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:repeat" case-sensitive="yes" haveVisualPreview="no">
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFReapeatTemplate">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:portlet" case-sensitive="yes">
+ <vpe:template children="yes" modify="no">
+ <span>
+ </span>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:push" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- Since RichFaces 3.3.0 -->
+ <vpe:tag name="a4j:queue" case-sensitive="yes">
+ <vpe:if test="tld_version('min=3.3')">
+ <vpe:template children="no" modify="no">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"/>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+</vpe:templates>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -10,42 +10,30 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-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.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
/**
- * A wrapper of VpeAbstractTemplate. Does the same, but ignores all attributes except id.
+ * The template of h:body.
+ *
+ * Omits all attributes except 'id'
+ *
+ * @see VpeAbstractBodyTemplate
* @author yradtsevich
- * @see HtmlBodyTemplate
*/
-public class JsfBodyTemplate extends VpeAbstractTemplate {
- public static final String ID_ID = "id"; //$NON-NLS-1$
-
- private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
-
+public class JsfBodyTemplate extends VpeAbstractBodyTemplate {
+
/**
- * @see org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ * {@inheritDoc}
*/
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- sourceNode = sourceNode.cloneNode(true);
- NamedNodeMap attributes = sourceNode.getAttributes();
- int length = attributes.getLength();
- for (int i = 0; i < length; i++) {
- Node attribute = attributes.item(i);
-
- if(!attribute.getNodeName().equalsIgnoreCase(ID_ID)) {
- attributes.removeNamedItem(attribute.getNodeName());
- }
+ @Override
+ protected String getTargetAttributeName(String sourceAttributeName) {
+ if (sourceAttributeName.equals(JSF.ATTR_ID)) {
+ return HTML.ATTR_ID;
+ } else {
+ return null;
}
-
- return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -33,6 +33,8 @@
public static final String ATTR_FOR = "for"; //$NON-NLS-1$
+ public static final String ATTR_ID = "id";//$NON-NLS-1$
+
public static final String ATTR_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
public static final String ATTR_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
Modified: 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 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-02-06 16:35:31 UTC (rev 13515)
@@ -1,897 +1,906 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<vpe:templates xmlns:vpe="http://org.jboss.org/tools/vpe/template"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <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:if test="(@escape='true')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfVerbatim">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- <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" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextTemplate">
- <!-- <input type="text" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}" title="{tagstring()}"
- size="{@size}" dir="{@dir}" /> -->
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:inputTextarea" case-sensitive="yes">
- <vpe:template children="no" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
- <!-- <textarea class="{@styleClass}" style="{@style}"
- rows="{@rows}" cols="{@cols}" title="{tagstring()}" dir="{@dir}">
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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}" dir="{@dir}" />
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:inputHidden" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- <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>
-
- <vpe:tag name="h:outputText" case-sensitive="yes">
- <vpe:if test="hasinparents('rich:progressBar')">
- <vpe:template children="yes" modify="no">
- <span style="display:none;"/>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="no"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputTextTemplate">
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:outputFormat" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputFormatTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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()}" alt="{jsfvalue(@alt)}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.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()}" alt="{jsfvalue(@alt)}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- </vpe:template>
- </vpe:tag>
-
- <!-- Проблема с адресацией от приложения (30 of 4) -->
- <vpe:tag name="h:commandButton" case-sensitive="yes">
- <!-- This is a very big if-statement.
- Its goal is to add support of 'disabled property'
- DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
- <vpe:if test="(@disabled='true')">
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled='disabled'/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{iif(@value='',' ',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled='disabled'/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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()}"
- disabled='disabled'/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <!--else-->
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{iif(@value='',' ',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <!--end-of-else-->
- </vpe:tag>
-
- <!-- Проблема с вложенным параметром (31 of 4) -->
- <vpe:tag name="h:commandLink" case-sensitive="yes">
- <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfCommandLinkTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting>
- <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:textFormatting>
- <vpe:pseudoContent />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:outputLink" case-sensitive="yes">
- <vpe:if test="(@disabled='true')">
- <vpe:template children="yes" modify="yes">
- <span class="{@styleClass}" style="{@style}"
- dir="{@dir}">
- </span>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat"
- setDefault="true">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="tld_version('min=1.2')">
- <vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}"
- style="{@style}"
- dir="{@dir}"
- title="{tagstring()}"/>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLinkTemplate">
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:outputLabel" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLabelTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyCheckbox">
-
- <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:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectOneRadio" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneRadioTemplate">
- <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:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
- <vpe:template
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneMenuTemplate"
- children="yes" modify="yes">
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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" dir="{@dir}" />
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:selectItem" case-sensitive="yes">
- <vpe:if test="hasinparents('h:selectManyCheckbox')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="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('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')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemsTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemsTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemsTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="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('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="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:if test="@layout='block'">
- <vpe:template children="yes" modify="yes">
- <div style="{@style}" class="{@styleClass}"
- title="{tagstring()}" />
- <vpe:breaker type="ignore" />
- </vpe:template>
- </vpe:if>
- <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}"
- dir="{@dir}" frame="{@frame}" rules="{jsfvalue(@rules)}" columnClasses="{@columnClasses}"
- footerClass="{@footerClass}" headerClass="{@headerClass}"
- captionClass="{@captionClass}" captionStyle="{@captionStyle}" rowClasses="{@rowClasses}" cellspacing="{@cellspacing}"
- cellpadding="{@cellpadding}" bgcolor="{@bgcolor}"
- title="{tagstring()}" table-size="{@columns}" />
- <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:dnd>
- <vpe:breaker type="ignore" />
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:dataTable" case-sensitive="yes">
- <vpe:template children="yes" modify="no">
- <vpe:datatable width="{@width}" height="{@height}" 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()}" dir="{@dir}"/>
- <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:textFormatting use-default-formats="yes">
- <vpe:format type="BlockFormat" addChildren="deny" />
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:column" case-sensitive="yes">
- <vpe:if
- test="parentname()='h:dataTable'|parentname()='h:panelGrid'">
-<!-- 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'|parentname()='rich:scrollableDataTable'">
- <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:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfFacet" >
- <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" hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfView">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:pseudoContent defaultText="yes" />
- <vpe:textFormatting>
- <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:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:subview" case-sensitive="yes">
- <vpe:template children="yes" modify="yes" hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSubView">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:pseudoContent defaultText="yes" />
- <vpe:textFormatting>
- <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:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:form" case-sensitive="yes">
- <vpe:template children="yes" modify="yes" hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfForm">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:setPropertyActionListener">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:actionListener">
- <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:converter">
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <!-- JSF 2.0 Tags -->
- <vpe:tag name="h:body" case-sensitive="yes">
- <!-- The tag cannot have any attribute. -->
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfBodyTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no"></vpe:drop>
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <vpe:tag name="h:head" case-sensitive="yes">
- <!-- The tag cannot have any attribute. -->
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="yes" modify="no">
- <div style="display:none;" />
- <vpe:dnd>
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <!--
- Tag h:outputScript can have any of next attributes: name, library, target.
- Mojarra 2.0 EDR1 implementation of JSF 2.0 includes a script as follows:
- <script type="text/javascript"
- src="{facesContext.getApplication().getResourceHandler().createResource(name, library).getRequestPath()}"/>
- -->
- <vpe:tag name="h:outputScript" case-sensitive="yes">
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="no" modify="no"/>
- </vpe:if>
- </vpe:tag>
-
- <!--
- Tag h:outputStylesheet can have any of next attributes: name, library, target.
- Value of target could be either 'head' or 'body'.
- Mojarra 2.0 EDR1 implementation of JSF 2.0 links a stylesheet as follows:
- <link type="text/css" rel="stylesheet"
- href="{facesContext.getApplication().getResourceHandler().createResource(name, library).getRequestPath()}"/>
- -->
- <vpe:tag name="h:outputStylesheet" case-sensitive="yes">
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="no" modify="no">
- <vpe:link rel="stylesheet" href="{href(@name)}" />
- </vpe:template>
- </vpe:if>
- </vpe:tag>
- <!-- End of JSF 2.0 Tags -->
-
- <!-- Default template -->
- <vpe:template children="yes" modify="no">
- <vpe:any value="{name()}" title="{tagstring()}"/>
- </vpe:template>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<vpe:templates xmlns:vpe="http://org.jboss.org/tools/vpe/template"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <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:if test="(@escape='true')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfVerbatim">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ <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" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextTemplate">
+ <!-- <input type="text" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}" title="{tagstring()}"
+ size="{@size}" dir="{@dir}" /> -->
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:inputTextarea" case-sensitive="yes">
+ <vpe:template children="no" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
+ <!-- <textarea class="{@styleClass}" style="{@style}"
+ rows="{@rows}" cols="{@cols}" title="{tagstring()}" dir="{@dir}">
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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}" dir="{@dir}" />
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:inputHidden" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ <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>
+
+ <vpe:tag name="h:outputText" case-sensitive="yes">
+ <vpe:if test="hasinparents('rich:progressBar')">
+ <vpe:template children="yes" modify="no">
+ <span style="display:none;"/>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputTextTemplate">
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:outputFormat" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputFormatTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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()}" alt="{jsfvalue(@alt)}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.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()}" alt="{jsfvalue(@alt)}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- Проблема с адресацией от приложения (30 of 4) -->
+ <vpe:tag name="h:commandButton" case-sensitive="yes">
+ <!-- This is a very big if-statement.
+ Its goal is to add support of 'disabled property'
+ DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
+ <vpe:if test="(@disabled='true')">
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled='disabled'/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled='disabled'/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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()}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <!--else-->
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{iif(@value='',' ',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <!--end-of-else-->
+ </vpe:tag>
+
+ <!-- Проблема с вложенным параметром (31 of 4) -->
+ <vpe:tag name="h:commandLink" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfCommandLinkTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting>
+ <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:textFormatting>
+ <vpe:pseudoContent />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:outputLink" case-sensitive="yes">
+ <vpe:if test="(@disabled='true')">
+ <vpe:template children="yes" modify="yes">
+ <span class="{@styleClass}" style="{@style}"
+ dir="{@dir}">
+ </span>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat"
+ setDefault="true">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="tld_version('min=1.2')">
+ <vpe:template children="yes" modify="yes">
+ <vpe:a class="{@styleClass}"
+ style="{@style}"
+ dir="{@dir}"
+ title="{tagstring()}"/>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLinkTemplate">
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:outputLabel" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLabelTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyCheckbox">
+
+ <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:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectOneRadio" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneRadioTemplate">
+ <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:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
+ <vpe:template
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneMenuTemplate"
+ children="yes" modify="yes">
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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" dir="{@dir}" />
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:selectItem" case-sensitive="yes">
+ <vpe:if test="hasinparents('h:selectManyCheckbox')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="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('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')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemsTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemsTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemsTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="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('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="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:if test="@layout='block'">
+ <vpe:template children="yes" modify="yes">
+ <div style="{@style}" class="{@styleClass}"
+ title="{tagstring()}" />
+ <vpe:breaker type="ignore" />
+ </vpe:template>
+ </vpe:if>
+ <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}"
+ dir="{@dir}" frame="{@frame}" rules="{jsfvalue(@rules)}" columnClasses="{@columnClasses}"
+ footerClass="{@footerClass}" headerClass="{@headerClass}"
+ captionClass="{@captionClass}" captionStyle="{@captionStyle}" rowClasses="{@rowClasses}" cellspacing="{@cellspacing}"
+ cellpadding="{@cellpadding}" bgcolor="{@bgcolor}"
+ title="{tagstring()}" table-size="{@columns}" />
+ <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:dnd>
+ <vpe:breaker type="ignore" />
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:dataTable" case-sensitive="yes">
+ <vpe:template children="yes" modify="no">
+ <vpe:datatable width="{@width}" height="{@height}" 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()}" dir="{@dir}"/>
+ <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:textFormatting use-default-formats="yes">
+ <vpe:format type="BlockFormat" addChildren="deny" />
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:column" case-sensitive="yes">
+ <vpe:if
+ test="parentname()='h:dataTable'|parentname()='h:panelGrid'">
+<!-- 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'|parentname()='rich:scrollableDataTable'">
+ <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="@name='head' and parentname()='a4j:page'">
+ <vpe:template children="yes" modify="no">
+ <div style="display:none;"/>
+ <vpe:dnd>
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.jsf.template.JsfFacet" >
+ <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" hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfView">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:pseudoContent defaultText="yes" />
+ <vpe:textFormatting>
+ <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:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:subview" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSubView">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:pseudoContent defaultText="yes" />
+ <vpe:textFormatting>
+ <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:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:form" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfForm">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:setPropertyActionListener">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:actionListener">
+ <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:converter">
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- JSF 2.0 Tags -->
+ <vpe:tag name="h:body" case-sensitive="yes">
+ <!-- The tag cannot have any attribute. -->
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfBodyTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <vpe:tag name="h:head" case-sensitive="yes">
+ <!-- The tag cannot have any attribute. -->
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="yes" modify="no">
+ <div style="display:none;" />
+ <vpe:dnd>
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <!--
+ Tag h:outputScript can have any of next attributes: name, library, target.
+ Mojarra 2.0 EDR1 implementation of JSF 2.0 includes a script as follows:
+ <script type="text/javascript"
+ src="{facesContext.getApplication().getResourceHandler().createResource(name, library).getRequestPath()}"/>
+ -->
+ <vpe:tag name="h:outputScript" case-sensitive="yes">
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="no" modify="no"/>
+ </vpe:if>
+ </vpe:tag>
+
+ <!--
+ Tag h:outputStylesheet can have any of next attributes: name, library, target.
+ Value of target could be either 'head' or 'body'.
+ Mojarra 2.0 EDR1 implementation of JSF 2.0 links a stylesheet as follows:
+ <link type="text/css" rel="stylesheet"
+ href="{facesContext.getApplication().getResourceHandler().createResource(name, library).getRequestPath()}"/>
+ -->
+ <vpe:tag name="h:outputStylesheet" case-sensitive="yes">
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="no" modify="no">
+ <vpe:link rel="stylesheet" href="{href(@name)}" />
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+ <!-- End of JSF 2.0 Tags -->
+
+ <!-- Default template -->
+ <vpe:template children="yes" modify="no">
+ <vpe:any value="{name()}" title="{tagstring()}"/>
+ </vpe:template>
</vpe:templates>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css 2009-02-06 16:35:31 UTC (rev 13515)
@@ -0,0 +1,6 @@
+.red {
+ color:red;
+}
+.bold {
+ font-weight: bold;
+}
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml (from rev 13476, trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml)
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Name: svn:mergeinfo
+
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml (from rev 13476, trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml 2009-02-06 16:35:31 UTC (rev 13515)
@@ -0,0 +1,16 @@
+<tests>
+ <test id="page">
+ <DIV>
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <H1 STYLE="-moz-user-modify: read-write;">
+ Hello World Demonstration Document
+ </H1>
+ </DIV>
+ <SPAN CLASS="red" STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ Red Bold Text on Black Background
+ </SPAN>
+ </SPAN>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml 2009-02-06 16:35:31 UTC (rev 13515)
@@ -1,11 +0,0 @@
-<tests>
- <test id="page">
- <DIV>
- <SPAN CLASS="red">
- <SPAN CLASS="vpe-text">
- Red Text
- </SPAN>
- </SPAN>
- </DIV>
- </test>
-</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -81,7 +81,7 @@
}
public void testPage() throws Throwable {
- performContentTest("components/page.xhtml");//$NON-NLS-1$
+ performContentTest("components/page/page.xhtml");//$NON-NLS-1$
}
public void testPoll() throws Throwable {
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml 2009-02-06 16:35:31 UTC (rev 13515)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<f:view xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <a4j:page id="page" style="background-color:black;" styleClass="bold" dir="LTR">
+ <f:facet name="head">
+ <title>
+ Hello World Demonstration Document
+ </title>
+ <style>
+ .red {
+ color:blue;
+ }
+ </style>
+ <link rel="stylesheet" href="page.css" type="text/css"></link>
+ </f:facet>
+ <span class="red">Red Bold Text on Black Background</span>
+ </a4j:page>
+</f:view>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css 2009-02-06 16:35:31 UTC (rev 13515)
@@ -0,0 +1,6 @@
+.red {
+ color:red;
+}
+.bold {
+ font-weight: bold;
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -51,6 +51,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3482Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3617Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3632Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3734Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE924Test;
@@ -81,6 +82,7 @@
// $JUnit-BEGIN$
suite.addTestSuite(JsfComponentTest.class);
suite.addTestSuite(Jsf20ComponentContentTest.class);
+ suite.addTestSuite(JBIDE3734Test.class);
suite.addTestSuite(JBIDE3617Test.class);
suite.addTestSuite(JBIDE3473Test.class);
suite.addTestSuite(JBIDE3441Test.class);
@@ -128,6 +130,7 @@
suite.addTestSuite(JBIDE3482Test.class);
suite.addTestSuite(JBIDE3632Test.class);
+
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNodeList;
+
+/**
+ * The class for testing JBIDE-3734
+ *
+ * @author yradtsevich
+ */
+public class JBIDE3734Test extends VpeTest {
+ private static final String TEST_FILE_NAME = "JBIDE3734.xhtml"; //$NON-NLS-1$
+ private static final String CSS_FILE_NAME = "page.css"; //$NON-NLS-1$
+ private final String TEST_FOLDER_PATH = "JBIDE/3734/"; //$NON-NLS-1$
+ public JBIDE3734Test(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests if attributes of a4j:page are rendered to visual BODY element.
+ *
+ * @throws Throwable
+ */
+ public void testBodyAttributes() throws Throwable {
+ setException(null);
+ VpeController vpeController = openTestPage();
+ nsIDOMElement body = vpeController.getVisualBuilder().getContentArea();
+
+ assertEquals("bold", body.getAttribute(HTML.ATTR_CLASS)); //$NON-NLS-1$
+ assertEquals("background-color: black;", body.getAttribute(HTML.ATTR_STYLE)); //$NON-NLS-1$
+
+ if(getException()!=null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Tests if CSS link from a4j:page head facet is linked to the page.
+ *
+ * @throws Throwable
+ */
+ public void testLink() throws Throwable {
+ setException(null);
+ VpeController vpeController = openTestPage();
+ nsIDOMElement head = (nsIDOMElement) vpeController
+ .getVisualBuilder()
+ .getHeadNode()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ nsIDOMNodeList links = head.getElementsByTagName(HTML.TAG_STYLE);
+ boolean pageCssLinkFound = false;
+ for (int i = 0; i < links.getLength(); i++) {
+ final String href = ((nsIDOMElement) links.item(i)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID))
+ .getAttribute(HTML.ATTR_HREF);
+ if (href != null && href.contains(TEST_FOLDER_PATH + CSS_FILE_NAME)) {
+ pageCssLinkFound = true;
+ break;
+ }
+ }
+
+ assertTrue("CSS link to 'page.css' is not found", pageCssLinkFound); //$NON-NLS-1$
+
+ if(getException()!=null) {
+ throw getException();
+ }
+ }
+
+ private VpeController openTestPage() throws CoreException,
+ PartInitException {
+ IFile ifile = (IFile) TestUtil.getComponentPath(TEST_FOLDER_PATH + TEST_FILE_NAME,
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ IEditorInput input = new FileEditorInput(ifile);
+ JSPMultiPageEditor part = openEditor(input);
+ VpeController vpeController = TestUtil.getVpeController(part);
+ return vpeController;
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -1321,7 +1321,7 @@
return getContentArea().equals(visualNode);
}
- nsIDOMElement getContentArea() {
+ public nsIDOMElement getContentArea() {
return visualEditor.getContentArea();
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.editor.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNamedNodeMap;
+import org.mozilla.interfaces.nsIDOMNode;
+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;
+
+/**
+ * This abstract class is intended to provide a common way to implement templates
+ * that have to render their contents into the {@code BODY}-element of the page.
+ *
+ * In most cases only the method {@code #getTargetAttributeName(String)} should be
+ * implemented.
+ *
+ * @author ezheleznyakov(a)exadel.com
+ * @author yradtsevich
+ */
+public abstract class VpeAbstractBodyTemplate extends VpeAbstractTemplate {
+
+ /**
+ * This method should return target attribute name for the given
+ * source attribute name.
+ *
+ * @return target attribute name, or {@code null} if the attribute
+ * have to be omitted.
+ */
+ abstract protected String getTargetAttributeName(String sourceAttributeName);
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ final nsIDOMElement body = getBody(visualDocument.getDocumentElement());
+ cleanBody(body);
+
+ final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ final NamedNodeMap sourceNodeAttributes = sourceNode.getAttributes();
+ for (int i = 0; i < sourceNodeAttributes.getLength(); i++) {
+ final Node sourceAttribute = sourceNodeAttributes.item(i);
+ final String sourceAttributeName = sourceAttribute.getNodeName();
+ String attributeValue = sourceAttribute.getNodeValue();
+
+ final String targetAttributeName = getTargetAttributeName(sourceAttributeName);
+
+ if (targetAttributeName != null) {
+ if(HTML.ATTR_ID.equalsIgnoreCase(targetAttributeName)) {
+ div.setAttribute(HTML.ATTR_ID, attributeValue);
+ } else {
+ // all full path for 'url'
+ if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(targetAttributeName))
+ attributeValue = VpeStyleUtil.addFullPathIntoURLValue(attributeValue, pageContext);
+ if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(targetAttributeName))
+ attributeValue = VpeStyleUtil.addFullPathIntoBackgroundValue(attributeValue,
+ pageContext.getEditPart().getEditorInput());
+ //FIX FOR JBIDE-1568, added by Max Areshkau
+ try {
+ body.setAttribute(targetAttributeName, attributeValue);
+ } catch(XPCOMException ex ) {
+ //jsut ignore it
+ }
+ }
+ }
+ }
+
+ return new VpeCreationData(div);
+ }
+
+ /**
+ * Deletes all attributes except ID from the {@code body}
+ *
+ * @param body BODY-element
+ */
+ protected void cleanBody(final nsIDOMElement body) {
+ nsIDOMNamedNodeMap attributes = body.getAttributes();
+
+ long len = attributes.getLength();
+ int j = 0;
+ for (int i = 0; i < len; i++) {
+ nsIDOMNode attr = attributes.item(j);
+ if (HTML.ATTR_ID.equalsIgnoreCase(attr.getNodeName())) {
+ j++;
+ } else {
+ body.removeAttribute(attr.getNodeName());
+ }
+ }
+ }
+
+ /**
+ * Finds {@code BODY}-element
+ *
+ * @param node a visual node
+ * @return the nearest child of {@code node} named {@code 'BODY'}
+ */
+ protected static nsIDOMElement getBody(nsIDOMNode node) {
+
+ final nsIDOMNodeList nodeChildren = node.getChildNodes();
+ for (int i = 0; i < nodeChildren.getLength(); i++) {
+ final nsIDOMNode nodeChild = nodeChildren.item(i);
+ if (HTML.TAG_BODY.equalsIgnoreCase(nodeChild
+ .getNodeName())) {
+ return (nsIDOMElement) nodeChild
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ } else {
+ nsIDOMElement body = getBody(nodeChild);
+ if (body != null) {
+ return body;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
+
+ /**
+ * Cleans the visual {@code BODY}-element before the source element is removed.
+ */
+ @Override
+ public void beforeRemove(VpePageContext pageContext, Node sourceNode,
+ nsIDOMNode visualNode, Object data) {
+ final nsIDOMElement body = getBody(visualNode.getOwnerDocument().getDocumentElement());
+ cleanBody(body);
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -90,6 +90,7 @@
public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
public static final String ATTR_DISABLED = "disabled"; //$NON-NLS-1$
public static final String ATTR_FRAME = "frame"; //$NON-NLS-1$
+ public static final String ATTR_HREF = "href"; //$NON-NLS-1$
public static final String ATTR_ROWSPAN = "rowspan"; //$NON-NLS-1$
public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
public static final String ATTR_COLS = "cols"; //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java 2009-02-06 16:17:14 UTC (rev 13514)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java 2009-02-06 16:35:31 UTC (rev 13515)
@@ -10,102 +10,19 @@
******************************************************************************/
package org.jboss.tools.vpe.html.template;
-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.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNamedNodeMap;
-import org.mozilla.interfaces.nsIDOMNode;
-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.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
/**
* @author ezheleznyakov(a)exadel.com
+ * @author yradtsevich
*/
-public class HtmlBodyTemplate extends VpeAbstractTemplate {
+public class HtmlBodyTemplate extends VpeAbstractBodyTemplate {
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- final nsIDOMElement body = getBody(visualDocument.getDocumentElement());
-
- nsIDOMNamedNodeMap attrsMap = body.getAttributes();
- long len = attrsMap.getLength();
- int j = 0;
- for (int i = 0; i < len; i++) {
- nsIDOMNode attr = attrsMap.item(j);
- if (HTML.ATTR_ID.equalsIgnoreCase(attr.getNodeName())) {
- j++;
- } else {
- body.removeAttribute(attr.getNodeName());
- }
- }
-
- final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- final NamedNodeMap sourceNodeAttributes = sourceNode.getAttributes();
- for (int i = 0; i < sourceNodeAttributes.getLength(); i++) {
- final Node sourceNodeAttribute = sourceNodeAttributes.item(i);
- final String name = sourceNodeAttribute.getNodeName();
- String value = sourceNodeAttribute.getNodeValue();
- if(HTML.ATTR_ID.equalsIgnoreCase(name)) {
- div.setAttribute(HTML.ATTR_ID, value);
- } else {
- // all full path for 'url'
- if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(name))
- value = VpeStyleUtil.addFullPathIntoURLValue(value,
- pageContext);
- if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(name))
- value = VpeStyleUtil.addFullPathIntoBackgroundValue(value,
- pageContext.getEditPart().getEditorInput());
- //FIX FOR JBIDE-1568, added by Max Areshkau
- try{
- body.setAttribute(name, value);
- }catch(XPCOMException ex ) {
- //jsut ignore it
- }
- }
- }
-
- return new VpeCreationData(div);
- }
-
/**
- * Finds {@code BODY}-element
- *
- * @param node a visual node
- * @return the nearest child of {@code node} named {@code 'BODY'}
- */
- private nsIDOMElement getBody(nsIDOMNode node) {
-
- final nsIDOMNodeList nodeChildren = node.getChildNodes();
- for (int i = 0; i < nodeChildren.getLength(); i++) {
- final nsIDOMNode nodeChild = nodeChildren.item(i);
- if (HTML.TAG_BODY.equalsIgnoreCase(nodeChild
- .getNodeName())) {
- return (nsIDOMElement) nodeChild
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- } else {
- nsIDOMElement body = getBody(nodeChild);
- if (body != null) {
- return body;
- }
- }
- }
-
- return null;
- }
-
- /**
* {@inheritDoc}
*/
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
+ @Override
+ protected String getTargetAttributeName(String sourceAttributeName) {
+ return sourceAttributeName;
}
}
\ No newline at end of file
15 years, 2 months
JBoss Tools SVN: r13514 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-02-06 11:17:14 -0500 (Fri, 06 Feb 2009)
New Revision: 13514
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java
Log:
JBIDE-3634
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java 2009-02-06 14:30:13 UTC (rev 13513)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/SelectObjectWizard.java 2009-02-06 16:17:14 UTC (rev 13514)
@@ -57,10 +57,15 @@
}
p.getSite().getSelectionProvider().setSelection(getSelection((XModelObject)object));
IWorkbenchPage page = ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IViewPart vs = page.findView("org.eclipse.ui.views.ContentOutline");
- ISelectionProvider sp = vs == null ? null : vs.getSite().getSelectionProvider();
- if(sp != null) {
+
+ ISelection s = p.getSite().getSelectionProvider().getSelection();
+
+ if(isXModelSelection(s)) {
+ IViewPart vs = page.findView("org.eclipse.ui.views.ContentOutline");
+ ISelectionProvider sp = vs == null ? null : vs.getSite().getSelectionProvider();
+ if(sp != null) {
sp.setSelection(getSelection(object));
+ }
}
}
});
@@ -71,6 +76,15 @@
private StructuredSelection getSelection(XModelObject o) {
return new StructuredSelection(new Object[]{o});
}
+
+ private boolean isXModelSelection(ISelection s) {
+ if(s == null || s.isEmpty() || !(s instanceof IStructuredSelection)) {
+ return false;
+ }
+ IStructuredSelection ss = (IStructuredSelection)s;
+ Object o = ss.getFirstElement();
+ return o instanceof XModelObject;
+ }
String[] views = new String[]{
"org.jboss.tools.jst.web.ui.navigator.WebProjectsView"
15 years, 2 months
JBoss Tools SVN: r13513 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-02-06 09:30:13 -0500 (Fri, 06 Feb 2009)
New Revision: 13513
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1439
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-02-06 14:30:09 UTC (rev 13512)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-02-06 14:30:13 UTC (rev 13513)
@@ -33,6 +33,7 @@
import org.eclipse.ui.actions.SelectionListenerAction;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.texteditor.ITextEditor;
+import org.hibernate.EntityMode;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -186,16 +187,18 @@
IRegion propRegion = null;
try {
propRegion = findAdapter.find(parentRegion.getOffset()+parentRegion.getLength(), generatePattern(compositeProperty), true, true, false, true);
- if (propRegion == null){
+ if (propRegion == null && parentProperty.isComposite()
+ && parentProperty.getPersistentClass().getIdentifierProperty() == parentProperty){
// try to use key-property
- String pattern = generatePattern(compositeProperty).replaceFirst("property", "key-property"); //$NON-NLS-1$ //$NON-NLS-2$
+ String pattern = generatePattern(compositeProperty).replaceFirst("<property", "<key-property"); //$NON-NLS-1$ //$NON-NLS-2$
propRegion = findAdapter.find(parentRegion.getOffset()+parentRegion.getLength(), pattern, true, true, false, true);
+
+ if (propRegion == null){
+ // try to use key-many-to-one
+ pattern = generatePattern(compositeProperty).replaceFirst("<many-to-one", "<key-many-to-one"); //$NON-NLS-1$ //$NON-NLS-2$
+ propRegion = findAdapter.find(parentRegion.getOffset()+parentRegion.getLength(), pattern, true, true, false, true);
+ }
}
- /*if (propRegion == null){
- // try to find name = "<name>"
- String pattern = HIBERNATE_TAG_NAME + "[\\s]*=[\\s]*\"" + property.getNodeName() + '\"';
- propRegion = findAdapter.find(parentRegion.getOffset()+parentRegion.getLength(), pattern, true, true, false, true);
- }*/
} catch (BadLocationException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenMappingAction_selection_not_found, e);
}
@@ -402,12 +405,16 @@
pattern.append("id"); //$NON-NLS-1$
}
} else{
- pattern.append(tool.getTag(property));
+ String toolTag = tool.getTag(property);
+ if ("component".equals(toolTag) && "embedded".equals(property.getPropertyAccessorName())){
+ toolTag = "properties";
+ }
+ pattern.append(toolTag);
}
pattern.append("[\\s]+[.[^>]]*"); //$NON-NLS-1$
pattern.append(HIBERNATE_TAG_NAME);
pattern.append("[\\s]*=[\\s]*\""); //$NON-NLS-1$
- pattern.append(property.getNodeName());
+ pattern.append(property.getName());
pattern.append('\"');
return pattern.toString();
}
15 years, 2 months