Author: sdzmitrovich
Date: 2008-10-01 08:38:24 -0400 (Wed, 01 Oct 2008)
New Revision: 10588
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2008-10-01
12:38:24 UTC (rev 10588)
@@ -15,11 +15,9 @@
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.Set;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
@@ -30,6 +28,8 @@
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -46,101 +46,101 @@
*/
public class RichFacesCalendarTemplate extends VpeAbstractTemplate implements
VpeToggableTemplate {
- static String[] HEADER_CONTENT = { "<<", "<",
"", ">", ">>" };
- static String[] HEADER_CONTENT_ON_POPUP = { "<<", "<",
"", ">", ">>", "X" };
+ static String[] HEADER_CONTENT = { "<<", "<",
"", ">", ">>" }; //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ static String[] HEADER_CONTENT_ON_POPUP = { "<<", "<",
"", ">", ">>", "X" }; //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
final static int MONTH_LENGTH[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
30, 31 };
final static int LEAP_MONTH_LENGTH[] = { 31, 29, 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 String STYLE_PATH = "calendar/calendar.css"; //$NON-NLS-1$
+ final static String BUTTON_IMG = "calendar/calendar.gif"; //$NON-NLS-1$
final static int COLUMN = 8;
- final static String FILL_WIDTH = "100%";
+ final static String FILL_WIDTH = "100%"; //$NON-NLS-1$
final static int NUM_DAYS_IN_WEEK = 7;
final static int NUM_WEEK_ON_PAGE = 6;
- final static String TODAY = "Today";
- final static String VERTICAL_SEPARATOR = "|";
- final static String APPLY = "Apply";
+ final static String TODAY = "Today"; //$NON-NLS-1$
+ final static String VERTICAL_SEPARATOR = "|"; //$NON-NLS-1$
+ final static String APPLY = "Apply"; //$NON-NLS-1$
final static int CALENDAR_WIDTH = 200;
final static int CALENDAR_INPUT_WIDTH = CALENDAR_WIDTH - 20;
final static int CALENDAR_IMAGE_WIDTH = 20;
final static int CALENDAR_CUSTOM_IMAGE_WIDTH = 40;
final static int CALENDAR_BUTTON_WIDTH = 80;
- final static String ATTRIBUTE_TEXT = "text";
+ final static String ATTRIBUTE_TEXT = "text"; //$NON-NLS-1$
- static final String DEFAULT_DATE_PATTERN = "MMMM, yyyy";
- static final String HEADER = "header";
- static final String FOOTER = "footer";
- static final String VPE_USER_TOGGLE_ID_ATTR = "vpe-user-toggle-id";
+ static final String DEFAULT_DATE_PATTERN = "MMMM, yyyy"; //$NON-NLS-1$
+ static final String HEADER = "header"; //$NON-NLS-1$
+ static final String FOOTER = "footer"; //$NON-NLS-1$
+ static final String VPE_USER_TOGGLE_ID_ATTR = "vpe-user-toggle-id";
//$NON-NLS-1$
/*rich:calendar attributes*/
- static final String BUTTON_LABEL = "buttonLabel";
- static final String BUTTON_ICON = "buttonIcon";
- static final String DIRECTION = "direction";
- static final String ENABLE_MANUAL_INPUT = "enableManualInput";
- static final String CELL_HEIGHT = "cellHeight";
- static final String CELL_WIDTH = "cellWidth";
- static final String DATE_PATTERN = "datePattern";
- static final String VALUE = "value";
- static final String DISABLED = "disabled";
- static final String HORIZONTAL_OFFSET = "horizontalOffset";
- static final String VERTICAL_OFFSET = "verticalOffset";
- static final String LOCALE = "locale";
- static final String POPUP = "popup";
- static final String SHOW_APPLY_BUTTON = "showApplyButton";
- static final String SHOW_INPUT = "showInput";
- static final String SHOW_SHOW_WEEKS_DAY_BAR = "showWeekDaysBar";
- static final String SHOW_WEEKS_BAR = "showWeeksBar";
- static final String TODAY_CONTROL_MODE = "todayControlMode";
- static final String SHOW_HEADER = "showHeader";
- static final String SHOW_FOOTER= "showFooter";
+ static final String BUTTON_LABEL = "buttonLabel"; //$NON-NLS-1$
+ static final String BUTTON_ICON = "buttonIcon"; //$NON-NLS-1$
+ static final String DIRECTION = "direction"; //$NON-NLS-1$
+ static final String ENABLE_MANUAL_INPUT = "enableManualInput"; //$NON-NLS-1$
+ static final String CELL_HEIGHT = "cellHeight"; //$NON-NLS-1$
+ static final String CELL_WIDTH = "cellWidth"; //$NON-NLS-1$
+ static final String DATE_PATTERN = "datePattern"; //$NON-NLS-1$
+ static final String VALUE = "value"; //$NON-NLS-1$
+ static final String DISABLED = "disabled"; //$NON-NLS-1$
+ static final String HORIZONTAL_OFFSET = "horizontalOffset"; //$NON-NLS-1$
+ static final String VERTICAL_OFFSET = "verticalOffset"; //$NON-NLS-1$
+ static final String LOCALE = "locale"; //$NON-NLS-1$
+ static final String POPUP = "popup"; //$NON-NLS-1$
+ static final String SHOW_APPLY_BUTTON = "showApplyButton"; //$NON-NLS-1$
+ static final String SHOW_INPUT = "showInput"; //$NON-NLS-1$
+ static final String SHOW_SHOW_WEEKS_DAY_BAR = "showWeekDaysBar";
//$NON-NLS-1$
+ static final String SHOW_WEEKS_BAR = "showWeeksBar"; //$NON-NLS-1$
+ static final String TODAY_CONTROL_MODE = "todayControlMode"; //$NON-NLS-1$
+ static final String SHOW_HEADER = "showHeader"; //$NON-NLS-1$
+ static final String SHOW_FOOTER= "showFooter"; //$NON-NLS-1$
/*CSS classes*/
- static final String CSS_R_C_INPUT = "rich-calendar-input";
- static final String CSS_R_C_BUTTON = "rich-calendar-button";
- static final String CSS_R_C_EXTERIOR = "rich-calendar-exterior";
- static final String CSS_R_C_HEADER = "rich-calendar-header";
- static final String CSS_R_C_TOOL = "rich-calendar-tool";
- static final String CSS_R_C_MONTH = "rich-calendar-month";
- static final String CSS_R_C_TOOL_CLOSE = "rich-calendar-tool-close";
- static final String CSS_R_C_DAYS = "rich-calendar-days";
- static final String CSS_R_C_WEEKENDS = "rich-calendar-weekends";
- static final String CSS_R_C_WEEK = "rich-calendar-week";
- static final String CSS_R_C_CELL = "rich-calendar-cell";
- static final String CSS_R_C_CELL_SIZE = "rich-calendar-cell-size";
- static final String CSS_R_C_HOLLY = "rich-calendar-holly";
- static final String CSS_R_C_BOUNDARY_DATES = "rich-calendar-boundary-dates";
- static final String CSS_R_C_BTN = "rich-calendar-btn";
- static final String CSS_R_C_TODAY = "rich-calendar-today";
- static final String CSS_R_C_SELECT = "rich-calendar-select";
- static final String CSS_R_C_TOOLFOOTER = "rich-calendar-toolfooter";
- static final String CSS_R_C_FOOTER = "rich-calendar-footer";
- static final String CSS_R_C_HEADER_OPTIONAL =
"rich-calendar-header-optional";
- static final String CSS_R_C_FOOTER_OPTIONAL =
"rich-calendar-footer-optional";
+ static final String CSS_R_C_INPUT = "rich-calendar-input"; //$NON-NLS-1$
+ static final String CSS_R_C_BUTTON = "rich-calendar-button"; //$NON-NLS-1$
+ static final String CSS_R_C_EXTERIOR = "rich-calendar-exterior";
//$NON-NLS-1$
+ static final String CSS_R_C_HEADER = "rich-calendar-header"; //$NON-NLS-1$
+ static final String CSS_R_C_TOOL = "rich-calendar-tool"; //$NON-NLS-1$
+ static final String CSS_R_C_MONTH = "rich-calendar-month"; //$NON-NLS-1$
+ static final String CSS_R_C_TOOL_CLOSE = "rich-calendar-tool-close";
//$NON-NLS-1$
+ static final String CSS_R_C_DAYS = "rich-calendar-days"; //$NON-NLS-1$
+ static final String CSS_R_C_WEEKENDS = "rich-calendar-weekends";
//$NON-NLS-1$
+ static final String CSS_R_C_WEEK = "rich-calendar-week"; //$NON-NLS-1$
+ static final String CSS_R_C_CELL = "rich-calendar-cell"; //$NON-NLS-1$
+ static final String CSS_R_C_CELL_SIZE = "rich-calendar-cell-size";
//$NON-NLS-1$
+ static final String CSS_R_C_HOLLY = "rich-calendar-holly"; //$NON-NLS-1$
+ static final String CSS_R_C_BOUNDARY_DATES = "rich-calendar-boundary-dates";
//$NON-NLS-1$
+ static final String CSS_R_C_BTN = "rich-calendar-btn"; //$NON-NLS-1$
+ static final String CSS_R_C_TODAY = "rich-calendar-today"; //$NON-NLS-1$
+ static final String CSS_R_C_SELECT = "rich-calendar-select"; //$NON-NLS-1$
+ static final String CSS_R_C_TOOLFOOTER = "rich-calendar-toolfooter";
//$NON-NLS-1$
+ static final String CSS_R_C_FOOTER = "rich-calendar-footer"; //$NON-NLS-1$
+ static final String CSS_R_C_HEADER_OPTIONAL = "rich-calendar-header-optional";
//$NON-NLS-1$
+ static final String CSS_R_C_FOOTER_OPTIONAL = "rich-calendar-footer-optional";
//$NON-NLS-1$
private final static String WEEK_DAY_HTML_CLASS_ATTR = CSS_R_C_DAYS;
- private final static String HOL_WEEK_DAY_HTML_CLASS_ATTR = CSS_R_C_DAYS + " "
+ CSS_R_C_WEEKENDS;
- private final static String TODAY_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+
CSS_R_C_CELL + " "+ CSS_R_C_TODAY;
- private final static String CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL;
- private final static String HOL_CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY;
- private final static String OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL + " "+ CSS_R_C_BOUNDARY_DATES;
- private final static String HOL_OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY + " " +
CSS_R_C_BOUNDARY_DATES ;
+ private final static String HOL_WEEK_DAY_HTML_CLASS_ATTR = CSS_R_C_DAYS + " "
+ CSS_R_C_WEEKENDS; //$NON-NLS-1$
+ private final static String TODAY_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + " "+
CSS_R_C_CELL + " "+ CSS_R_C_TODAY; //$NON-NLS-1$ //$NON-NLS-2$
+ private final static String CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL; //$NON-NLS-1$
+ private final static String HOL_CUR_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY; //$NON-NLS-1$ //$NON-NLS-2$
+ private final static String OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL + " "+ CSS_R_C_BOUNDARY_DATES; //$NON-NLS-1$
//$NON-NLS-2$
+ private final static String HOL_OTHER_MONTH_HTML_CLASS_ATTR = CSS_R_C_CELL_SIZE + "
"+ CSS_R_C_CELL + " "+ CSS_R_C_HOLLY + " " +
CSS_R_C_BOUNDARY_DATES ; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/*Attribute values*/
- private static final String DIRECTIONS_TOP_LEFT = "top-left";
- private static final String DIRECTIONS_TOP_RIGHT = "top-right";
- private static final String DIRECTIONS_BOTTOM_LEFT = "bottom-left";
- private static final String DIRECTIONS_BOTTOM_RIGHT = "bottom-right";
+ private static final String DIRECTIONS_TOP_LEFT = "top-left"; //$NON-NLS-1$
+ private static final String DIRECTIONS_TOP_RIGHT = "top-right"; //$NON-NLS-1$
+ private static final String DIRECTIONS_BOTTOM_LEFT = "bottom-left";
//$NON-NLS-1$
+ private static final String DIRECTIONS_BOTTOM_RIGHT = "bottom-right";
//$NON-NLS-1$
private static final int DIRECTIONS_TOP_LEFT_INT = 1;
private static final int DIRECTIONS_TOP_RIGHT_INT = 2;
private static final int DIRECTIONS_BOTTOM_LEFT_INT = 3;
private static final int DIRECTIONS_BOTTOM_RIGHT_INT = 4;
/*styles for direction table cells*/
- private static final String STYLE_TOP_LEFT = "vertical-align: bottom; text-align:
right;";
- private static final String STYLE_TOP_RIGHT = "vertical-align: bottom; text-align:
left;";
- private static final String STYLE_BOTTOM_LEFT = "vertical-align: top; text-align:
right;";
- private static final String STYLE_BOTTOM_RIGHT = "vertical-align: top; text-align:
left;";
+ private static final String STYLE_TOP_LEFT = "vertical-align: bottom; text-align:
right;"; //$NON-NLS-1$
+ private static final String STYLE_TOP_RIGHT = "vertical-align: bottom; text-align:
left;"; //$NON-NLS-1$
+ private static final String STYLE_BOTTOM_LEFT = "vertical-align: top; text-align:
right;"; //$NON-NLS-1$
+ private static final String STYLE_BOTTOM_RIGHT = "vertical-align: top; text-align:
left;"; //$NON-NLS-1$
/*rich:calendar attributes*/
private String buttonLabel;
@@ -202,7 +202,7 @@
readAttributes(sourceNode);
initCalendar();
- ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "calendar");
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "calendar");
//$NON-NLS-1$
nsIDOMElement div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -222,8 +222,8 @@
nsIDOMElement calendar;
nsIDOMElement calendarWithPopup;
- if ("false".equalsIgnoreCase(popup)) {
- if ("true".equalsIgnoreCase(disabled)) {
+ if ("false".equalsIgnoreCase(popup)) { //$NON-NLS-1$
+ if ("true".equalsIgnoreCase(disabled)) { //$NON-NLS-1$
calendar = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
} else {
@@ -298,8 +298,8 @@
nsIDOMElement hiddenDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
hiddenDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
- + "px; overflow: hidden; display: none;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
//$NON-NLS-1$
+ + "px; overflow: hidden; display: none;"); //$NON-NLS-1$
nsIDOMElement hiddenTable = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
@@ -346,7 +346,7 @@
.createElement(HtmlComponentUtil.HTML_TAG_TD);
table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : 100%");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : 100%"); //$NON-NLS-1$
tr1.appendChild(td1_1);
tr1.appendChild(td1_2);
@@ -360,21 +360,21 @@
int divWidth = CALENDAR_WIDTH + CALENDAR_IMAGE_WIDTH;
div.appendChild(table);
- if (!"false".equalsIgnoreCase(showInput)) {
+ if (!Constants.FALSE.equalsIgnoreCase(showInput)) {
nsIDOMElement input = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
input.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR, ATTRIBUTE_TEXT);
input.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_INPUT);
input.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + CALENDAR_INPUT_WIDTH + "px;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " //$NON-NLS-1$
+ + CALENDAR_INPUT_WIDTH + "px;"); //$NON-NLS-1$
- if ("true".equals(enableManualInput)) {
- input.setAttribute(HtmlComponentUtil.HTML_READONLY_ATTR, "true");
- }
- if ("true".equals(disabled)) {
- input.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true");
- }
+ if (Constants.TRUE.equals(enableManualInput)) {
+ input.setAttribute(HTML.ATTR_READONLY, Constants.TRUE);
+ }
+ if (Constants.TRUE.equals(disabled)) {
+ input.setAttribute(HTML.ATTR_DISABLED, Constants.TRUE);
+ }
if (attrPresents(value)) {
input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
@@ -391,10 +391,10 @@
HtmlComponentUtil.HTML_TAG_BUTTON);
button.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, buttonLabel);
button.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_BUTTON);
- if ("true".equalsIgnoreCase(disabled)) {
- button.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true");
+ if ("true".equalsIgnoreCase(disabled)) { //$NON-NLS-1$
+ button.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true");
//$NON-NLS-1$
}
- button.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar);
+ button.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar);
//$NON-NLS-1$
td1_2.appendChild(button);
divWidth = CALENDAR_WIDTH + CALENDAR_BUTTON_WIDTH;
} else {
@@ -409,12 +409,12 @@
ComponentUtil.setImg(image, BUTTON_IMG);
divWidth = CALENDAR_WIDTH + CALENDAR_IMAGE_WIDTH;
}
- image.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar);
+ image.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar);
//$NON-NLS-1$
td1_2.appendChild(image);
}
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + divWidth + "px; overflow: hidden;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " //$NON-NLS-1$
+ + divWidth + "px; overflow: hidden;"); //$NON-NLS-1$
return div;
}
@@ -454,14 +454,14 @@
nsIDOMElement div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH
- + "px; overflow: hidden;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH //$NON-NLS-1$
+ + "px; overflow: hidden;"); //$NON-NLS-1$
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_CELLPADDING_ATTR, "0");
//$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
//$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
//$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_R_C_EXTERIOR);
@@ -481,10 +481,10 @@
nsIDOMElement calendarBody = createCalendarBody(visualDocument);
nsIDOMElement footer = null;
- if (!"false".equals(showHeader)) {
+ if (!"false".equals(showHeader)) { //$NON-NLS-1$
header = createCalendarHeader(visualDocument);
}
- if (!"false".equals(showFooter)) {
+ if (!"false".equals(showFooter)) { //$NON-NLS-1$
footer = createCalendarFooter(visualDocument);
}
@@ -524,7 +524,7 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
//$NON-NLS-1$
tr.appendChild(td);
if (isHeader) {
@@ -549,10 +549,10 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
//$NON-NLS-1$
String[] array;
- if ("false".equalsIgnoreCase(popup)) {
+ if ("false".equalsIgnoreCase(popup)) { //$NON-NLS-1$
array = HEADER_CONTENT;
} else {
array = HEADER_CONTENT_ON_POPUP;
@@ -573,9 +573,9 @@
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_CELLPADDING_ATTR, "0");
//$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
//$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
//$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
nsIDOMElement tbody = visualDocument
@@ -594,8 +594,8 @@
// close tool
if (i == 5) {
- td1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, "0");
- td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "cursor:
pointer;");
+ td1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, "0"); //$NON-NLS-1$
+ td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "cursor: pointer;");
//$NON-NLS-1$
}
nsIDOMText text1 = visualDocument.createTextNode(array[i]);
@@ -622,12 +622,12 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
+ td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN);
//$NON-NLS-1$
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_CELLSPACING_ATTR, "0");
//$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
//$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
nsIDOMElement tr1 = visualDocument
@@ -640,7 +640,7 @@
td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_R_C_TOOLFOOTER);
- SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
+ SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); //$NON-NLS-1$
Calendar cal = getCalendarWithLocale();
nsIDOMText text1 = visualDocument.createTextNode(sdf.format(cal
@@ -662,14 +662,14 @@
HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
String nodeText;
- if ("false".equalsIgnoreCase(showApplyButton)) {
- if ("hidden".equalsIgnoreCase(todayControlMode)) {
- nodeText = "";
+ if ("false".equalsIgnoreCase(showApplyButton)) { //$NON-NLS-1$
+ if ("hidden".equalsIgnoreCase(todayControlMode)) { //$NON-NLS-1$
+ nodeText = ""; //$NON-NLS-1$
} else {
nodeText = TODAY;
}
} else {
- if ("hidden".equalsIgnoreCase(todayControlMode)) {
+ if ("hidden".equalsIgnoreCase(todayControlMode)) { //$NON-NLS-1$
nodeText = APPLY;
} else {
nodeText = TODAY + VERTICAL_SEPARATOR + APPLY;
@@ -702,16 +702,14 @@
Calendar cal1 = getCalendarWithLocale();
- SimpleDateFormat wdf = new SimpleDateFormat("EE");
-
cal1.set(Calendar.WEEK_OF_MONTH, Calendar.SATURDAY);
// Create week days row
- if (!"false".equalsIgnoreCase(showWeekDaysBar)) {
+ if (!"false".equalsIgnoreCase(showWeekDaysBar)) { //$NON-NLS-1$
for (int i = 0; i < COLUMN; i++) {
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- if ((i == 0) && (!"false".equalsIgnoreCase(showWeeksBar))) {
+ if ((i == 0) && (!"false".equalsIgnoreCase(showWeeksBar))) {
//$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
WEEK_DAY_HTML_CLASS_ATTR);
nsIDOMElement br = visualDocument
@@ -726,7 +724,7 @@
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
WEEK_DAY_HTML_CLASS_ATTR);
}
- nsIDOMText text = visualDocument.createTextNode(i == 0 ? ""
+ nsIDOMText text = visualDocument.createTextNode(i == 0 ? "" //$NON-NLS-1$
: weeks[i - 1]);
td.appendChild(text);
bodyTR.appendChild(td);
@@ -754,13 +752,13 @@
nsIDOMElement tr = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
- if (!"false".equalsIgnoreCase(showWeeksBar)) {
+ if (!"false".equalsIgnoreCase(showWeeksBar)) { //$NON-NLS-1$
// Week in year
nsIDOMElement weekTD = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
weekTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_R_C_WEEK);
- nsIDOMText weekText = visualDocument.createTextNode(""
+ nsIDOMText weekText = visualDocument.createTextNode("" //$NON-NLS-1$
+ cal.get(Calendar.WEEK_OF_YEAR));
weekTD.appendChild(weekText);
tr.appendChild(weekTD);
@@ -773,7 +771,7 @@
nsIDOMElement td = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- String currentAttr = "";
+ String currentAttr = ""; //$NON-NLS-1$
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
@@ -808,18 +806,18 @@
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, currentAttr);
if (attrPresents(cellWidth) && attrPresents(cellHeight)) {
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + ":" + cellWidth
- + "px;" + HtmlComponentUtil.HTML_ATR_HEIGHT
- + ":" + cellHeight + "px;");
+ HtmlComponentUtil.HTML_ATR_WIDTH + ":" + cellWidth //$NON-NLS-1$
+ + "px;" + HtmlComponentUtil.HTML_ATR_HEIGHT //$NON-NLS-1$
+ + ":" + cellHeight + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
} else if (attrPresents(cellWidth)) {
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH +":" + cellWidth + "px;");
+ HtmlComponentUtil.HTML_ATR_WIDTH +":" + cellWidth + "px;");
//$NON-NLS-1$ //$NON-NLS-2$
} else if (attrPresents(cellHeight)) {
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_HEIGHT+":" + cellHeight + "px;");
+ HtmlComponentUtil.HTML_ATR_HEIGHT+":" + cellHeight + "px;");
//$NON-NLS-1$ //$NON-NLS-2$
}
- nsIDOMText text = visualDocument.createTextNode(""
+ nsIDOMText text = visualDocument.createTextNode("" //$NON-NLS-1$
+ cal.get(Calendar.DAY_OF_MONTH));
td.appendChild(text);
tr.appendChild(td);
@@ -843,7 +841,7 @@
visualNode, data, name, value);
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
String popup = sourceElement.getAttribute(POPUP);
- if (popup != null && popup.equalsIgnoreCase("false"))
+ if (popup != null && popup.equalsIgnoreCase("false"))
//$NON-NLS-1$
return;
nsIDOMElement element = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -867,7 +865,7 @@
visualNode, data, name);
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
String popup = sourceElement.getAttribute(POPUP);
- if (popup != null && popup.equalsIgnoreCase("false"))
+ if (popup != null && popup.equalsIgnoreCase("false"))
//$NON-NLS-1$
return;
nsIDOMElement element = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -917,7 +915,7 @@
* @return true, if successful
*/
private boolean attrPresents(String attr) {
- return ((null != attr) && (!"".equals(attr)));
+ return ((null != attr) && (!"".equals(attr))); //$NON-NLS-1$
}
/**
@@ -931,8 +929,8 @@
cal.add(Calendar.DAY_OF_MONTH, 1);
}
- SimpleDateFormat sdf = new SimpleDateFormat("EE");
- String dayOfWeek = "";
+ SimpleDateFormat sdf = new SimpleDateFormat("EE"); //$NON-NLS-1$
+ String dayOfWeek = ""; //$NON-NLS-1$
for (int i = 0; i < NUM_DAYS_IN_WEEK; i++) {
dayOfWeek = sdf.format(cal.getTime());
weeks[i] = dayOfWeek;
@@ -964,7 +962,7 @@
return Locale.getDefault();
}
// Lookup index of first '_' in string locale representation.
- int index1 = localeStr.indexOf("_");
+ int index1 = localeStr.indexOf("_"); //$NON-NLS-1$
// Get first charters (if exist) from string
String language = null;
if (index1 != -1) {
@@ -973,7 +971,7 @@
return new Locale(localeStr);
}
// Lookup index of second '_' in string locale representation.
- int index2 = localeStr.indexOf("_", index1 + 1);
+ int index2 = localeStr.indexOf("_", index1 + 1); //$NON-NLS-1$
String country = null;
if (index2 != -1) {
country = localeStr.substring(index1 + 1, index2);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-01
12:38:24 UTC (rev 10588)
@@ -66,13 +66,13 @@
public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels";
//$NON-NLS-1$
/** The Constant ATTR_DEFAULT_LABEL. */
- public static final String ATTR_DEFAULT_LABEL = "defaultLabel";
+ public static final String ATTR_DEFAULT_LABEL = "defaultLabel";
//$NON-NLS-1$
/** The Constant ATTR_ADD_CONTROL_LABEL. */
- public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel";
+ public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel";
//$NON-NLS-1$
/** The Constant ATTR_STYLE_CLASS. */
- public static final String ATTR_STYLE_CLASS = "styleClass";
+ public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel";
//$NON-NLS-1$
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/ajaxValidator.xhtml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>ajaxValidator</h1>
+
+<h:form>
+
+ <h:panelGrid columns="2">
+ <h:inputText value="#{bean.avString}" id="input"
required="true">
+ <f:validateLength minimum="3" maximum="12" />
+ <rich:ajaxValidator event="onblur" id="ajaxValidator" />
+ </h:inputText>
+ <rich:message for="input" />
+ </h:panelGrid>
+</h:form>
+
+</body>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/beanValidator.xhtml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>beanValidator</h1>
+<h:form>
+ <h:inputText value="#{bean.bvString}" id="input">
+ <rich:beanValidator id="beanValidator"/>
+ </h:inputText>
+ <rich:message for="input"/>
+ <a4j:commandButton value="Store changes" />
+</h:form>
+</body>
+</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -9,7 +9,9 @@
<head>
</head>
<body>
- <!-- Calendar -->
- <rich:calendar />
+<h1>calendar</h1>
+<rich:calendar direction="bottom-right"
id="calendar1"></rich:calendar>
+
+<rich:calendar direction="bottom-right" popup="false"
id="calendar2"></rich:calendar>
</body>
</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/calendar.xhtml.xml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,30 @@
+<tests>
+ <test id="calendar1">
+ <TABLE>
+ <TR>
+ <TD>
+ <DIV>
+ <DIV STYLE="overflow: hidden; width: 220px;">
+ <TABLE STYLE="width: 100%;">
+ <TR>
+ <TD>
+ <INPUT TYPE="text" CLASS="rich-calendar-input"
STYLE="width: 180px;" />
+ </TD>
+ <TD>
+ <IMG CLASS="rich-calendar-button"
VPE-USER-TOGGLE-ID="false" />
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"
/>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>comboBox</h1>
+<rich:comboBox value="#{bean.cbString}" defaultLabel="Select Any
Value"
+ style="width:250px" id="comboBox">
+ <f:selectItem itemValue="suggestion 1" />
+ <f:selectItem itemValue="suggestion 2" />
+ <f:selectItem itemValue="suggestion 3" />
+ <f:selectItem itemValue="suggestion 4" />
+ <f:selectItem itemValue="suggestion 5" />
+</rich:comboBox>
+</body>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,22 @@
+<tests>
+ <test id="comboBox">
+ <DIV STYLE="width: 150px;">
+ <DIV ALIGN="left" CLASS="rich-combobox-font rich-combobox"
+ STYLE="position: static; z-index: 0; width: 250px;">
+ <DIV CLASS="rich-combobox-font rich-combobox-shell" STYLE="width:
150px; z-index: 1;">
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-disabled rich-combobox-input-inactive"
+ AUTOCOMPLETE="off" STYLE="width: 133px;" VALUE="Select Any
Value" />
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-inactive rich-combobox-button-background
rich-combobox-button-inactive"
+ READONLY="true" VPE-USER-TOGGLE-ID="0" />
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-inactive rich-combobox-button-icon-inactive
rich-combobox-button-inactive"
+ READONLY="true" VPE-USER-TOGGLE-ID="0" />
+ <DIV CLASS="rich-combobox-strut rich-combobox-font" STYLE="width:
140px;">
+ Struts</DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/componentControl.xhtml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -10,6 +10,6 @@
</head>
<body>
<h:inputText value="#{user}" id="inputText"/>
- <rich:componentControl for="inputText" attachTo="link"
operation="show" event="onclick"/>
+ <rich:componentControl for="inputText" attachTo="link"
operation="show" event="onclick" id="componentControl"/>
</body>
</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/graphValidator.xhtml 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h1>graphValidator</h1>
+<h:form>
+
+ <rich:graphValidator id="graphValidator">
+
+ <h:inputText value="#{bean.gvString}" id="input">
+ </h:inputText>
+ <rich:message for="input" />
+ <h:inputText value="#{bean.gvString2}" id="input2">
+ </h:inputText>
+ <rich:message for="input2" />
+
+ </rich:graphValidator>
+ <a4j:commandButton value="Store changes" />
+</h:form>
+</body>
+</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-01
12:38:24 UTC (rev 10588)
@@ -38,40 +38,43 @@
public class RichFacesAllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); //
$NON-NLS-1$
- // $JUnit-BEGIN$
+ public static final String IMPORT_PROJECT_NAME = "richFacesTest";
//$NON-NLS-1$
- suite.addTestSuite(RichFacesComponentTest.class);
- suite.addTestSuite(JBIDE1579Test.class);
- suite.addTestSuite(Jbide1580Test.class);
- suite.addTestSuite(JBIDE1613Test.class);
- suite.addTestSuite(Jbide1614Test.class);
- suite.addTestSuite(Jbide1639Test.class);
- suite.addTestSuite(Jbide1682Test.class);
- suite.addTestSuite(Jbide1548Test.class);
- suite.addTestSuite(JBIDE1713Test.class);
- suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
- suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
- suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
- suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
- suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
- suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
- suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
- suite.addTestSuite(JBIDE1605Test.class);
- suite.addTestSuite(JBIDE1606Test.class);
- // $JUnit-END$
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); //
$NON
+ // $JUnit-BEGIN$
- List<ImportBean> projectToImport = new ArrayList<ImportBean>();
- ImportBean importBean = new ImportBean();
- importBean
- .setImportProjectName(RichFacesComponentTest.IMPORT_PROJECT_NAME);
- importBean.setImportProjectPath(RichFacesTestPlugin
- .getPluginResourcePath());
- projectToImport.add(importBean);
+ suite.addTestSuite(RichFacesComponentTest.class);
+ suite.addTestSuite(JBIDE1579Test.class);
+ suite.addTestSuite(Jbide1580Test.class);
+ suite.addTestSuite(JBIDE1613Test.class);
+ suite.addTestSuite(Jbide1614Test.class);
+ suite.addTestSuite(Jbide1639Test.class);
+ suite.addTestSuite(Jbide1682Test.class);
+ suite.addTestSuite(Jbide1548Test.class);
+ suite.addTestSuite(JBIDE1713Test.class);
+ suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
+ suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
+ suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
+ suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
+ suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
+ suite.addTestSuite(JBIDE1605Test.class);
+ suite.addTestSuite(JBIDE1606Test.class);
+ suite.addTestSuite(RichFacesComponentContentTest.class);
- return new VpeTestSetup(suite, projectToImport);
+ // $JUnit-END$
- }
+ List<ImportBean> projectToImport = new ArrayList<ImportBean>();
+ ImportBean importBean = new ImportBean();
+ importBean.setImportProjectName(RichFacesAllTests.IMPORT_PROJECT_NAME);
+ importBean.setImportProjectPath(RichFacesTestPlugin
+ .getPluginResourcePath());
+ projectToImport.add(importBean);
+ return new VpeTestSetup(suite, projectToImport);
+
+ }
+
}
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-01
12:38:24 UTC (rev 10588)
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+
+/**
+ * Class for testing all richfaces components
+ *
+ * @author sdzmitrovich
+ *
+ */
+public class RichFacesComponentContentTest extends ComponentContentTest {
+
+ public RichFacesComponentContentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ public void testAjaxValidator() throws Throwable {
+ performInvisibleTagTest(
+ "components/ajaxValidator.xhtml", "ajaxValidator");//$NON-NLS-1$
//$NON-NLS-2$
+ }
+
+ public void testGraphValidator() throws Throwable {
+ performInvisibleWrapperTagTest(
+ "components/graphValidator.xhtml",
"graphValidator");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testBeanValidator() throws Throwable {
+ performInvisibleTagTest(
+ "components/beanValidator.xhtml", "beanValidator");//$NON-NLS-1$
//$NON-NLS-2$
+ }
+
+ public void testCalendar() throws Throwable {
+ performContentTest("components/calendar.xhtml");//$NON-NLS-1$
+ }
+
+ public void testComboBox() throws Throwable {
+ performContentTest("components/comboBox.xhtml");//$NON-NLS-1$
+ }
+
+ public void testComponentControl() throws Throwable {
+ performInvisibleTagTest(
+ "components/componentControl.xhtml",
"componentControl");//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void testContextMenu() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDataFilterSlider() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDatascroller() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testColumns() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testColumnGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testColumn() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDataGrid() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDataList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDataOrderedList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDataDefinitionList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDataTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testSubTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDndParam() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDragIndicator() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDragSupport() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDropSupport() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDragListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDropListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testDropDownMenu() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testExtendedDataTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testMenuGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testMenuItem() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testMenuSeparator() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testEffect() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testFileUpload() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testGmap() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testVirtualEarth() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testHotKey() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testInplaceInput() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testInplaceSelect() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testInputNumberSlider() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testInputNumberSpinner() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testInsert() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testJQuery() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testListShuttle() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testMessage() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testMessages() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testModalPanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testOrderingList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPaint2D() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPanelBar() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPanelBarItem() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPanelMenu() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPanelMenuGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPanelMenuItem() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testPickList() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testProgressBar() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testScrollableDataTable() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testSeparator() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testSimpleTogglePanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testSpacer() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testSuggestionbox() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testTabPanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testTab() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testTogglePanel() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testToggleControl() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testToolBar() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testToolBarGroup() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testToolTip() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testTree() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testTreeNode() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testChangeExpandListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testNodeSelectListener() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testRecursiveTreeNodesAdaptor() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ public void testTreeNodesAdaptor() throws Throwable {
+ assertTrue("it is necessary to add a body of the test ",
false);//$NON-NLS-1$
+ }
+
+ protected String getTestProjectName() {
+ return RichFacesAllTests.IMPORT_PROJECT_NAME;
+ }
+
+}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-01
12:38:24 UTC (rev 10588)
@@ -34,186 +34,186 @@
public void testAllComponentsOnSinglePage() throws PartInitException,
Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testCalendar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/calendar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/calendar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataDefinitionList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataFilterSlider() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataGrid() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataOrderedList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataScroller() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataTable() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDragAndDrop() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDropDawnMenu() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testEffect() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/effect.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/effect.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testGoogleMap() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInputNumberSlider() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInputNumberSpinner() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testInsert() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/insert.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/insert.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMessage() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/message.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/message.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testMessages() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/messages.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/messages.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testModalPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testOrderingList() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPaint2D() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/panel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanelBar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testPanelMenu() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testScrollableDataTable() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); //
$NON-NLS-1$
+ "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSeparator() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/separator.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/separator.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSimpleTogglePanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSpacer() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/spacer.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/spacer.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testSuggestionBox() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTabPanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTogglePanel() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testToolBar() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testTree() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tree.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/tree.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testVirtualEarth() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testComponentControl() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testContextMenu() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testListShuttle() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/listShuttle.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ "components/listShuttle.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2008-10-01
12:20:59 UTC (rev 10587)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2008-10-01
12:38:24 UTC (rev 10588)
@@ -22,8 +22,11 @@
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* @author Sergey Dzmitrovich
@@ -127,9 +130,12 @@
}
/**
+ * test for invisible tags
*
* @param elementPagePath
* - path to test page
+ * @param elementId
+ * - id of element on page
* @throws Throwable
*/
protected void performInvisibleTagTest(String elementPagePath,
@@ -191,7 +197,81 @@
}
/**
+ * test for invisible tags which can have visible children
*
+ * @param elementPagePath
+ * - path to test page
+ * @param elementId
+ * - id of element on page
+ * @throws Throwable
+ */
+ protected void performInvisibleWrapperTagTest(String elementPagePath,
+ String elementId) throws Throwable {
+ setException(null);
+
+ IFile elementPageFile = (IFile) TestUtil.getComponentPath(
+ elementPagePath, getTestProjectName());
+
+ IEditorInput input = new FileEditorInput(elementPageFile);
+
+ TestUtil.waitForJobs();
+
+ IEditorPart editor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().openEditor(input,
+ EDITOR_ID, true);
+
+ assertNotNull(editor);
+
+ TestUtil.waitForJobs();
+
+ VpeController controller = getVpeController((JSPMultiPageEditor) editor);
+
+ // find source element and check if it is not null
+ Element sourceELement = findSourceElementById(controller, elementId);
+ assertNotNull(sourceELement);
+
+ // find visual element and check if it is null
+ nsIDOMElement visualElement = findElementById(controller, elementId);
+ assertNull(visualElement);
+
+ // check children of non-visual
+ NodeList children = sourceELement.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node child = children.item(i);
+ assertNotNull(findNode(controller, child));
+ }
+
+ // set show invisible tag's flag to true
+ controller.getVisualBuilder().setShowInvisibleTags(true);
+ controller.visualRefresh();
+
+ TestUtil.waitForIdle();
+
+ // find visual element and check if it is not null
+ visualElement = findElementById(controller, elementId);
+ assertNotNull(visualElement);
+
+ // generate text for invisible tag
+ String modelInvisibleTagText = generateInvisibleTagText(sourceELement
+ .getNodeName());
+
+ // generate dom document and get root element
+ Element modelElement = TestDomUtil.getDocument(modelInvisibleTagText)
+ .getDocumentElement();
+ assertNotNull(modelElement);
+
+ // compare elements
+ assertEquals(true, TestDomUtil
+ .compareNodes(visualElement, modelElement));
+
+ if (getException() != null) {
+ throw getException();
+ }
+
+ }
+
+ /**
+ *
* @param tagName
* @return
*/
@@ -222,6 +302,24 @@
}
/**
+ * find visual element by "id" entered in source part of vpe
+ *
+ * @param controller
+ * @param elementId
+ * @return
+ */
+ protected nsIDOMNode findNode(VpeController controller, Node node) {
+
+ VpeNodeMapping nodeMapping = controller.getDomMapping().getNodeMapping(
+ node);
+
+ if (nodeMapping == null)
+ return null;
+
+ return nodeMapping.getVisualNode();
+ }
+
+ /**
* find source element by "id"
*
* @param controller