Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrimble2008-04-25 12:55:59 -0400
committeritrimble2008-04-25 12:55:59 -0400
commit799d4aafe59d82dd204a8e4031bf1e900c1da3ca (patch)
treef724b55f2f7b27a2c0240244b49283396b7d9690
parent2dbd5f4a1abc291b93d459e899741330a14e9ba7 (diff)
downloadwebtools.jsf-799d4aafe59d82dd204a8e4031bf1e900c1da3ca.tar.gz
webtools.jsf-799d4aafe59d82dd204a8e4031bf1e900c1da3ca.tar.xz
webtools.jsf-799d4aafe59d82dd204a8e4031bf1e900c1da3ca.zip
[Bug 228906]: [Trinidad Support] panelFormLayout and panelLabelAndMessage broken.
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml3
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java58
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java17
3 files changed, 76 insertions, 2 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml
index 3b9c0b7fd..5b1cd5e5e 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml
@@ -858,8 +858,7 @@
</tag-convert-info>
<tag-decorate-info id="vpd-decorate-design"
multiLevel="true"
- widget="true"
- setNonVisualChildElements="true"
+ needBorderDecorator="true"
/>
</value>
</trait>
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java
new file mode 100644
index 000000000..47b376f6d
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/PanelFormLayoutChildElementEdit.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2008 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ */
+package org.eclipse.jst.jsf.apache.trinidad.tagsupport.elementedit;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jst.jsf.apache.trinidad.tagsupport.ITrinidadConstants;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.pagedesigner.parts.ElementEditPart;
+import org.w3c.dom.Element;
+
+/**
+ * IElementEdit implementation for Trinidad tags that are potentially children
+ * of the panelFormLayout tag, and therefore may need to refresh panelFormLayout
+ * on model change.
+ *
+ * @author Ian Trimble - Oracle
+ */
+public class PanelFormLayoutChildElementEdit extends
+ DefaultTrinidadCoreElementEdit {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit#handleModelChange(org.w3c.dom.Element, org.eclipse.jst.pagedesigner.parts.ElementEditPart, boolean)
+ */
+ @Override
+ public boolean handleModelChange(Element ele, ElementEditPart part,
+ boolean recursive) {
+ boolean handled = false;
+ EditPart parentPart = part.getParent();
+ while (parentPart instanceof ElementEditPart) {
+ ElementEditPart parentElementEditPart = (ElementEditPart)parentPart;
+ TagIdentifier tagID = parentElementEditPart.getTagIdentifier();
+ if (tagID != null) {
+ if (ITrinidadConstants.TAG_IDENTIFIER_PANELFORMLAYOUT.isSameTagType(tagID)) {
+ parentElementEditPart.refreshModelChange(recursive);
+ handled = true;
+ break;
+ } else if (
+ ITrinidadConstants.TAG_IDENTIFIER_GROUP.isSameTagType(tagID) ||
+ IJSFConstants.TAG_IDENTIFIER_FACET.isSameTagType(tagID)) {
+ parentPart = parentPart.getParent();
+ } else {
+ break;
+ }
+ }
+ }
+ return handled;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java
index 9460623ad..3a1d3c688 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/elementedit/TrinidadCoreElementEditFactory.java
@@ -39,6 +39,23 @@ public class TrinidadCoreElementEditFactory extends AbstractElementEditFactory {
return new PanelTabbedElementEdit();
} else if (ITrinidadConstants.TAG_IDENTIFIER_SHOWDETAILITEM.isSameTagType(tagIdentifier)) {
return new ShowDetailItemElementEdit();
+ } else if (
+ ITrinidadConstants.TAG_IDENTIFIER_INPUTCOLOR.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_INPUTDATE.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_INPUTFILE.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_INPUTLISTOFVALUES.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_INPUTNUMBERSPINBOX.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_INPUTTEXT.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTBOOLEANRADIO.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTONECHOICE.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTONELISTBOX.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_SELECTONERADIO.isSameTagType(tagIdentifier) ||
+ ITrinidadConstants.TAG_IDENTIFIER_PANELLABELANDMESSAGE.isSameTagType(tagIdentifier)
+ ) {
+ return new PanelFormLayoutChildElementEdit();
} else {
return new DefaultTrinidadCoreElementEdit();
}

Back to the top