JBoss Tools SVN: r3436 - trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-04 06:26:53 -0400 (Tue, 04 Sep 2007)
New Revision: 3436
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java
Log:
JBIDE-706
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java 2007-09-04 09:17:54 UTC (rev 3435)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java 2007-09-04 10:26:53 UTC (rev 3436)
@@ -26,12 +26,19 @@
if(roleName == null) return null;
if(roleName.length() == 0) {
return fire(object, "role.empty", attr, null);
- } else if(findRole(o, roleName) == null) {
+ } else if(!isRoleNameOk(o, roleName)) {
return fire(object, "role", attr, roleName);
}
return null;
}
+ boolean isRoleNameOk(XModelObject mapping, String roleName) {
+ if(roleName.equalsIgnoreCase("NONE")) return true;
+ if("*".equals(roleName)) return true;
+ if(findRole(mapping, roleName) != null) return true;
+ return false;
+ }
+
XModelObject findRole(XModelObject mapping, String name) {
XModelObject webxml = WebAppHelper.getParentFile(mapping);
if(webxml == null) return null;
16 years, 8 months
JBoss Tools SVN: r3435 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-09-04 05:17:54 -0400 (Tue, 04 Sep 2007)
New Revision: 3435
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
code adjustment
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-09-04 09:12:44 UTC (rev 3434)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-09-04 09:17:54 UTC (rev 3435)
@@ -288,7 +288,6 @@
}
public nsIWebBrowser getWebBrowser() {
- System.out.println("getWebBrouser");
return webBrowser;
}
@@ -326,7 +325,6 @@
*/
public void onLocationChange(nsIWebProgress arg0, nsIRequest arg1,
nsIURI arg2) {
- System.out.println("On location change");
}
/* (non-Javadoc)
@@ -356,7 +354,6 @@
* @see org.mozilla.interfaces.nsIWebProgressListener#onStatusChange(org.mozilla.interfaces.nsIWebProgress, org.mozilla.interfaces.nsIRequest, long, java.lang.String)
*/
public void onStatusChange(nsIWebProgress arg0, nsIRequest arg1, long aStatus, String message) {
- System.out.println("on status change");
}
16 years, 8 months
JBoss Tools SVN: r3434 - in branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-09-04 05:12:44 -0400 (Tue, 04 Sep 2007)
New Revision: 3434
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java
Log:
code adjustment
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-09-04 09:03:44 UTC (rev 3433)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-09-04 09:12:44 UTC (rev 3434)
@@ -11,14 +11,12 @@
******************************************************************************/
package org.jboss.tools.vpe.dnd;
-import org.eclipse.swt.graphics.Rectangle;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.mozilla.EditorDomEventListener;
import org.jboss.tools.vpe.editor.mozilla.MozillaDropInfo;
import org.mozilla.interfaces.nsIComponentManager;
import org.mozilla.interfaces.nsIDOMEvent;
import org.mozilla.interfaces.nsIDOMMouseEvent;
-import org.mozilla.interfaces.nsIDOMNSHTMLElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDragService;
import org.mozilla.interfaces.nsIServiceManager;
@@ -26,7 +24,6 @@
import org.mozilla.interfaces.nsISupportsString;
import org.mozilla.interfaces.nsITransferable;
import org.mozilla.xpcom.Mozilla;
-import org.mozilla.xpcom.XPCOMException;
/**
* @author Max Areshkau
@@ -55,39 +52,7 @@
*/
private nsIDragService dragService;
- public Rectangle getBounds(nsIDOMNode visualNode) {
- try {
-
- nsIDOMNSHTMLElement domNSHTMLElement = (nsIDOMNSHTMLElement) visualNode.queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
- int offsetLeft=domNSHTMLElement.getOffsetLeft();
- int offsetTop =domNSHTMLElement.getOffsetTop();
- while(true) {
-
- try{
-
- if(domNSHTMLElement.getOffsetParent()==null) {
- break;
- }
-
- domNSHTMLElement=(nsIDOMNSHTMLElement) domNSHTMLElement.getOffsetParent().queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
- offsetLeft+=domNSHTMLElement.getOffsetLeft();
- offsetTop+=domNSHTMLElement.getOffsetTop();
- } catch(XPCOMException ex){
- break;
- }
- }
-
- return new Rectangle(offsetLeft, offsetTop,domNSHTMLElement.getOffsetWidth(),domNSHTMLElement.getOffsetHeight());
-
- } catch(XPCOMException xpcomException) {
-
- //TODO Max Areshkau
- //If node not not implement nsIDOMNSHTMLElement, may be check best take a parent node
- return new Rectangle(0, 0, 0,0);
- }
- }
-
/**
* Starts drag session
* @param dragetElement
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-09-04 09:03:44 UTC (rev 3433)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-09-04 09:12:44 UTC (rev 3434)
@@ -55,21 +55,17 @@
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.TextUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeDndUtil;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
import org.mozilla.interfaces.nsIDOMAttr;
-import org.mozilla.interfaces.nsIDOMChromeWindow;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMEventGroup;
-import org.mozilla.interfaces.nsIDOMEventTarget;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsIDOMText;
-import org.mozilla.interfaces.nsIEventTarget;
-import org.mozilla.interfaces.nsIWebBrowserChrome;
import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -1370,7 +1366,7 @@
Rectangle getNodeBounds(nsIDOMNode visualNode) {
- return dnd.getBounds(visualNode);
+ return VpeDndUtil.getBounds(visualNode);
}
static boolean canInsertAfter(int x, int y, Rectangle rect) {
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java 2007-09-04 09:03:44 UTC (rev 3433)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java 2007-09-04 09:12:44 UTC (rev 3434)
@@ -14,10 +14,14 @@
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.graphics.Rectangle;
import org.jboss.tools.common.model.ui.dnd.DnDUtil;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
import org.jboss.tools.vpe.VpePlugin;
+import org.mozilla.interfaces.nsIDOMNSHTMLElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.xpcom.XPCOMException;
public class VpeDndUtil {
public static boolean isDropEnabled(IModelObjectEditorInput input){
@@ -39,4 +43,41 @@
VpePlugin.getPluginLog().logError(ex);
}
}
+
+ /**
+ *
+ * @param visualNode
+ * @return returns absolute position and size of visual node
+ */
+ public static Rectangle getBounds(nsIDOMNode visualNode) {
+ try {
+
+ nsIDOMNSHTMLElement domNSHTMLElement = (nsIDOMNSHTMLElement) visualNode.queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
+ int offsetLeft=domNSHTMLElement.getOffsetLeft();
+ int offsetTop =domNSHTMLElement.getOffsetTop();
+ while(true) {
+
+ try{
+
+ if(domNSHTMLElement.getOffsetParent()==null) {
+ break;
+ }
+
+ domNSHTMLElement=(nsIDOMNSHTMLElement) domNSHTMLElement.getOffsetParent().queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
+ offsetLeft+=domNSHTMLElement.getOffsetLeft();
+ offsetTop+=domNSHTMLElement.getOffsetTop();
+ } catch(XPCOMException ex){
+ break;
+ }
+ }
+
+ return new Rectangle(offsetLeft, offsetTop,domNSHTMLElement.getOffsetWidth(),domNSHTMLElement.getOffsetHeight());
+
+ } catch(XPCOMException xpcomException) {
+
+ //TODO Max Areshkau
+ //If node not not implement nsIDOMNSHTMLElement, may be check best take a parent node
+ return new Rectangle(0, 0, 0,0);
+ }
+ }
}
16 years, 8 months
JBoss Tools SVN: r3433 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-09-04 05:03:44 -0400 (Tue, 04 Sep 2007)
New Revision: 3433
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-744
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-09-03 18:26:45 UTC (rev 3432)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-09-04 09:03:44 UTC (rev 3433)
@@ -59,7 +59,25 @@
try {
nsIDOMNSHTMLElement domNSHTMLElement = (nsIDOMNSHTMLElement) visualNode.queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
- return new Rectangle(domNSHTMLElement.getOffsetLeft(), domNSHTMLElement.getOffsetTop(),domNSHTMLElement.getOffsetWidth(),domNSHTMLElement.getOffsetHeight());
+ int offsetLeft=domNSHTMLElement.getOffsetLeft();
+ int offsetTop =domNSHTMLElement.getOffsetTop();
+ while(true) {
+
+ try{
+
+ if(domNSHTMLElement.getOffsetParent()==null) {
+ break;
+ }
+
+ domNSHTMLElement=(nsIDOMNSHTMLElement) domNSHTMLElement.getOffsetParent().queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
+ offsetLeft+=domNSHTMLElement.getOffsetLeft();
+ offsetTop+=domNSHTMLElement.getOffsetTop();
+ } catch(XPCOMException ex){
+ break;
+ }
+ }
+
+ return new Rectangle(offsetLeft, offsetTop,domNSHTMLElement.getOffsetWidth(),domNSHTMLElement.getOffsetHeight());
} catch(XPCOMException xpcomException) {
@@ -69,6 +87,7 @@
}
}
+
/**
* Starts drag session
* @param dragetElement
16 years, 8 months
JBoss Tools SVN: r3432 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/calendar and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-09-03 14:26:45 -0400 (Mon, 03 Sep 2007)
New Revision: 3432
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847 Fdd RichFaces Calendar template
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.css 2007-09-03 18:26:45 UTC (rev 3432)
@@ -0,0 +1,137 @@
+.rich-calendar-exterior {
+ border: 1px solid #c0c0c0; /*panelBorderColor*/
+}
+
+.rich-calendar-btn {
+ cursor: pointer;
+}
+
+.rich-calendar-header {
+ border-bottom: 1px solid #c0c0c0; /*panelBorderColor*/
+ background: #C7D7EC; /*additionalBackgroundColor*/
+ font-size: 11px; /*generalSizeFont*/
+ font-family: verdana; /*generalFamilyFont*/
+ padding: 7px;
+ height: 22px;
+}
+
+.rich-cell-size {
+ width: 25px;
+ height: 22px;
+}
+
+.rich-calendar-cell {
+ background-color: #FFFFFF; /*generalBackgroundColor*/
+ border-bottom: 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right: 1px solid #c0c0c0; /*panelBorderColor*/
+ font-size: 11px; /*generalSizeFont*/
+ font-family: verdana; /*generalFamilyFont*/
+ padding: 0px;
+ vertical-align: middle;
+ text-align: center;
+}
+
+.rich-calendar-tool {
+ border-bottom: 1px solid #c0c0c0; /*panelBorderColor*/
+ background-color: #D4CFC7; /*headerBackgroundColor*/
+ font-size: 11px; /*headerSizeFont*/
+ font-family: Arial, Verdana, sans-serif;
+ color: #000000; /*headerTextColor*/
+ font-weight: bold;
+ vertical-align: middle;
+ text-align: center;
+ width: 25px;
+ height: 22px;
+}
+
+.rich-calendar-month {
+ border-bottom: 1px solid #c0c0c0; /*panelBorderColor*/
+ background-color: #D4CFC7; /*headerBackgroundColor*/
+ border-bottom-color: #C4C0B9;
+ font-size: 11px; /*headerSizeFont*/
+ font-family: Arial, Verdana, sans-serif;
+ color: #000000;
+ /*headerTextColor*/
+ font-weight: bold;
+ vertical-align: middle;
+ text-align: center;
+ color: #000000;
+ font-size: 11px
+}
+
+.rich-calendar-days {
+ background: #F1EEE9 none repeat scroll 0%;
+ border-bottom: 1px solid #C4C0B9; /*panelBorderColor*/
+ border-right: 0px solid #C4C0B9; /*panelBorderColor*/
+ font-size: 11px; /*generalSizeFont*/
+ font-family: Arial, Verdana, sans-serif;
+ vertical-align: middle;
+ text-align: center;
+ height: 22px;
+ vertical-align: middle;
+}
+
+.rich-calendar-week {
+ border-bottom: 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right: 1px solid #c0c0c0; /*panelBorderColor*/
+ font-size: 11px; /*generalSizeFont*/
+ font-family: verdana; /*generalFamilyFont*/
+ background-color: #f5f5f5; /*unknown parameter - need to add*/
+ vertical-align: middle;
+ text-align: center;
+ width: 25px;
+}
+
+.rich-calendar-holly {
+ background-color: # #FFEBDA; /*unknown parameter - need to add*/
+ color: #FF7800; /*unknown parameter - need to add*/
+}
+
+.rich-calendar-today {
+ background-color: #ff7800; /*unknown parameter - need to add*/
+ color: #ffebda; /*unknown parameter - need to add*/
+ font-weight: bold;
+}
+
+.rich-calendar-spec {
+ background-color: #e4f5e2; /*unknown parameter - need to add*/
+}
+
+.rich-calendar-select {
+ background-color: #224986; /*headerBackgroundColor*/
+ color: #FFFFFF; /*headerTextColor*/
+ font-weight: bold;
+}
+
+.rich-right-cell {
+ border-right: 0px;
+}
+
+.rich-bottom-cell {
+ border-bottom: 0px;
+}
+
+.rich-calendar-toolfooter {
+ border-top: 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right: 0px solid #c0c0c0; /*panelBorderColor*/
+ background: #F1EEE9; /*additionalBackgroundColor*/
+ font-size: 11px; /*generalSizeFont*/
+ font-family: verdana; /*generalFamilyFont*/
+ padding: 0px 7px 0px 7px;
+ height: 22px;
+}
+
+.rich-calendar-footer {
+ border-top: 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right: 0px solid #c0c0c0; /*panelBorderColor*/
+ background: #C7D7EC; /*additionalBackgroundColor*/
+ font-size: 11px; /*generalSizeFont*/
+ font-family: verdana; /*generalFamilyFont*/
+ padding: 7px;
+ height: 22px;
+}
+
+.rich-calendar-popupicon {
+ cursor: pointer;
+ vertical-align: middle;
+}
\ No newline at end of file
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/calendar/calendar.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2007-09-03 17:17:53 UTC (rev 3431)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2007-09-03 18:26:45 UTC (rev 3432)
@@ -20,6 +20,9 @@
/** HTML TAG DL */
public static final String HTML_TAG_DL = "dl";
+
+ /** HTML TAG BR */
+ public static final String HTML_TAG_BR = "br";
/** HTML TAG DT */
public static final String HTML_TAG_DT = "dt";
@@ -32,7 +35,7 @@
/** HTML_TAG_TBODY * */
public static final String HTML_TAG_TBODY = "TBODY";
-
+
/** HTML_TAG_TR * */
public static final String HTML_TAG_TR = "TR";
@@ -120,6 +123,12 @@
/** HTML_TYPE_ATTR * */
public static final String HTML_TYPE_ATTR = "type";
+ /** HTML_READONLY_ATTR * */
+ public static final String HTML_READONLY_ATTR = "readonly";
+
+ /** HTML_TAG_BUTTON * */
+ public static final String HTML_TAG_BUTTON = "button";
+
/** HTML_VALUE_ATTR * */
public static final String HTML_VALUE_ATTR = "value";
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2007-09-03 18:26:45 UTC (rev 3432)
@@ -0,0 +1,454 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+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.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Displays template for calendar
+ *
+ * @author dsakovich(a)exadel.com
+ *
+ */
+public class RichFacesCalendarTemplate extends VpeAbstractTemplate {
+
+ static String[] HEADER_CONTENT = { "<<", "<", "", ">", ">>" };
+ private String[] weeks = new String[7];
+ private int[] monthDays = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+
+ final static String STYLE_PATH = "calendar/calendar.css";
+ final static String BUTTON_IMG = "calendar/calendar.gif";
+ final static int COLUMN = 8;
+ final static String FILL_WIDTH = "100%";
+ final static int NUM_DAYS_IN_WEEK = 7;
+ final static String TODAY = "Today";
+ final static int CALENDAR_WIDTH = 200;
+ final static int CALENDAR_IMAGE_WIDTH = 20;
+ final static String ATTRIBUTE_POPUP = "popup";
+ final static String ATTRIBUTE_TEXT = "text";
+
+ public RichFacesCalendarTemplate() {
+ super();
+ Calendar cal = Calendar.getInstance();
+ int firstDayOfWeek = cal.getFirstDayOfWeek();
+ while (firstDayOfWeek != cal.get(Calendar.DAY_OF_WEEK)) {
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+ }
+
+ SimpleDateFormat sdf = new SimpleDateFormat("EE");
+ for (int i = 0; i < NUM_DAYS_IN_WEEK; i++) {
+ weeks[i] = new String(sdf.format(cal.getTime()));
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+ }
+
+ }
+
+ /**
+ * Creates a node of the visual tree on the node of the source tree. This
+ * visual node should not have the parent node This visual node can have
+ * child nodes.
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceNode
+ * The current node of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @return The information on the created node of the visual tree.
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ Element source = (Element) sourceNode;
+ String popup = source.getAttribute(ATTRIBUTE_POPUP);
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "calendar");
+ VpeCreationData creationData;
+ if (popup != null && popup.equalsIgnoreCase("false")) {
+ nsIDOMElement calendar = createCalendar(visualDocument);
+ creationData = new VpeCreationData(calendar);
+ } else {
+ nsIDOMElement calendarWithPopup = createCalendarWithPopup(
+ visualDocument, source);
+ creationData = new VpeCreationData(calendarWithPopup);
+ }
+ return creationData;
+ }
+
+ /**
+ *
+ * @param visualDocument
+ * @return Node of the visual tree.
+ */
+ private nsIDOMElement createCalendarWithPopup(
+ nsIDOMDocument visualDocument, Element source) {
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
+ + "px;");
+ nsIDOMElement input = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_INPUT);
+ input.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : "
+ + (CALENDAR_WIDTH - CALENDAR_IMAGE_WIDTH) + "px;");
+ input.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR, ATTRIBUTE_TEXT);
+ input.setAttribute(HtmlComponentUtil.HTML_READONLY_ATTR, "true");
+ String value = source.getAttribute(HtmlComponentUtil.HTML_VALUE_ATTR);
+ if (value != null) {
+ input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
+ }
+
+ nsIDOMElement image = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ image.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-popupicon");
+ ComponentUtil.setImg(image, BUTTON_IMG);
+
+ div.appendChild(input);
+ div.appendChild(image);
+
+ return div;
+ }
+
+ /**
+ * Checks, whether it is necessary to re-create an element at change of
+ * attribute
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceElement
+ * The current element of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @param visualNode
+ * The current node of the visual tree.
+ * @param data
+ * The arbitrary data, built by a method <code>create</code>
+ * @param name
+ * Atrribute name
+ * @param value
+ * Attribute value
+ * @return <code>true</code> if it is required to re-create an element at
+ * a modification of attribute, <code>false</code> otherwise.
+ */
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ if (name.equalsIgnoreCase(ATTRIBUTE_POPUP)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param visualDocument
+ * @return Node of the visual tree.
+ */
+ private nsIDOMElement createCalendar(nsIDOMDocument visualDocument) {
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
+ + "px;");
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "calendar-exterior");
+
+ nsIDOMElement tbody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ nsIDOMElement header = createCalendarHeader(visualDocument);
+ nsIDOMElement calendarBody = createCalendarBody(visualDocument);
+ tbody.appendChild(header);
+ tbody.appendChild(calendarBody);
+ table.appendChild(tbody);
+ div.appendChild(table);
+
+ return div;
+ }
+
+ /**
+ *
+ * @param visualDocument
+ * @return Node of the visual tree.
+ */
+ private nsIDOMElement createCalendarHeader(nsIDOMDocument visualDocument) {
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+
+ SimpleDateFormat sdf = new SimpleDateFormat("MMMM, yyyy");
+ Calendar cal = Calendar.getInstance();
+ HEADER_CONTENT[2] = sdf.format(cal.getTime());
+
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+
+ nsIDOMElement tbody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+
+ nsIDOMElement tr1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ for (int i = 0; i < HEADER_CONTENT.length; i++) {
+ nsIDOMElement td1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ i == 2 ? "rich-calendar-month" : "rich-calendar-tool");
+
+ nsIDOMText text1 = visualDocument.createTextNode(HEADER_CONTENT[i]);
+ td1.appendChild(text1);
+ tr1.appendChild(td1);
+ }
+
+ tbody.appendChild(tr1);
+ table.appendChild(tbody);
+ td.appendChild(table);
+ tr.appendChild(td);
+ return tr;
+ }
+
+ /**
+ *
+ * @param visualDocument
+ * @return Node of the visual tree.
+ */
+ private nsIDOMElement createCalendarBody(nsIDOMDocument visualDocument) {
+ nsIDOMElement tbody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+
+ nsIDOMElement bodyTR = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ for (int i = 0; i < COLUMN; i++) {
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-days");
+ if (i == 0) {
+ nsIDOMElement br = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_BR);
+ td.appendChild(br);
+ } else {
+ nsIDOMText text = visualDocument.createTextNode(i == 0 ? ""
+ : weeks[i - 1]);
+ td.appendChild(text);
+ }
+ bodyTR.appendChild(td);
+ }
+
+ tbody.appendChild(bodyTR);
+
+ // // Calendar body
+ int jumped = 0;
+ int inserted = 1;
+
+ Calendar cal = Calendar.getInstance();
+ int month = cal.get(Calendar.MONTH);
+ int day = cal.get(Calendar.DAY_OF_WEEK);
+ int dayN = cal.get(Calendar.DAY_OF_MONTH);
+ int days = monthDays[month];
+ if (month == 1) {
+ int year = cal.get(Calendar.YEAR);
+ if (year % 4 == 0)
+ days = 29;
+ }
+
+ int start = day - (dayN % NUM_DAYS_IN_WEEK + 1);
+ if (start < 0)
+ start += NUM_DAYS_IN_WEEK;
+ int weeks = (start + days) / NUM_DAYS_IN_WEEK;
+ if ((start + days) % NUM_DAYS_IN_WEEK != 0)
+ weeks++;
+ for (int i = weeks; i > 0; i--) {
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ // Week in year
+ nsIDOMElement weekTD = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ weekTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-week");
+ cal.set(Calendar.DAY_OF_MONTH, inserted);
+ nsIDOMText weekText = visualDocument.createTextNode(""
+ + cal.get(Calendar.WEEK_OF_YEAR));
+ weekTD.appendChild(weekText);
+ tr.appendChild(weekTD);
+ for (int j = NUM_DAYS_IN_WEEK; j > 0; j--) {
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ if (jumped < start || inserted > days) {
+ cal.set(Calendar.DAY_OF_MONTH, inserted);
+ int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
+ td
+ .setAttribute(
+ HtmlComponentUtil.HTML_CLASS_ATTR,
+ (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) ? "rich-cell-size rich-calendar-cell rich-calendar-holly rich-right-cell"
+ : "rich-cell-size rich-calendar-cell rich-calendar-cell");
+ nsIDOMElement br = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_BR);
+ td.appendChild(br);
+ tr.appendChild(td);
+ jumped++;
+ } else {
+ if (inserted == dayN) {
+
+ td
+ .setAttribute(
+ HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-cell-size rich-calendar-cell rich-calendar-today ");
+ nsIDOMText text = visualDocument.createTextNode(""
+ + inserted);
+ td.appendChild(text);
+ tr.appendChild(td);
+ } else {
+ cal.set(Calendar.DAY_OF_MONTH, inserted);
+ int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
+ td
+ .setAttribute(
+ HtmlComponentUtil.HTML_CLASS_ATTR,
+ (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) ? "rich-cell-size rich-calendar-cell rich-calendar-holly rich-right-cell "
+ : "rich-cell-size rich-calendar-cell");
+ nsIDOMText text = visualDocument.createTextNode(""
+ + inserted);
+ td.appendChild(text);
+ tr.appendChild(td);
+ }
+ inserted++;
+ }
+ }
+ tbody.appendChild(tr);
+ }
+
+ // Footer for calendar
+
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+
+ nsIDOMElement tr1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+
+ nsIDOMElement td1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-toolfooter");
+
+ SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
+ cal = Calendar.getInstance();
+
+ nsIDOMText text1 = visualDocument.createTextNode(sdf.format(cal
+ .getTime()));
+ td1.appendChild(text1);
+ tr1.appendChild(td1);
+
+ nsIDOMElement td2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td2.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-toolfooter");
+ tr1.appendChild(td2);
+
+ nsIDOMElement td3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td3.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ td3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-calendar-toolfooter");
+ td3.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
+ HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
+ nsIDOMText text3 = visualDocument.createTextNode(TODAY);
+ td3.appendChild(text3);
+ tr1.appendChild(td3);
+
+ table.appendChild(tr1);
+ td.appendChild(table);
+ tr.appendChild(td);
+
+ tbody.appendChild(tr);
+
+ return tbody;
+ }
+
+ /**
+ *
+ */
+ public void setAttribute(VpePageContext pageContext, Element sourceElement,
+ nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data,
+ String name, String value) {
+ super.setAttribute(pageContext, sourceElement, visualDocument,
+ visualNode, data, name, value);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
+ String popup = sourceElement.getAttribute(ATTRIBUTE_POPUP);
+ if (popup != null && popup.equalsIgnoreCase("false"))
+ return;
+ nsIDOMElement element = (nsIDOMElement) visualNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMNodeList list = element.getChildNodes();
+ nsIDOMNode tableNode = list.item(0);
+ nsIDOMElement input = (nsIDOMElement) tableNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
+ }
+
+ }
+
+ /**
+ *
+ */
+ public void removeAttribute(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name) {
+ super.removeAttribute(pageContext, sourceElement, visualDocument,
+ visualNode, data, name);
+ if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
+ String popup = sourceElement.getAttribute(ATTRIBUTE_POPUP);
+ if (popup != null && popup.equalsIgnoreCase("false"))
+ return;
+ nsIDOMElement element = (nsIDOMElement) visualNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMNodeList list = element.getChildNodes();
+ nsIDOMNode tableNode = list.item(0);
+ nsIDOMElement input = (nsIDOMElement) tableNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ input.removeAttribute(HtmlComponentUtil.HTML_VALUE_ATTR);
+ }
+ }
+}
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 17:17:53 UTC (rev 3431)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 18:26:45 UTC (rev 3432)
@@ -454,7 +454,22 @@
<vpe:tag name="rich:menuSeparator" case-sensitive="yes" >
<vpe:template children="no" modify="no">
</vpe:template>
- </vpe:tag>
+ </vpe:tag>
+
+ <vpe:tag name="rich:calendar" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesCalendarTemplate">
+ <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="no" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="rich:virtualEarth" case-sensitive="yes">
<vpe:template children="no" modify="yes"
16 years, 8 months
JBoss Tools SVN: r3431 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-09-03 13:17:53 -0400 (Mon, 03 Sep 2007)
New Revision: 3431
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create <rich:effect> template
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 16:51:31 UTC (rev 3430)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 17:17:53 UTC (rev 3431)
@@ -507,5 +507,12 @@
</span>
</vpe:template>
</vpe:tag>
+
+ <vpe:tag name="rich:effect" case-sensitive="yes">
+ <vpe:template children="no" modify="yes">
+ <span style="display:none">
+ </span>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
\ No newline at end of file
16 years, 8 months
JBoss Tools SVN: r3430 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-09-03 12:51:31 -0400 (Mon, 03 Sep 2007)
New Revision: 3430
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create <rich:toolTip> template.
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 16:34:56 UTC (rev 3429)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 16:51:31 UTC (rev 3430)
@@ -500,5 +500,12 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
+
+ <vpe:tag name="rich:toolTip" case-sensitive="yes">
+ <vpe:template children="no" modify="yes">
+ <span style="display:none">
+ </span>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
\ No newline at end of file
16 years, 8 months
JBoss Tools SVN: r3429 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: templates and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-09-03 12:34:56 -0400 (Mon, 03 Sep 2007)
New Revision: 3429
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create <rich:messages> template
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2007-09-03 16:33:58 UTC (rev 3428)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2007-09-03 16:34:56 UTC (rev 3429)
@@ -29,38 +29,57 @@
*/
public class RichFacesMessageTemplate extends VpeAbstractTemplate {
- private static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel";
- private static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass";
- private static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass";
- private static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle";
+ protected static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel";
+ protected static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass";
+ protected static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass";
+ protected static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle";
- private static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass";
- private static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass";
- private static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass";
+ protected static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass";
+ protected static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass";
+ protected static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass";
- private static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass";
- private static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass";
- private static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass";
+ protected static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass";
+ protected static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass";
+ protected static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass";
- private static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass";
- private static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass";
- private static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass";
+ protected static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass";
+ protected static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass";
+ protected static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass";
- private static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass";
- private static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass";
- private static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass";
+ protected static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass";
+ protected static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass";
+ protected static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass";
- private static String ERROR_MESSAGE = "Error message";
- private static String FATAL_MESSAGE = "Fatal message";
- private static String INFO_MESSAGE = "Info message";
- private static String WARNING_MESSAGE = "Warning message";
+ protected static String ERROR_MESSAGE = "Error message";
+ protected static String FATAL_MESSAGE = "Fatal message";
+ protected static String INFO_MESSAGE = "Info message";
+ protected static String WARNING_MESSAGE = "Warning message";
- private static String[] markers = { "passedMarker", "errorMarker",
+ protected String passedLabelValue;
+ protected String labelClassValue;
+ protected String markerClassValue;
+ protected String markerStyleValue;
+ protected String errorMarkerClassValue;
+ protected String errorLabelClassValue;
+ protected String errorClassValue;
+ protected String fatalMarkerClassValue;
+ protected String fatalLabelClassValue;
+ protected String fatalClassValue;
+ protected String infoMarkerClassValue;
+ protected String infoLabelClassValue;
+ protected String infoClassValue;
+ protected String warnMarkerClassValue;
+ protected String warnLabelClassValue;
+ protected String warnClassValue;
+ protected String styleValue;
+ protected String styleClassValue;
+
+ protected static String[] markers = { "passedMarker", "errorMarker",
"fatalMarker", "infoMarker", "warnMarker" };
- private static String FACET_TAG_NAME = "f:facet";
+ protected static String FACET_TAG_NAME = "f:facet";
- private static String NAME_ATTRIBUTE_NAME = "name";
+ protected static String NAME_ATTRIBUTE_NAME = "name";
private nsIDOMElement td1; // passed marker
private nsIDOMElement td2; // passed label
@@ -81,57 +100,61 @@
private nsIDOMElement td9; // warn marker
private nsIDOMElement td10; // warn label
- private VpeCreationData creationData;
+ protected VpeCreationData creationData;
- nsIDOMDocument vis;
-
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- vis = visualDocument;
-
- String passedLabelValue = ((Element) sourceNode)
+ passedLabelValue = ((Element) sourceNode)
.getAttribute(PASSED_LABEL_ATTRIBUTE_NAME);
- String labelClassValue = ((Element) sourceNode)
+ labelClassValue = ((Element) sourceNode)
.getAttribute(LABEL_CLASS_ATTRIBUTE_NAME);
- String markerClassValue = ((Element) sourceNode)
+ markerClassValue = ((Element) sourceNode)
.getAttribute(MARKER_CLASS_ATTRIBUTE_NAME);
- String markerStyleValue = ((Element) sourceNode)
+ markerStyleValue = ((Element) sourceNode)
.getAttribute(MARKER_STYLE_ATTRIBUTE_NAME);
- String errorMarkerClassValue = ((Element) sourceNode)
+ errorMarkerClassValue = ((Element) sourceNode)
.getAttribute(ERROR_MARKER_CLASS_ATTRIBUTE_NAME);
- String errorLabelClassValue = ((Element) sourceNode)
+ errorLabelClassValue = ((Element) sourceNode)
.getAttribute(ERROR_LABEL_CLASS_ATTRIBUTE_NAME);
- String errorClassValue = ((Element) sourceNode)
+ errorClassValue = ((Element) sourceNode)
.getAttribute(ERROR_CLASS_ATTRIBUTE_NAME);
- String fatalMarkerClassValue = ((Element) sourceNode)
+ fatalMarkerClassValue = ((Element) sourceNode)
.getAttribute(FATAL_MARKER_CLASS_ATTRIBUTE_NAME);
- String fatalLabelClassValue = ((Element) sourceNode)
+ fatalLabelClassValue = ((Element) sourceNode)
.getAttribute(FATAL_LABEL_CLASS_ATTRIBUTE_NAME);
- String fatalClassValue = ((Element) sourceNode)
+ fatalClassValue = ((Element) sourceNode)
.getAttribute(FATAL_CLASS_ATTRIBUTE_NAME);
- String infoMarkerClassValue = ((Element) sourceNode)
+ infoMarkerClassValue = ((Element) sourceNode)
.getAttribute(INFO_MARKER_CLASS_ATTRIBUTE_NAME);
- String infoLabelClassValue = ((Element) sourceNode)
+ infoLabelClassValue = ((Element) sourceNode)
.getAttribute(INFO_LABEL_CLASS_ATTRIBUTE_NAME);
- String infoClassValue = ((Element) sourceNode)
+ infoClassValue = ((Element) sourceNode)
.getAttribute(INFO_CLASS_ATTRIBUTE_NAME);
- String warnMarkerClassValue = ((Element) sourceNode)
+ warnMarkerClassValue = ((Element) sourceNode)
.getAttribute(WARN_MARKER_CLASS_ATTRIBUTE_NAME);
- String warnLabelClassValue = ((Element) sourceNode)
+ warnLabelClassValue = ((Element) sourceNode)
.getAttribute(WARN_LABEL_CLASS_ATTRIBUTE_NAME);
- String warnClassValue = ((Element) sourceNode)
+ warnClassValue = ((Element) sourceNode)
.getAttribute(WARN_CLASS_ATTRIBUTE_NAME);
- String styleValue = ((Element) sourceNode)
+ styleValue = ((Element) sourceNode)
.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- String styleClassValue = ((Element) sourceNode)
+ styleClassValue = ((Element) sourceNode)
.getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ createRichMessage(visualDocument, sourceNode);
+
+ return creationData;
+ }
+
+ protected void createRichMessage(nsIDOMDocument visualDocument,
+ Node sourceNode) {
+
// -------------------create common table
nsIDOMElement tableHeader = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
@@ -366,15 +389,40 @@
tr5.appendChild(td9);
tr5.appendChild(td10);
td10.appendChild(warnText);
+ }
- return creationData;
+ /**
+ * Checks, whether it is necessary to re-create an element at change of
+ * attribute
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceElement
+ * The current element of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @param visualNode
+ * The current node of the visual tree.
+ * @param data
+ * The arbitrary data, built by a method <code>create</code>
+ * @param name
+ * Atrribute name
+ * @param value
+ * Attribute value
+ * @return <code>true</code> if it is required to re-create an element at
+ * a modification of attribute, <code>false</code> otherwise.
+ */
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
}
/**
*
* @param td01
*/
- private void addNotFacetComponent(nsIDOMElement td01, Node sourceNode) {
+ protected void addNotFacetComponent(nsIDOMElement td01, Node sourceNode) {
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td01);
creationData.addChildrenInfo(childrenInfo);
@@ -393,7 +441,7 @@
* Marker name
* @return True if marker name correct or false
*/
- private boolean searchInMarker(String markerName) {
+ protected boolean searchInMarker(String markerName) {
if (markerName == null)
return false;
@@ -409,7 +457,7 @@
* @param td
* @param elemFacet
*/
- private void createVisualFacet(nsIDOMElement td, Element elemFacet) {
+ protected void createVisualFacet(nsIDOMElement td, Element elemFacet) {
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td);
creationData.addChildrenInfo(childrenInfo);
@@ -423,33 +471,6 @@
return;
}
}
-
- /**
- * Checks, whether it is necessary to re-create an element at change of
- * attribute
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceElement
- * The current element of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @param visualNode
- * The current node of the visual tree.
- * @param data
- * The arbitrary data, built by a method <code>create</code>
- * @param name
- * Atrribute name
- * @param value
- * Attribute value
- * @return <code>true</code> if it is required to re-create an element at
- * a modification of attribute, <code>false</code> otherwise.
- */
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
}
// HTML code component
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2007-09-03 16:34:56 UTC (rev 3429)
@@ -0,0 +1,320 @@
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class RichFacesMessagesTemplate extends RichFacesMessageTemplate {
+
+ private static String LAYOUT_ATTRIBUTE_NAME = "layout";
+ private static String LAYOUT_ATTRIBUTE_VALUE_TABLE = "table";
+
+ private String layoutValue;
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ passedLabelValue = ((Element) sourceNode)
+ .getAttribute(PASSED_LABEL_ATTRIBUTE_NAME);
+ labelClassValue = ((Element) sourceNode)
+ .getAttribute(LABEL_CLASS_ATTRIBUTE_NAME);
+ markerClassValue = ((Element) sourceNode)
+ .getAttribute(MARKER_CLASS_ATTRIBUTE_NAME);
+ markerStyleValue = ((Element) sourceNode)
+ .getAttribute(MARKER_STYLE_ATTRIBUTE_NAME);
+
+ errorMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(ERROR_MARKER_CLASS_ATTRIBUTE_NAME);
+ errorLabelClassValue = ((Element) sourceNode)
+ .getAttribute(ERROR_LABEL_CLASS_ATTRIBUTE_NAME);
+ errorClassValue = ((Element) sourceNode)
+ .getAttribute(ERROR_CLASS_ATTRIBUTE_NAME);
+
+ fatalMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(FATAL_MARKER_CLASS_ATTRIBUTE_NAME);
+ fatalLabelClassValue = ((Element) sourceNode)
+ .getAttribute(FATAL_LABEL_CLASS_ATTRIBUTE_NAME);
+ fatalClassValue = ((Element) sourceNode)
+ .getAttribute(FATAL_CLASS_ATTRIBUTE_NAME);
+
+ infoMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(INFO_MARKER_CLASS_ATTRIBUTE_NAME);
+ infoLabelClassValue = ((Element) sourceNode)
+ .getAttribute(INFO_LABEL_CLASS_ATTRIBUTE_NAME);
+ infoClassValue = ((Element) sourceNode)
+ .getAttribute(INFO_CLASS_ATTRIBUTE_NAME);
+
+ warnMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(WARN_MARKER_CLASS_ATTRIBUTE_NAME);
+ warnLabelClassValue = ((Element) sourceNode)
+ .getAttribute(WARN_LABEL_CLASS_ATTRIBUTE_NAME);
+ warnClassValue = ((Element) sourceNode)
+ .getAttribute(WARN_CLASS_ATTRIBUTE_NAME);
+
+ styleValue = ((Element) sourceNode)
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ styleClassValue = ((Element) sourceNode)
+ .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+
+ layoutValue = ((Element) sourceNode)
+ .getAttribute(LAYOUT_ATTRIBUTE_NAME);
+
+ if (layoutValue != null
+ && LAYOUT_ATTRIBUTE_VALUE_TABLE.equalsIgnoreCase(layoutValue
+ .trim()))
+ createTableLayout(visualDocument, sourceNode);
+ else
+ createListLayout(visualDocument, sourceNode);
+
+ return creationData;
+ }
+
+ /**
+ * Create <rich:messages> with layout="table"
+ */
+ public void createTableLayout(nsIDOMDocument visualDocument, Node sourceNode) {
+
+ createRichMessage(visualDocument, sourceNode);
+
+ }
+
+ /**
+ * Create <rich:messages> with layout="list"
+ */
+ public void createListLayout(nsIDOMDocument visualDocument, Node sourceNode) {
+
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+
+ if (styleValue != null && !styleValue.trim().equals(""))
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, styleValue);
+ if (styleClassValue != null && !styleClassValue.trim().equals(""))
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ styleClassValue);
+
+ creationData = new VpeCreationData(table);
+
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ // create first td for PASSED
+ nsIDOMElement td1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ nsIDOMElement span1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set markerClass
+ if (markerClassValue != null && !markerClassValue.trim().equals(""))
+ span1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ markerClassValue);
+
+ // set markerStyle
+ if (markerStyleValue != null && !markerStyleValue.trim().equals(""))
+ span1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ markerStyleValue);
+
+ nsIDOMElement span2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ if (labelClassValue != null && !labelClassValue.trim().equals(""))
+ span2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ labelClassValue);
+
+ nsIDOMText passedText = visualDocument
+ .createTextNode(passedLabelValue == null ? ""
+ : passedLabelValue);
+ // -----------------------------------------------------------
+
+ // Create second td for ERROR
+ nsIDOMElement td2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ // set errorClass
+ if (errorClassValue != null && !errorClassValue.trim().equals(""))
+ td2
+ .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ errorClassValue);
+
+ nsIDOMElement span3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set errorMarkerClass
+ if (errorMarkerClassValue != null
+ && !errorMarkerClassValue.trim().equals(""))
+ span3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ errorMarkerClassValue);
+
+ nsIDOMElement span4 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set errorLabelClass
+ if (errorLabelClassValue != null
+ && !errorLabelClassValue.trim().equals(""))
+ span4.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ errorLabelClassValue);
+
+ nsIDOMText errorText = visualDocument.createTextNode(ERROR_MESSAGE);
+ // -------------------------------------------------------------
+
+ // Create third td for FATAL
+ nsIDOMElement td3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ // set fatalClass
+ if (fatalClassValue != null && !fatalClassValue.trim().equals(""))
+ td3
+ .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ fatalClassValue);
+
+ nsIDOMElement span5 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set fatalMarkerClass
+ if (fatalMarkerClassValue != null
+ && !fatalMarkerClassValue.trim().equals(""))
+ span5.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ fatalMarkerClassValue);
+
+ nsIDOMElement span6 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set fatalLabelClass
+ if (fatalLabelClassValue != null
+ && !fatalLabelClassValue.trim().equals(""))
+ span6.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ fatalLabelClassValue);
+
+ nsIDOMText fatalText = visualDocument.createTextNode(FATAL_MESSAGE);
+ // ---------------------------------------------------------------------------
+
+ // Create four td for INFO
+
+ nsIDOMElement td4 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ // set infoClass
+ if (infoClassValue != null && !infoClassValue.trim().equals(""))
+ td4.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, infoClassValue);
+
+ nsIDOMElement span7 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set infoMarkerClass
+ if (infoMarkerClassValue != null
+ && !infoMarkerClassValue.trim().equals(""))
+ span7.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ infoMarkerClassValue);
+
+ nsIDOMElement span8 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set infoLabelClass
+ if (infoLabelClassValue != null
+ && !infoLabelClassValue.trim().equals(""))
+ span8.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ infoLabelClassValue);
+
+ nsIDOMText infoText = visualDocument.createTextNode(INFO_MESSAGE);
+ // --------------------------------------------------------------------
+
+ // Create fifth for WARN
+
+ nsIDOMElement td5 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ // set warnClass
+ if (warnClassValue != null && !warnClassValue.trim().equals(""))
+ td5.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, warnClassValue);
+
+ nsIDOMElement span9 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set warnMarkerClass
+ if (warnMarkerClassValue != null
+ && !warnMarkerClassValue.trim().equals(""))
+ span9.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ warnMarkerClassValue);
+
+ nsIDOMElement span10 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+
+ // set warnLabelClass
+ if (warnLabelClassValue != null
+ && !warnLabelClassValue.trim().equals(""))
+ span10.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ warnLabelClassValue);
+
+ nsIDOMText warnText = visualDocument.createTextNode(WARNING_MESSAGE);
+ // ---------------------------------------------------------------------
+
+ NodeList nodeList = sourceNode.getChildNodes();
+
+ for (int i = 0; i < nodeList.getLength(); i++) {
+
+ if (!(nodeList.item(i) instanceof Element))
+ continue;
+
+ Element elemFacet = (Element) nodeList.item(i);
+
+ if (elemFacet.getNodeName().equalsIgnoreCase(FACET_TAG_NAME)
+ && searchInMarker(elemFacet
+ .getAttribute(NAME_ATTRIBUTE_NAME))) {
+
+ String markerName = elemFacet.getAttribute(NAME_ATTRIBUTE_NAME)
+ .trim();
+
+ if (elemFacet.getChildNodes().getLength() != 0)
+ if (markers[0].equalsIgnoreCase(markerName)) {
+ createVisualFacet(span1, elemFacet);
+ } else if (markers[1].equalsIgnoreCase(markerName)) {
+ createVisualFacet(span3, elemFacet);
+ } else if (markers[2].equalsIgnoreCase(markerName)) {
+ createVisualFacet(span5, elemFacet);
+ } else if (markers[3].equalsIgnoreCase(markerName)) {
+ createVisualFacet(span7, elemFacet);
+ } else if (markers[4].equalsIgnoreCase(markerName)) {
+ createVisualFacet(span9, elemFacet);
+ }
+ }
+ }
+
+ addNotFacetComponent(td, sourceNode);
+
+ table.appendChild(tr);
+ tr.appendChild(td);
+
+ tr.appendChild(td1);
+ td1.appendChild(span1);
+ td1.appendChild(span2);
+ span2.appendChild(passedText);
+
+ tr.appendChild(td2);
+ td2.appendChild(span3);
+ td2.appendChild(span4);
+ span4.appendChild(errorText);
+
+ tr.appendChild(td3);
+ td3.appendChild(span5);
+ td3.appendChild(span6);
+ span6.appendChild(fatalText);
+
+ tr.appendChild(td4);
+ td4.appendChild(span7);
+ td4.appendChild(span8);
+ span8.appendChild(infoText);
+
+ tr.appendChild(td5);
+ td5.appendChild(span9);
+ td5.appendChild(span10);
+ span10.appendChild(warnText);
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 16:33:58 UTC (rev 3428)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-03 16:34:56 UTC (rev 3429)
@@ -485,5 +485,20 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
+
+ <vpe:tag name="rich:messages" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesMessagesTemplate">
+
+ <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:templates>
\ No newline at end of file
16 years, 8 months
JBoss Tools SVN: r3428 - in trunk/seam/tests/org.jboss.tools.seam.ui.test: META-INF and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-09-03 12:33:58 -0400 (Mon, 03 Sep 2007)
New Revision: 3428
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.classpath
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.project
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jdt.core.prefs
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.component
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.jboss.tools.jst.web.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/Messages.properties
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/User.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/META-INF/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/Messages.properties
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/User.class
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/faces-config.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/common-annotations.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-beanutils.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-collections.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-digester.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-logging.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/ejb3-persistence.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jboss-ejb3x.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jboss-seam.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jsf-api.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jstl.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/standard.jar
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/tmp
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/web.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/index.jsp
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/hello.jsp
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/inputUserName.jsp
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/seam.properties
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.properties
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.xml
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
Log:
http://jira.jboss.com/jira/browse/EXIN-337
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-09-03 14:56:43 UTC (rev 3427)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-09-03 16:33:58 UTC (rev 3428)
@@ -14,7 +14,8 @@
org.eclipse.core.resources,
org.jboss.tools.common.model,
org.eclipse.ui.navigator,
- org.jboss.tools.seam.core.test
+ org.jboss.tools.seam.core.test,
+ org.jboss.tools.seam.core
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.classpath (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.classpath 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.project (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.project 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TestComponentView</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.seam.core.seambuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.seam.core.seamnature</nature>
+ </natures>
+</projectDescription>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jdt.core.prefs 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,7 @@
+#Tue Jun 19 15:59:09 MSD 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.jst.common.project.facet.core.prefs 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,4 @@
+#Tue Jun 19 15:59:10 MSD 2007
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER/owners=jst.java\:5.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v5.5/owners=jst.web\:2.4
+eclipse.preferences.version=1
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.component 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="TestComponentView">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="context-root" value="TestComponentView"/>
+<property name="java-output-path" value="build/classes"/>
+</wb-module>
+</project-modules>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.eclipse.wst.common.project.facet.core.xml 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Tomcat v5.5"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.4"/>
+</faceted-project>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/.settings/org.jboss.tools.jst.web.xml 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="TestComponentView" ENTITY="FileSystems"
+ VERSION="2.0.0" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%redhat.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%redhat.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/../../JavaSource" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%redhat.workspace%/lib" NAME="lib"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/classes" NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/../../ant" NAME="build"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/common-annotations.jar" NAME="lib-common-annotations.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/commons-beanutils.jar" NAME="lib-commons-beanutils.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/commons-collections.jar" NAME="lib-commons-collections.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/commons-digester.jar" NAME="lib-commons-digester.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/commons-logging.jar" NAME="lib-commons-logging.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/jsf-api.jar" NAME="lib-jsf-api.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/jsf-impl.jar" NAME="lib-jsf-impl.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/jstl.jar" NAME="lib-jstl.jar"/>
+ <FILESYSTEM ENTITY="FileSystemJar" INFO="hidden=yes"
+ LOCATION="%redhat.workspace%/lib/standard.jar" NAME="lib-standard.jar"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%eclipse.project%" NAME="TestScanner"/>
+ <FILESYSTEM ENTITY="FileSystemJar"
+ LOCATION="%redhat.workspace%/lib/jboss-seam.jar" NAME="lib-jboss-seam.jar"/>
+ <WEB ENTITY="JstWeb" MODEL_PATH="/web.xml" SERVLET_VERSION="2.4">
+ <MODULE ENTITY="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/Messages.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/Messages.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/Messages.properties 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,3 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/User.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/User.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/JavaSource/demo/User.java 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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 demo;
+
+import javax.persistence.Entity;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+
+/**
+ * Created by Red Hat Developer Studio
+ */
+
+@Name("myUser")
+(a)Scope(ScopeType.APPLICATION)
+@Entity
+(a)Install(precedence=Install.FRAMEWORK)
+
+public class User {
+
+ private String name;
+
+ @Out
+ private String address = "";
+
+ @In
+ private String payment = "";
+
+ /**
+ * @return User Name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param User Name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public String getPayment() {
+ return payment;
+ }
+
+ @Unwrap
+ public void unwrapMethod() {
+ }
+
+ @Create @Destroy
+ public void createAndDestroyMethod() {
+ }
+
+ @Factory(value="myFactory", scope=ScopeType.SESSION)
+ public void testFactory() {
+
+ }
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/META-INF/MANIFEST.MF 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/Messages.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/Messages.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/Messages.properties 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,3 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/User.class
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/classes/demo/User.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.xml 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd">
+ <component class="java.lang.Boolean" name="myComponent" scope="page">
+ <property name="property1">value1</property>
+ <property name="myList">
+ <value>value1</value>
+ </property>
+ <property name="myMap">
+ <key>key1</key>
+ <value>map value 1</value>
+ </property>
+ </component>
+ <core:managed-persistence-context name="myPersistenceContext1"/>
+
+ <core:resource-bundle>
+ <core:bundle-names>
+ <value>bundleA</value>
+ <value>bundleB</value>
+ </core:bundle-names>
+ </core:resource-bundle>
+
+ <core:manager
+ conversation-is-long-running-parameter="a"
+ parent-conversation-id-parameter="b"
+ conversation-id-parameter="c"
+ concurrent-request-timeout="2"
+ conversation-timeout="3"
+ />
+
+ <factory name="factory1" scope="conversation"/>
+
+</components>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/faces-config.xml 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <description>User Name Bean</description>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>demo.User</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <property-class>java.lang.String</property-class>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputUserName.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>hello</from-outcome>
+ <to-view-id>/pages/hello.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/common-annotations.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/common-annotations.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-beanutils.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-beanutils.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-collections.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-collections.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-digester.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-digester.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-logging.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/ejb3-persistence.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/ejb3-persistence.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jboss-ejb3x.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jboss-ejb3x.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jboss-seam.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jboss-seam.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jstl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/jstl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/standard.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/standard.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/tmp (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/lib/tmp 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1 @@
+
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/web.xml 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>TestComponentView</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/index.jsp
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/index.jsp (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/index.jsp 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+ <body>
+ <jsp:forward page="/pages/inputUserName.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/hello.jsp
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/hello.jsp (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/hello.jsp 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,20 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<f:loadBundle var="Message" basename="demo.Messages" />
+
+<html>
+ <head>
+ <title>Hello!</title>
+ </head>
+
+ <body>
+ <f:view>
+ <h3>
+ <h:outputText value="#{Message.hello_message}" />,
+ <h:outputText value="#{user.name}" />!
+ </h3>
+ </f:view>
+ </body>
+
+</html>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/inputUserName.jsp
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/inputUserName.jsp (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/pages/inputUserName.jsp 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,28 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<f:loadBundle var="Message" basename="demo.Messages"/>
+
+<html>
+ <head>
+ <title>Input User Name Page</title>
+ </head>
+ <body>
+
+ <f:view>
+ <h1><h:outputText value="#{Message.header}"/></h1>
+
+ <h:messages style="color: red"/>
+
+ <h:form id="greetingForm">
+ <h:outputText value="#{Message.prompt_message}"/>
+ <h:inputText value="#{user.name}" required="true">
+ <f:validateLength maximum="30" minimum="3"/>
+ </h:inputText>
+
+ <h:commandButton action="hello" value="Say Hello!" />
+
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/seam.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/seam.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/seam.properties 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1 @@
+org.jboss.seam.core.microcontainer.persistenceUnitName=MyPersistenceUnit
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.properties 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,3 @@
+#
+#Tue Jun 19 15:59:08 MSD 2007
+classpath.external=C\:\\Documents and Settings\\glory\\runtime-RedHat_Seam\\.metadata\\.plugins\\org.jboss.tools.common.projecttemplates\\lib\\servlet\\2.4\\jsp-api.jar;C\:\\Documents and Settings\\glory\\runtime-RedHat_Seam\\.metadata\\.plugins\\org.jboss.tools.common.projecttemplates\\lib\\servlet\\2.4\\servlet-api.jar;
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/ant/build.xml 2007-09-03 16:33:58 UTC (rev 3428)
@@ -0,0 +1,74 @@
+<project name="KickStart" default="deploy" basedir="../">
+
+ <!-- Project settings -->
+ <property file="${basedir}/ant/build.properties" />
+
+ <property name="project.name" value="KickStart" />
+ <property name="web.content.dir" value="${basedir}/WebContent" />
+ <property name="web-inf.dir" value="${web.content.dir}/WEB-INF" />
+ <property name="build.dir" value="build" />
+ <property name="war.name" value="${build.dir}/${project.name}.war" />
+
+ <!-- Define a folder for deployment -->
+ <property name="deploy.dir" value="deploy" />
+
+ <!-- Compile classpath -->
+ <path id="compile.classpath">
+ <fileset dir="${webinf.dir}/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <pathelement path="${classpath}" />
+ <pathelement path="${classpath.external}" />
+ <pathelement path="${webinf.dir}/classes" />
+ </path>
+
+ <!-- Copy any resource or configuration files -->
+ <target name="copyResources">
+ <copy todir="${web-inf.dir}/classes" includeEmptyDirs="no">
+ <fileset dir="JavaSource">
+ <patternset>
+ <include name="**/*.*" />
+ <exclude name="**/*.java" />
+ </patternset>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Check timestamp on files -->
+ <target name="prepare">
+ <tstamp />
+ </target>
+
+ <!-- Remove classes directory for clean build -->
+ <target name="clean" description="Prepare for clean build">
+ <delete dir="${web-inf.dir}/classes" failonerror="false"/>
+ <mkdir dir="${web-inf.dir}/classes" />
+ </target>
+
+ <!-- Normal build of application -->
+ <target name="compile" depends="prepare, copyResources">
+ <javac srcdir="JavaSource" destdir="${web-inf.dir}/classes">
+ <classpath refid="compile.classpath" />
+ </javac>
+ </target>
+
+ <!-- Build Project -->
+ <target name="build" depends="prepare, compile" />
+
+ <!-- Rebuild Project -->
+ <target name="rebuild" depends="clean, prepare, compile" />
+
+ <!-- Build WAR -->
+ <target name="war" depends="build">
+ <mkdir dir="${build.dir}" />
+ <war warfile="${war.name}" basedir="${web.content.dir}" webxml="${web-inf.dir}/web.xml">
+ <exclude name="WEB-INF/web.xml" />
+ </war>
+ </target>
+
+ <target name="deploy" depends="war">
+ <delete dir="${deploy.dir}/${project.name}" failonerror="false"/>
+ <copy file="${war.name}" todir="${deploy.dir}" />
+ </target>
+
+</project>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-09-03 14:56:43 UTC (rev 3427)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-09-03 16:33:58 UTC (rev 3428)
@@ -11,20 +11,30 @@
******************************************************************************/
package org.jboss.tools.seam.ui.test.view;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
import junit.framework.TestCase;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.navigator.CommonNavigator;
import org.jboss.tools.common.model.XJob;
import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.web.ui.RedHat4WebPerspectiveFactory;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamPackage;
+import org.jboss.tools.seam.core.ISeamScope;
import org.jboss.tools.seam.ui.ISeamUiConstants;
import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.WorkbenchUtils;
@@ -44,7 +54,41 @@
RedHat4WebPerspectiveFactory.PERSPECTIVE_ID,
WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow());
}
-
+
+ public void testComponentViewTree(){
+ System.out.println("testAComponentViewTree!");
+ TestProjectProvider provider=null;
+ try {
+ provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null, "TestComponentView", true);
+ } catch (Exception e1) {
+ JUnitUtils.fail("Cannot create Project Provider", e1);
+ }
+ IProject project = provider.getProject();
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot refresh created test Project", e);
+ }
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ JUnitUtils.fail(e.getMessage(),e);
+ }
+ System.out.println("Refresh is DONE!");
+
+ IFile f = project.getFile("WebContent/WEB-INF/components.xml");
+ assertTrue("Cannot find components.xml in test project", f != null && f.exists());
+
+ CommonNavigator navigator = getSeamComponentsView();
+ navigator.getCommonViewer().expandAll();
+ Tree tree = navigator.getCommonViewer().getTree();
+
+ System.out.println("tree.getItemCount() - "+tree.getItemCount());
+ for(int i=0;i<tree.getItemCount();i++){
+ showTreeItem(tree.getItem(i),0);
+ }
+ }
+
/**
*
*/
@@ -57,7 +101,7 @@
public void testCreatedProjectIsShownOnTree() {
TestProjectProvider provider=null;
try {
- provider = new TestProjectProvider("org.jboss.tools.seam.core.test", null, "TestScanner", true);
+ provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null, "TestComponentView", true);
} catch (Exception e1) {
JUnitUtils.fail("Cannot create Project Provider", e1);
}
@@ -80,7 +124,7 @@
public void testThatDeletedProjectIsDisappearedFromTree() {
try {
- ResourcesPlugin.getWorkspace().getRoot().findMember("TestScanner").delete(true, new NullProgressMonitor());
+ ResourcesPlugin.getWorkspace().getRoot().findMember("TestComponentView").delete(true, new NullProgressMonitor());
} catch (CoreException e) {
JUnitUtils.fail(e.getMessage(),e);
}
@@ -94,4 +138,47 @@
CommonNavigator part = (CommonNavigator)page.findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
return part;
}
+
+
+
+ private void showTreeItem(TreeItem item, int level){
+ for(int i=0;i<level;i++)
+ System.out.print("-");
+
+ System.out.print(item.getText());
+ System.out.println(" "+item.getData());
+ if(item.getData() instanceof ISeamScope){
+ ISeamScope scope = (ISeamScope)item.getData();
+ Collection packages = scope.getPackages();
+ System.out.println(" packages - "+packages.size());
+ Iterator iter = packages.iterator();
+ while(iter.hasNext())
+ showSeamPackage((ISeamPackage)iter.next(), level++);
+
+
+ List components = scope.getComponents();
+ for(int i=0;i<components.size();i++)
+ showSeamComponent((ISeamComponent)components.get(i), level++);
+ }
+
+ for(int i=0;i<item.getItemCount();i++){
+ showTreeItem(item.getItem(i),level++);
+ }
+ }
+
+ private void showSeamComponent(ISeamComponent component, int level){
+ for(int i=0;i<level;i++)
+ System.out.print("-");
+
+ System.out.println("Component - "+component.getName());
+
+ }
+
+ private void showSeamPackage(ISeamPackage seamPackage, int level){
+ for(int i=0;i<level;i++)
+ System.out.print("-");
+
+ System.out.println("Package - "+seamPackage.getName());
+
+ }
}
16 years, 8 months
JBoss Tools SVN: r3427 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-09-03 10:56:43 -0400 (Mon, 03 Sep 2007)
New Revision: 3427
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionicon.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject10.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject11.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject12.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject13.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject14.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject15.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject16.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject17.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject18.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject19.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject20.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject21.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject22.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject6.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject7.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject8.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject9.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
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-160 updated context
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionicon.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/connectionicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject10.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject11.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject11.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject12.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject12.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject13.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject13.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject14.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject14.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject15.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject15.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject16.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject17.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject17.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject18.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject18.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject19.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject19.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject20.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject20.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject21.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject21.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject22.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject22.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject6.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject7.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject8.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject9.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-09-03 14:54:05 UTC (rev 3426)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-09-03 14:56:43 UTC (rev 3427)
@@ -5,6 +5,7 @@
[<!ENTITY GettingStartedWithRHDS SYSTEM "modules/GettingStartedWithRHDS.xml">
<!ENTITY ManageJBossAS SYSTEM "modules/ManageJBossAS.xml">
<!ENTITY GetStartSeamGen SYSTEM "modules/GetStartSeamGen.xml">
+<!ENTITY DevelopAsimpleJSPWebApplication SYSTEM "modules/DevelopAsimpleJSPWebApplication.xml">
<!ENTITY GenCURDDatabaseApp SYSTEM "modules/GenCURDDatabaseApp.xml">
<!ENTITY CURDAppWalkthrough SYSTEM "modules/CURDAppWalkthrough.xml">
<!ENTITY AddBusinessProcess SYSTEM "modules/AddBusinessProcess.xml">
@@ -31,6 +32,7 @@
&GettingStartedWithRHDS;
&ManageJBossAS;
&GetStartSeamGen;
+&DevelopAsimpleJSPWebApplication;
&GenCURDDatabaseApp;
&CURDAppWalkthrough;
<!-- TODO: drools used in this section is not available for eclipse .3.3 &AddBusinessProcess; -->
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml (rev 0)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml 2007-09-03 14:56:43 UTC (rev 3427)
@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="DevelopASimpleWebApplication" xreflabel="DevelopASimpleWebApplication">
+ <?dbhtml filename="DevelopASimpleWebApplication.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Red Hat Developer Studio</keyword>
+ <keyword>JSP</keyword>
+ <keyword>JSF</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Develop a simple JSP web application</title>
+ <para>In this chapter we are going to show you how to create a simple JSP application using the Red Hat Developer Studio. The completed application will ask a user to enter a name and click a button. The resulting new page will display the familiar message, "Hello <name>!"</para>
+<para>You will learn how to create such an application from the beginning, along the way demonstrating some of the powerful features of Red Hat Developer Studio. You will design the JSP application and then run the application from inside RHDS.</para>
+ <para>We'll assume that you have already launched Red Hat Developer Studio installed and
+also that the Red Hat perspective is the current perspective. (If not, make it active by selecting <emphasis>Window/Open Perspective/Red Hat Developer Studio</emphasis> from the menu bar or by selecting <emphasis>Window/
+Open Perspective/Other...</emphasis> from the menu bar and then selecting Red Hat Developer Studio from
+the Select Perspective dialog box.)</para>
+ <section id="SettingUpTheProject">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>We are first going to create a new project for the application.</para>
+ <orderedlist>
+ <listitem><para>Go to the menu bar and select <emphasis>File/New/Project...</emphasis></para></listitem>
+ <listitem><para>Select <emphasis>Red Hat Developer Studio/JSF/JSF Project</emphasis> in the New Project dialog box</para></listitem>
+ <listitem><para>Click Next ></para></listitem>
+ <listitem><para>Enter "jsfHello" as the project name</para></listitem>
+ <listitem><para>Leave everything else as is, and click Finish</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Create New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="TheJSFApplicationConfigurationFile">
+ <?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
+ <title>The JSF Application Configuration File</title>
+ <para>A <emphasis>jsfHello</emphasis> node should appear in the upper-left Package Explorer view.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Click the right-pointing-arrow sign next to <emphasis>jsfHello</emphasis> to reveal the child nodes</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Click the right-pointing-arrow sign next to WebContent under <emphasis>jsfHello</emphasis></para></listitem>
+ <listitem><para>Click the right-pointing-arrow sign next to WEB-INF under WebContent.</para></listitem>
+ <listitem><para>Then double-click on the faces-config.xml node to display the JSF application configuration file editor</para></listitem>
+ </orderedlist>
+ <para>The configuration file will be opened in Diagram View.</para>
+ <figure>
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="AddingNavigationToTheApplication">
+ <?dbhtml filename="AddingNavigationToTheApplication.html"?>
+ <title>Adding Navigation to the Application</title>
+ <para>In our simple application, the flow is defined as a single navigation rule connecting two views (presentation files). At this point, we will create the placeholders for the two JSP presentation files and then the navigation rule to connect them as views. Later, we will complete the coding for the JSP presentation files. With Red Hat Developer Studio, we can do all of this in the Diagram mode of the configuration file editor.</para>
+ <section id="AddingTwoViewsJSPPages">
+ <?dbhtml filename="AddingTwoViewsJSPPages.html"?>
+ <title>Adding Two Views (JSP Pages)</title>
+ <orderedlist continuation="continues">
+ <listitem><para>Right-click anywhere on the diagram and select <emphasis>New View...</emphasis> from the pop-up
+menu</para></listitem>
+ <listitem><para>In the dialog box, type <emphasis>pages/inputname</emphasis> as the value for From-view-id</para></listitem>
+ <listitem><para>Leave everything else as is</para></listitem>
+ <listitem><para>Click Finish</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Create New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you look in the Package Explorer view you should see a pages folder under WebContent and the icon of the just created view. Opening it will reveal the JSP file you just created.</para>
+ <figure>
+ <title>New View is created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Back on the diagram, right-click anywhere and select <emphasis>New View...</emphasis> from the popup menu.</para></listitem>
+ <listitem><para>In the dialog box, type <emphasis>pages/greeting</emphasis> as the value for From-view-id</para></listitem>
+ <listitem><para>Leave everything else as is</para></listitem>
+ <listitem><para>Click Finish</para></listitem>
+ </orderedlist>
+ <para>The second view is created.</para>
+ <figure>
+ <title>New View is created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="CreatingTheTransitionNavigationRule">
+ <?dbhtml filename="CreatingTheTransitionNavigationRule.html"?>
+ <title>Creating the Transition (Navigation Rule)</title>
+ <para>Let's now create a navigation transition between these two views.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>In the diagram, select the connection icon third from the top along the upper left
+side of the diagram
+
+ <figure>
+ <title>Connection Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/connectionicon.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ to get an arrow cursor with a two-pronged plug at the arrow's bottom</para></listitem>
+ <listitem><para>Click on the <emphasis>pages/inputname page</emphasis> icon and then click on the <emphasis>pages/greeting page</emphasis> icon</para></listitem>
+ </orderedlist>
+ <para>A transition should appear between the two icons.</para>
+ <figure>
+ <title>Transition between two views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Select <emphasis>File/Save</emphasis> from the menu bar to save the configuration file</para></listitem>
+ </orderedlist>
+ </section>
+ </section>
+
+ <section id="AddingAManagedBeanToTheApplication">
+ <?dbhtml filename="AddingAManagedBeanToTheApplication.html"?>
+ <title>Adding a Managed Bean to the Application</title>
+ <para>To store data in the application, we will use a managed bean. Let's create it.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Click on the Tree tab at the bottom of the editing window</para></listitem>
+ <listitem><para>Select the Managed Beans node and then click the <emphasis>Add...</emphasis> button displayed along the right side of the editor window</para></listitem>
+ <listitem><para>Type in <emphasis>jsfHello.PersonBean</emphasis> for Class and <emphasis>personBean</emphasis> for Name. Leave Scope as is and Generate Source Code as is (checked).</para></listitem>
+ </orderedlist>
+ <figure>
+ <title>Create managed bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+ <listitem><para>Click Finish</para></listitem>
+ </orderedlist>
+ <para><emphasis>personBean</emphasis> will now be selected and three sections of information, "Managed
+Bean", "Properties", and "Advanced", will be displayed about it.</para>
+ <orderedlist continuation="continues">
+ <listitem><para>Under the Properties section, click the <emphasis>Add...</emphasis> button.
+ <figure>
+ <title>Managed bean is created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para></listitem>
+ </orderedlist>
+ <orderedlist continuation="continues">
+ <listitem><para>For <emphasis>Property-Name</emphasis> type in name. Leave everything else as is. (When <emphasis>Property-Class</emphasis> is not filled in, String is the assumed type.).</para></listitem>
+ <listitem><para>Click Finish.</para></listitem>
+ <listitem><para>Select the personBean node in the tree.</para></listitem>
+ <para>You should see this now:</para>
+ <figure>
+ <title>Managed bean with name property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </orderedlist>
+ <orderedlist continuation="continues">
+ <listitem><para>Select <emphasis>File/Save</emphasis> from the menu bar.</para></listitem>
+ </orderedlist>
+ </section>
+
+ <section id="EditingTheJSPViewFiles">
+ <?dbhtml filename="EditingTheJSPViewFiles.html"?>
+ <title>Editing the JSP View Files</title>
+ <para>Now we will finish editing the JSP files for our two "views" using Red's JSP Visual Page
+Editor.</para>
+
+<section id="inputnamejspView">
+ <?dbhtml filename="inputnamejspView.html"?>
+ <title>inputname.jsp view</title>
+ <orderedlist continuation="continues">
+<listitem><para>Click on the Diagram tab for the configuration file editor.</para></listitem>
+<listitem><para>Open the editor for this first JSP file by double-clicking on the /pages/inputname.
+jsp icon.</para></listitem>
+</orderedlist>
+<para>The Red Hat Visual Page Editor will open in a screen split between source code along the top and a WYSIWIG view along the bottom:</para>
+<figure>
+ <title>inputname.jsp in visual/source mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Some JSF code will already be in the file because we selected a template when creating the page.</para>
+ <orderedlist continuation="continues">
+<listitem><para>Select the Visual tab, so we can work with the editor completely in its WYSIWYG
+mode.</para></listitem>
+<listitem><para>To the right of the editor, in the Red Hat Palette, expand the JSF HTML palette folder by selecting it.</para>
+
+<figure>
+ <title>JSF HTML palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure></listitem>
+ <listitem><para>Click on "form" within this folder, drag the cursor over to the editor, and drop it inside the red box in the editor.</para></listitem></orderedlist>
+ <para>An "Insert Tag" dialog will be prompted</para>
+ <orderedlist continuation="continues">
+<listitem><para>In the value field next to <emphasis>id</emphasis>, type "greeting" and click on the Finish button.</para>
+<figure>
+ <title>Insert Tag dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+</orderedlist>
+<para>Another red box will appear inside the first red box.</para>
+<orderedlist continuation="continues">
+<listitem><para>Type "Please enter name:" inside the boxes.</para>
+<figure>
+ <title>Editing View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+<listitem><para>Select "inputText" within the JSF HTML palette folder and drag it into the innermost box in the editor after "Please enter name: ".</para></listitem>
+<listitem><para>In the attributes dialog, click in the value field next to the <emphasis role="italic"><property>"value"</property></emphasis> attribute and click on the <emphasis>...</emphasis> button.</para></listitem>
+
+<listitem><para>Then, select the <emphasis>Managed Beans/personBean/name</emphasis> node and click on the Ok button.</para>
+<figure>
+ <title>Select bean property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject15.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+<listitem><para>Back in the attributes dialog, select the Advanced tab, type in "name" as the value
+for the <emphasis role="italic"><property>"id"</property></emphasis> attribute, and then click on the Finish button.</para></listitem>
+<listitem><para>Select "commandButton" within the JSF HTML palette folder and drag it into the innermost box in the editor after the input box.</para></listitem>
+<listitem><para>In the attributes dialog, click in the "value" field next to the <emphasis role="italic"><property>"action"</property></emphasis> attribute and click on the <emphasis>...</emphasis> button.</para></listitem>
+<listitem><para>Then, select the <emphasis>View Actions/greeting</emphasis> node and click on the Ok button.</para></listitem>
+<listitem><para>Back in the attributes dialog box, type in "Say Hello" as the value for the <emphasis role="italic"><property>"value"</property></emphasis> attribute and then click on the Finish button.</para></listitem>
+</orderedlist>
+<para>The source coding should be something like this now:</para>
+<programlisting role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ <h:form id="greeting">
+ Please enter a name:
+ <h:inputText value="#{personBean.name}" id="name"/>
+ <h:commandButton action="greeting" value="Say Hello"/>
+ </h:form>
+ </f:view>
+ </body>
+</html>
+]]></programlisting>
+<para>The editor should look like this:</para>
+<figure>
+ <title>inputname.jsp view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+<listitem><para>Save the file by selecting <emphasis>File/Save</emphasis> from the menu bar.</para></listitem>
+</orderedlist>
+<para>As you see with Red Hat Visual Editor you can easily create JSF components on a page and bind them with managed bean and view actions.</para>
+ </section>
+ <section id="greetingjspView">
+ <?dbhtml filename="greetingjspView.html"?>
+ <title>greeting.jsp view</title>
+ <para>Let's now write a code for a greeting page that will display a name of the user.</para>
+ <orderedlist continuation="continues">
+<listitem><para>Click on the faces-config.xml tab to bring the diagram back.</para></listitem>
+<listitem><para>Open the editor for the second file by double-clicking on the <emphasis>/pages/greeting.jsp</emphasis> icon.</para></listitem>
+<listitem><para>Select the Visual tab, so we can work with the editor completely in its WYSIWYG mode.</para></listitem>
+<listitem><para>Type "Hello " (note space after hello) into the box.</para></listitem>
+<listitem><para>Select <emphasis role="italic"><property>outputText</property></emphasis> within the JSF HTML palette folder and drag it into the innermost box in the editor after "Hello ".</para></listitem>
+<listitem><para>In the attributes dialog, click in <emphasis>value</emphasis> field next to the <emphasis role="italic"><property>"value"</property></emphasis> attribute and click on the <emphasis>...</emphasis> button.</para></listitem>
+<listitem><para>Then, select the <emphasis>Managed Beans/personBean/name</emphasis> node, click on the Ok button,
+and then click on the Finish button.</para></listitem>
+<listitem><para>Right after the output field, type an exclamation point (!).</para></listitem>
+</orderedlist>
+<para>The source coding should be something like this now:</para>
+<programlisting role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ Hello <h:outputText value="#{personBean.name}"/>!
+ </f:view>
+ </body>
+</html>
+]]></programlisting>
+<orderedlist continuation="continues">
+<listitem><para>Save the file.</para></listitem>
+</orderedlist>
+ </section>
+ </section>
+ <section id="CreatingTheStartPage">
+ <?dbhtml filename="CreatingTheStartPage.html"?>
+ <title>Creating the Start Page</title>
+ <para>You also need to create a start page as an entry point into the application.</para>
+ <orderedlist continuation="continues">
+<listitem><para>In the Package Explorer view to the left, right-click <emphasis>jsfHello/WebContent</emphasis> and select
+<emphasis>New/JSP File</emphasis> .</para></listitem>
+<listitem><para>For Name type in "index", for Template select "JSPRedirect", and click Finish.</para></listitem>
+</orderedlist>
+<para>A JSP editor will open up on the newly created file.</para>
+<figure>
+ <title>index.jsp view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+<orderedlist continuation="continues">
+<listitem><para>In the Source part of the split screen, type <emphasis>/pages/inputname.jsf</emphasis> in between the quotes for the page attribute.</para></listitem>
+</orderedlist>
+<para>The source coding should look like this now:</para>
+<programlisting role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+ <head></head>
+ <body>
+ <jsp:forward page="/pages/inputname.jsf" />
+ </body>
+</html>
+]]></programlisting>
+<para>Note the <emphasis>.jsf</emphasis> extension for the file name. This is a mapping defined in the web.xml file
+for the project for invoking JavaServer Faces when you run the application.</para>
+<orderedlist continuation="continues">
+<listitem><para>Select <emphasis>File/Save</emphasis> from the menu bar.</para></listitem>
+</orderedlist>
+ </section>
+
+ <section id="RunningTheApplication1">
+ <?dbhtml filename="RunningTheApplication1.html"?>
+ <title>Running the Application</title>
+ <para>Everything is now ready for running our application—without having to leave Red Hat Developer Studio —
+by using the JBoss engine that comes with the RHDS. For controlling JBoss within Studio, there is a special view - JBoss Server View (if it is not open select <emphasis>Window > Show View > Other > Server > JBoss Server View</emphasis>).</para>
+<figure>
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <orderedlist continuation="continues">
+<listitem><para>Start up JBoss by clicking on the second icon from left.</para></listitem>
+</orderedlist>
+<para>After the messages in the Console tabbed view stop scrolling, JBoss server is available.</para>
+<orderedlist continuation="continues">
+<listitem><para>Click on the <emphasis>Run</emphasis> icon in the toolbar.</para>
+<figure>
+ <title>Run icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject19.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</listitem>
+</orderedlist>
+<para>This is the equivalent of launching the browser and typing http://localhost:8080/
+jsfHello into your browser. Our JSF application should now appear.</para>
+ </section>
+ <section id="RunningTheApplication">
+ <?dbhtml filename="RunningTheApplication.html"?>
+ <title>Making changes to JSP page</title>
+ <para>Red Hat Developer Studio comes with JSP design-time preview features. When designing JSP pages you can easily preview how they will look during runtime. You can even attach your stylesheet to the preview.</para>
+ <para>Open the inputname.jsp page and after this line</para>
+ <programlisting role="XML"><![CDATA[<h:commandButton action="greeting" value="Say Hello"/>
+]]></programlisting>
+<para>Type the next script:</para>
+<programlisting role="XML"><![CDATA[<%= new
+java.util.Date() %>
+]]></programlisting>
+<para>Then swich to Preview tab to see the changes.</para>
+ </section>
+
+ <section id="WebXML">
+ <?dbhtml filename="WebXML.html"?>
+ <title>web.xml file</title>
+ <para>When you create a JSF project Red Hat Developer Studio is generating web.xml file for you. You don't need to write any configuration manually. The integrated web.xml editor comes both in source and tree modes.</para>
+ <figure>
+ <title>Web.xml editor in source mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject20.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Web.xml editor in tree mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject21.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="WarDeploy">
+ <?dbhtml filename="WarDeploy.html"?>
+ <title>Deploy with War archive</title>
+ <para>With Red Hat Developer Studio you can easily export your project in a <emphasis>.war</emphasis> and deploy to any web server.</para>
+ <para>Just right click the project folder in Package Explorer and select <emphasis>Export > Web > WAR file</emphasis></para>
+ <para>Then click Next > and in Export dialog specify the destination of the <emphasis>.war</emphasis> file and press Finish.</para>
+ <figure>
+ <title>Export war file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/newproject22.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-09-03 14:54:05 UTC (rev 3426)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GetStartSeamGen.xml 2007-09-03 14:56:43 UTC (rev 3427)
@@ -69,8 +69,8 @@
</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>
+ <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>
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-09-03 14:54:05 UTC (rev 3426)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-09-03 14:56:43 UTC (rev 3427)
@@ -13,27 +13,23 @@
<section id="ConfigJavaEnvironment">
<?dbhtml filename="ConfigJavaEnvironment.html"?>
<title>Configuring Your Java Environment</title>
- <para>You must have a working installation of JDK 1.5 before you
- install Red Hat Developer Studio. Currently it will only fully work
- with a 32-bit JVM, not a 64-bit JVM. On a 64-bit JVM the visual
- editor will fail to launch. Thus in this guide we will show you how
- to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft
- Windows Platform.</para>
+ <para>You must have a working installation of JDK 1.5 before you install Red Hat Developer Studio. Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM. On a 64-bit JVM the visual editor will fail to launch. Thus in this guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft Windows Platform.</para>
<section id="InstallJDK50onLinux">
<title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
<itemizedlist>
<listitem><para>Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0 (Java 2 Development Kit)</ulink> from Sun's website.
- Choose "JDK 5.0 Update <x>" (where x is the latest update number) for download and then select "RPM in self-extracting" file for Linux. Read the instructions on Sun's website for installing the JDK.</para></listitem>
+ Choose "JDK 5.0 Update <x>" (where "x" is the latest update number) for download and then select "RPM in self-extracting" file for Linux. Read the instructions on Sun's website for installing the JDK.</para></listitem>
<listitem><para>If you don't want to use SysV service scripts you can install the "self-extracting file" for Linux instead of choosing the "RPM in self-extracting" file.
In that case you can skip the next step mentioned here. But it is recommended to use the SysV service scripts for production servers.</para></listitem>
<listitem><para>Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>.
Please ensure you choose a matching version of the -compat package to the JDK you installed.</para></listitem>
<listitem><para>Create an environment variable that points to the JDK installation directory and call it JAVA_HOME. Add <emphasis>$JAVA_HOME/bin</emphasis> to the system path to be able to run java from the
- command line. You can do this by adding the following lines to the .bashrc file in your home directory.</para></listitem>
- </itemizedlist>
- <programlisting><![CDATA[#In this example /usr/java/jdk1.5.0_11 is the JDK installation directory.
+ command line. You can do this by adding the following lines to the .bashrc file in your home directory.
+ <programlisting role="JAVA"><![CDATA[#In this example /usr/java/jdk1.5.0_11 is the JDK installation directory.
export JAVA_HOME=/usr/java/jdk1.5.0_11
export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
+</para></listitem>
+ </itemizedlist>
<note>
<title>Note:</title>
<para>When you add $JAVA_HOME/bin to $PATH, you should add it <emphasis role="bold">before</emphasis> the old $PATH not after it. This way, the machine will pick up the new JVM first.
@@ -50,7 +46,7 @@
<itemizedlist>
<listitem><para>As root, type the following command at the shell prompt and you should see something like this:</para></listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config java
+ <programlisting role="JAVA"><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
@@ -61,7 +57,7 @@
<itemizedlist>
<listitem><para>Repeat the same for javac and java_sdk_1.5.0.</para></listitem>
</itemizedlist>
- <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config javac
+ <programlisting role="JAVA"><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config javac
There are 1 programs which provide 'javac'.
Selection Command
-----------------------------------------------
@@ -80,8 +76,7 @@
<para>You can always override this step by setting the JAVA_HOME environment variable as explained in the previous step.</para>
</note>
<itemizedlist>
- <listitem><para>Make sure that the java executable is in your path and that you are using an appropriate version. To verify your Java environment, type java -version
- at the shell prompt and you should see something like this:</para></listitem>
+ <listitem><para>Make sure that the java executable is in your path and that you are using an appropriate version. To verify your Java environment, type "java -version" at the shell prompt and you should see something like this:</para></listitem>
</itemizedlist>
<programlisting><![CDATA[[root@vsr ~]$ java -version
java version "1.5.0_11"
@@ -96,14 +91,13 @@
<title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windows</title>
<itemizedlist>
<listitem><para>Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0 (Java 2 Development Kit)</ulink> from Sun's website.
- Choose "JDK 5.0 Update <x>" (where x is the latest update number) for download and then select your Windows Platform options to perform the installation.</para></listitem>
+ Choose "JDK 5.0 Update <x>" (where "x" is the latest update number) for download and then select your Windows Platform options to perform the installation.</para></listitem>
<listitem><para>Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example:</para></listitem>
</itemizedlist>
- <programlisting><![CDATA[C:\Program Files\Java\jdk1.5.0_11\]]></programlisting>
+ <para><emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis></para>
<para>In order to run java from the command line add the <emphasis>jre\bin</emphasis> directory to your path, for example:</para>
- <programlisting><![CDATA[C:\Program Files\Java\jdk1.5.0_11\jre\bin]]></programlisting>
- <para>To do this, open the Control Panel from the Start Menu, switch to Classic View if necessary, open the System Control Panel applet, select the Advanced Tab,
- and click on the Environment Variables button.</para>
+ <para><emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis></para>
+ <para>To do this, open the Control Panel from the Start Menu, switch to Classic View if necessary, open the System Control Panel applet, select the Advanced Tab, and click on the Environment Variables button.</para>
</section>
</section>
@@ -112,13 +106,17 @@
<title>Red Hat Developer Studio Installation</title>
<section id="Instfromdownver">
<title>Installing from the downloaded version</title>
+ <para>RHDS comes with simple installer, bundled with tested/pre-configured versions of Eclipse, Webtools, JBossEAP, and SpringIDE.</para>
<itemizedlist>
<listitem>
<para>Download the appropriate installation file for your platform from <ulink url="http://www.redhat.com/developers/rhds/index.html">Red Hat website</ulink>.</para>
</listitem>
<listitem>
- <para>Run rhdevstudio-linux-gtk-1.0.0.beta1.jar and follow the instructions presented by the installation wizard</para>
- </listitem>
+ <para>Run in console:</para>
+ <programlisting role="JAVA"><![CDATA[java -jar rhdevstudio-linux-gtk-1.0.0.beta1.jar
+]]></programlisting></listitem>
+ <listitem><para>and follow the instructions presented by the installation wizard</para></listitem>
+
</itemizedlist>
<figure>
@@ -214,23 +212,30 @@
<orderedlist>
<listitem>On Red Hat based Linux distributions install the xpLib.i386 package</listitem>
-<listitem>Type ln -s libstdc++.so.5.0.7 libstdc++.so.5</listitem>
-<listitem>and/or use yum install libXp</listitem>
+<listitem>Type
+<programlisting role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
+]]></programlisting>
+</listitem>
+<listitem>and/or use
+<programlisting role="JAVA"><![CDATA[yum install libXp
+]]></programlisting>
+ </listitem>
<listitem>Open the RHDS perspective. If you see the Help view open, close it and restart RHDS</listitem>
<listitem>If none of these work, do the following:
<itemizedlist>
-<listitem>Clear the Eclipse log file, <workspace>\.metadata\.log</listitem>
+<listitem>Clear the Eclipse log file, <emphasis><workspace>\.metadata\.log</emphasis></listitem>
<listitem>Start Eclipse with the -debug option:
-<para>eclipse -debug</para></listitem>
-<listitem>Post the Eclipse log file (<workspace>\.metadata\.log) on the forums.</listitem>
+<programlisting role="JAVA"><![CDATA[eclipse -debug
+]]></programlisting>
+</listitem>
+<listitem>Post the Eclipse log file (<emphasis><workspace>\.metadata\.log</emphasis>) on the forums.</listitem>
</itemizedlist>
</listitem>
</orderedlist>
<para><emphasis role="bold">Do I need to have JBoss server installed to run Red Hat Developer Studio?</emphasis></para>
- <para>No. Red Hat Developer Studio already comes bundled with JBoss server. We bundle it together so that you don't need to download any
- additional software and can test your application in a Web browser right away.</para>
+ <para>No. Red Hat Developer Studio already comes bundled with JBoss server. We bundle it together so that you don't need to download any additional software and can test your application in a Web browser right away.</para>
<para>If you want to use a different JBoss server installation, after Red Hat Developer Studio is installed open Servers View (select <emphasis>Window > Show View > Others > Server > Servers</emphasis>), then right click on this <emphasis>view > New > Server</emphasis> and follow the wizards steps to point to another Jboss server installation.</para>
<para>Red Hat Developer Studio works with any servlet container, not just JBoss. For more information on deployment, please see the Deploying Your Application section.</para>
</section>
@@ -245,7 +250,9 @@
<title>Troubleshooting, Problems, Configuration, Error Messages</title>
<para><emphasis role="bold">Is it possible to increase the performance of Eclipse after installing your product? My Eclipse now crawls.</emphasis></para>
<para>Red Hat Developer Studio preconfigures eclipse via the eclipse.ini file to allocate extra memory, but if you for some reason need more memory then by default, you can manually make adjustments in this file. For example:</para>
- <para>-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m</para>
+ <programlisting role="JAVA"><![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
+]]></programlisting>
+
<para><emphasis role="bold">How can I add my own tag library to the Red Hat Palette?</emphasis></para>
<para>See <ulink url="http://www.redhat.com/developers/rhds/JSFTools/JavaServerFacesSupport.htm...">Adding Tag Libraries</ulink> in JBossJSFTools Guide.</para>
16 years, 8 months