JBoss Tools SVN: r4193 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 11:19:24 -0400 (Mon, 15 Oct 2007)
New Revision: 4193
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
Log:
JBIDE-982
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2007-10-15 15:05:23 UTC (rev 4192)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2007-10-15 15:19:24 UTC (rev 4193)
@@ -30,6 +30,19 @@
public IProject getProject();
/**
+ * Test or EJB project have WAR project as the parent.
+ * The method returns the parent project name,
+ * or null if project has no parent project.
+ */
+ public String getParentProjectName();
+
+ /**
+ * Returns Seam runtime name.
+ * @return
+ */
+ public String getRuntimeName();
+
+ /**
* Returns Seam runtime object.
* @return
*/
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-10-15 15:05:23 UTC (rev 4192)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-10-15 15:19:24 UTC (rev 4193)
@@ -49,6 +49,7 @@
import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.SeamCoreBuilder;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.SeamPreferences;
import org.jboss.tools.seam.core.event.Change;
import org.jboss.tools.seam.core.event.ISeamProjectChangeListener;
import org.jboss.tools.seam.core.event.SeamProjectChangeEvent;
@@ -72,6 +73,7 @@
boolean useDefaultRuntime = false;
+ String runtimeName = null;
SeamRuntime runtime = null;
Set<IPath> sourcePaths = new HashSet<IPath>();
@@ -137,20 +139,51 @@
/**
*
*/
+ public String getRuntimeName() {
+ String parent = getParentProjectName();
+ if(parent != null) {
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(parent);
+ if(p == null || !p.isAccessible()) return null;
+ ISeamProject sp = SeamCorePlugin.getSeamProject(p, false);
+ return sp == null ? null : sp.getRuntimeName();
+ }
+ if(useDefaultRuntime) {
+ SeamRuntime runtime = SeamRuntimeManager.getInstance().getDefaultRuntime();
+ return runtime != null ? runtime.getName() : null;
+ }
+ return runtimeName;
+ }
+ /**
+ *
+ */
public SeamRuntime getRuntime() {
+ String parent = getParentProjectName();
+ if(parent != null) {
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(parent);
+ if(p == null || !p.isAccessible()) return null;
+ ISeamProject sp = SeamCorePlugin.getSeamProject(p, false);
+ return sp == null ? null : sp.getRuntime();
+ }
if(useDefaultRuntime) {
return SeamRuntimeManager.getInstance().getDefaultRuntime();
}
return runtime;
}
+ public String getParentProjectName() {
+ IEclipsePreferences p = getSeamPreferences();
+ return p == null ? null : p.get("seam.parent.project", null);
+ }
+
public void setRuntime(SeamRuntime runtime) {
if(this.runtime == runtime) return;
useDefaultRuntime = runtime == SeamRuntimeManager.getInstance().getDefaultRuntime();
if(useDefaultRuntime) {
this.runtime = null;
+ this.runtimeName = null;
} else {
this.runtime = runtime;
+ this.runtimeName = runtime == null ? null : runtime.getName();
}
storeRuntime();
}
@@ -221,7 +254,7 @@
void loadRuntime() {
IEclipsePreferences prefs = getSeamPreferences();
if(prefs == null) return;
- String runtimeName = prefs.get(RUNTIME_NAME, null);
+ runtimeName = prefs.get(RUNTIME_NAME, null);
if(runtimeName != null) {
runtime = SeamRuntimeManager.getInstance().findRuntimeByName(runtimeName);
} else {
@@ -233,6 +266,7 @@
public void propertyChange(Preferences.PropertyChangeEvent event) {
if(SeamFacetPreference.RUNTIME_LIST.equals(event.getProperty()) && runtime != null && runtime.isDefault()) {
runtime = null;
+ runtimeName = null;
useDefaultRuntime = true;
storeRuntime();
}
@@ -383,21 +417,19 @@
void storeRuntime() {
IEclipsePreferences prefs = getSeamPreferences();
String runtimeName = prefs.get(RUNTIME_NAME, null);
- if((runtime == null || runtime.isDefault()) && runtimeName != null) {
+ boolean changed = (this.runtimeName == null) ? runtimeName != null : !this.runtimeName.equals(runtimeName);
+ if(!changed) return;
+
+ if(this.runtimeName == null) {
prefs.remove(RUNTIME_NAME);
- try {
- prefs.flush();
- } catch (BackingStoreException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
- } else if(runtime != null && !runtime.isDefault() && !runtime.getName().equals(runtimeName)) {
- prefs.put(RUNTIME_NAME, runtime.getName());
- try {
- prefs.flush();
- } catch (BackingStoreException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
+ } else {
+ prefs.put(RUNTIME_NAME, this.runtimeName);
}
+ try {
+ prefs.flush();
+ } catch (BackingStoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
}
/*
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-10-15 15:05:23 UTC (rev 4192)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-10-15 15:19:24 UTC (rev 4193)
@@ -107,7 +107,17 @@
if(o.getParent() instanceof FolderImpl) {
IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(source);
- if(f != null && f.exists()) ((FolderImpl)o.getParent()).updateChildFile(o, f.getLocation().toFile());
+ if(f != null && f.exists()) {
+ ((FolderImpl)o.getParent()).updateChildFile(o, f.getLocation().toFile());
+ if(o.getParent() == null) {
+ boolean b = isLikelyComponentSource(f);
+ System.out.println("--1 " + b);
+ if(!b) return null;
+ o = EclipseResourceUtil.getObjectByResource(o.getModel(), f);
+ System.out.println("--2 " + o);
+ if(o == null) return null;
+ }
+ }
}
LoadedDeclarations ds = new LoadedDeclarations();
17 years, 3 months
JBoss Tools SVN: r4192 - trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-15 11:05:23 -0400 (Mon, 15 Oct 2007)
New Revision: 4192
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-571
removed line: viewer.setContextMenu(new PaletteContextMenuProvider(viewer));
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java 2007-10-15 14:24:46 UTC (rev 4191)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java 2007-10-15 15:05:23 UTC (rev 4192)
@@ -53,7 +53,7 @@
model = PaletteModel.getInstance(paletteContents);
viewer = new PaletteViewer(viewPart);
palette = viewer.createControl(root);
- viewer.setContextMenu(new PaletteContextMenuProvider(viewer));
+
viewer.setPaletteViewerPreferences(new PaletteViewerPreferences());
PaletteRoot paletteRoot = model.getPaletteRoot();
viewer.setPaletteRoot(paletteRoot);
17 years, 3 months
JBoss Tools SVN: r4191 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: amakhtadui
Date: 2007-10-15 10:24:46 -0400 (Mon, 15 Oct 2007)
New Revision: 4191
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2007-10-15 14:01:10 UTC (rev 4190)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2007-10-15 14:24:46 UTC (rev 4191)
@@ -1,3 +1,15 @@
+.rich-pmenu-group-icon {
+ width: 16;
+ height: 16;
+ vspace: 0;
+ hspace: 0;
+ vertical-align: middle;
+}
+
+.rich-pmenu-group-disabled {
+ color: #B1ADA7;
+}
+
.dr-pmenu-top-group-div {
border-color: #C4C0B9;
}
@@ -9,6 +21,13 @@
border-color: #C4C0B9;
}
+.dr-pmenu-top-self-div {
+ border-top: 1px solid;
+ margin-bottom: 3px;
+ padding: 1px;
+ border-color: #C4C0B9;
+}
+
.dr-pmenu-top-group {
background-color: #D4CFC7;
color: #000000;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-15 14:01:10 UTC (rev 4190)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-15 14:24:46 UTC (rev 4191)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.util.List;
@@ -14,45 +25,71 @@
import org.w3c.dom.Text;
public class RichFacesPanelMenuGroupTemplate extends VpeAbstractTemplate {
-
+
private static final String NAME_COMPONENT = "panelMenuGroup";
-
+
private static final String PANEL_MENU_END_TAG = ":panelMenu";
-
+
private static final String PANEL_MENU_GROUP_END_TAG = ":panelMenuGroup";
-
+
private static final String PANEL_MENU_ITEM_END_TAG = ":panelMenuItem";
-
+
+ // *******************************************************************************
+ // * Panel menu attribytes.
+ // ******************************************************************************/
+ private static final String PANEL_MENU_ATTR_ICON_GROUP_POSITION = "iconGroupPosition";
+
+ private static final String PANEL_MENU_ATTR_ICON_TOP_GROUP_POSITION = "iconGroupTopPosition";
+
+ private static final String PANEL_MENU_ATTR_ICON_COLLAPSED_GROUP = "iconCollapsedGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_COLLAPSED_TOP_GROUP = "iconCollapsedTopGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_EXPANDED_GROUP = "iconExpandedGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_EXPANDED_TOP_GROUP = "iconExpandedTopGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_DISABLE_GROUP = "iconDisableGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_TOP_DISABLE_GROUP = "iconTopDisableGroup";
+
+ private static final String PANEL_MENU_ATTR_DISABLED_GROUP_CLASS = "disabledGroupClass";
+
+ private static final String PANEL_MENU_ATTR_DISABLED_GROUP_STYLE = "disabledGroupStyle";
+
+ private static final String PANEL_MENU_ATTR_TOP_GROUP_CLASS = "topGroupClass";
+
+ private static final String PANEL_MENU_ATTR_GROUP_CLASS = "groupClass";
+
+ private static final String PANEL_MENU_ATTR_TOP_GROUP_STYLE = "topGroupStyle";
+
+ private static final String PANEL_MENU_ATTR_GROUP_STYLE = "groupStyle";
+
+ // *******************************************************************************
+ // * Panel menu group attribytes.
+ // ******************************************************************************/
private static final String PANEL_MENU_GROUP_ATTR_DISABLED_STYLE = "disabledStyle";
-
+
private static final String PANEL_MENU_GROUP_ATTR_DISABLED_CLASS = "disabledClass";
-
+
private static final String PANEL_MENU_GROUP_ATTR_DISABLED = "disabled";
-
- private static final String PANEL_MENU_GROUP_ATTR_ICON_STYLE = "iconStyle";
-
- private static final String PANEL_MENU_GROUP_ATTR_ICON_CLASS = "iconClass";
-
+
private static final String PANEL_MENU_GROUP_ATTR_ICON_EXPANDED = "iconExpanded";
-
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_COLLAPSED = "iconCollapsed";
+
private static final String PANEL_MENU_GROUP_ATTR_ICON_DISABLED = "iconDisabled";
-
+
private static final String PANEL_MENU_GROUP_ATTR_ICON_LABEL = "label";
-
- private static final String PANEL_MENU_GROUP_ATTR_EXPANDED = "expanded";
-
+
+ // private static final String PANEL_MENU_GROUP_ATTR_EXPANDED = "expanded";
+
private static final String COMPONENT_ATTR_VPE_SUPPORT = "vpeSupport";
-
+
private static final String COMPONENT_ATTR_VPE_USER_TOGGLE_ID = "vpe-user-toggle-id";
-
+
private static final String DEFAULT_PANEL_MENU_GROUP_SPACER = "/panelMenuGroup/spacer.gif";
- private static final String DEFAULT_PANEL_MENU_GROUP_POINTER = "/panelMenuGroup/pointer.gif";
-
- private static final String DEFAULT_PANEL_MENU_GROUP_POINT = "/panelMenuGroup/point.gif";
-
- private static final String DEFAULT_PANEL_MENU_GROUP_COLLAPSED = "/panelMenuGroup/collapsed.gif";
-
private static final String STYLE_PATH = "/panelMenuGroup/style.css";
private static final String EMPTY_DIV_STYLE = "display: none;";
@@ -60,42 +97,52 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
Element div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, EMPTY_DIV_STYLE);
-
return new VpeCreationData(div);
}
-
+
public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
return true;
-}
+ }
- public static VpeCreationData encode(VpePageContext pageContext, VpeCreationData creationData, Element sourceParentElement, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean expanded, int activeChildId) {
+ public static VpeCreationData encode(VpePageContext pageContext, VpeCreationData creationData, Element sourceParentElement, Element sourceElement, Document visualDocument,
+ Element parentVisualElement, boolean expanded, int activeChildId) {
+ boolean disabled = false;
+ Element parent = getRichPanelParent(sourceElement);
+
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
-
- if(expanded == true) {
- activeChildId = -1;
+
+ if (expanded == true) {
+ activeChildId = -1;
}
Element div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
parentVisualElement.appendChild(div);
-
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-group-div");
div.setAttribute(COMPONENT_ATTR_VPE_SUPPORT, NAME_COMPONENT);
div.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
- buildTable(sourceElement, visualDocument, div, expanded, expanded, activeChildId);
+ if ("true".equalsIgnoreCase(sourceParentElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ disabled = true;
+ } else if ("true".equalsIgnoreCase(parent.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ disabled = true;
+ } else if ("true".equalsIgnoreCase(sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ disabled = true;
+ }
+
+ buildTable(pageContext, sourceParentElement, parent, sourceElement, visualDocument, div, expanded, disabled, activeChildId);
+
List<Node> children = ComponentUtil.getChildren(sourceElement);
if (!children.isEmpty()) {
Element childSpan = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childSpan);
for (Node child : children) {
- if (!child.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG) && !child.getNodeName().endsWith( PANEL_MENU_ITEM_END_TAG)) {
+ if (!child.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG) && !child.getNodeName().endsWith(PANEL_MENU_ITEM_END_TAG)) {
if (childrenInfo.getSourceChildren() == null || childrenInfo.getSourceChildren().size() == 0) {
div.appendChild(childSpan);
}
childrenInfo.addSourceChild(child);
} else {
- if (expanded) {
+ if (expanded && !disabled) {
if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)) {
RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, sourceParentElement, (Element) child, visualDocument, div, true, -1);
} else {
@@ -110,8 +157,8 @@
}
}
}
-
- if(childrenInfo.getSourceChildren() != null && childrenInfo.getSourceChildren().size() > 0) {
+
+ if (childrenInfo.getSourceChildren() != null && childrenInfo.getSourceChildren().size() > 0) {
creationData.addChildrenInfo(childrenInfo);
}
}
@@ -119,8 +166,25 @@
return creationData;
}
- private static final void buildTable(Element sourceElement, Document visualDocument, Element div, boolean active, boolean expanded, int activeChildId) {
- Node parent = getRichPanelParent(sourceElement);
+ private static final void buildTable(VpePageContext pageContext, Element sourceParentElement, Element parent, Element sourceElement, Document visualDocument, Element div, boolean expanded,
+ boolean disabled, int activeChildId) {
+
+ String disabledStyle = sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_STYLE);
+ String disableClass = null;
+ String style = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ String styleClass = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+
+ if(disabledStyle == null) {
+ disabledStyle = sourceParentElement.getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_STYLE);
+ }
+
+ if(sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_CLASS) != null) {
+ disableClass = sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_CLASS);
+ }else if(sourceParentElement.getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_CLASS) != null) {
+ disableClass = sourceParentElement.getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_CLASS);
+ } else {
+ disableClass = "rich-pmenu-group-disabled";
+ }
Element table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
div.appendChild(table);
@@ -138,18 +202,15 @@
Element img1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
column1.appendChild(img1);
img1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-pmenu-group-icon");
+ ComponentUtil.setImg(img1, DEFAULT_PANEL_MENU_GROUP_SPACER);
Element column2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
tableBody.appendChild(column2);
column2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: 100%;");
- Text name = visualDocument.createTextNode(sourceElement.getAttribute("label"));
+ Text name = visualDocument.createTextNode(sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_ICON_LABEL));
column2.appendChild(name);
column2.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
- if(active) {
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-selected-item");
- }
-
Element column3 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
column3.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
@@ -158,37 +219,114 @@
Element img2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
column3.appendChild(img2);
img2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-pmenu-group-icon");
+ ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_SPACER);
+ setIcon(pageContext, parent, sourceParentElement, sourceElement, img1, img2, expanded, disabled);
+
if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
- ComponentUtil.setImg(img1, DEFAULT_PANEL_MENU_GROUP_SPACER);
- if(expanded) {
- ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_COLLAPSED);
- } else {
- ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_POINTER);
+ if(styleClass != null && sourceParentElement.getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS) != null) {
+ styleClass = "dr-pmenu-group-self-label dr-pmenu-selected-item dr-pmenu-top-group" + " " + sourceParentElement.getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS);
+ }else {
+ styleClass = "dr-pmenu-group-self-label dr-pmenu-selected-item dr-pmenu-top-group";
}
- column2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-group-self-label dr-pmenu-selected-item");
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-group");
+ if(style != null && sourceParentElement.getAttribute(PANEL_MENU_ATTR_TOP_GROUP_STYLE) != null) {
+ style = sourceParentElement.getAttribute(PANEL_MENU_ATTR_TOP_GROUP_STYLE);
+ }else {
+ style = "";
+ }
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-group-div");
} else {
+ if(styleClass != null && sourceParentElement.getAttribute(PANEL_MENU_ATTR_GROUP_CLASS) != null) {
+ styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label" + " " + sourceParentElement.getAttribute(PANEL_MENU_ATTR_GROUP_CLASS);
+ }else {
+ styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label";
+ }
+ if(style != null && sourceParentElement.getAttribute(PANEL_MENU_ATTR_GROUP_STYLE) != null) {
+ style = sourceParentElement.getAttribute(PANEL_MENU_ATTR_GROUP_STYLE);
+ }else {
+ style = "";
+ }
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-self-div");
- ComponentUtil.setImg(img1, DEFAULT_PANEL_MENU_GROUP_POINT);
- img1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "vertical-align: middle");
- ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_SPACER);
- column2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-group rich-pmenu-group");
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-group-self-label rich-pmenu-group-self-label");
}
+
+ if(disabled) {
+ styleClass = styleClass + " " + disableClass;
+
+ if(disabledStyle != null) {
+ style = style + " " + disabledStyle;
+ }
+ }
+
+ if(!"".equals(style)) {
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ }
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
}
- private static final Node getRichPanelParent(Element sourceElement) {
- Node parent = sourceElement.getParentNode();
+ private static final Element getRichPanelParent(Element sourceElement) {
+ Element parent = (Element) sourceElement.getParentNode();
while (true) {
if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG) || parent.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)) {
break;
} else {
- parent = parent.getParentNode();
+ parent = (Element) parent.getParentNode();
}
}
return parent;
}
+
+ private static final void setIcon(VpePageContext pageContext, Node parent, Element sourceParentElement, Element sourceElement, Element img1, Element img2, boolean expanded, boolean disabled) {
+ boolean needChangePosition = false;
+ String pathIconExpanded = sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_ICON_EXPANDED);
+ String pathIconCollapsed = sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_ICON_COLLAPSED);
+ String pathIconDisabled = sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_ICON_DISABLED);
+
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
+ if (pathIconExpanded == null) {
+ pathIconExpanded = sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_EXPANDED_TOP_GROUP);
+ }
+ if (pathIconCollapsed == null) {
+ pathIconCollapsed = sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_COLLAPSED_TOP_GROUP);
+ }
+ if (pathIconDisabled == null) {
+ pathIconDisabled = sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_TOP_DISABLE_GROUP);
+ }
+
+ if ("right".equalsIgnoreCase(sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_TOP_GROUP_POSITION))) {
+ needChangePosition = true;
+ }
+ } else {
+ if (pathIconExpanded == null) {
+ pathIconExpanded = sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_EXPANDED_GROUP);
+ }
+ if (pathIconCollapsed == null) {
+ pathIconCollapsed = sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_COLLAPSED_GROUP);
+ }
+ if (pathIconDisabled == null) {
+ pathIconDisabled = sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_DISABLE_GROUP);
+ }
+
+ if ("right".equalsIgnoreCase(sourceParentElement.getAttribute(PANEL_MENU_ATTR_ICON_GROUP_POSITION))) {
+ needChangePosition = true;
+ }
+ }
+
+ if (needChangePosition) {
+ Element temp = img2;
+ img2 = img1;
+ img1 = temp;
+ }
+
+ if (disabled) {
+ ComponentUtil.setImgFromResources(pageContext, img1, pathIconDisabled, DEFAULT_PANEL_MENU_GROUP_SPACER);
+ } else {
+ if (expanded) {
+ ComponentUtil.setImgFromResources(pageContext, img1, pathIconExpanded, DEFAULT_PANEL_MENU_GROUP_SPACER);
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, img2, pathIconCollapsed, DEFAULT_PANEL_MENU_GROUP_SPACER);
+ }
+ }
+ }
}
17 years, 3 months
JBoss Tools SVN: r4190 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-15 10:01:10 -0400 (Mon, 15 Oct 2007)
New Revision: 4190
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-227 links are corrected
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-10-15 13:53:14 UTC (rev 4189)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-10-15 14:01:10 UTC (rev 4190)
@@ -1,422 +1,424 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="GetStartSeamGen" xreflabel="GetStartSeamGen">
- <?dbhtml filename="GetStartSeamGen.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>Red Hat Developer Studio</keyword>
- <keyword>Seam</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Write Your First Seam Web Application</title>
-
- <para>The Red Hat Developer Studio provides sophisticated tools for enterprise applications. With the Red Hat Developer Studio, you can get started very quickly with a web prototype, and then scale up your application to include enterprise features (e.g., business processes, web services, etc.) using the same developer tools. It is a "scalable" RAD (Rapid Application Development) tool.</para>
-
- <para>A core element that makes the Red Hat Developer Studio "scalable" is the JBoss <property>Seam</property> framework. <property>Seam</property> is a fully featured application framework on top of Java EE 5. It is also one of the most popular enterprise Java framework today. <property>Seam</property> deeply integrates many other standard-based or open source frameworks (e.g., JSF, EJB3, JMS, Web Services, jBPM, JBoss Rules, Ajax4jsf, RichFaces, Facelets, Spring, iText, Quartz, TestNG, etc.), and provides a single programming model for developers to "drive" those underlying frameworks via simple annotated POJOs (Plain Old Java Objects). It makes life easier for developers to tackle complex enterprise applications with many component frameworks.</para>
-
- <para>In this chapter, we will cover how to build a simple <property>Seam</property> web application in minutes with the Red Hat Developer Studio.</para>
-
- <section>
- <title>Create a Seam Project</title>
-
- <para>To create a new web application in <property>Seam</property>, select <emphasis>New > Project ... > Seam > Seam Web Project</emphasis>. You will be prompted to enter a name and a location directory for your new project. You will also be asked to choose a JBoss AS server to deploy the project. You must choose the JBoss AS 4.2.0 instance we had defined in the JBoss AS Server manager view.</para>
-
- <figure>
- <title>Create a Seam project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamNewProj01.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Next, you will be asked to select the "features" you want to use in your project. This allows Red Hat Developer Studio to setup the appropriate tooling for your project. Since JBoss <property>Seam</property> integrates all popular Java EE frameworks, you can select any combination of technologies from the list. Here, for this project, we will select Dynamic Web Module, Java, Java Persistence (JPA), JavaServer Faces (JSF), and <property>Seam</property> Facet for a typical database-driven web application.</para>
-
- <figure>
- <title>Select toolings for the project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamNewProj02.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>A dynamic web application contains both web pages and Java code. The wizard will ask you where you want to put those files. You can just leave the default values.</para>
-
- <figure>
- <title>Select directory names for web pages and Java files</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamNewProj03.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- <para>We will use a default connection provided by RHDS.</para>
- <orderedlist>
- <listitem><para>Click Next in the dialog "JPA Facet"</para></listitem>
- </orderedlist>
- <figure>
- <title>Select provider for JPA JARs</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamNewProj04.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Since you selected JPA and JSF tooling support, the project needs to incorporate the JAR files for those frameworks on its classpath. In the next screen, you will be able to select where those library JARs come from. The easiest is just to select the JARs provided by the JBoss AS runtime associated with this project. That is why it is important to chose the right JBoss AS 4.2 runtime in the project setup window.</para>
- <orderedlist continuation="continues">
- <listitem><para>Check "Server Supplied JSF Implementation". We will use JSF implementation that comes with JBoss server</para></listitem>
- <listitem><para>Click Next</para></listitem>
- </orderedlist>
- <figure>
- <title>Define JSF Implementation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamNewProj044.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We will also use a default Hibernate Dialect - <emphasis>org.hibernate.dialect.HSQLDialect</emphasis> and deploy as a <emphasis>war</emphasis> archive.</para>
-
- <para>The project setup wizard also asks you to configure how <property>Seam</property> generates code for the project. The <property>Seam</property> Home Folder should point to a valid <property>Seam</property> distribution. By default, it is set to the <property>Seam</property> distribution bundled in your Red Hat Developer Studio tool. For the deployment format, choose WAR deployment if you want to use POJOs for UI event handling and business logic; choose EAR deployment if you want to EJB3 beans for added features. In most web applications, the WAR deployment option would suffice. You should also enter Java packages for the entity beans (for database mapping) and session beans (for action handlers). All generated code will be placed in those packages. </para>
-
- <figure>
- <title>Enter Java packages for generated code</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamNewProj045.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click on Finish to generate a project. The generated project contains all the necessary library JARs, XML configuration files, the ANT build script, as well as simple XHTML web pages and Java classes for the skeleton web application.</para>
-
-
- </section>
-
- <section>
- <title>Build and Deploy the Seam Application</title>
-
- <para>Once the application is generated, you can use the "Run on server" menu to build and deploy it into the JBoss AS runtime associated with the project. All you need is to start JBoss AS in the server manager, and load the browser at URL http://localhost:8080/MySeamProj/. You should see the following web page.</para>
-
- <figure>
- <title>The generated application in action</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/startedapplication.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To make simple changes to the page, you just need to double click on the <emphasis><property>WebContent/home.xhtml file</property></emphasis> and edit it in the visual editor. Notice that the visual editor lets you both the XHTML code and the rendered page. The rendered view is designed to make it easy to find stuff in a complex XHTML page.</para>
-
- <figure>
- <title>Making changes in the visual editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/SeamJsfEditor.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Once you finished editing, save the file (<emphasis>File > Save</emphasis>), re-deploy the application, and reload the browser to see the changes.</para>
-
- <figure>
- <title>The front page is changed</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!-- Not yet ...
- <para>Notice that we do not need to re-build and re-deploy the application. Just save the edited page and reload the browser.</para>
- -->
-
- </section>
-
- <section>
- <title>Add a Web Page and an Action</title>
-
- <para>To add a new page and related UI action to the project, use the <emphasis>New > Other ... > Seam > Seam Form</emphasis> wizard. You are prompted to enter the name of the web page, the name for the <property>Seam</property> component that handles UI actions from the page, and UI action method name.</para>
-
- <figure>
- <title>New form for the application</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/newseamproj22.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The wizard generate a web page with a single text input field and an action button. Notice that the generated page uses <emphasis>layout/template.xhtml</emphasis> as a template. The template page provides the page header, footer, side menu, and CSS styles (see the template.xhtml for more details). The Simplepage.xhtml is assembled into the template when the Simplepage.seam URL is loaded.</para>
-
- <programlisting role="XML"><![CDATA[
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- template="layout/template.xhtml">
-
-<ui:define name="body">
-
- <h1>Simplepage</h1>
- <p>Generated form page</p>
-
- <h:messages globalOnly="true" styleClass="message"/>
-
- <h:form id="simpleAction">
- <div class="dialog">
- <s:validateAll>
- <div class="prop">
- <span class="name">Value</span>
- <span class="value">
- <s:decorate>
- <h:inputText id="value" required="true"
- value="#{simpleAction.value}"/>
- </s:decorate>
- </span>
- </div>
- </s:validateAll>
- </div>
- <div class="actionButtons">
- <h:commandButton id="hello" value="hello"
- action="#{simpleAction.hello}"/>
- </div>
- </h:form>
-
-</ui:define>
-
-</ui:composition>
-]]></programlisting>
- <figure>
- <title>Generated form</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/newseamproj23.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <emphasis>#{simpleAction.value}</emphasis> notation on the web page maps to the "value" property in the backend component named "simpleAction", and the <emphasis>#{simpleAction.hello}</emphasis> notation indicates that the <emphasis><property>hello()</property></emphasis> method is called when the button is clicked on. Here is the "simpleAction" named backend <property>Seam</property> component generated by the wizard.</para>
-
- <programlisting role="JAVA"><![CDATA[
-@Name("simpleAction")
-public class SimpleAction {
-
- @Logger private Log log;
-
- @In
- FacesMessages facesMessages;
-
- private String value;
-
- //seam-gen method
- public String hello()
- {
- //implement your business logic here
- log.info("simpleAction.echo() action called with: #{simpleAction.value}");
- facesMessages.add("echo #{simpleAction.value}");
- return "success";
- }
-
- //add additional action methods
-
- @Length(max=10)
- public String getValue()
- {
- return value;
- }
-
- public void setValue(String value)
- {
- this.value = value;
- }
-
-}
-]]></programlisting>
-
- <para>Load the Simplepage.seam in the web browser. Type something in the text field and click on the "hello" button. A JSF message containing the input string is created by the <emphasis><property>SimpleAction.hello()</property></emphasis> method. The message is displayed on the page via the <emphasis role="bold"><property><h:messages></property></emphasis> tag.</para>
-
- </section>
-
- <section>
- <title>Input Validation</title>
-
- <para>Notice that in the generated SimpleAction class, there is a <emphasis>@Length</emphasis> annotation to validate the input when the input string is bound to <emphasis>#{simpleAction.value}</emphasis>. To see how this works, enter a text string longer than 10 chars and click on the button. This is what you should see.</para>
-
- <figure>
- <title>The input validation in action</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><property>Seam</property> supports many different input validation annotations. To see an example, you can replace the <emphasis>@Length(max=10)</emphasis> annotation with the following. It would require the input string to have a first name and last name separated by a space. If the validation fails, the web page would print the customized error message.</para>
-
- <programlisting role="JAVA"><![CDATA[
-@NotNull
-@Pattern(regex="^[a-zA-Z.-]+ [a-zA-Z.-]+",
- message="Need a firstname and a lastname")
-public String getValue()
-{
- return value;
-}
-]]></programlisting>
-
- <para>Save the Java file, deploy the application, and reload the browser to see the new validation scheme in action.</para>
-
- <figure>
- <title>More input validation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section>
- <title>Add a new UI Component</title>
-
- <para>Now, let's add a little more logic to the application. We will add a new boolean property to the action component. If it is set to true, the action would capitalize the input string and display it on the web page. The following code in the SimpleAction class implements the logic.</para>
-
- <programlisting role="JAVA"><![CDATA[@Name("simpleAction")
-public class SimpleAction {
-
- private boolean convertToCap;
-
- public boolean getConvertToCap () { return convertToCap; }
- public void setConvertToCap (boolean b) { convertToCap = b; }
-
- public String hello()
- {
- if (convertToCap) {
- value = value.toUpperCase ();
- }
- return null;
- }
- ... ...
-}
-]]></programlisting>
-
- <para>Next, on the web page, add the following line to display the value property on the simpleAction component. Notice that code completion is supported for the JSF EL expression.</para>
-
- <programlisting role="XML"><![CDATA[<p><b>Hello, #{simpleAction.value}</b></p>
-]]></programlisting>
-
- <para>Finally, on the web page, we add a boolean selection box component. It is bound to the <emphasis><property>convertToCap</property></emphasis> property on the backend component.</para>
-
- <programlisting role="XML"><![CDATA[<h:selectBooleanCheckbox title="convertToCap"
- value="#{simpleAction.convertToCap}" />
-Capitalize the input?
-]]></programlisting>
-
- <para>Deploy the application and see it in action now.</para>
-
- <figure>
- <title>Add UI components and business logic</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section>
- <title>Add Security to the Application</title>
-
- <para>You have probably noticed that the web page template has a login link at the top of the page. You can use the <property>Seam</property> security framework to secure access to any web page or web action. You can implement the login logic in the <emphasis>checkLoggedIn</emphasis> method. In the following example, we just use hardcoded username and password. But you can easily change it to use database, LDAP or any other means.</para>
-
- <programlisting role="JAVA"><![CDATA[
-]]></programlisting>
-
- <para>Then, on the action method, you can use the <emphasis>@AroundInvoke</emphasis> annotation to specify that it is only invoked by authenticated users.</para>
-
- <programlisting role="JAVA"><![CDATA[public class LoggedInInterceptor
- {
- @AroundInvoke
- public Object checkLoggedIn(InvocationContext invocation) throws Exception
- {
- boolean isLoggedIn = Contexts.getSessionContext().get("loggedIn")!=null;
- if (isLoggedIn) {
- //the user is already logged in
- return invocation.proceed();
- }
- else {
- //the user is not logged in, fwd to login page
- return "login";
- }
- }
-}
-]]></programlisting>
-
- <para>Now, re-deploy the application and try the action button. The application redirects to the <emphasis>login</emphasis> page asking for login credentials. The method is invoked after you successfully logged in.</para>
-
- <figure>
- <title>Access control for action methods</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/xxxx.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We can also secure web pages. You can edit the <emphasis>Authenticator.java</emphasis> file to put an access constraint on the login page.</para>
-
- <programlisting role="JAVA"><![CDATA[package.org.domain.MySeamProj.session;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.security.identity;
-
- @Name ("authenticator")
- public class Authenticator
- {
- @Logger Log log;
- @In Identity identity;
-
- public boolean authenticate()
- {
- log.info("authenticating #0", identity.getUserName());
- //write your authentication logic here,
- //return true if the authentication was
- //successful, false otherwise
- identity.addRole("admin");
- return true;
- }
- }
-]]></programlisting>
-
- <para>You can try to load the http://localhost:8080/MySeamProj/ URL in the browser and it will redirect to ask for login.</para>
-
- </section>
-
-
-<section id="OtherRelevantResourcesOnTheTopic2">
-<?dbhtml filename="OtherRelevantResourcesOnTheTopic2.html"?>
-<title>Other relevant resources on the topic</title>
-<para>Seam on JBoss: <ulink url="http://www.jboss.com/products/seam">Seam Framework</ulink></para>
-
-<para>Ten Good Reasons to use Seam: <ulink url="http://www.jboss.com/products/seam/whyseam">Why Seam</ulink></para>
-<para>Getting Started: <ulink url="http://labs.jboss.com/jbossseam/gettingstarted">Getting Started with JBoss Seam</ulink></para>
-<para>Wiki: <ulink url="http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam">JBoss Wiki</ulink></para>
-<para>FAQ: <ulink url="http://labs.jboss.com/jbossseam/faq/index.html">JBoss Seam FAQ</ulink></para>
-<para>Downloads: <ulink url="http://labs.jboss.com/jbossseam/download">JBoss Seam Downloads</ulink></para>
-<para>Jira: <ulink url="http://jira.jboss.org/jira/browse/JBSEAM">Jira issue tracker</ulink></para>
-<para>Rules Framework: <ulink url="http://www.jboss.com/products/rules">JBoss Rules</ulink></para>
-</section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="GetStartSeamGen" xreflabel="GetStartSeamGen">
+ <?dbhtml filename="GetStartSeamGen.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Write Your First Seam Web Application</title>
+
+ <para>The Red Hat Developer Studio provides sophisticated tools for enterprise applications. With the Red Hat Developer Studio, you can get started very quickly with a web prototype, and then scale up your application to include enterprise features (e.g., business processes, web services, etc.) using the same developer tools. It is a "scalable" RAD (Rapid Application Development) tool.</para>
+
+ <para>A core element that makes the Red Hat Developer Studio "scalable" is the JBoss <property>Seam</property> framework. <property>Seam</property> is a fully featured application framework on top of Java EE 5. It is also one of the most popular enterprise Java framework today. <property>Seam</property> deeply integrates many other standard-based or open source frameworks (e.g., JSF, EJB3, JMS, Web Services, jBPM, JBoss Rules, Ajax4jsf, RichFaces, Facelets, Spring, iText, Quartz, TestNG, etc.), and provides a single programming model for developers to "drive" those underlying frameworks via simple annotated POJOs (Plain Old Java Objects). It makes life easier for developers to tackle complex enterprise applications with many component frameworks.</para>
+
+ <para>In this chapter, we will cover how to build a simple <property>Seam</property> web application in minutes with the Red Hat Developer Studio.</para>
+
+ <section>
+ <title>Create a Seam Project</title>
+
+ <para>To create a new web application in <property>Seam</property>, select <emphasis>New > Project ... > Seam > Seam Web Project</emphasis>. You will be prompted to enter a name and a location directory for your new project. You will also be asked to choose a JBoss AS server to deploy the project. You must choose the JBoss AS 4.2.0 instance we had defined in the JBoss AS Server manager view.</para>
+
+ <figure>
+ <title>Create a Seam project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamNewProj01.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next, you will be asked to select the "features" you want to use in your project. This allows Red Hat Developer Studio to setup the appropriate tooling for your project. Since JBoss <property>Seam</property> integrates all popular Java EE frameworks, you can select any combination of technologies from the list. Here, for this project, we will select Dynamic Web Module, Java, Java Persistence (JPA), JavaServer Faces (JSF), and <property>Seam</property> Facet for a typical database-driven web application.</para>
+
+ <figure>
+ <title>Select toolings for the project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamNewProj02.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>A dynamic web application contains both web pages and Java code. The wizard will ask you where you want to put those files. You can just leave the default values.</para>
+
+ <figure>
+ <title>Select directory names for web pages and Java files</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamNewProj03.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>We will use a default connection provided by RHDS.</para>
+ <orderedlist>
+ <listitem><para>Click Next in the dialog "JPA Facet"</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Select provider for JPA JARs</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamNewProj04.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Since you selected JPA and JSF tooling support, the project needs to incorporate the JAR files for those frameworks on its classpath. In the next screen, you will be able to select where those library JARs come from. The easiest is just to select the JARs provided by the JBoss AS runtime associated with this project. That is why it is important to chose the right JBoss AS 4.2 runtime in the project setup window.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Check "Server Supplied JSF Implementation". We will use JSF implementation that comes with JBoss server</para></listitem>
+ <listitem><para>Click Next</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Define JSF Implementation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamNewProj044.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We will also use a default Hibernate Dialect - <emphasis>org.hibernate.dialect.HSQLDialect</emphasis> and deploy as a <emphasis>war</emphasis> archive.</para>
+
+ <para>The project setup wizard also asks you to configure how <property>Seam</property> generates code for the project. The <property>Seam</property> Home Folder should point to a valid <property>Seam</property> distribution. By default, it is set to the <property>Seam</property> distribution bundled in your Red Hat Developer Studio tool. For the deployment format, choose WAR deployment if you want to use POJOs for UI event handling and business logic; choose EAR deployment if you want to EJB3 beans for added features. In most web applications, the WAR deployment option would suffice. You should also enter Java packages for the entity beans (for database mapping) and session beans (for action handlers). All generated code will be placed in those packages. </para>
+
+ <figure>
+ <title>Enter Java packages for generated code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamNewProj045.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on Finish to generate a project. The generated project contains all the necessary library JARs, XML configuration files, the ANT build script, as well as simple XHTML web pages and Java classes for the skeleton web application.</para>
+
+
+ </section>
+
+ <section>
+ <title>Build and Deploy the Seam Application</title>
+
+ <para>Once the application is generated, you can use the "Run on server" menu to build and deploy it into the JBoss AS runtime associated with the project. All you need is to start JBoss AS in the server manager, and load the browser at URL http://localhost:8080/MySeamProj/. You should see the following web page.</para>
+
+ <figure>
+ <title>The generated application in action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/startedapplication.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To make simple changes to the page, you just need to double click on the <emphasis><property>WebContent/home.xhtml file</property></emphasis> and edit it in the visual editor. Notice that the visual editor lets you both the XHTML code and the rendered page. The rendered view is designed to make it easy to find stuff in a complex XHTML page.</para>
+
+ <figure>
+ <title>Making changes in the visual editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/SeamJsfEditor.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once you finished editing, save the file (<emphasis>File > Save</emphasis>), re-deploy the application, and reload the browser to see the changes.</para>
+
+ <figure>
+ <title>The front page is changed</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/xxxx.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- Not yet ...
+ <para>Notice that we do not need to re-build and re-deploy the application. Just save the edited page and reload the browser.</para>
+ -->
+
+ </section>
+
+ <section>
+ <title>Add a Web Page and an Action</title>
+
+ <para>To add a new page and related UI action to the project, use the <emphasis>New > Other ... > Seam > Seam Form</emphasis> wizard. You are prompted to enter the name of the web page, the name for the <property>Seam</property> component that handles UI actions from the page, and UI action method name.</para>
+
+ <figure>
+ <title>New form for the application</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newseamproj22.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizard generate a web page with a single text input field and an action button. Notice that the generated page uses <emphasis>layout/template.xhtml</emphasis> as a template. The template page provides the page header, footer, side menu, and CSS styles (see the template.xhtml for more details). The Simplepage.xhtml is assembled into the template when the Simplepage.seam URL is loaded.</para>
+
+ <programlisting role="XML"><![CDATA[
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h1>Simplepage</h1>
+ <p>Generated form page</p>
+
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <h:form id="simpleAction">
+ <div class="dialog">
+ <s:validateAll>
+ <div class="prop">
+ <span class="name">Value</span>
+ <span class="value">
+ <s:decorate>
+ <h:inputText id="value" required="true"
+ value="#{simpleAction.value}"/>
+ </s:decorate>
+ </span>
+ </div>
+ </s:validateAll>
+ </div>
+ <div class="actionButtons">
+ <h:commandButton id="hello" value="hello"
+ action="#{simpleAction.hello}"/>
+ </div>
+ </h:form>
+
+</ui:define>
+
+</ui:composition>
+]]></programlisting>
+ <figure>
+ <title>Generated form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newseamproj23.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <emphasis>#{simpleAction.value}</emphasis> notation on the web page maps to the "value" property in the backend component named "simpleAction", and the <emphasis>#{simpleAction.hello}</emphasis> notation indicates that the <emphasis><property>hello()</property></emphasis> method is called when the button is clicked on. Here is the "simpleAction" named backend <property>Seam</property> component generated by the wizard.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+@Name("simpleAction")
+public class SimpleAction {
+
+ @Logger private Log log;
+
+ @In
+ FacesMessages facesMessages;
+
+ private String value;
+
+ //seam-gen method
+ public String hello()
+ {
+ //implement your business logic here
+ log.info("simpleAction.echo() action called with: #{simpleAction.value}");
+ facesMessages.add("echo #{simpleAction.value}");
+ return "success";
+ }
+
+ //add additional action methods
+
+ @Length(max=10)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
+]]></programlisting>
+
+ <para>Load the Simplepage.seam in the web browser. Type something in the text field and click on the "hello" button. A JSF message containing the input string is created by the <emphasis><property>SimpleAction.hello()</property></emphasis> method. The message is displayed on the page via the <emphasis role="bold"><property><h:messages></property></emphasis> tag.</para>
+
+ </section>
+
+ <section>
+ <title>Input Validation</title>
+
+ <para>Notice that in the generated SimpleAction class, there is a <emphasis>@Length</emphasis> annotation to validate the input when the input string is bound to <emphasis>#{simpleAction.value}</emphasis>. To see how this works, enter a text string longer than 10 chars and click on the button. This is what you should see.</para>
+
+ <figure>
+ <title>The input validation in action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/xxxx.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><property>Seam</property> supports many different input validation annotations. To see an example, you can replace the <emphasis>@Length(max=10)</emphasis> annotation with the following. It would require the input string to have a first name and last name separated by a space. If the validation fails, the web page would print the customized error message.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+@NotNull
+@Pattern(regex="^[a-zA-Z.-]+ [a-zA-Z.-]+",
+ message="Need a firstname and a lastname")
+public String getValue()
+{
+ return value;
+}
+]]></programlisting>
+
+ <para>Save the Java file, deploy the application, and reload the browser to see the new validation scheme in action.</para>
+
+ <figure>
+ <title>More input validation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/xxxx.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Add a new UI Component</title>
+
+ <para>Now, let's add a little more logic to the application. We will add a new boolean property to the action component. If it is set to true, the action would capitalize the input string and display it on the web page. The following code in the SimpleAction class implements the logic.</para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("simpleAction")
+public class SimpleAction {
+
+ private boolean convertToCap;
+
+ public boolean getConvertToCap () { return convertToCap; }
+ public void setConvertToCap (boolean b) { convertToCap = b; }
+
+ public String hello()
+ {
+ if (convertToCap) {
+ value = value.toUpperCase ();
+ }
+ return null;
+ }
+ ... ...
+}
+]]></programlisting>
+
+ <para>Next, on the web page, add the following line to display the value property on the simpleAction component. Notice that code completion is supported for the JSF EL expression.</para>
+
+ <programlisting role="XML"><![CDATA[<p><b>Hello, #{simpleAction.value}</b></p>
+]]></programlisting>
+
+ <para>Finally, on the web page, we add a boolean selection box component. It is bound to the <emphasis><property>convertToCap</property></emphasis> property on the backend component.</para>
+
+ <programlisting role="XML"><![CDATA[<h:selectBooleanCheckbox title="convertToCap"
+ value="#{simpleAction.convertToCap}" />
+Capitalize the input?
+]]></programlisting>
+
+ <para>Deploy the application and see it in action now.</para>
+
+ <figure>
+ <title>Add UI components and business logic</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/xxxx.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Add Security to the Application</title>
+
+ <para>You have probably noticed that the web page template has a login link at the top of the page. You can use the <property>Seam</property> security framework to secure access to any web page or web action. You can implement the login logic in the <emphasis>checkLoggedIn</emphasis> method. In the following example, we just use hardcoded username and password. But you can easily change it to use database, LDAP or any other means.</para>
+
+ <programlisting role="JAVA"><![CDATA[
+]]></programlisting>
+
+ <para>Then, on the action method, you can use the <emphasis>@AroundInvoke</emphasis> annotation to specify that it is only invoked by authenticated users.</para>
+
+ <programlisting role="JAVA"><![CDATA[public class LoggedInInterceptor
+ {
+ @AroundInvoke
+ public Object checkLoggedIn(InvocationContext invocation) throws Exception
+ {
+ boolean isLoggedIn = Contexts.getSessionContext().get("loggedIn")!=null;
+ if (isLoggedIn) {
+ //the user is already logged in
+ return invocation.proceed();
+ }
+ else {
+ //the user is not logged in, fwd to login page
+ return "login";
+ }
+ }
+}
+]]></programlisting>
+
+ <para>Now, re-deploy the application and try the action button. The application redirects to the <emphasis>login</emphasis> page asking for login credentials. The method is invoked after you successfully logged in.</para>
+
+ <figure>
+ <title>Access control for action methods</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/xxxx.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We can also secure web pages. You can edit the <emphasis>Authenticator.java</emphasis> file to put an access constraint on the login page.</para>
+
+ <programlisting role="JAVA"><![CDATA[package.org.domain.MySeamProj.session;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.identity;
+
+ @Name ("authenticator")
+ public class Authenticator
+ {
+ @Logger Log log;
+ @In Identity identity;
+
+ public boolean authenticate()
+ {
+ log.info("authenticating #0", identity.getUserName());
+ //write your authentication logic here,
+ //return true if the authentication was
+ //successful, false otherwise
+ identity.addRole("admin");
+ return true;
+ }
+ }
+]]></programlisting>
+
+ <para>You can try to load the http://localhost:8080/MySeamProj/ URL in the browser and it will redirect to ask for login.</para>
+
+ </section>
+
+
+<section id="OtherRelevantResourcesOnTheTopic2">
+<?dbhtml filename="OtherRelevantResourcesOnTheTopic2.html"?>
+<title>Other relevant resources on the topic</title>
+<para>Seam on JBoss: <ulink url="http://www.jboss.com/products/seam">Seam Framework</ulink></para>
+
+<para>Ten Good Reasons to use Seam: <ulink url="http://www.jboss.com/products/seam/whyseam">Why Seam</ulink></para>
+<para>Getting Started: <ulink url="http://labs.jboss.com/jbossseam/gettingstarted">Getting Started with JBoss Seam</ulink></para>
+<para>Wiki: <ulink url="http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam">JBoss Wiki</ulink></para>
+<para>FAQ: <ulink url="http://labs.jboss.com/jbossseam/faq/index.html">JBoss Seam FAQ</ulink></para>
+<para>Downloads: <ulink url="http://labs.jboss.com/jbossseam/download">JBoss Seam Downloads</ulink></para>
+<para>Jira: <ulink url="http://jira.jboss.org/jira/browse/JBSEAM">Jira issue tracker</ulink></para>
+<para>Rules Framework: <ulink url="http://www.jboss.com/products/rules">JBoss Rules</ulink></para>
+<para>Seam Tools:New and Noteworthy: <ulink url="http://fisheye.jboss.org/browse/~raw,r=3993/JBossTools/trunk/documentatio...">What's new and noteworthy</ulink></para>
+
+</section>
+</chapter>
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-10-15 13:53:14 UTC (rev 4189)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-10-15 14:01:10 UTC (rev 4190)
@@ -282,11 +282,11 @@
<para><emphasis role="bold">What version of Eclipse does Red Hat Developer Studio support?</emphasis></para>
<para>Red Hat Developer Studio works with Eclipse 3.3</para>
</section> -->
- <section id="Downloading">
+ <!--<section id="Downloading">
<title>Downloading</title>
<para><emphasis role="bold">Where can I download a copy of Red Hat Developer Studio?</emphasis></para>
<para>Go to <ulink url="http://www.redhat.com/developers/rhds/index.html">Download Page</ulink></para>
- </section>
+ </section>-->
<section id="Installation_Issues">
<title>Installation Issues</title>
<para><emphasis role="bold">Visual Editor does not start under Linux</emphasis></para>
@@ -349,7 +349,7 @@
<title>Other relevant resources on the topic</title>
<para>RHDS on JBoss: <ulink url="http://labs.jboss.com/rhdevstudio/">Red Hat Developer Studio</ulink></para>
<para>Forum: <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss Forum</ulink></para>
-<para>Download: <ulink url="http://www.exadel.com/web/portal/download/esp35">RHDS Download</ulink></para>
+<para>Download: <ulink url="http://www.redhat.com/developers/rhds/index.html">RHDS Download</ulink></para>
</section>
</chapter>
17 years, 3 months
JBoss Tools SVN: r4189 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/preferences and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 09:53:14 -0400 (Mon, 15 Oct 2007)
New Revision: 4189
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
Log:
JBIDE-582
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-10-15 13:17:01 UTC (rev 4188)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-10-15 13:53:14 UTC (rev 4189)
@@ -333,13 +333,13 @@
id="org.jboss.tools.seam.ui.enableSeamAction"
nameFilter="*"
objectClass="org.eclipse.core.resources.IProject">
- <action
+ <!--action
class="org.jboss.tools.seam.ui.builder.ToggleSeamNatureAction"
enablesFor="+"
id="org.jboss.tools.seam.ui.addRemoveSeamNatureAction"
label="Add/Remove Seam support"
menubarPath="additions">
- </action>
+ </action-->
</objectContribution>
</extension>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2007-10-15 13:17:01 UTC (rev 4188)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2007-10-15 13:53:14 UTC (rev 4189)
@@ -19,6 +19,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
@@ -186,11 +187,13 @@
private void validate() {
if(getSeamSupport() && (runtime.getValue()== null || "".equals(runtime.getValue()))) { //$NON-NLS-1$
- setValid(false);
- setErrorMessage(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_IS_NOT_SELECTED);
+// setValid(false);
+ setMessage(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_IS_NOT_SELECTED, IMessageProvider.WARNING);
+// setErrorMessage(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_IS_NOT_SELECTED);
} else {
setValid(true);
setErrorMessage(null);
+ setMessage(null, IMessageProvider.WARNING);
}
}
17 years, 3 months
JBoss Tools SVN: r4188 - trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 09:17:01 -0400 (Mon, 15 Oct 2007)
New Revision: 4188
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
Log:
JBIDE-535
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2007-10-15 13:16:35 UTC (rev 4187)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2007-10-15 13:17:01 UTC (rev 4188)
@@ -1631,11 +1631,11 @@
PROPERTIES="support=org.jboss.tools.struts.webprj.model.helpers.sync.SyncProjectSupport"
displayName="Modules Configuration" kind="action" name="SynchronizeModules"/>
<XActionItem kind="list" name="Registration">
- <XActionItem HIDE="disabled"
+ <XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jst.web.model.handlers.UnregisterInServerXmlHandler"
ICON="action.empty"
displayName="Unregister Web Context from server.xml" kind="action" name="UnregisterInServerXML"/>
- <XActionItem
+ <XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jst.web.model.handlers.RegisterInServerXmlHandler"
ICON="action.empty"
displayName="Register Web Context in server.xml" kind="action" name="RegisterInServerXML"/>
17 years, 3 months
JBoss Tools SVN: r4187 - trunk/struts/plugins/org.jboss.tools.struts/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 09:16:35 -0400 (Mon, 15 Oct 2007)
New Revision: 4187
Modified:
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/strutsprojects.meta
Log:
JBIDE-535
Modified: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/strutsprojects.meta
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/strutsprojects.meta 2007-10-15 13:16:09 UTC (rev 4186)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/strutsprojects.meta 2007-10-15 13:16:35 UTC (rev 4187)
@@ -244,12 +244,12 @@
</XActionItem>
<XActionItem kind="list" name="Separator"/>
<XActionItem kind="list" name="Registration">
- <XActionItem
+ <XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jst.web.model.handlers.ServerXmlRedirectHandler"
ICON="action.empty"
PROPERTIES="actionpath=Registration/RegisterInServerXML"
displayName="Register Web Context in server.xml" kind="action" name="RegisterInServerXML"/>
- <XActionItem
+ <XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jst.web.model.handlers.ServerXmlRedirectHandler"
ICON="action.empty"
PROPERTIES="actionpath=Registration/UnregisterInServerXML"
17 years, 3 months
JBoss Tools SVN: r4186 - trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 09:16:09 -0400 (Mon, 15 Oct 2007)
New Revision: 4186
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta
Log:
JBIDE-535
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta 2007-10-15 13:15:34 UTC (rev 4185)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsfprojects.meta 2007-10-15 13:16:09 UTC (rev 4186)
@@ -307,12 +307,12 @@
<XActionItem ICON="action.empty" displayName="Red Hat Developer Studio JSF"
group="1" kind="list" name="JSFStudio">
<XActionItem kind="list" name="Registration">
- <XActionItem
+ <XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jst.web.model.handlers.ServerXmlRedirectHandler"
ICON="action.empty"
PROPERTIES="actionpath=Registration/RegisterInServerXML"
displayName="Register Web Context in server.xml" kind="action" name="RegisterInServerXML"/>
- <XActionItem
+ <XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jst.web.model.handlers.ServerXmlRedirectHandler"
ICON="action.empty"
PROPERTIES="actionpath=Registration/UnregisterInServerXML"
17 years, 3 months
JBoss Tools SVN: r4185 - trunk/jsf/plugins/org.jboss.tools.jsf.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 09:15:34 -0400 (Mon, 15 Oct 2007)
New Revision: 4185
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.properties
trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.xml
Log:
JBIDE-535
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.properties 2007-10-15 13:14:45 UTC (rev 4184)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.properties 2007-10-15 13:15:34 UTC (rev 4185)
@@ -8,8 +8,6 @@
popupMenus.action.addJSFNature=Add JSF Capabilities...
popupMenus.action.removeJSFNature=Remove JSF Capabilities
-popupMenus.action.registerInServerXml=Register Web Context in server.xml
-popupMenus.action.unregisterFromServerXml=Unregister Web Context from server.xml
popupMenus.action.addCustomCapabilities=Add Custom Capabilities...
jsf.views.category.name=Red Hat Developer Studio
jsf.projects.navigator.name=JSF Projects
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.xml 2007-10-15 13:14:45 UTC (rev 4184)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/plugin.xml 2007-10-15 13:15:34 UTC (rev 4185)
@@ -126,20 +126,6 @@
label="%popupMenus.action.addCustomCapabilities"
menubarPath="RedHat4Web/d">
</action>
- <!--action
- class="org.jboss.tools.jsf.ui.action.UnregisterFromServerXmlActionDelegate"
- enablesFor="*"
- id="org.jboss.tools.jsf.ui.action.UnregisterFromServerXmlActionDelegate"
- label="%popupMenus.action.unregisterFromServerXml"
- menubarPath="RedHat4Web/c">
- </action-->
- <!--action
- class="org.jboss.tools.jsf.ui.action.RegisterInServerXmlActionDelegate"
- enablesFor="*"
- id="org.jboss.tools.jsf.ui.action.RegisterInServerXmlActionDelegate"
- label="%popupMenus.action.registerInServerXml"
- menubarPath="RedHat4Web/c">
- </action-->
</objectContribution>
<!-- IJavaProject -->
<objectContribution id="JSF_IJavaProject" objectClass="org.eclipse.jdt.core.IJavaProject">
@@ -180,20 +166,6 @@
label="%popupMenus.action.addCustomCapabilities"
menubarPath="RedHat4Web/d">
</action>
- <!--action
- class="org.jboss.tools.jsf.ui.action.UnregisterFromServerXmlActionDelegate"
- enablesFor="*"
- id="org.jboss.tools.jsf.ui.action.UnregisterFromServerXmlActionDelegate"
- label="%popupMenus.action.unregisterFromServerXml"
- menubarPath="RedHat4Web/c">
- </action-->
- <!--action
- class="org.jboss.tools.jsf.ui.action.RegisterInServerXmlActionDelegate"
- enablesFor="*"
- id="org.jboss.tools.jsf.ui.action.RegisterInServerXmlActionDelegate"
- label="%popupMenus.action.registerInServerXml"
- menubarPath="RedHat4Web/c">
- </action-->
</objectContribution>
<!-- IFile -->
<!--objectContribution id="JSF_IFile" objectClass="org.eclipse.core.resources.IFile">
17 years, 3 months
JBoss Tools SVN: r4184 - trunk/common/plugins/org.jboss.tools.common.model.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-15 09:14:45 -0400 (Mon, 15 Oct 2007)
New Revision: 4184
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties
Log:
JBIDE-535
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties 2007-10-15 13:13:48 UTC (rev 4183)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.properties 2007-10-15 13:14:45 UTC (rev 4184)
@@ -3,8 +3,6 @@
popupMenus.action.verify=Verify
popupMenus.action.removeStrutsNature=Remove Struts Nature
-popupMenus.action.registerInServerXml=Register Web Context in server.xml
-popupMenus.action.unregisterFromServerXml=Unregister Web Context from server.xml
views.name=Red Hat
17 years, 3 months