JBoss Rich Faces SVN: r11733 - in trunk/test-applications/facelets/src/main: webapp/pics and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-12 06:51:34 -0500 (Fri, 12 Dec 2008)
New Revision: 11733
Added:
trunk/test-applications/facelets/src/main/webapp/pics/1.gif
trunk/test-applications/facelets/src/main/webapp/pics/2.gif
trunk/test-applications/facelets/src/main/webapp/pics/3.gif
trunk/test-applications/facelets/src/main/webapp/pics/4.gif
Modified:
trunk/test-applications/facelets/src/main/java/tTree/TTree.java
trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml
Log:
+ some attributes to tTree
Modified: trunk/test-applications/facelets/src/main/java/tTree/TTree.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/tTree/TTree.java 2008-12-12 11:32:20 UTC (rev 11732)
+++ trunk/test-applications/facelets/src/main/java/tTree/TTree.java 2008-12-12 11:51:34 UTC (rev 11733)
@@ -6,6 +6,7 @@
import org.richfaces.component.UITree;
import org.richfaces.component.xml.XmlTreeDataBuilder;
import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.model.TreeNode;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -20,7 +21,13 @@
private boolean ajaxSubmitSelection = false;
private String anOpened = "null";
private String anSelected = "null";
+ private boolean rendered = true;
+ private boolean showConnectingLines = false;
+ private boolean toggleOnClick = false;
+ private boolean useCustomIcons = false;
+ private String reRenderCheck = "... waiting ...";
+
public TTree() {
try {
data = XmlTreeDataBuilder.build(new InputSource(getClass()
@@ -41,12 +48,30 @@
e.printStackTrace();
}
}
-
- public void add(){
+
+ public void addCustomIcons() {
+ if (useCustomIcons) {
+ tree.setIcon("/pics/1.gif");
+ tree.setIconCollapsed("/pics/3.gif");
+ tree.setIconExpanded("/pics/4.gif");
+ tree.setIconLeaf("/pics/2.gif");
+ } else {
+ tree.setIcon(null);
+ tree.setIconCollapsed(null);
+ tree.setIconExpanded(null);
+ tree.setIconLeaf(null);
+ }
+ }
+
+ public void add() {
ComponentInfo info = ComponentInfo.getInstance();
info.addField(tree);
}
+ public void resetReRenderCheck() {
+ reRenderCheck = "... waiting ...";
+ }
+
public Boolean adviseNodeOpened(UITree t) {
Boolean tAnOpened = null;
if (anOpened.equals("FALSE"))
@@ -63,14 +88,40 @@
tAnSelected = Boolean.FALSE;
else if (anSelected.equals("TRUE"))
tAnSelected = Boolean.TRUE;
-
+
return tAnSelected;
}
public void changeExpandListener(NodeExpandedEvent e) {
+ reRenderCheck = "!!! I am WORKing !!!";
System.out.println("!!! changeExpandListener !!!");
}
+ public void nodeSelectListener(NodeSelectedEvent e) {
+ reRenderCheck = "!!! I am WORKing !!!";
+ System.out.println("!!! nodeSelectListener !!!");
+ }
+
+ public String getReRenderCheck() {
+ return reRenderCheck;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public boolean isAjaxSubmitSelection() {
+ return ajaxSubmitSelection;
+ }
+
+ public void setAjaxSubmitSelection(boolean ajaxSubmitSelection) {
+ this.ajaxSubmitSelection = ajaxSubmitSelection;
+ }
+
public String getSwitchType() {
return switchType;
}
@@ -95,22 +146,6 @@
this.tree = tree;
}
- public boolean isImmediate() {
- return immediate;
- }
-
- public void setImmediate(boolean immediate) {
- this.immediate = immediate;
- }
-
- public boolean isAjaxSubmitSelection() {
- return ajaxSubmitSelection;
- }
-
- public void setAjaxSubmitSelection(boolean ajaxSubmitSelection) {
- this.ajaxSubmitSelection = ajaxSubmitSelection;
- }
-
public String getAnOpened() {
return anOpened;
}
@@ -126,4 +161,36 @@
public void setAnSelected(String anSelected) {
this.anSelected = anSelected;
}
-}
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public boolean isShowConnectingLines() {
+ return showConnectingLines;
+ }
+
+ public void setShowConnectingLines(boolean showConnectingLines) {
+ this.showConnectingLines = showConnectingLines;
+ }
+
+ public boolean isToggleOnClick() {
+ return toggleOnClick;
+ }
+
+ public void setToggleOnClick(boolean toggleOnClick) {
+ this.toggleOnClick = toggleOnClick;
+ }
+
+ public boolean isUseCustomIcons() {
+ return useCustomIcons;
+ }
+
+ public void setUseCustomIcons(boolean useCustomIcons) {
+ this.useCustomIcons = useCustomIcons;
+ }
+}
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/pics/1.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/facelets/src/main/webapp/pics/1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/facelets/src/main/webapp/pics/2.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/facelets/src/main/webapp/pics/2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/facelets/src/main/webapp/pics/3.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/facelets/src/main/webapp/pics/3.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/facelets/src/main/webapp/pics/4.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/facelets/src/main/webapp/pics/4.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml 2008-12-12 11:32:20 UTC (rev 11732)
+++ trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml 2008-12-12 11:51:34 UTC (rev 11733)
@@ -34,7 +34,11 @@
<rich:tree id="dTree" switchType="#{tTree.switchType}"
value="#{tTree.data}" var="defTree" binding="#{tTree.tree}"
ajaxSubmitSelection="#{tTree.ajaxSubmitSelection}"
- immediate="#{tTree.immediate}"
+ immediate="#{tTree.immediate}" rendered="#{tTree.rendered}"
+ reRender="reRenderID"
+ showConnectingLines="#{tTree.showConnectingLines}" focus="focusID"
+ nodeSelectListener="#{tTree.nodeSelectListener}"
+ toggleOnClick="#{tTree.toggleOnClick}"
changeExpandListener="#{tTree.changeExpandListener}"
adviseNodeOpened="#{tTree.adviseNodeOpened}"
adviseNodeSelected="#{tTree.adviseNodeSelected}"
@@ -62,11 +66,19 @@
</rich:treeNode>
</rich:tree>
<hr />
- <h:commandButton action="#{tTree.add}" value="add test" />
+ <h:commandButton id="focusID" action="#{tTree.add}" value="add test" />
<h:panelGrid columns="2">
<f:facet name="header">
<h:outputText value="Tree Properties" />
</f:facet>
+
+ <h:outputText value="reRender:" />
+ <h:panelGroup>
+ <a4j:commandButton value="reset"
+ action="#{tTree.resetReRenderCheck}" reRender="reRenderID"></a4j:commandButton>
+ <h:outputText id="reRenderID" value="#{tTree.reRenderCheck}" />
+ </h:panelGroup>
+
<h:outputText value="Change tree switchType:" />
<h:selectOneRadio value="#{tTree.switchType}" onclick="submit();">
<f:selectItem itemLabel="client" itemValue="client" />
@@ -74,6 +86,18 @@
<f:selectItem itemLabel="ajax" itemValue="ajax" />
</h:selectOneRadio>
+ <h:outputText value="rendered:" />
+ <h:selectBooleanCheckbox value="#{tTree.rendered}"
+ onchange="submit();" />
+
+ <h:outputText value="showConnectingLines:" />
+ <h:selectBooleanCheckbox value="#{tTree.showConnectingLines}"
+ onchange="submit();" />
+
+ <h:outputText value="toggleOnClick:" />
+ <h:selectBooleanCheckbox value="#{tTree.toggleOnClick}"
+ onchange="submit();" />
+
<h:outputText value="ajaxSubmitSelection:" />
<h:selectBooleanCheckbox value="#{tTree.ajaxSubmitSelection}"
onchange="submit();" />
@@ -82,6 +106,12 @@
<h:selectBooleanCheckbox value="#{tTree.immediate}"
onchange="submit();" />
+ <h:outputText value="use custom icons:" />
+ <h:selectBooleanCheckbox value="#{tTree.useCustomIcons}">
+ <a4j:support action="#{tTree.addCustomIcons}" event="onchange"
+ reRender="dTreePanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
<h:outputText value="adviseNodeOpened:" />
<h:selectOneRadio value="#{tTree.anOpened}" onclick="submit();">
<f:selectItem itemLabel="null (default)" itemValue="null" />
17 years, 5 months
JBoss Rich Faces SVN: r11732 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/calendar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-12 06:32:20 -0500 (Fri, 12 Dec 2008)
New Revision: 11732
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5251
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-12 10:41:53 UTC (rev 11731)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-12 11:32:20 UTC (rev 11732)
@@ -40,6 +40,8 @@
public static final String currentDateChangeListener = "currentDateChangeListener";
+ public static final String REQUIRED_MESSAGE = "Date cannot be empty";
+
public static final String DATE_PATTERN = "MM/dd/yyyy HH:mm";
public static final Locale LOCALE = Locale.US;
@@ -222,6 +224,7 @@
isPopup = false;
currentDate = new Date();
locale = Locale.US;
+ required = false;
}
public String resetAction() {
@@ -457,4 +460,46 @@
this.todayControlMode = todayControlMode;
}
+ private boolean required;
+
+ /**
+ * Gets value of required field.
+ * @return value of required field
+ */
+ public boolean isRequired() {
+ return required;
+ }
+
+ /**
+ * Set a new value for required field.
+ * @param required a new value for required field
+ */
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ private String requiredMessage = REQUIRED_MESSAGE;
+
+ /**
+ * Gets value of requiredMessage field.
+ * @return value of requiredMessage field
+ */
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ /**
+ * Set a new value for requiredMessage field.
+ * @param requiredMessage a new value for requiredMessage field
+ */
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
+ public void initRequiredTest() {
+ required = true;
+ selectedDate = null;
+ isPopup = false;
+ }
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-12 10:41:53 UTC (rev 11731)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-12 11:32:20 UTC (rev 11732)
@@ -21,6 +21,13 @@
package org.richfaces.testng;
+import static org.ajax4jsf.bean.CalendarTestBean.DATE_FORMAT;
+import static org.ajax4jsf.bean.CalendarTestBean.DEFAULT_DATE;
+import static org.ajax4jsf.bean.CalendarTestBean.REQUIRED_MESSAGE;
+import static org.ajax4jsf.bean.CalendarTestBean.currentDateChangeListener;
+import static org.ajax4jsf.bean.CalendarTestBean.getDayInMay;
+import static org.ajax4jsf.bean.CalendarTestBean.valueChangeListener;
+
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -29,10 +36,8 @@
import java.util.List;
import java.util.Locale;
-import org.ajax4jsf.bean.CalendarTestBean;
import org.ajax4jsf.template.Template;
import org.ajax4jsf.util.DateUtils;
-import org.apache.tools.ant.util.StringUtils;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
@@ -46,6 +51,8 @@
static final String INIT_SHOW_ATTRIBUTES_TEST = "#{calendarBean.initShowAttributesTest}";
+ static final String INIT_REQUIRED_TEST = "#{calendarBean.initRequiredTest}";
+
static final String FORM_ID = "_form:";
static final String SHOW_ATTRIBURES_TEST_URL = "pages/calendar/showAttributesTest.xhtml";
@@ -68,8 +75,7 @@
WEEK_DAYS_RU.add("��");
WEEK_DAYS_RU.add("��");
WEEK_DAYS_RU.add("��");
- WEEK_DAYS_RU.add("��");
-
+ WEEK_DAYS_RU.add("��");
}
String calendarId;
@@ -92,6 +98,8 @@
String setupActionId;
+ String ajaxSetupActionId;
+
String dateSelectionXpath;
String timeSelectionXpath;
@@ -147,9 +155,9 @@
String cleanButtonXPath;
String closeHeaderXpath;
-
-
+ String calendarMessageId;
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
calendarHeaderId = calendarId + "Header";
@@ -163,6 +171,7 @@
resetActionId = parentId + CONTROLS_FORM_ID + "resetAction";
testClientModeId = parentId + CONTROLS_FORM_ID + "testClientMode";
setupActionId = parentId + CONTROLS_FORM_ID + "setup";
+ ajaxSetupActionId = parentId + CONTROLS_FORM_ID + "ajaxSetup";
timeHoursSelectionId = calendarId + "TimeHours";
timeMinutesSelectionId = calendarId + "TimeMinutes";
timeSelectionOkButtonId = calendarId + "TimeEditorButtonOk";
@@ -189,6 +198,7 @@
todayControlXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[5]";
applyButtonXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[6]";
cleanButtonXPath = "//td[@id='"+calendarFooterId+"']/table/tbody/tr/td[2]";
+ calendarMessageId = parentId + FORM_ID + "calendarMsg";
}
String getStatus() {
@@ -513,14 +523,14 @@
changeDate();
clickAjaxCommandAndWait(ajaxSubmitId);
- assertListeners(CalendarTestBean.valueChangeListener);
+ assertListeners(valueChangeListener);
reset();
changeCurrentDate(true);
changeDate();
clickAjaxCommandAndWait(ajaxSubmitId);
- assertListeners(CalendarTestBean.valueChangeListener, CalendarTestBean.currentDateChangeListener);
+ assertListeners(valueChangeListener, currentDateChangeListener);
}
@@ -533,7 +543,7 @@
changeDate();
clickCommandAndWait(serverSubmitId);
- assertListeners(CalendarTestBean.valueChangeListener);
+ assertListeners(valueChangeListener);
reset();
switchToClientMode();
@@ -541,7 +551,7 @@
changeCurrentDate(false);
changeDate();
clickCommandAndWait(serverSubmitId);
- assertListeners(CalendarTestBean.valueChangeListener, CalendarTestBean.currentDateChangeListener);
+ assertListeners(valueChangeListener, currentDateChangeListener);
}
@@ -578,7 +588,7 @@
public void testSelectDateComponent(Template template) {
renderPage(template);
- Date newSelectedDate = CalendarTestBean.getDayInMay(15);
+ Date newSelectedDate = getDayInMay(15);
String containerId = getParentId() + "_form:";
String calendarOpenedId = containerId + "calendar";
@@ -595,11 +605,11 @@
String inputDateString = getValueById(calendarInputDate);
Date readDate = null;
try {
- readDate = CalendarTestBean.DATE_FORMAT.parse(inputDateString);
+ readDate = DATE_FORMAT.parse(inputDateString);
} catch (ParseException parseException) {
// skip exception
}
- Assert.assertEquals(readDate, CalendarTestBean.DEFAULT_DATE, "Default date representation is wrong!");
+ Assert.assertEquals(readDate, DEFAULT_DATE, "Default date representation is wrong!");
// click on 15th of May
String newSelectedDateId = calendarOpenedId + "DayCell18";
@@ -610,7 +620,7 @@
inputDateString = getValueById(calendarInputDate);
try {
- readDate = CalendarTestBean.DATE_FORMAT.parse(inputDateString);
+ readDate = DATE_FORMAT.parse(inputDateString);
} catch (ParseException parseException) {
// skip exception
}
@@ -666,7 +676,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- @Test
+ @Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -891,7 +901,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- @Test
+ @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -1005,8 +1015,8 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- @Test
- public void buttonRelatedAttributesTest(Template template) {
+ @Test
+ public void testButtonRelatedAttributes(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
@@ -1028,6 +1038,50 @@
AssertTextEquals(labeledPopupBtnId, "Button");
}
+ @Test
+ public void testRequiredAndRequiredMessageAttributes(Template template) {
+ renderPage(template, INIT_REQUIRED_TEST);
+ initIds(getParentId());
+
+ String validDate = new SimpleDateFormat(selenium.getValue(datePatternId)).format(new Date());
+
+ writeStatus("Check required & requiredMessage attributes");
+
+ writeStatus("Initially calendar message has to be empty. Check it");
+ AssertTextEquals(calendarMessageId, "", "there is already not empty message here! This is no good!");
+
+ writeStatus("Check the attributes themselves. In any case 'Date cannot be empty' error message has to come up. Track it");
+ writeStatus("Check non-popup mode");
+
+ clickAjaxCommandAndWait(ajaxSubmitId);
+ AssertTextEquals(calendarMessageId, REQUIRED_MESSAGE, "Wrong message is shown up");
+ ajaxSetup();
+ clickCommandAndWait(serverSubmitId);
+ AssertTextEquals(calendarMessageId, REQUIRED_MESSAGE, "Wrong message is shown up");
+
+ writeStatus("Check popup mode");
+ setPopup(true);
+ ajaxSetup();
+
+ clickAjaxCommandAndWait(ajaxSubmitId);
+ AssertTextEquals(calendarMessageId, REQUIRED_MESSAGE, "Wrong message is shown up");
+ ajaxSetup();
+ clickCommandAndWait(serverSubmitId);
+ AssertTextEquals(calendarMessageId, REQUIRED_MESSAGE, "Wrong message is shown up");
+
+ writeStatus("Fix date. Error message has to escape");
+ setValueById(selectedDateId, validDate);
+ ajaxSetup();
+
+ clickAjaxCommandAndWait(ajaxSubmitId);
+ AssertTextEquals(calendarMessageId, "", "Message has to be empty");
+ ajaxSetup();
+
+ clickCommandAndWait(serverSubmitId);
+ AssertTextEquals(calendarMessageId, "", "Message has to be empty");
+ ajaxSetup();
+ }
+
private void setPopup(boolean isPopup) {
runScript("$('" + isPopupId + "').checked=" + isPopup);
}
@@ -1044,6 +1098,10 @@
clickCommandAndWait(setupActionId);
}
+ private void ajaxSetup() {
+ clickAjaxCommandAndWait(ajaxSetupActionId);
+ }
+
private void showPopup() {
writeStatus("Show popup");
clickById(popupButtonId);
@@ -1081,7 +1139,7 @@
public void changeValue() {
changeDate();
}
-
+
@Override
public void sendAjax() {
changeCurrentDate(true);
17 years, 5 months
JBoss Rich Faces SVN: r11731 - trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-12 05:41:53 -0500 (Fri, 12 Dec 2008)
New Revision: 11731
Modified:
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-3658
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java 2008-12-12 10:41:25 UTC (rev 11730)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.java 2008-12-12 10:41:53 UTC (rev 11731)
@@ -128,7 +128,19 @@
Object child = iter.next();
if (child instanceof UIParameter) {
UIParameter param = (UIParameter) child;
- parameters.put(param.getName(),param.getValue());
+ String name = ((UIParameter) child).getName();
+ Object value = ((UIParameter) child).getValue();
+
+ if (name == null) {
+ throw new IllegalArgumentException(Messages.getMessage(
+ Messages.UNNAMED_PARAMETER_ERROR, component.getClientId(context)));
+ }
+
+ if (value == null) {
+ value = "";
+ }
+
+ parameters.put(name,value);
}
}
17 years, 5 months
JBoss Rich Faces SVN: r11730 - trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-12 05:41:25 -0500 (Fri, 12 Dec 2008)
New Revision: 11730
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
Log:
https://jira.jboss.org/jira/browse/RF-3658
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2008-12-12 09:02:00 UTC (rev 11729)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2008-12-12 10:41:25 UTC (rev 11730)
@@ -262,6 +262,9 @@
escape = !actionParam.isNoEscape();
}
if (escape) {
+ if(value == null) {
+ value = "";
+ }
parameters.put(name, value);
} else {
parameters.put(name, new JSReference(value.toString()));
17 years, 5 months
JBoss Rich Faces SVN: r11729 - in trunk/test-applications/facelets/src/main: webapp/tTree and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-12 04:02:00 -0500 (Fri, 12 Dec 2008)
New Revision: 11729
Modified:
trunk/test-applications/facelets/src/main/java/tTree/PVisability.java
trunk/test-applications/facelets/src/main/java/tTree/TTree.java
trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml
trunk/test-applications/facelets/src/main/webapp/tTree/tTreeProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/tTree/tTreeStraightforward.xhtml
Log:
+ some attributes to tTree
Modified: trunk/test-applications/facelets/src/main/java/tTree/PVisability.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/tTree/PVisability.java 2008-12-11 20:23:53 UTC (rev 11728)
+++ trunk/test-applications/facelets/src/main/java/tTree/PVisability.java 2008-12-12 09:02:00 UTC (rev 11729)
@@ -7,10 +7,10 @@
private boolean tTreeDefaultSubviewID;
public PVisability() {
- tTreeSubviewID = false;
+ tTreeSubviewID = true;
tTreePropertySubviewID = false;
tTreeStraightforwardSubviewID = false;
- tTreeDefaultSubviewID = true;
+ tTreeDefaultSubviewID = false;
}
public boolean istTreeDefaultSubviewID() {
Modified: trunk/test-applications/facelets/src/main/java/tTree/TTree.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/tTree/TTree.java 2008-12-11 20:23:53 UTC (rev 11728)
+++ trunk/test-applications/facelets/src/main/java/tTree/TTree.java 2008-12-12 09:02:00 UTC (rev 11729)
@@ -5,14 +5,21 @@
import java.util.Map;
import org.richfaces.component.UITree;
import org.richfaces.component.xml.XmlTreeDataBuilder;
+import org.richfaces.event.NodeExpandedEvent;
import org.richfaces.model.TreeNode;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import util.componentInfo.ComponentInfo;
+
public class TTree {
private String switchType = "server";
private TreeNode data;
private UITree tree;
+ private boolean immediate = false;
+ private boolean ajaxSubmitSelection = false;
+ private String anOpened = "null";
+ private String anSelected = "null";
public TTree() {
try {
@@ -34,7 +41,36 @@
e.printStackTrace();
}
}
+
+ public void add(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(tree);
+ }
+ public Boolean adviseNodeOpened(UITree t) {
+ Boolean tAnOpened = null;
+ if (anOpened.equals("FALSE"))
+ tAnOpened = Boolean.FALSE;
+ else if (anOpened.equals("TRUE"))
+ tAnOpened = Boolean.TRUE;
+
+ return tAnOpened;
+ }
+
+ public Boolean adviseNodeSelected(UITree t) {
+ Boolean tAnSelected = null;
+ if (anSelected.equals("FALSE"))
+ tAnSelected = Boolean.FALSE;
+ else if (anSelected.equals("TRUE"))
+ tAnSelected = Boolean.TRUE;
+
+ return tAnSelected;
+ }
+
+ public void changeExpandListener(NodeExpandedEvent e) {
+ System.out.println("!!! changeExpandListener !!!");
+ }
+
public String getSwitchType() {
return switchType;
}
@@ -58,4 +94,36 @@
public void setTree(UITree tree) {
this.tree = tree;
}
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public boolean isAjaxSubmitSelection() {
+ return ajaxSubmitSelection;
+ }
+
+ public void setAjaxSubmitSelection(boolean ajaxSubmitSelection) {
+ this.ajaxSubmitSelection = ajaxSubmitSelection;
+ }
+
+ public String getAnOpened() {
+ return anOpened;
+ }
+
+ public void setAnOpened(String anOpened) {
+ this.anOpened = anOpened;
+ }
+
+ public String getAnSelected() {
+ return anSelected;
+ }
+
+ public void setAnSelected(String anSelected) {
+ this.anSelected = anSelected;
+ }
}
Modified: trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml 2008-12-11 20:23:53 UTC (rev 11728)
+++ trunk/test-applications/facelets/src/main/webapp/tTree/tTree.xhtml 2008-12-12 09:02:00 UTC (rev 11729)
@@ -9,46 +9,94 @@
<h:outputText value="Select tree to show: " />
</f:facet>
<h:outputText value="default Tree: " />
- <h:selectBooleanCheckbox value="#{pVisability.tTreeSubviewID}"
- onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{pVisability.tTreeSubviewID}">
+ <a4j:support event="onchange" reRender="dTreePanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
<h:outputText value="Tree with treeNodesAdaptor: " />
- <h:selectBooleanCheckbox value="#{pVisability.tTreePropertySubviewID}"
- onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{pVisability.tTreePropertySubviewID}">
+ <a4j:support event="onchange" reRender="tTreeNAPanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
<h:outputText value="Tree with recursiveTreeNodesAdaptor: " />
<h:selectBooleanCheckbox
- value="#{pVisability.tTreeStraightforwardSubviewID}"
- onchange="submit();" />
+ value="#{pVisability.tTreeStraightforwardSubviewID}">
+ <a4j:support event="onchange" reRender="tTreeRNAPanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
<h:outputText value="Tree with Drag and Drop functionality: " />
- <h:selectBooleanCheckbox value="#{pVisability.tTreeDefaultSubviewID}"
- onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{pVisability.tTreeDefaultSubviewID}">
+ <a4j:support event="onchange" reRender="tTreeDNDPanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
</h:panelGrid>
<rich:spacer height="10" />
- <h:panelGrid columns="1" rendered="#{pVisability.tTreeSubviewID}">
- <h:outputText value="default Tree" style="color: red" />
- <rich:tree id="dTree" switchType="#{tTree.switchType}"
- value="#{tTree.data}" var="defTree" binding="#{tTree.tree}"
- ajaxSubmitSelection="false" immediate="false">
+ <a4j:outputPanel id="dTreePanelID">
+ <h:panelGrid columns="1" rendered="#{pVisability.tTreeSubviewID}">
+ <h:outputText value="default Tree" style="color: red" />
+ <rich:tree id="dTree" switchType="#{tTree.switchType}"
+ value="#{tTree.data}" var="defTree" binding="#{tTree.tree}"
+ ajaxSubmitSelection="#{tTree.ajaxSubmitSelection}"
+ immediate="#{tTree.immediate}"
+ changeExpandListener="#{tTree.changeExpandListener}"
+ adviseNodeOpened="#{tTree.adviseNodeOpened}"
+ adviseNodeSelected="#{tTree.adviseNodeSelected}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ onclick="#{event.onclick}" oncollapse="#{event.oncollapse}"
+ oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}"
+ ondragend="#{event.ondragend}" ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondragstart="#{event.ondragstart}"
+ ondrop="#{event.ondrop}" ondropend="#{event.ondropend}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
+ onexpand="#{event.onexpand}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
+ onselected="#{event.onselected}">
- <rich:treeNode>
- <h:outputText value="#{defTree} : " />
- <h:inputText value="#{defTree.name}" />
- </rich:treeNode>
+ <rich:treeNode>
+ <h:outputText value="#{defTree} : " />
+ <h:inputText value="#{defTree.name}" />
+ </rich:treeNode>
- <rich:treeNode>
- <h:outputText value="#{defTree}" />
- </rich:treeNode>
- </rich:tree>
+ <rich:treeNode>
+ <h:outputText value="#{defTree}" />
+ </rich:treeNode>
+ </rich:tree>
+ <hr />
+ <h:commandButton action="#{tTree.add}" value="add test" />
+ <h:panelGrid columns="2">
+ <f:facet name="header">
+ <h:outputText value="Tree Properties" />
+ </f:facet>
+ <h:outputText value="Change tree switchType:" />
+ <h:selectOneRadio value="#{tTree.switchType}" onclick="submit();">
+ <f:selectItem itemLabel="client" itemValue="client" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ </h:selectOneRadio>
- <h:panelGrid columns="2">
- <h:outputText value="Change tree switchType:" />
- <h:selectOneRadio value="#{tTree.switchType}" onclick="submit();">
- <f:selectItem itemLabel="client" itemValue="client" />
- <f:selectItem itemLabel="server" itemValue="server" />
- <f:selectItem itemLabel="ajax" itemValue="ajax" />
- </h:selectOneRadio>
+ <h:outputText value="ajaxSubmitSelection:" />
+ <h:selectBooleanCheckbox value="#{tTree.ajaxSubmitSelection}"
+ onchange="submit();" />
+
+ <h:outputText value="immediate:" />
+ <h:selectBooleanCheckbox value="#{tTree.immediate}"
+ onchange="submit();" />
+
+ <h:outputText value="adviseNodeOpened:" />
+ <h:selectOneRadio value="#{tTree.anOpened}" onclick="submit();">
+ <f:selectItem itemLabel="null (default)" itemValue="null" />
+ <f:selectItem itemLabel="false (do not open)" itemValue="FALSE" />
+ <f:selectItem itemLabel="true (open)" itemValue="TRUE" />
+ </h:selectOneRadio>
+
+ <h:outputText value="adviseNodeSelected:" />
+ <h:selectOneRadio value="#{tTree.anSelected}" onclick="submit();">
+ <f:selectItem itemLabel="null (default)" itemValue="null" />
+ <f:selectItem itemLabel="false (do not select)" itemValue="FALSE" />
+ <f:selectItem itemLabel="true (select)" itemValue="TRUE" />
+ </h:selectOneRadio>
+ </h:panelGrid>
+ <rich:separator height="10" />
</h:panelGrid>
- </h:panelGrid>
-
- <rich:spacer height="10" />
+ </a4j:outputPanel>
</f:subview>
Modified: trunk/test-applications/facelets/src/main/webapp/tTree/tTreeProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/tTree/tTreeProperty.xhtml 2008-12-11 20:23:53 UTC (rev 11728)
+++ trunk/test-applications/facelets/src/main/webapp/tTree/tTreeProperty.xhtml 2008-12-12 09:02:00 UTC (rev 11729)
@@ -2,26 +2,29 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich" id="tTreePropertySubviewID"
- rendered="#{pVisability.tTreePropertySubviewID}">
+ xmlns:rich="http://richfaces.org/rich" id="tTreePropertySubviewID">
- <h:outputText value="Tree with treeNodesAdaptor" style="color: red" />
- <rich:tree>
- <rich:treeNodesAdaptor nodes="#{tTreeNA.treeNA}" var="project">
- <rich:treeNode>
- <h:outputText value="#{project.name}" />
- </rich:treeNode>
- <rich:treeNodesAdaptor nodes="#{project.srcDirs}" var="dir">
- <rich:treeNode>
- <h:outputText value="#{dir.name}" />
- </rich:treeNode>
- <rich:treeNodesAdaptor nodes="#{dir.packages}" var="package">
+ <a4j:outputPanel id="tTreeNAPanelID">
+ <h:panelGrid columns="1"
+ rendered="#{pVisability.tTreePropertySubviewID}">
+ <h:outputText value="Tree with treeNodesAdaptor" style="color: red" />
+ <rich:tree>
+ <rich:treeNodesAdaptor nodes="#{tTreeNA.treeNA}" var="project">
<rich:treeNode>
- <h:outputText value="#{package.name}" />
+ <h:outputText value="#{project.name}" />
</rich:treeNode>
+ <rich:treeNodesAdaptor nodes="#{project.srcDirs}" var="dir">
+ <rich:treeNode>
+ <h:outputText value="#{dir.name}" />
+ </rich:treeNode>
+ <rich:treeNodesAdaptor nodes="#{dir.packages}" var="package">
+ <rich:treeNode>
+ <h:outputText value="#{package.name}" />
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+ </rich:treeNodesAdaptor>
</rich:treeNodesAdaptor>
- </rich:treeNodesAdaptor>
- </rich:treeNodesAdaptor>
- </rich:tree>
- <rich:spacer height="10" />
+ </rich:tree>
+ </h:panelGrid>
+ </a4j:outputPanel>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/tTree/tTreeStraightforward.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/tTree/tTreeStraightforward.xhtml 2008-12-11 20:23:53 UTC (rev 11728)
+++ trunk/test-applications/facelets/src/main/webapp/tTree/tTreeStraightforward.xhtml 2008-12-12 09:02:00 UTC (rev 11729)
@@ -21,93 +21,97 @@
}
</style>
- <h:panelGrid columns="1"
- rendered="#{pVisability.tTreeStraightforwardSubviewID}">
- <h:outputText value="Tree with recursiveTreeNodesAdaptor"
- style="color: red" />
- <rich:tree>
- <rich:treeNodesAdaptor nodes="#{tTreeRNA.treeRNAroots}" var="root">
- <rich:treeNode>
- <h:outputText value="#{root.name}" />
- </rich:treeNode>
- <rich:recursiveTreeNodesAdaptor var="dir" roots="#{root.dirs}"
- nodes="#{dir.dirs}">
- <rich:treeNodesAdaptor nodes="#{dir.packages}" var="package">
+ <a4j:outputPanel id="tTreeRNAPanelID">
+ <h:panelGrid columns="1"
+ rendered="#{pVisability.tTreeStraightforwardSubviewID}">
+ <h:outputText value="Tree with recursiveTreeNodesAdaptor"
+ style="color: red" />
+ <rich:tree>
+ <rich:treeNodesAdaptor nodes="#{tTreeRNA.treeRNAroots}" var="root">
+ <rich:treeNode>
+ <h:outputText value="#{root.name}" />
+ </rich:treeNode>
+ <rich:recursiveTreeNodesAdaptor var="dir" roots="#{root.dirs}"
+ nodes="#{dir.dirs}">
+ <rich:treeNodesAdaptor nodes="#{dir.packages}" var="package">
+ <rich:treeNode>
+ <h:outputText value="#{package.name}" />
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
<rich:treeNode>
- <h:outputText value="#{package.name}" />
+ <h:outputText value="#{dir.name}" />
</rich:treeNode>
- </rich:treeNodesAdaptor>
- <rich:treeNode>
- <h:outputText value="#{dir.name}" />
- </rich:treeNode>
- </rich:recursiveTreeNodesAdaptor>
- </rich:treeNodesAdaptor>
- </rich:tree>
- </h:panelGrid>
- <rich:spacer height="10" />
- <h:panelGrid columns="1"
- rendered="#{pVisability.tTreeDefaultSubviewID}">
- <h:outputText value="Tree with Drag and Drop functionality"
- style="color: red" />
+ </rich:recursiveTreeNodesAdaptor>
+ </rich:treeNodesAdaptor>
+ </rich:tree>
+ <rich:separator height="10" />
+ </h:panelGrid>
+ </a4j:outputPanel>
- <rich:dragIndicator id="treeIndicator">
- <f:facet name="single">
- <f:verbatim>{marker} {nodeParam}({treeParam})</f:verbatim>
- </f:facet>
- </rich:dragIndicator>
+ <a4j:outputPanel id="tTreeDNDPanelID">
+ <h:panelGrid columns="1"
+ rendered="#{pVisability.tTreeDefaultSubviewID}">
+ <h:outputText value="Tree with Drag and Drop functionality"
+ style="color: red" />
- <h:panelGrid columns="2" columnClasses="LeftTreePane,RightTreePane">
+ <rich:dragIndicator id="treeIndicator">
+ <f:facet name="single">
+ <f:verbatim>{marker} {nodeParam}({treeParam})</f:verbatim>
+ </f:facet>
+ </rich:dragIndicator>
- <h:panelGroup id="leftContainer" layout="block"
- styleClass="TreeContainer">
- <h:outputText escape="false"
- value="Selected Node:
- #{tTreeDND.leftSelectedNodeTitle}"
- id="selectedNodeL" />
+ <h:panelGrid columns="2" columnClasses="LeftTreePane,RightTreePane">
- <rich:tree id="leftTree" style="width:300px"
- nodeSelectListener="#{tTreeDND.processLSelection}"
- reRender="selectedNodeL, leftContainer" ajaxSubmitSelection="true"
- switchType="client" value="#{tTreeDND.treeNodeLeft}"
- changeExpandListener="#{tTreeDND.onExpand}"
- binding="#{tTreeDND.leftTree}"
- onselected="window.status='selectedNode: '+event.selectedNode;"
- onexpand="window.status='expandedNode: '+event.expandedNode"
- oncollapse="window.status='collapsedNode: '+event.collapsedNode"
- dropListener="#{tTreeDND.onDrop}" dragListener="#{tTreeDND.onDrag}"
- dragIndicator="treeIndicator" acceptedTypes="treeNodeR"
- dragType="treeNodeL" rowKeyVar="key" var="item">
+ <h:panelGroup id="leftContainer" layout="block"
+ styleClass="TreeContainer">
+ <h:outputText escape="false"
+ value="Selected Node:
+ #{tTreeDND.leftSelectedNodeTitle}"
+ id="selectedNodeL" />
- <rich:dndParam name="treeParam" value="leftTree" />
- </rich:tree>
- </h:panelGroup>
+ <rich:tree id="leftTree" style="width:300px"
+ nodeSelectListener="#{tTreeDND.processLSelection}"
+ reRender="selectedNodeL, leftContainer" ajaxSubmitSelection="true"
+ switchType="client" value="#{tTreeDND.treeNodeLeft}"
+ changeExpandListener="#{tTreeDND.onExpand}"
+ binding="#{tTreeDND.leftTree}"
+ onselected="window.status='selectedNode: '+event.selectedNode;"
+ onexpand="window.status='expandedNode: '+event.expandedNode"
+ oncollapse="window.status='collapsedNode: '+event.collapsedNode"
+ dropListener="#{tTreeDND.onDrop}"
+ dragListener="#{tTreeDND.onDrag}" dragIndicator="treeIndicator"
+ acceptedTypes="treeNodeR" dragType="treeNodeL" rowKeyVar="key"
+ var="item">
- <h:panelGroup id="rightContainer" layout="block"
- styleClass="TreeContainer">
- <h:outputText escape="false"
- value="Selected Node:
- #{tTreeDND.rightSelectedNodeTitle}"
- id="selectedNodeR" />
+ <rich:dndParam name="treeParam" value="leftTree" />
+ </rich:tree>
+ </h:panelGroup>
- <rich:tree id="rightTree" style="width:300px"
- nodeSelectListener="#{tTreeDND.processRSelection}"
- reRender="selectedNodeR,rightContainer" ajaxSubmitSelection="true"
- switchType="client" value="#{tTreeDND.treeNodeRight}"
- changeExpandListener="#{tTreeDND.onExpand}"
- binding="#{tTreeDND.rightTree}"
- onselected="window.status='selectedNode: '+event.selectedNode;"
- onexpand="window.status='expandedNode: '+event.expandedNode"
- oncollapse="window.status='collapsedNode: '+event.collapsedNode"
- rowKeyVar="key" dropListener="#{tTreeDND.onDrop}"
- dragListener="#{tTreeDND.onDrag}" dragIndicator="treeIndicator"
- acceptedTypes="treeNodeL" dragType="treeNodeR" var="item">
+ <h:panelGroup id="rightContainer" layout="block"
+ styleClass="TreeContainer">
+ <h:outputText escape="false"
+ value="Selected Node:
+ #{tTreeDND.rightSelectedNodeTitle}"
+ id="selectedNodeR" />
- <rich:dndParam name="treeParam" value="rightTree" />
- </rich:tree>
- </h:panelGroup>
+ <rich:tree id="rightTree" style="width:300px"
+ nodeSelectListener="#{tTreeDND.processRSelection}"
+ reRender="selectedNodeR,rightContainer" ajaxSubmitSelection="true"
+ switchType="client" value="#{tTreeDND.treeNodeRight}"
+ changeExpandListener="#{tTreeDND.onExpand}"
+ binding="#{tTreeDND.rightTree}"
+ onselected="window.status='selectedNode: '+event.selectedNode;"
+ onexpand="window.status='expandedNode: '+event.expandedNode"
+ oncollapse="window.status='collapsedNode: '+event.collapsedNode"
+ rowKeyVar="key" dropListener="#{tTreeDND.onDrop}"
+ dragListener="#{tTreeDND.onDrag}" dragIndicator="treeIndicator"
+ acceptedTypes="treeNodeL" dragType="treeNodeR" var="item">
+ <rich:dndParam name="treeParam" value="rightTree" />
+ </rich:tree>
+ </h:panelGroup>
+ </h:panelGrid>
+ <rich:separator height="10" />
</h:panelGrid>
- </h:panelGrid>
- <rich:spacer height="10" />
-
+ </a4j:outputPanel>
</f:subview>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r11728 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-11 15:23:53 -0500 (Thu, 11 Dec 2008)
New Revision: 11728
Modified:
trunk/docs/userguide/en/src/main/resources/images/dropSupport1.png
Log:
RF-5219: dropSupport: typeMapping attribute have wrong description.
Modified: trunk/docs/userguide/en/src/main/resources/images/dropSupport1.png
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Rich Faces SVN: r11727 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-11 14:39:04 -0500 (Thu, 11 Dec 2008)
New Revision: 11727
Added:
trunk/docs/userguide/en/src/main/resources/images/dropSupport1.png
trunk/docs/userguide/en/src/main/resources/images/dropSupport1a.png
Log:
RF-5219: dropSupport: typeMapping attribute have wrong description.
Added: trunk/docs/userguide/en/src/main/resources/images/dropSupport1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/dropSupport1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/dropSupport1a.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/dropSupport1a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 5 months
JBoss Rich Faces SVN: r11726 - in trunk/ui/inplaceSelect/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-11 13:58:44 -0500 (Thu, 11 Dec 2008)
New Revision: 11726
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectstyles.js
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
https://jira.jboss.org/jira/browse/RF-5360
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectstyles.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectstyles.js 2008-12-11 18:58:20 UTC (rev 11725)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectstyles.js 2008-12-11 18:58:44 UTC (rev 11726)
@@ -1,10 +1,10 @@
if (!window.Richfaces) window.Richfaces = {};
+Richfaces.InplaceSelectStyles = Class.create();
-if (!Richfaces.InplaceSelect) Richfaces.inplaceSelect = {};
-
-Richfaces.InplaceSelect.classes = {
-
- combolist : {
+Richfaces.InplaceSelectStyles.prototype = {
+ initialize : function() {
+ this.commonStyles = {
+ combolist : {
list :{
classes :{
active : "rich-inplace-select-list-scroll rich-inplace-select-list-decoration rich-inplace-select-list-position"
@@ -15,10 +15,16 @@
selected : 'rich-inplace-select-item rich-inplace-select-font rich-inplace-select-selected-item'
}
},
- component : {
+ component : {
changed : {normal : 'rich-inplace-select rich-inplace-select-view rich-inplace-select-changed', hovered : 'rich-inplace-select-changed-hover'},
view : {normal : 'rich-inplace-select rich-inplace-select-view', hovered : 'rich-inplace-select-view-hover'},
editable : 'rich-inplace-select rich-inplace-select-view rich-inplace-select-edit'
- }
+ }
+ }
+ },
+
+ getCommonStyles : function() {
+ return this.commonStyles;
+ }
+
};
-
\ No newline at end of file
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-12-11 18:58:20 UTC (rev 11725)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-12-11 18:58:44 UTC (rev 11726)
@@ -239,8 +239,10 @@
}
};
+ var inplaceSelectCommonStyles = new Richfaces.InplaceSelectStyles();
+
new Richfaces.InplaceSelect(new Richfaces.InplaceSelectList('#{clientId}list', '#{clientId}listParent', true,
- inplaceSelectUserStyles.combolist, Richfaces.InplaceSelect.classes.combolist, '#{component.attributes["listWidth"]}', '#{component.attributes["listHeight"]}', #{this:getItemsTextAsJSArray(context, component,items)}, null,
+ inplaceSelectUserStyles.combolist, inplaceSelectCommonStyles.getCommonStyles().combolist, '#{component.attributes["listWidth"]}', '#{component.attributes["listHeight"]}', #{this:getItemsTextAsJSArray(context, component,items)}, null,
'#{clientId}inplaceTmpValue', '#{clientId}shadow', 0, 0, #{encodedFieldValue}),
'#{clientId}', '#{clientId}inplaceTmpValue',
'#{clientId}inplaceValue', '#{clientId}tabber',
@@ -260,7 +262,7 @@
oneditactivated : #{this:getAsEventHandler(context, component, "oneditactivated")},
onviewactivated : #{this:getAsEventHandler(context, component, "onviewactivated")},
onchange : #{this:getAsEventHandler(context, component, "onchange")}},
- inplaceSelectUserStyles, Richfaces.InplaceSelect.classes,
+ inplaceSelectUserStyles, inplaceSelectCommonStyles,
['#{clientId}bar', '#{clientId}ok', '#{clientId}cancel', '#{clientId}buttons', '#{clientId}btns_shadow'], '#{clientId}inselArrow');
</script>
</div>
17 years, 5 months
JBoss Rich Faces SVN: r11725 - in trunk/ui/inplaceInput/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-11 13:58:20 -0500 (Thu, 11 Dec 2008)
New Revision: 11725
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinputstyles.js
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
https://jira.jboss.org/jira/browse/RF-5360
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-12-11 18:57:52 UTC (rev 11724)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-12-11 18:58:20 UTC (rev 11725)
@@ -34,7 +34,7 @@
this.initHandlers();
this.initEvents();
- this.classes = Richfaces.mergeStyles(userStyles,commonStyles);
+ this.classes = Richfaces.mergeStyles(userStyles,commonStyles.getCommonStyles());
this["rich:destructor"] = "destroy";
this.skipSwitching = false;
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinputstyles.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinputstyles.js 2008-12-11 18:57:52 UTC (rev 11724)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinputstyles.js 2008-12-11 18:58:20 UTC (rev 11725)
@@ -1,20 +1,28 @@
if (!window.Richfaces) window.Richfaces = {};
+Richfaces.InplaceInputStyles = Class.create();
-if (!Richfaces.InplaceInput) Richfaces.inplaceInput = {};
+Richfaces.InplaceInputStyles.prototype = {
+
+ initialize : function() {
+ this.commonStyles = {
+ component:{
+ view :{
+ normal:"rich-inplace rich-inplace-view",
+ hovered:"rich-inplace-input-view-hover"
+ },
+ changed:{
+ normal:"rich-inplace rich-inplace-changed",
+ hovered:"rich-inplace-input-changed-hover"
+ },
+ editable:"rich-inplace rich-inplace-edit editClass"
+ }
+ }
+ },
+
+ getCommonStyles: function() {
+ return this.commonStyles;
+ }
-Richfaces.InplaceInput.classes = {
-
- component:{
- view :{
- normal:"rich-inplace rich-inplace-view",
- hovered:"rich-inplace-input-view-hover"
- },
- changed:{
- normal:"rich-inplace rich-inplace-changed",
- hovered:"rich-inplace-input-changed-hover"
- },
- editable:"rich-inplace rich-inplace-edit editClass"
- }
};
@@ -22,3 +30,4 @@
+
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-12-11 18:57:52 UTC (rev 11724)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-12-11 18:58:20 UTC (rev 11725)
@@ -197,7 +197,7 @@
};
var inplaceInput = new Richfaces.InplaceInput('#{clientId}', '#{clientId}tempValue', '#{clientId}value', '#{clientId}tabber',
- attributes, events, inplaceInputUserStyles, Richfaces.InplaceInput.classes, ['#{clientId}bar',
+ attributes, events, inplaceInputUserStyles, new Richfaces.InplaceInputStyles(), ['#{clientId}bar',
'#{clientId}ok', '#{clientId}cancel', '#{clientId}buttons','#{clientId}btns_shadow']);
</script>
</div>
17 years, 5 months
JBoss Rich Faces SVN: r11724 - in trunk/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-11 13:57:52 -0500 (Thu, 11 Dec 2008)
New Revision: 11724
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
https://jira.jboss.org/jira/browse/RF-5360
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-12-11 18:57:52 UTC (rev 11724)
@@ -17,9 +17,10 @@
this.tempItem;
this.BUTTON_WIDTH = 17; //px
- this.classes = Richfaces.mergeStyles(userStyles,commonStyles);
+ this.classes = Richfaces.mergeStyles(userStyles,commonStyles.getCommonStyles());
+
this.button = document.getElementById(buttonId);
this.buttonBG = document.getElementById(buttonBGId);
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js 2008-12-11 18:57:52 UTC (rev 11724)
@@ -1,8 +1,12 @@
if (!window.Richfaces) window.Richfaces = {};
-if (!Richfaces.ComboBox) Richfaces.ComboBox = {};
+Richfaces.ComboBoxStyles = Class.create();
-Richfaces.ComboBox.classes = {
- button : { classes : {
+Richfaces.ComboBoxStyles.prototype = {
+
+ initialize : function () {
+ this.commonStyles = {
+
+ button : { classes : {
normal : "rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive",
active : "rich-combobox-font rich-combobox-button-icon rich-combobox-button",
disabled : "rich-combobox-font-disabled rich-combobox-button-icon-disabled rich-combobox-button-disabled",
@@ -13,6 +17,13 @@
active: "",
disabled: ""}
},
+
+
+
+
+
+
+
buttonbg : {
classes : {
@@ -26,6 +37,7 @@
active: "",
disabled: ""}
},
+
field : {classes: {
normal : "rich-combobox-font-inactive rich-combobox-input-inactive",
@@ -45,6 +57,12 @@
classes :{
active : "rich-combobox-list-cord rich-combobox-list-scroll rich-combobox-list-decoration rich-combobox-list-position"},
style : {active: ""
+
+
+
+
+
+
}
},
@@ -52,4 +70,20 @@
selected : "rich-combobox-item rich-combobox-item-selected"
}
}
-}
\ No newline at end of file
+
+
+
+
+
+ }
+ },
+
+ getCommonStyles : function() {
+ return this.commonStyles;
+ }
+
+
+};
+
+
+
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-12-11 18:57:52 UTC (rev 11724)
@@ -98,7 +98,7 @@
var items = this.getItems();
if (items.length != 0) {
if (this.iframe) {
- this.iframe.style.display="";
+ Element.hide(this.iframe);
}
this.listParent.style.display = "";
if (this.selectFirstOnUpdate) {
@@ -146,14 +146,17 @@
this.outjectListFromBody(this.listParentContainer, this.listParent);
this.resetState();
if (this.iframe) {
- this.iframe.style.display= "none";
+ Element.hide(this.iframe);
+ //this.iframe.style.display= "none";
}
var component = this.listParent.parentNode;
component.style.position = "static";
component.style.zIndex = 0;
- this.listParent.style.display = "none";
+ //this.listParent.style.display = "none";
+ Element.hide(this.listParent);
+
},
visible : function() {
@@ -221,7 +224,12 @@
var docHeight = Richfaces.getDocumentHeight();
var comBottom = fieldTop + fieldHeight;
- var listHeight = parseInt(this.list.style.height) + Richfaces.getBorderWidth(this.list.parentNode, "tb");
+
+ var listHeight = parseInt(this.list.style.height);
+ if (this.list.parentNode) {
+ listHeight += Richfaces.getBorderWidth(this.list.parentNode, "tb");
+ }
+
var topPosition = comBottom;
var showPoint = fieldHeight;
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-12-11 18:57:52 UTC (rev 11724)
@@ -341,7 +341,7 @@
"#{clientId}comboboxButton",
"#{clientId}comboBoxButtonBG",
"#{clientId}shadow",
- Richfaces.ComboBox.classes,
+ new Richfaces.ComboBoxStyles(),
comboboxUserStyles,
"#{listWidth}", "#{listHeight}",
#{this:getItemsTextAsJSArray(context, component,items)},
17 years, 5 months
JBoss Rich Faces SVN: r11723 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-11 12:00:16 -0500 (Thu, 11 Dec 2008)
New Revision: 11723
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5237
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 16:49:08 UTC (rev 11722)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 17:00:16 UTC (rev 11723)
@@ -346,6 +346,13 @@
}
@Test
+ public void testRenderedAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ tester.testRendered();
+ }
+
+ @Test
public void testInternationalization(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -362,7 +369,7 @@
}
- // @Test
+ @Test
public void testLinitToListAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -371,7 +378,7 @@
tester.testLimitToList();
}
- //@Test
+ @Test
public void testReRenderAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -381,7 +388,7 @@
tester.testReRender();
}
- //@Test
+ @Test
public void testConverterAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -389,7 +396,7 @@
tester.testConverterAttribute();
}
- // @Test
+ @Test
public void testValidatorAndValidatorMessageAttributes(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -397,7 +404,7 @@
tester.testValidatorAndValidatorMessageAttributes();
}
- // @Test
+ @Test
public void testClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -431,7 +438,7 @@
}
- //@Test
+ @Test
public void testDataModelAttribute(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -450,7 +457,7 @@
}
- // @Test
+ @Test
public void testTimeSelection(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -498,7 +505,7 @@
}
- // @Test
+ @Test
public void testListenersInAjaxMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -517,7 +524,7 @@
}
- // @Test
+ @Test
public void testListenersInClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -538,7 +545,7 @@
}
- // @Test
+ @Test
public void testCalendarComponent(Template template) {
renderPage(template);
@@ -567,7 +574,7 @@
Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
}
- // @Test
+ @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -612,7 +619,7 @@
Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
- // @Test
+ @Test
public void testValueAndCurrentDateOfCalendarInCaseOfPopupTrue(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -659,7 +666,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- //@Test
+ @Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -725,7 +732,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- // @Test
+ @Test
public void testDatePatternNonPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -755,7 +762,7 @@
}
}
- //@Test
+ @Test
public void testDatePatternPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -791,7 +798,7 @@
}
}
- // @Test
+ @Test
public void testShowHeaderAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -814,7 +821,7 @@
AssertPresent(calendarHeaderId, "Header is not present");
}
- //@Test
+ @Test
public void testShowFooterAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -837,7 +844,7 @@
AssertPresent(calendarFooterId, "Footer is not present");
}
- // @Test
+ @Test
public void testShowWeekDaysBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -860,7 +867,7 @@
AssertPresent(weekDaysBarId, "Week days bar is not present");
}
- // @Test
+ @Test
public void testShowWeeksBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -884,7 +891,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- // @Test
+ @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -898,7 +905,7 @@
AssertNotVisible(inputDateId, "Input is visible");
}
- // @Test
+ @Test
public void testShowApplyButton(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -915,7 +922,7 @@
Assert.assertFalse(isVisible(applyButtonXpath), "Apply button is visible");
}
- // @Test
+ @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
@@ -998,7 +1005,7 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- //@Test
+ @Test
public void buttonRelatedAttributesTest(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
17 years, 5 months
JBoss Rich Faces SVN: r11722 - in trunk/test-applications/seleniumTest/richfaces/src: main/resources/org/ajax4jsf/message and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-11 11:49:08 -0500 (Thu, 11 Dec 2008)
New Revision: 11722
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
Internationalization refactoring
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-11 16:43:19 UTC (rev 11721)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-11 16:49:08 UTC (rev 11722)
@@ -2,9 +2,4 @@
error=Error was occured.
RICH_LIST_SHUTTLE_COPY_ALL_LABEL=Copy All Items
RICH_SHUTTLES_TOP_LABEL=Move to top
-RICH_CALENDAR_APPLY_LABEL = Apply_en_US
-RICH_CALENDAR_TODAY_LABEL = Today_en_US
-RICH_CALENDAR_CLOSE_LABEL = Close_en_US
-RICH_CALENDAR_OK_LABEL = OK_en_US
-RICH_CALENDAR_CLEAN_LABEL = Clean_en_US
-RICH_CALENDAR_CANCEL_LABEL = Cancel_en_US
+
Added: trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/richfaces/renderkit/calendar/resource_ru.properties 2008-12-11 16:49:08 UTC (rev 11722)
@@ -0,0 +1,6 @@
+RICH_CALENDAR_APPLY_LABEL = Apply_ru
+RICH_CALENDAR_TODAY_LABEL = Today_ru
+RICH_CALENDAR_CLOSE_LABEL = Close_ru
+RICH_CALENDAR_OK_LABEL = OK_ru
+RICH_CALENDAR_CLEAN_LABEL = Clean_ru
+RICH_CALENDAR_CANCEL_LABEL =Cancel_ru
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 16:43:19 UTC (rev 11721)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-11 16:49:08 UTC (rev 11722)
@@ -23,13 +23,16 @@
import java.text.ParseException;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
+import java.util.List;
import java.util.Locale;
import org.ajax4jsf.bean.CalendarTestBean;
import org.ajax4jsf.template.Template;
import org.ajax4jsf.util.DateUtils;
+import org.apache.tools.ant.util.StringUtils;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
@@ -56,6 +59,18 @@
static final String availableDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-btn";
static final String disabledDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-boundary-dates";
+
+ static final List<String> WEEK_DAYS_RU = new ArrayList<String>();
+ static {
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+ WEEK_DAYS_RU.add("��");
+
+ }
String calendarId;
@@ -314,18 +329,36 @@
}
+ // Checks months label with ru locale
+ private void testWeekDays() {
+ String weekDaysLabelsId = calendarId + "WeekDay";
+ int l = selenium.getXpathCount("//tr[@id='"+weekDaysLabelsId+"']/td").intValue();
+ List<String> weekDays = new ArrayList<String>();
+ for (int i = 1; i <= l; i++) {
+ weekDays.add(selenium.getText("//tr[@id='"+weekDaysLabelsId+"']/td["+i+"]"));
+ }
+
+ for (String weekday : WEEK_DAYS_RU) {
+ if (!weekDays.contains(weekday)) {
+ Assert.fail("Internationalization failed. Weekdays should contain ["+weekday+"] in case of RU locale. But was: " + weekDays.toArray());
+ }
+ }
+ }
+
@Test
public void testInternationalization(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
setPopup(true);
- setup();
+ String changeLocaleButtonId = getParentId() + CONTROLS_FORM_ID + "testLocale";
+ clickCommandAndWait(changeLocaleButtonId);
showPopup();
showTimeSelectionWindow();
- testInternatialization("_en_US");
+ testInternatialization("_ru");
+ testWeekDays();
}
17 years, 5 months
JBoss Rich Faces SVN: r11721 - trunk/framework/api/src/main/java/org/ajax4jsf/javascript.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-11 11:43:19 -0500 (Thu, 11 Dec 2008)
New Revision: 11721
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java
Log:
https://jira.jboss.org/jira/browse/RF-5273
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java 2008-12-11 16:11:32 UTC (rev 11720)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/javascript/JSEncoder.java 2008-12-11 16:43:19 UTC (rev 11721)
@@ -74,6 +74,9 @@
(c == 0x5c) || // [\]
(c == 0x03) || // [esc]
(c == ']') || // ] - to avoid conflicts in CDATA
+ (c == '<') || // - escape HTML markup characters
+ (c == '>') || // - HTML
+ (c == '&') || // - HTML
(c < 0x20) || // See <http://www.w3.org/TR/REC-xml#charsets>
((c > 0xd7ff) && (c < 0xe000)) || (c > 0xfffd)|| (c > 0xff)) {
return (false);
17 years, 5 months
JBoss Rich Faces SVN: r11720 - trunk/ui/tree/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-11 11:11:32 -0500 (Thu, 11 Dec 2008)
New Revision: 11720
Modified:
trunk/ui/tree/src/main/config/component/tree.xml
Log:
https://jira.jboss.org/jira/browse/RF-4541
Modified: trunk/ui/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/tree.xml 2008-12-11 15:41:11 UTC (rev 11719)
+++ trunk/ui/tree/src/main/config/component/tree.xml 2008-12-11 16:11:32 UTC (rev 11720)
@@ -192,14 +192,9 @@
</property>
<property hidden="true">
- <name>ajaxKeys</name>
- </property>
-
- <property hidden="true">
<name>rowKey</name>
</property>
-
<property>
<name>dragValue</name>
<classname>java.lang.Object</classname>
17 years, 5 months
JBoss Rich Faces SVN: r11719 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-12-11 10:41:11 -0500 (Thu, 11 Dec 2008)
New Revision: 11719
Modified:
trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-5042
added some info to the guide
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml 2008-12-11 14:57:47 UTC (rev 11718)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.desc.xml 2008-12-11 15:41:11 UTC (rev 11719)
@@ -30,11 +30,10 @@
<itemizedlist>
<listitem><para>Seam text support</para></listitem>
- <listitem><para>Properties customization via configuration files</para></listitem>
+ <listitem><para>Manageable global configurations</para></listitem>
<listitem><para>Possibility to use custom plug-ins</para></listitem>
+ <listitem><para>Support of all TinyMCE's parameters through <f:param></para></listitem>
-
-
</itemizedlist>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-11 14:57:47 UTC (rev 11718)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-11 15:41:11 UTC (rev 11719)
@@ -72,7 +72,9 @@
<para>The easiest way to place the <emphasis role="bold"> <property><rich:editor></property></emphasis>on a page is as follows:</para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
<rich:editor value="#{bean.editorValue}" />
]]></programlisting>
@@ -83,9 +85,9 @@
<orderedlist>
- <listitem><para>Using attributes;</para></listitem>
- <listitem><para>Using using <f:param> JSF tag;</para></listitem>
- <listitem><para>Using configuration files.</para></listitem>
+ <listitem><para>Using attributes</para></listitem>
+ <listitem><para>Using using <f:param> JSF tag</para></listitem>
+ <listitem><para>Using configuration files that allow you to set up multiple configurations for all editors in your application and change them in the runtime</para></listitem>
</orderedlist>
@@ -96,16 +98,34 @@
match the corresponding properties of TinyMCE editor.</para>
<para>For example, a theme for the editor can be defined using the <property>"theme"</property> attribute like this: </para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
<rich:editor value="#{bean.editorValue}" theme="advanced"/>
]]></programlisting>
<para>Setting a different skin for the editor can be done using the <property>"skin"</property> attribute.</para>
- <para>Another useful property that is implemented at attribute level is <property>"viewmode"</property>.
- The attribute switches between "visual" and "source" modes, toggling between modes is performed setting the attribute to "visual" and "source" respectively.</para>
-
- <para>
+ <para>Another useful property that is implemented at attribute level is <property>"viewMode"</property>.
+ The attribute switches between "visual" and "source" modes, toggling between modes is performed setting the attribute to "visual" and "source" respectively.
+ Implementation of <emphasis role="bold"> <property><rich:editor></property></emphasis> also implies that you can change the modes dynamically
+ setting the value of the <property>"viewMode"</property> attribute using EL-expression.
+ </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:editor value="#{editor.submit}" theme="advanced" viewMode="#{editor.viewMode}" >
+ ...
+ <h:selectOneRadio value="#{editor.viewMode}" onchange="submit();">
+ <f:selectItem itemValue="visual" itemLabel="visual" />
+ <f:selectItem itemValue="source" itemLabel="source" />
+ </h:selectOneRadio>
+ ...
+ ...]]></programlisting>
+ <para>
Apart from the attributes that define the editor's properties there are some attributes that help handle events(custom event handlers).
</para>
<para>
@@ -118,7 +138,10 @@
the <property>"value"</property> attribute assigns some value to the option.</para>
<para>For example, this code adds some buttons to the editor and positions the toolbar. </para>
-
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:editor value="#{bean.editorValue}" theme="advanced" plugins="save,paste" >
<f:param name="theme_advanced_buttons1" value="bold,italic,underline, cut,copy,paste,pasteword"/>
@@ -152,6 +175,9 @@
<itemizedlist>
<listitem><para>Create a configuration file (.properties) in the classpath folder and add some properties to it. Use standard syntax for the .properties files: <code>parameter=value</code>. Here is an example of configuration file:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
theme="advanced"
plugins="save,paste"
@@ -166,28 +192,33 @@
<property>"configuration"</property>attribute which takes the name of the configuration file as a value (with out .properties extension). </para>
<para>For example, if you named the configuration file "editorconfig", you would address it as follows:
</para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:editor value="#{bean.editorValue}" configuration="editorconfig"/>
...]]></programlisting>
</listitem>
<listitem><para>
- Alternately, you can use a EL-binding to define a configuration file. This way you can dynamically change the sets of configuration properties. </para>
+ Alternately, you can use a EL-expression to define a configuration file. This way you can dynamically change the sets of configuration properties. </para>
<para> For example, you have two configuration files "configurationAdvanced" and "configurationSimple" and you want them to be
applied under some condition. </para>
<para>To do this you need to bind <property>"configuration"</property>attribute to the appropriate bean property like this . </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
-<rich:editor value="#{bean.editorValue}" configuration="#{editor.property}" />
+<rich:editor value="#{bean.editorValue}" configuration="#{editor.configuration}" />
...]]></programlisting>
<para>Your Java file should look like this.</para>
<programlisting role="JAVA"><![CDATA[...
String configuration;
- if(some condition){//define some condition
+ if(some condition){//defines some condition
configuration = "configurationAdvanced"; //the name on the file with advanced properties
}
else{
@@ -217,6 +248,9 @@
<itemizedlist>
<listitem><para>Create a .properties file and put the name of the plug-in and a path to it into the file.
The file can contain multiple plug-in declarations. Your .properties file should be like this. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
pluginName=/mytinymceplugins/plugin1Name/editor_plugin.js
...]]></programlisting>
@@ -226,6 +260,9 @@
<para>Use the <property>"customPlugins"</property> attribute to specify the .properties file with a plug-in name and a path to it.</para>
<para>Example:</para>
<para>If your .properties file is named "myPlugins", then your will have this code on the page.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<rich:editor theme="advanced" customPlugins="myPlugins" plugins="pluginName">
...]]></programlisting>
@@ -251,7 +288,9 @@
to Seam text (you can read more Seam text <ulink url="http://docs.jboss.org/seam/1.1.5.GA/reference/en/html/text.html">here</ulink>.), it also interprets Seam text
passed to the <emphasis role="bold"> <property><rich:editor></property></emphasis> and renders it to HTML.
The converter can be enable with the <property>"seamTest"</property> attribute.</para>
- <para>Example:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<para>This HTML code generated by editor</para>
<programlisting role="XML"><![CDATA[...
@@ -1209,6 +1248,10 @@
<section>
<title>Relevant Resources Links</title>
+
+ <para>The <emphasis role="bold"> <property><rich:editor></property></emphasis> is based on TinyMCE editor and supports almost all its features and properties some of which are not described here since you can find more detailed documentation on them on the official <ulink url="http://wiki.moxiecode.com/index.php/TinyMCE:Index">web site.</ulink></para>
+
+
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=editor"
>Here</ulink> you can see an example of <emphasis
17 years, 5 months
JBoss Rich Faces SVN: r11718 - in trunk/samples/richfaces-demo/src/main: webapp/richfaces/support and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-11 09:57:47 -0500 (Thu, 11 Dec 2008)
New Revision: 11718
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java 2008-12-11 14:32:53 UTC (rev 11717)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java 2008-12-11 14:57:47 UTC (rev 11718)
@@ -6,6 +6,10 @@
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
public class SelectsBean {
private String currentType="";
private String currentItem="";
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-11 14:57:47 UTC (rev 11718)
@@ -30,6 +30,11 @@
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/support/examples/dynamicSelects.xhtml"/>
</ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/ajaxsupport/SelectsBean.java"/>
+ <ui:param name="openlabel" value="View SelectsBean.java Source" />
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
</div>
17 years, 5 months
JBoss Rich Faces SVN: r11717 - in trunk/samples/richfaces-demo/src/main: webapp/WEB-INF and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-11 09:32:53 -0500 (Thu, 11 Dec 2008)
New Revision: 11717
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5147
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/SelectsBean.java 2008-12-11 14:32:53 UTC (rev 11717)
@@ -0,0 +1,69 @@
+package org.richfaces.demo.ajaxsupport;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+public class SelectsBean {
+ private String currentType="";
+ private String currentItem="";
+ public List<SelectItem> firstList = new ArrayList<SelectItem>();
+ public List<SelectItem> secondList = new ArrayList<SelectItem>();
+ private static final String [] FRUITS = {"Banana", "Cranberry", "Blueberry", "Orange"};
+ private static final String [] VEGETABLES = {"Potatoes", "Broccoli", "Garlic", "Carrot"};
+
+ public SelectsBean() {
+ SelectItem item = new SelectItem("fruits", "Fruits");
+ firstList.add(item);
+ item = new SelectItem("vegetables", "Vegetables");
+ firstList.add(item);
+ for (int i = 0; i < FRUITS.length; i++) {
+ item = new SelectItem(FRUITS[i]);
+ }
+ }
+
+ public List<SelectItem> getFirstList() {
+ return firstList;
+ }
+ public List<SelectItem> getSecondList() {
+ return secondList;
+ }
+ public static String[] getFRUITS() {
+ return FRUITS;
+ }
+ public static String[] getVEGETABLES() {
+ return VEGETABLES;
+ }
+ public void valueChanged(ValueChangeEvent event){
+ secondList.clear();
+ String[] currentItems;
+ if (((String)event.getNewValue()).equals("fruits")) {
+ currentItems = FRUITS;
+ }else{
+ currentItems = VEGETABLES;
+ }
+ for (int i = 0; i < currentItems.length; i++) {
+ SelectItem item = new SelectItem(currentItems[i]);
+ secondList.add(item);
+ }
+
+ }
+
+ public String getCurrentType() {
+ return currentType;
+ }
+
+ public void setCurrentType(String currentType) {
+ this.currentType = currentType;
+ }
+
+ public String getCurrentItem() {
+ return currentItem;
+ }
+
+ public void setCurrentItem(String currentItem) {
+ this.currentItem = currentItem;
+ }
+}
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-11 11:50:45 UTC (rev 11716)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -418,6 +418,11 @@
<managed-bean-class>org.richfaces.demo.queue.MojarraBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>selectsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.ajaxsupport.SelectsBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<from-view-id>/richfaces/include/examples/wstep1.xhtml</from-view-id>
<navigation-case>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -0,0 +1,40 @@
+<!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">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <p>
+ One of the most frequently asked question from the community is about the
+ problems while trying to create so called dependent selects.
+ </p>
+ <p>
+ So there you could explore simple sample of this case and check the source
+ code used.
+ </p>
+ <p>
+ After you select the produce type - the second select list will be populated
+ and contains the items of this type. And if you change the type it will
+ be updated again wih proper values.
+ </p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Dynamic selects Demo</legend>
+ <div class="sample-container" >
+
+ <ui:include src="/richfaces/support/examples/dynamicSelects.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/support/examples/dynamicSelects.xhtml"/>
+ </ui:include>
+
+
+ </div>
+ </fieldset>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/dynamicSelects.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -0,0 +1,24 @@
+<ui:composition 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">
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Choose the produce type:"/>
+ <rich:inplaceSelect value="#{selectsBean.currentType}" valueChangeListener="#{selectsBean.valueChanged}" defaultLabel="Click here to select">
+ <f:selectItems value="#{selectsBean.firstList}"/>
+ <a4j:support event="onchange" reRender="items, label" ajaxSingle="true"/>
+ </rich:inplaceSelect>
+ <a4j:outputPanel id="label">
+ <h:outputText value="Choose concrete product:" rendered="#{!empty selectsBean.secondList}"/>
+ </a4j:outputPanel>
+ <a4j:outputPanel id="items">
+ <rich:inplaceSelect value="#{selectsBean.currentItem}" rendered="#{!empty selectsBean.secondList}" defaultLabel="Click here to select">
+ <f:selectItems value="#{selectsBean.secondList}"/>
+ </rich:inplaceSelect>
+ </a4j:outputPanel>
+ </h:panelGrid>
+ </h:form>
+</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml 2008-12-11 11:50:45 UTC (rev 11716)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.xhtml 2008-12-11 14:32:53 UTC (rev 11717)
@@ -7,7 +7,20 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components - Ajax Support</ui:define>
<ui:define name="body">
- <ui:include src="/templates/include/tab-panel.xhtml" />
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab"
+ selectedTab="#{componentNavigator.currentComponent.activeTab}" valueChangeListener="#{componentNavigator.tabPanelSwitched}">
+ <rich:tab label="Usage" name="usage">
+ <ui:include src="/richfaces/support/usage.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Dynamic Forms Sample" name="selects">
+ <ui:include src="/richfaces/support/dropDowns.xhtml"/>
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
+ </rich:tabPanel>
</ui:define>
</ui:composition>
</html>
17 years, 5 months
JBoss Rich Faces SVN: r11716 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-11 06:50:45 -0500 (Thu, 11 Dec 2008)
New Revision: 11716
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithForAttribute.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMoreThanOneMessage.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5128
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithForAttribute.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithForAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMoreThanOneMessage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-11 08:40:55 UTC (rev 11715)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-11 11:50:45 UTC (rev 11716)
@@ -24,16 +24,16 @@
public void testComponentOutputAllMessagesByAjax(Template template) {
init(template, TEST_MORE_THAN_ONE_MESSAGE);
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":fatalMarker"));
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":errorMarker"));
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
selenium.type(inputText, "fatal");
selenium.type(inputText + "2", "");
selenium.type(inputText + "3", "");
clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
- Assert.assertTrue(selenium.isElementPresent(mainForm + ":fatalMarker"));
- Assert.assertTrue(selenium.isElementPresent(mainForm + ":errorMarker"));
+ AssertPresent(mainForm + ":fatalMarker");
+ AssertPresent(mainForm + ":errorMarker");
Assert.assertEquals("messageSummary", selenium.getText("xpath=id('" + message + "')/dt[1]/span[2]"));
Assert.assertEquals("Required message 1", selenium.getText("xpath=id('" + message + "')/dt[2]/span[2]"));
Assert.assertEquals("Required message 2", selenium.getText("xpath=id('" + message + "')/dt[3]/span[2]"));
@@ -43,7 +43,32 @@
selenium.type(inputText + "3", "passed");
clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":fatalMarker"));
- Assert.assertFalse(selenium.isElementPresent(mainForm + ":errorMarker"));
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
}
+
+ @Test
+ public void testMessagesForAttribute(Template template) {
+ init(template, TEST_MESSAGES_WITH_FOR_ATTRIBUTE);
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+
+ selenium.type(inputText, "fatal");
+ selenium.type(inputText + "2", "");
+ selenium.type(inputText + "3", "");
+
+ clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
+
+ //should present error message only for 2-nd input
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertPresent(mainForm + ":errorMarker");
+ Assert.assertEquals("Required message 1", selenium.getText("xpath=id('" + message + "')/dt[1]/span[2]"));
+
+ selenium.type(inputText + "2", "passed");
+
+ clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ }
}
17 years, 5 months
JBoss Rich Faces SVN: r11715 - in trunk/test-applications/realworld/web/src/main: webapp/WEB-INF/tags/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-11 03:40:55 -0500 (Thu, 11 Dec 2008)
New Revision: 11715
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-10 20:17:35 UTC (rev 11714)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-11 08:40:55 UTC (rev 11715)
@@ -62,7 +62,7 @@
@In(create=true)
FileManager fileManager;
- @In(create=true) @Out
+ @In(create=true) @Out(required=false)
private Image selectedImage;
@In(create=true) @Out
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Rich Faces SVN: r11714 - in trunk/test-applications/seleniumTest/richfaces/src: main/resources/org/ajax4jsf/message and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 15:17:35 -0500 (Wed, 10 Dec 2008)
New Revision: 11714
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5234
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-10 19:27:44 UTC (rev 11713)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-10 20:17:35 UTC (rev 11714)
@@ -141,7 +141,7 @@
public void setTimeZone(TimeZone timeZone) {
this.timeZone = timeZone;
}
-
+
public static Calendar getCalendar() {
return Calendar.getInstance(CalendarTestBean.TIME_ZONE, CalendarTestBean.LOCALE);
}
@@ -208,13 +208,20 @@
mode = UICalendar.CLIENT_MODE;
return null;
}
+
+ public String testLocale () {
+ locale = new Locale("ru");
+ return null;
+ }
+
public void reset() {
mode = UICalendar.AJAX_MODE;
status = "";
selectedDate = new Date();
isPopup = false;
currentDate = new Date();
+ locale = Locale.US;
}
public String resetAction() {
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-10 19:27:44 UTC (rev 11713)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-12-10 20:17:35 UTC (rev 11714)
@@ -1,4 +1,10 @@
test=It is sample message from resourceBundle
error=Error was occured.
RICH_LIST_SHUTTLE_COPY_ALL_LABEL=Copy All Items
-RICH_SHUTTLES_TOP_LABEL=Move to top
\ No newline at end of file
+RICH_SHUTTLES_TOP_LABEL=Move to top
+RICH_CALENDAR_APPLY_LABEL = Apply_en_US
+RICH_CALENDAR_TODAY_LABEL = Today_en_US
+RICH_CALENDAR_CLOSE_LABEL = Close_en_US
+RICH_CALENDAR_OK_LABEL = OK_en_US
+RICH_CALENDAR_CLEAN_LABEL = Clean_en_US
+RICH_CALENDAR_CANCEL_LABEL = Cancel_en_US
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:27:44 UTC (rev 11713)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 20:17:35 UTC (rev 11714)
@@ -126,6 +126,14 @@
String todayControlModeId;
String todayControlXpath;
+
+ String applyButtonXpath;
+
+ String cleanButtonXPath;
+
+ String closeHeaderXpath;
+
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
@@ -151,6 +159,7 @@
timeZoneId = parentId + CONTROLS_FORM_ID + "timeZone";
localeId = parentId + CONTROLS_FORM_ID + "locale";
currentDateHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[3]/div";
+ closeHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[last()]/div";
popupButtonId = calendarId + "PopupButton";
inputDateId = calendarId + "InputDate";
showApplyButtonId = parentId + FORM_ID + "showApplyButton";
@@ -163,6 +172,8 @@
weekDaysBarId = calendarId + "WeekDay";
todayControlModeId = parentId + FORM_ID + "todayControlMode";
todayControlXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[5]";
+ applyButtonXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[6]";
+ cleanButtonXPath = "//td[@id='"+calendarFooterId+"']/table/tbody/tr/td[2]";
}
String getStatus() {
@@ -268,7 +279,57 @@
}
}
+ void testInternatialization(String prefix) {
+ String label = selenium.getText(todayControlXpath);
+ String expectedLabel = ("Today" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Today' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(cleanButtonXPath);
+ expectedLabel = ("Clean" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Clean' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(timeSelectionOkButtonId);
+ expectedLabel = ("OK" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'OK' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(timeSelectionCancelButtonId);
+ expectedLabel = ("Cancel" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Cancel' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+ label = selenium.getText(closeHeaderXpath);
+ expectedLabel = ("Close" + prefix);
+ if (!expectedLabel.equals(label)) {
+ Assert.fail("Internatialization was not applied. Expected label for 'Close' button: ["+expectedLabel+"]. But was ["+label+"]");
+ }
+
+
+
+ }
+
@Test
+ public void testInternationalization(Template template) {
+ renderPage(template, RESET_METHOD);
+ initIds(getParentId());
+
+ setPopup(true);
+ setup();
+
+ showPopup();
+ showTimeSelectionWindow();
+
+ testInternatialization("_en_US");
+
+ }
+
+ // @Test
public void testLinitToListAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -277,7 +338,7 @@
tester.testLimitToList();
}
- @Test
+ //@Test
public void testReRenderAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -287,7 +348,7 @@
tester.testReRender();
}
- @Test
+ //@Test
public void testConverterAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -295,7 +356,7 @@
tester.testConverterAttribute();
}
- @Test
+ // @Test
public void testValidatorAndValidatorMessageAttributes(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -303,7 +364,7 @@
tester.testValidatorAndValidatorMessageAttributes();
}
- @Test
+ // @Test
public void testClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -337,7 +398,7 @@
}
- @Test
+ //@Test
public void testDataModelAttribute(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -356,7 +417,7 @@
}
- @Test
+ // @Test
public void testTimeSelection(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -404,7 +465,7 @@
}
- @Test
+ // @Test
public void testListenersInAjaxMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -423,7 +484,7 @@
}
- @Test
+ // @Test
public void testListenersInClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -444,7 +505,7 @@
}
- @Test
+ // @Test
public void testCalendarComponent(Template template) {
renderPage(template);
@@ -473,7 +534,7 @@
Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
}
- @Test
+ // @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -518,7 +579,7 @@
Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
- @Test
+ // @Test
public void testValueAndCurrentDateOfCalendarInCaseOfPopupTrue(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -565,7 +626,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- @Test
+ //@Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -631,7 +692,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- @Test
+ // @Test
public void testDatePatternNonPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -661,7 +722,7 @@
}
}
- @Test
+ //@Test
public void testDatePatternPopupMode(Template template) {
renderPage(template, null);
initIds(getParentId());
@@ -697,7 +758,7 @@
}
}
- @Test
+ // @Test
public void testShowHeaderAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -720,7 +781,7 @@
AssertPresent(calendarHeaderId, "Header is not present");
}
- @Test
+ //@Test
public void testShowFooterAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -743,7 +804,7 @@
AssertPresent(calendarFooterId, "Footer is not present");
}
- @Test
+ // @Test
public void testShowWeekDaysBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -766,7 +827,7 @@
AssertPresent(weekDaysBarId, "Week days bar is not present");
}
- @Test
+ // @Test
public void testShowWeeksBar(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -790,7 +851,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- @Test
+ // @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -804,7 +865,7 @@
AssertNotVisible(inputDateId, "Input is visible");
}
- @Test
+ // @Test
public void testShowApplyButton(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -821,7 +882,7 @@
Assert.assertFalse(isVisible(applyButtonXpath), "Apply button is visible");
}
- @Test
+ // @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
@@ -904,7 +965,7 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- @Test
+ //@Test
public void buttonRelatedAttributesTest(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
17 years, 5 months
JBoss Rich Faces SVN: r11713 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 14:27:44 -0500 (Wed, 10 Dec 2008)
New Revision: 11713
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
/RF-5233
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:05:21 UTC (rev 11712)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:27:44 UTC (rev 11713)
@@ -269,6 +269,25 @@
}
@Test
+ public void testLinitToListAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ calendarHeaderId = calendarId + "Header";
+ tester.testLimitToList();
+ }
+
+ @Test
+ public void testReRenderAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ calendarHeaderId = calendarId + "Header";
+ currentDateHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[3]/div";
+ tester.testReRender();
+ }
+
+ @Test
public void testConverterAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -771,7 +790,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- @Test
+ @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -885,7 +904,7 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- @Test
+ @Test
public void buttonRelatedAttributesTest(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
@@ -961,4 +980,9 @@
public void changeValue() {
changeDate();
}
+
+ @Override
+ public void sendAjax() {
+ changeCurrentDate(true);
+ }
}
17 years, 5 months
JBoss Rich Faces SVN: r11712 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/layout/autotest and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 14:05:21 -0500 (Wed, 10 Dec 2008)
New Revision: 11712
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5232
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-12-10 19:05:21 UTC (rev 11712)
@@ -8,8 +8,11 @@
import java.util.Date;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
import javax.faces.event.ActionEvent;
import javax.faces.event.FacesEvent;
import javax.faces.event.ValueChangeEvent;
@@ -19,6 +22,8 @@
import org.richfaces.event.NodeExpandedEvent;
import org.richfaces.event.NodeSelectedEvent;
+import sun.awt.datatransfer.DataTransferer.IndexOrderComparator;
+
/**
* Bean for auto test
*
@@ -42,6 +47,8 @@
public static final String NODE_SELECTED_LISTENER_STATUS = "NodeSelectedListener";
public static final String NODE_EXPANDED_LISTENER_STATUS = "NodeExpandedListener";
+
+ public static final String CONVERTER_ID = "autoTestConverter";
public static final String VALIDATOR_ID = "autoTestValidator";
@@ -71,7 +78,51 @@
private String validatorId = VALIDATOR_DEFAULT_ID;
- public void actionListener(ActionEvent event) {
+ private Object value;
+
+ private boolean converterSet;
+
+ public class AutoTestConverter implements Converter {
+
+ public static final String AS_OBJECT_STRING = "AUTO_TEST_CONVERTER_AS_OBJECT";
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
+ */
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String v) {
+ value = AS_OBJECT_STRING;
+ return v;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
+ */
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ return null;
+ }
+
+ };
+
+ AutoTestConverter converter = new AutoTestConverter();
+
+
+ /**
+ * @return the value
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ public void actionListener(ActionEvent event) {
setStatus(getStatus() + ACTION_LISTENER_STATUS);
}
@@ -91,6 +142,13 @@
public void processExpansion(NodeExpandedEvent nodeExpandedEvent) {
setStatus(getStatus() + NODE_EXPANDED_LISTENER_STATUS);
}
+
+ public void validate(FacesContext context, UIComponent component, Object o) {
+ if (VALIDATOR_ID.equals(this.validatorId)) {
+ AutoTestValidator validator = new AutoTestValidator();
+ validator.validate(context, component, o);
+ }
+ }
public String load() {
status = null;
@@ -99,6 +157,7 @@
public String reset() {
status = null;
+ value = null;
return null;
}
@@ -340,5 +399,29 @@
return VALIDATOR_MESSAGE;
}
+ /**
+ * @return the converter
+ */
+ public Converter getConverter() {
+ if (converterSet) {
+ return converter;
+ }
+ return null;
+ }
+ /**
+ * @return the converterSet
+ */
+ public boolean isConverterSet() {
+ return converterSet;
+ }
+
+ /**
+ * @param converterSet the converterSet to set
+ */
+ public void setConverterSet(boolean converterSet) {
+ this.converterSet = converterSet;
+ }
+
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2008-12-10 19:05:21 UTC (rev 11712)
@@ -55,6 +55,12 @@
</td>
</tr>
<tr>
+ <td>Converter:</td>
+ <td>
+ <h:selectBooleanCheckbox id="_auto_converter" value="#{autoTestBean.converterSet}"></h:selectBooleanCheckbox>
+ </td>
+ </tr>
+ <tr>
<td colspan="2"><h:commandButton id="_auto_load" actionListener="#{templateBean.reset}" action="#{autoTestBean.load}" value="Load"></h:commandButton> </td>
</tr>
</table>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-12-10 19:05:21 UTC (rev 11712)
@@ -9,6 +9,7 @@
<h:outputText id="_auto_status" style="display: none;" value="#{autoTestBean.status}"></h:outputText>
</a4j:outputPanel>
<h:outputText id="_auto_time" style="display: none;" value="#{autoTestBean.text}"></h:outputText>
+ <h:outputText id="_auto_value" style="display: none;" value="#{autoTestBean.value}"></h:outputText>
<h:commandButton id="_auto_simple_submit" value="Simple submit" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_submit" value="Ajax submit" reRender="componentId" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" />
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml 2008-12-10 19:05:21 UTC (rev 11712)
@@ -17,10 +17,11 @@
rendered="#{autoTestBean.rendered}"
oncomplete="#{autoTestBean.oncomplete}"
validatorMessage="#{autoTestBean.validatorMessage}"
+ validator="#{autoTestBean.validate}"
+ converter="#{autoTestBean.converter}"
mode="ajax"
popup="false"
>
- <f:validator validatorId="#{autoTestBean.validatorId}" />
<f:param name="parameter1" value="value1" />
</rich:calendar>
</ui:define>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-10 19:05:21 UTC (rev 11712)
@@ -29,6 +29,8 @@
private static final String INPUT_ID = "_auto_input";
public static final String STATUS_ID = "_auto_status";
+
+ public static final String VALUE_ID = "_auto_value";
private static final String TIME_ID = "_auto_time";
@@ -404,10 +406,22 @@
}
}
+ public void testConverterAttribute() {
+ setupControl(TestSetupEntry.converter, true);
+ clickLoad();
+
+ changeValue();
+
+ clickSubmit();
+ String value = getComponentValue();
+ if (!AutoTestBean.AutoTestConverter.AS_OBJECT_STRING.equals(value)) {
+ Assert.fail("Converter attribute does not work: getAsObject method failed of converter was not triggered. Expected component value: ["+AutoTestBean.AutoTestConverter.AS_OBJECT_STRING+"]. But was: ["+value+"]");
+ }
+ }
+
public void testValidatorAndValidatorMessageAttributes() {
setInternalValidation(true);
clickLoad();
- renderPage(base.getTemplate(), null);
changeValue();
clickSubmit();
@@ -419,7 +433,6 @@
setInternalValidation(false);
clickLoad();
- renderPage(base.getTemplate(), null);
changeValue();
clickSubmit();
@@ -490,6 +503,10 @@
private String getStatus() {
return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + STATUS_ID);
}
+
+ private String getComponentValue() {
+ return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + VALUE_ID);
+ }
public static class TestSetupEntry {
@@ -523,6 +540,8 @@
public static final TestSetupEntry bypassUpdate = new TestSetupEntry("bypassUpdate", Boolean.class, Boolean.FALSE);
public static final TestSetupEntry limitToList = new TestSetupEntry("limitToList", Boolean.class, Boolean.FALSE);
+
+ public static final TestSetupEntry converter = new TestSetupEntry("converter", Boolean.class, Boolean.FALSE);
public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
static {
@@ -534,7 +553,7 @@
list.add(bypassUpdate);
list.add(limitToList);
list.add(oncomplete);
-
+ list.add(converter);
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:05:21 UTC (rev 11712)
@@ -268,6 +268,13 @@
}
}
+ @Test
+ public void testConverterAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ tester.testConverterAttribute();
+ }
@Test
public void testValidatorAndValidatorMessageAttributes(Template template) {
17 years, 5 months
JBoss Rich Faces SVN: r11711 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-10 13:43:52 -0500 (Wed, 10 Dec 2008)
New Revision: 11711
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
Log:
https://jira.jboss.org/jira/browse/RF-5089
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-12-10 18:41:53 UTC (rev 11710)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-12-10 18:43:52 UTC (rev 11711)
@@ -49,7 +49,7 @@
this.outjectListFromBody(this.listParentContainer, this.listParent);
this.resetState();
if (this.iframe) {
- this.iframe.hide();
+ Element.hide(this.iframe);
}
var component = this.listParent.parentNode;
component.style.zIndex = 0;
17 years, 5 months
JBoss Rich Faces SVN: r11710 - in trunk/test-applications/regressionArea: regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644 and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-10 13:41:53 -0500 (Wed, 10 Dec 2008)
New Revision: 11710
Added:
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
Log:
Example for RF-2644 committed
Added: trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,54 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+
+@Stateful
+@Name("rf2644")
+(a)Scope(ScopeType.SESSION)
+public class DataBean implements DataBeanLocal {
+
+ @DataModel
+ private List<Item> items = new ArrayList<Item>();
+
+ @DataModelSelection
+ private Item item;
+
+ public DataBean() {
+ super();
+ }
+
+ @Factory("rf2644Items")
+ public void createList() {
+ for (int i = 0; i < 5000; i++) {
+ Item item = new Item();
+ item.setName(UUID.randomUUID().toString());
+
+ items.add(item);
+ }
+ }
+
+ public Item getItem() {
+ return item;
+ }
+
+ public void setItem(Item item) {
+ this.item = item;
+ }
+
+ @Remove
+ public void destroy() {
+
+ }
+}
Added: trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,13 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+import javax.ejb.Local;
+
+@Local
+public interface DataBeanLocal {
+
+ public void createList();
+
+ public void setItem(Item item);
+ public Item getItem();
+
+}
Added: trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,17 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+public class Item {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void action() {
+ System.out.println("Item.action() " + name);
+ }
+}
Added: trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,27 @@
+<!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"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+ <rich:scrollableDataTable id="table" value="#{rf2644Items}" var="item" rows="100">
+ <rich:column width="400">
+ <s:link value="#{item.name}" action="#{item.action}" />
+ </rich:column>
+ </rich:scrollableDataTable>
+
+ <h:dataTable value="#{rf2644Items}" var="item" rows="100">
+ <rich:column width="400">
+ <s:link value="#{item.name}" action="#{item.action}" />
+ </rich:column>
+ </h:dataTable>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r11709 - in trunk/ui/tooltip/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-10 13:36:37 -0500 (Wed, 10 Dec 2008)
New Revision: 11709
Modified:
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
https://jira.jboss.org/jira/browse/RF-4474
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-12-10 17:31:26 UTC (rev 11708)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-12-10 18:36:37 UTC (rev 11709)
@@ -279,10 +279,11 @@
eventsMap.put(new JSReference("delay"), new Integer(toolTip.getShowDelay()));
eventsMap.put(new JSReference("hideDelay"), new Integer(toolTip.getHideDelay()));
+ JSFunctionDefinition ajaxFunc = new JSFunctionDefinition("event", "ajaxOptions");
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
JSReference ref = new JSReference("ajaxOptions");
function.addParameter(ref);
- String ajaxFunc = function.toScript();
+ ajaxFunc.addToBody(function);
Map<String, Object> ajaxOptions = buildEventOptions(context, toolTip, targetClientId);
ajaxOptions.putAll(getParamsMap(context, toolTip));
@@ -305,7 +306,7 @@
append(toolTip.isFollowMouse()).append(comma).
append(toolTip.getHorizontalOffset()).append(comma).
append(toolTip.getVerticalOffset()).append(comma).
- append("\"").append(ajaxFunc).append("\"").append(comma).append(ScriptUtils.toScript(ajaxOptions)).append(");");
+ append(ajaxFunc.toScript()).append(comma).append(ScriptUtils.toScript(ajaxOptions)).append(");");
return ret.toString();
}
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-12-10 17:31:26 UTC (rev 11708)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-12-10 18:36:37 UTC (rev 11709)
@@ -29,7 +29,7 @@
this.horizontalOffset = horizontalOffset;
this.verticalOffset = verticalOffset;
- this.ajaxExecuteString = ajaxFunction;
+ if (ajaxFunction) this.ajaxExecuteFunction = (ajaxFunction) ? ajaxFunction : function() {};
this.ajaxOptions = ajaxOptions;
this.clientAjaxParams = {};
@@ -249,12 +249,9 @@
this.toolTip.style.visibility = "hidden";
this.toolTip.style.display = 'block';
-
- this.setToolTipPosition(e);
- this.setToolTipVisible(false);
-
+ this.setToolTipPosition(e);
}
- var event = e;
+ var event = A4J.AJAX.CloneObject(e, false);
var ajaxOptions = this.ajaxOptions;
if(this.clientAjaxParams){
if(e.clientX){
@@ -268,7 +265,23 @@
Object.extend(ajaxOptions['parameters'], this.clientAjaxParams);
}
- eval(this.ajaxExecuteString);
+ if (this.delay>0)
+ {
+ this.setToolTipPosition(e);
+ this.activationTimerHandle = window.setTimeout(function()
+ {
+ if (this.toolTipDefaultContent)
+ {
+ this.setToolTipVisible(false);
+ }
+ this.ajaxExecuteFunction(event, ajaxOptions);
+ }.bind(this), this.delay);
+ }
+ else
+ {
+ this.setToolTipVisible(false);
+ this.ajaxExecuteFunction(event, ajaxOptions);
+ }
} else {
this.setToolTipPosition(e);
if (this.delay>0)
@@ -276,7 +289,7 @@
this.activationTimerHandle = window.setTimeout(function()
{
this.displayDiv();
- }.bindAsEventListener(this), this.delay);
+ }.bind(this), this.delay);
}
else this.displayDiv();
}
@@ -318,11 +331,6 @@
if (this.ffcheck(relTarg)) return;
- if (this.activationTimerHandle) {
- window.clearTimeout(this.activationTimerHandle);
- this.activationTimerHandle = undefined;
- }
-
var className;
if (relTarg)
{
17 years, 5 months
JBoss Rich Faces SVN: r11708 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-10 12:31:26 -0500 (Wed, 10 Dec 2008)
New Revision: 11708
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
https://jira.jboss.org/jira/browse/RF-4190
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-12-10 17:23:41 UTC (rev 11707)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-12-10 17:31:26 UTC (rev 11708)
@@ -191,50 +191,52 @@
//bug : http://jira.jboss.com/jira/browse/RF-2810,
//will be corrected in a future version (http://jira.jboss.com/jira/browse/RF-2814)
var unescapedValue = this.currentItemValue;
- var params = {itemValue: unescapedValue,itemLabel: this.tempValueKeeper.value}
+ // var params = {itemValue: unescapedValue,itemLabel: this.tempValueKeeper.value}
// var unescapeText = this.tempValueKeeper.value.unescapeHTML();
- this.setValue(e,params);
+ this.setValue(e,unescapedValue);
}
},
- getParameters : function (args) {
- var result = {};
- var label = args[1]['itemLabel'];
- if(label) {
- var value = args[1]['itemValue'];
- result.itemLabel = label;
- result.itemValue = value;
- } else {
- result.itemLabel = args[0];
- result.itemValue = args[1];
- }
- return result;
- },
+ findLabel : function(lookupItems, value) {
+ var items = lookupItems;
+ for(var i=0; i < items.length; i++) {
+ if(items[i][1] == value) {
+ return items[i][0];
+ }
+ }
+ },
- setValue : function(e, params) {
- var args = $A(arguments);
- var params = this.getParameters(args);
+ setValue : function(e, param) {
+ var item = {};
+ item.itemValue = this.getParameters(e,param,"value");
+ item.itemLabel = this.findLabel(this.comboList.itemsText,item.itemValue);
+
+ if (!item.itemLabel) {
+ item.itemValue = this.currentItemValue;
+ item.itemLabel = this.tempValueKeeper.value;
+ }
+
var value = this.valueKeeper.value;
- if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : params.itemValue})) {
+ if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : item.itemValue})) {
this.endEditableState();
- if (params.itemValue == "") {
+ if (item.itemValue == "") {
this.setDefaultText();
this.valueKeeper.value = "";
//this.startViewState();
} else {
- if (params.itemLabel == "") {
+ if (item.itemLabel == "") {
this.setDefaultText();
} else {
- this.currentText = params.itemLabel;
+ this.currentText = item.itemLabel;
}
- this.valueKeeper.value = params.itemValue;
+ this.valueKeeper.value = item.itemValue;
}
- if (params.itemValue != this.value) {
+ if (item.itemValue != this.value) {
this.startChangedState();
- if (this.tempValueKeeper != params.itemLabel) {
- this.tempValueKeeper.value = params.itemLabel;
+ if (this.tempValueKeeper != item.itemLabel) {
+ this.tempValueKeeper.value = item.itemLabel;
}
- this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", params);
+ this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", item.itemValue);
} else {
this.startViewState();
}
17 years, 5 months
JBoss Rich Faces SVN: r11707 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-10 12:23:41 -0500 (Wed, 10 Dec 2008)
New Revision: 11707
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-4848
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-10 17:18:57 UTC (rev 11706)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-10 17:23:41 UTC (rev 11707)
@@ -517,7 +517,7 @@
if (this.iframe) return;
var div = document.createElement("div");
div.style.display = 'none';
- var child = "<iframe name='"+this.id+"_iframe' id='"+this.id+"_iframe'></iframe>";
+ var child = "<iframe name='"+this.id+"_iframe' id='"+this.id+"_iframe'"+ (!Richfaces.browser.isOpera ? " src=\"javascript:''\"" : "")+"></iframe>";
div.innerHTML = child;
document.body.appendChild(div);
this.iframe = $(this.id + "_iframe");
17 years, 5 months
JBoss Rich Faces SVN: r11706 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-10 12:18:57 -0500 (Wed, 10 Dec 2008)
New Revision: 11706
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
deprecated method usage removed
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 17:08:13 UTC (rev 11705)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 17:18:57 UTC (rev 11706)
@@ -429,25 +429,25 @@
String calendarPopupButton = calendarCollapsedId + "Button";
String outputPanel = containerId + "outputPanel";
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar InputDate field");
clickById(calendarInputDate);
- Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
+ Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
writeStatus("Mouse click outside calendar");
clickById(outputPanel);
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar popup button");
clickById(calendarPopupButton);
- Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
+ Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
}
- @Test
+ @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -460,10 +460,10 @@
String calendarPopupButton = calendarCollapsedId + "Button";
String outputPanel = containerId + "outputPanel";
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar popup button");
clickById(calendarPopupButton);
- Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
+ Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
String inputDateString = getValueById(calendarInputDate);
Date readDate = null;
@@ -489,7 +489,7 @@
}
Assert.assertEquals(readDate, newSelectedDate, "Date representation after selecting 15.May.2008 is wrong!");
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
@Test
17 years, 5 months
JBoss Rich Faces SVN: r11705 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/images/calendar and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-10 12:08:13 -0500 (Wed, 10 Dec 2008)
New Revision: 11705
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_disabled.gif
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_enabled.gif
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/buttonRelatedAttributesTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5253
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_disabled.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_disabled.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_enabled.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_enabled.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/buttonRelatedAttributesTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/buttonRelatedAttributesTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 16:09:05 UTC (rev 11704)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 17:08:13 UTC (rev 11705)
@@ -49,6 +49,8 @@
static final String TODAY_CONTROL_MODE_URL = "pages/calendar/todayControlModeTest.xhtml";
+ static final String BUTTON_RELATED_TEST_URL = "pages/calendar/buttonRelatedAttributesTest.xhtml";
+
static final String CONTROLS_FORM_ID = "_controls:";
static final String availableDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-btn";
@@ -876,6 +878,29 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
+ @Test
+ public void buttonRelatedAttributesTest(Template template) {
+ renderPage(BUTTON_RELATED_TEST_URL, template, null);
+ writeStatus("Check button-related attributes");
+
+ String calendar = getParentId() + FORM_ID + "calendar";
+ String enabledIconPopupBtnId = calendar + "EnabledIconPopupButton";
+ String disabledIconPopupBtnId = calendar + "DisabledIconPopupButton";
+ String labeledPopupBtnId = calendar + "LabeledPopupButton";
+
+ writeStatus("Check enabled popup button are rendered with a proper icon");
+ testIcon(enabledIconPopupBtnId, "icon_enabled");
+ isRenderedAs(enabledIconPopupBtnId, "img");
+
+ writeStatus("Check disabled popup button are rendered with a proper icon");
+ testIcon(disabledIconPopupBtnId, "icon_disabled");
+ isRenderedAs(disabledIconPopupBtnId, "img");
+
+ writeStatus("Check popup button is rendered as a labeled button element");
+ isRenderedAs(labeledPopupBtnId, "button");
+ AssertTextEquals(labeledPopupBtnId, "Button");
+ }
+
private void setPopup(boolean isPopup) {
runScript("$('" + isPopupId + "').checked=" + isPopup);
}
@@ -897,17 +922,36 @@
clickById(popupButtonId);
}
+ /**
+ * Test an icon.
+ *
+ * @param location location of image representing icon to be tested
+ * @param iconName substring that icon uri has to contain
+ */
+ private void testIcon(String location, String iconSubstring) {
+ String iconSrc = selenium.getAttribute(location + "@src");
+ if (null == iconSrc || !iconSrc.matches(".*" + iconSubstring + ".*")) {
+ Assert.fail("It looks as if the icon is not proper. Uri of icon is being tested must contain [" + iconSubstring + "]");
+ }
+ }
+
+ private void isRenderedAs(String id, String tagName) {
+ if (selenium.getXpathCount("//" + tagName + "[@id='" + id + "']").intValue() != 1) {
+ Assert.fail("Dom element with id[" + id + "] is not rendered as [" + tagName + "]");
+ }
+ }
+
public String getTestUrl() {
return "pages/calendar/calendarTest.xhtml";
}
-
+
@Override
public String getAutoTestUrl() {
- return "pages/calendar/calendarAutoTest.xhtml";
+ return "pages/calendar/calendarAutoTest.xhtml";
}
-
+
@Override
public void changeValue() {
- changeDate();
+ changeDate();
}
}
17 years, 5 months
JBoss Rich Faces SVN: r11704 - in trunk/test-applications/facelets/src/main/webapp: SimpleTogglePanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-10 11:09:05 -0500 (Wed, 10 Dec 2008)
New Revision: 11704
Modified:
trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml
trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml
trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml
Log:
minor changes
Modified: trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml 2008-12-10 16:08:47 UTC (rev 11703)
+++ trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml 2008-12-10 16:09:05 UTC (rev 11704)
@@ -10,7 +10,7 @@
value="#{editor.value}" width="#{editor.width}"
height="#{editor.height}" theme="#{editor.theme}"
onchange="#{event.onchange}" oninit="#{event.oninit}"
- onsave="#{event.onsave}" onsetup="#{event.onsetup}"
+ onsetup="#{event.onsetup}"
autoResize="#{editor.autoResize}" converter="#{editor.convert}"
converterMessage="converterMessage" immediate="#{editor.immediate}"
rendered="#{editor.rendered}" required="#{editor.required}"
Modified: trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml 2008-12-10 16:08:47 UTC (rev 11703)
+++ trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml 2008-12-10 16:09:05 UTC (rev 11704)
@@ -1,34 +1,46 @@
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="simpleTogglePanelSubviewID">
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="simpleTogglePanelSubviewID">
- <rich:simpleTogglePanel id="stpIncludeID" switchType="client">
- <f:facet name="closeMarker">
- <h:outputText value="Close it"/>
- </f:facet>
+ <rich:simpleTogglePanel id="stpIncludeID" switchType="client">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close it" />
+ </f:facet>
- <f:facet name="openMarker">
- <h:outputText value="Open it"/>
- </f:facet>
- <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
- <f:selectItems value="#{richBean.listContainer}"/>
- </h:selectOneMenu>
-
- </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP" bodyClass="body" headerClass="head" label="simpleTogglePanel with some text" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- width="#{simpleTogglePanel.width}" height="#{simpleTogglePanel.height}" switchType="#{simpleTogglePanel.switchType}"
- style="#{style.style}" styleClass="#{style.styleClass}"
- oncollapse="#{event.oncollapse}" onbeforedomupdate="#{event.onbeforedomupdate}" onexpand="#{event.onexpand}"
- opened="#{event.opened}" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}"
- onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
- onmouseup="#{event.onmouseup}" binding="#{simpleTogglePanel.htmlSTP}">
- <f:facet name="closeMarker">
- <h:outputText value="Close It"/>
- </f:facet>
- <f:facet name="openMarker">
- <h:outputText value="Open It"/>
- </f:facet>
- <f:verbatim>
+ <f:facet name="openMarker">
+ <h:outputText value="Open it" />
+ </f:facet>
+ <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
+ <f:selectItems value="#{richBean.listContainer}" />
+ </h:selectOneMenu>
+
+ </rich:simpleTogglePanel>
+ <rich:simpleTogglePanel id="sTP" bodyClass="body" headerClass="head"
+ label="simpleTogglePanel with some text"
+ action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ width="#{simpleTogglePanel.width}"
+ height="#{simpleTogglePanel.height}"
+ switchType="#{simpleTogglePanel.switchType}" style="#{style.style}"
+ styleClass="#{style.styleClass}" oncollapse="#{event.oncollapse}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ onexpand="#{event.onexpand}" opened="#{event.opened}"
+ onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}" binding="#{simpleTogglePanel.htmlSTP}">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close It" />
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:outputText value="Open It" />
+ </f:facet>
+ <f:verbatim>
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
@@ -36,27 +48,48 @@
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
</f:verbatim>
- <h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
- </rich:simpleTogglePanel>
+ <h:outputLink value="http://www.jboss.com/">
+ <f:verbatim>Link</f:verbatim>
+ </h:outputLink>
+ </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP1" headerClass="head" label="simpleTogglePanel wiht image" width="#{simpleTogglePanel.width}" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- height="#{simpleTogglePanel.height}" rendered="#{simpleTogglePanel.rendered}" switchType="#{simpleTogglePanel.switchType}"
- opened="false" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <h:graphicImage value="/pics/podb109_61.jpg" width="500" height="300"></h:graphicImage>
- </rich:simpleTogglePanel>
+ <rich:simpleTogglePanel id="sTP1" headerClass="head"
+ label="simpleTogglePanel wiht image"
+ width="#{simpleTogglePanel.width}" action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ height="#{simpleTogglePanel.height}"
+ rendered="#{simpleTogglePanel.rendered}"
+ switchType="#{simpleTogglePanel.switchType}" opened="false"
+ onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}">
+ <h:graphicImage value="/pics/podb109_61.jpg" width="500" height="300"></h:graphicImage>
+ </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP2" label="Focus simpleTogglePanle" width="#{simpleTogglePanel.width}" ignoreDupResponses="true" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- focus="#{simpleTogglePanel.focus}" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <f:facet name="closeMarker">
- <h:graphicImage value="/pics/ajax_stoped.gif"></h:graphicImage>
- </f:facet>
- <f:facet name="openMarker">
- <h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
- </f:facet>
- <rich:simpleTogglePanel id="INsTP">
- <h:panelGrid columns="2">
- <h:graphicImage value="/pics/podb109_61.jpg" width="250px" height="200px"></h:graphicImage>
- <f:verbatim>
+ <rich:simpleTogglePanel id="sTP2" label="Focus simpleTogglePanle"
+ width="#{simpleTogglePanel.width}" ignoreDupResponses="true"
+ action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ focus="#{simpleTogglePanel.focus}" onclick="#{event.onclick}"
+ oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
+ <f:facet name="closeMarker">
+ <h:graphicImage value="/pics/ajax_stoped.gif"></h:graphicImage>
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
+ </f:facet>
+ <rich:simpleTogglePanel id="INsTP">
+ <h:panelGrid columns="2">
+ <h:graphicImage value="/pics/podb109_61.jpg" width="250px"
+ height="200px"></h:graphicImage>
+ <f:verbatim>
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
@@ -64,13 +97,14 @@
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
</f:verbatim>
- </h:panelGrid>
- </rich:simpleTogglePanel>
- </rich:simpleTogglePanel>
+ </h:panelGrid>
+ </rich:simpleTogglePanel>
+ </rich:simpleTogglePanel>
<h:panelGrid id="simpleTogglePanelActionID" columns="1">
- <a4j:commandButton value="Show action" reRender="simpleTogglePanelActionID" style=" width : 95px;"></a4j:commandButton>
+ <a4j:commandButton value="Show action"
+ reRender="simpleTogglePanelActionID" style=" width : 95px;"></a4j:commandButton>
<h:outputText value="#{simpleTogglePanel.action}" />
<h:outputText value="#{simpleTogglePanel.actionListener}" />
- </h:panelGrid>
- <rich:spacer height="20px"></rich:spacer>
+ </h:panelGrid>
+ <rich:spacer height="20px"></rich:spacer>
</f:subview>
Modified: trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml 2008-12-10 16:08:47 UTC (rev 11703)
+++ trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml 2008-12-10 16:09:05 UTC (rev 11704)
@@ -1,33 +1,39 @@
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="stpPropertySubviewID">
-<h:commandButton action="#{simpleTogglePanel.add}" value="add test" />
- <h:panelGrid columns="2" border="1">
- <h:outputText value="Width:">
- </h:outputText>
- <h:inputText value="#{simpleTogglePanel.width}">
- <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
- </h:inputText>
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="stpPropertySubviewID">
+ <h:commandButton action="#{simpleTogglePanel.add}" value="add test" />
+ <h:panelGrid columns="2" border="1">
+ <h:outputText value="Width:">
+ </h:outputText>
+ <h:inputText value="#{simpleTogglePanel.width}">
+ <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
+ </h:inputText>
- <h:outputText value="Height:">
- </h:outputText>
- <h:inputText value="#{simpleTogglePanel.height}">
- <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
- </h:inputText>
+ <h:outputText value="Height:">
+ </h:outputText>
+ <h:inputText value="#{simpleTogglePanel.height}">
+ <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
+ </h:inputText>
- <h:outputText value="Switch Type:"></h:outputText>
- <h:selectOneRadio value="#{simpleTogglePanel.switchType}">
- <f:selectItem itemLabel="client" itemValue="client" />
- <f:selectItem itemLabel="server" itemValue="server" />
- <f:selectItem itemLabel="ajax" itemValue="ajax" />
- <a4j:support event="onclick" reRender="sTP,sTP1,sTP2"></a4j:support>
- </h:selectOneRadio>
+ <h:outputText value="Switch Type:"></h:outputText>
+ <h:selectOneRadio value="#{simpleTogglePanel.switchType}">
+ <f:selectItem itemLabel="client" itemValue="client" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ <a4j:support event="onclick" reRender="sTP,sTP1,sTP2"></a4j:support>
+ </h:selectOneRadio>
- <h:outputText value="Rendered:"></h:outputText>
- <h:selectBooleanCheckbox value="#{simpleTogglePanel.rendered}" onclick="submit()">
- </h:selectBooleanCheckbox>
- </h:panelGrid>
- <br />
+ <h:outputText value="Rendered:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{simpleTogglePanel.rendered}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
<br />
+ <br />
+ <!--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -37,4 +43,5 @@
<h:outputText value="#{rich:findComponent('sTP').value}" />
</rich:column>
</h:panelGrid>
+ -->
</f:subview>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r11703 - in trunk/test-applications/jsp/src/main: webapp/Editor and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-10 11:08:47 -0500 (Wed, 10 Dec 2008)
New Revision: 11703
Modified:
trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java
trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.jsp
trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.jsp
trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp
trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp
trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanelProperty.jsp
trunk/test-applications/jsp/src/main/webapp/VirtualEarth/VirtualEarthProperty.jsp
Log:
minor changes
Modified: trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/java/togglePanel/TogglePanel.java 2008-12-10 16:08:47 UTC (rev 11703)
@@ -1,5 +1,8 @@
package togglePanel;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+
import org.richfaces.component.html.HtmlTogglePanel;
import util.componentInfo.ComponentInfo;
@@ -10,18 +13,35 @@
private String stateOrder;
private String switchType;
private HtmlTogglePanel htmlTogglePanel = null;
+ private boolean immediate = false;
public void addHtmlTogglePanel(){
ComponentInfo info = ComponentInfo.getInstance();
info.addField(htmlTogglePanel);
}
+ public void actionListener(ActionEvent e) {
+ System.out.println("!!! actionListener work !!!");
+ }
+
+ public void valueChangeListener(ValueChangeEvent e) {
+ System.out.println("!!! ValueChangeEvent work !!!");
+ }
+
public TogglePanel() {
initialState="asus";
switchType="server";
stateOrder="asus,benq,toshiba";
}
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
public String getInitialState() {
return initialState;
}
Modified: trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -10,7 +10,7 @@
value="#{editor.value}" width="#{editor.width}"
height="#{editor.height}" theme="#{editor.theme}"
onchange="#{event.onchange}" oninit="#{event.oninit}"
- onsave="#{event.onsave}" onsetup="#{event.onsetup}"
+ onsetup="#{event.onsetup}"
autoResize="#{editor.autoResize}" converter="#{editor.convert}"
converterMessage="converterMessage" immediate="#{editor.immediate}"
rendered="#{editor.rendered}" required="#{editor.required}"
Modified: trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -7,7 +7,7 @@
showButtonsLabel="#{pickList.showButtonLabels}"
valueChangeListener="#{pickList.valueChangeListener}"
controlClass="#{style.controlClass}"
- listClass="#{style.listClass}"
+ listClass="#{style.listClass}"
style="#{style.style}" styleClass="#{style.styleClass}"
copyAllControlLabel="#{pickList.copyAllControlLabel}"
copyControlLabel="#{pickList.copyControlLabel}"
@@ -24,7 +24,7 @@
required="#{pickList.required}"
requiredMessage="#{pickList.requiredMessage}"
onclick="#{event.onclick}"
- ondblclick="#{event.ondblclick}"
+ ondblclick="#{event.ondblclick}"
onkeydown="#{event.onkeydown}"
onkeypress="#{event.onkeypress}"
onkeyup="#{event.onkeyup}"
Modified: trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -1,34 +1,48 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="simpleTogglePanelSubviewID">
- <rich:simpleTogglePanel id="stpIncludeID" switchType="client">
- <f:facet name="closeMarker">
- <h:outputText value="Close it"/>
- </f:facet>
+ <rich:simpleTogglePanel id="stpIncludeID" switchType="client">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close it" />
+ </f:facet>
- <f:facet name="openMarker">
- <h:outputText value="Open it"/>
- </f:facet>
- <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
- <f:selectItems value="#{richBean.listContainer}"/>
- </h:selectOneMenu>
- <jsp:include flush="true" page="${richBean.pathComponentContainer}"/>
- </rich:simpleTogglePanel>
- <rich:simpleTogglePanel binding="#{simpleTogglePanel.htmlSimpleTogglePanel}" id="sTP" bodyClass="body" headerClass="head" label="simpleTogglePanel with some text" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- width="#{simpleTogglePanel.width}" height="#{simpleTogglePanel.height}" switchType="#{simpleTogglePanel.switchType}"
- style="#{style.style}" styleClass="#{style.styleClass}"
- oncollapse="#{event.oncollapse}" onbeforedomupdate="#{event.onbeforedomupdate}" onexpand="#{event.onexpand}" opened="#{event.opened}" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <f:facet name="closeMarker">
- <h:outputText value="Close It"/>
- </f:facet>
- <f:facet name="openMarker">
- <h:outputText value="Open It"/>
- </f:facet>
- <f:verbatim>
+ <f:facet name="openMarker">
+ <h:outputText value="Open it" />
+ </f:facet>
+ <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
+ <f:selectItems value="#{richBean.listContainer}" />
+ </h:selectOneMenu>
+ <jsp:include flush="true" page="${richBean.pathComponentContainer}" />
+ </rich:simpleTogglePanel>
+ <rich:simpleTogglePanel
+ binding="#{simpleTogglePanel.htmlSimpleTogglePanel}" id="sTP"
+ bodyClass="body" headerClass="head"
+ label="simpleTogglePanel with some text"
+ action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ width="#{simpleTogglePanel.width}"
+ height="#{simpleTogglePanel.height}"
+ switchType="#{simpleTogglePanel.switchType}" style="#{style.style}"
+ styleClass="#{style.styleClass}" oncollapse="#{event.oncollapse}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ onexpand="#{event.onexpand}" opened="#{event.opened}"
+ onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}" immediate="true">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close It" />
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:outputText value="Open It" />
+ </f:facet>
+ <f:verbatim>
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
@@ -36,27 +50,48 @@
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
</f:verbatim>
- <h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
- </rich:simpleTogglePanel>
+ <h:outputLink value="http://www.jboss.com/">
+ <f:verbatim>Link</f:verbatim>
+ </h:outputLink>
+ </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP1" headerClass="head" label="simpleTogglePanel wiht image" width="#{simpleTogglePanel.width}" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- height="#{simpleTogglePanel.height}" rendered="#{simpleTogglePanel.rendered}" switchType="#{simpleTogglePanel.switchType}"
- opened="false" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <h:graphicImage value="/pics/podb109_61.jpg" width="500" height="300"></h:graphicImage>
- </rich:simpleTogglePanel>
+ <rich:simpleTogglePanel id="sTP1" headerClass="head"
+ label="simpleTogglePanel wiht image"
+ width="#{simpleTogglePanel.width}" action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ height="#{simpleTogglePanel.height}"
+ rendered="#{simpleTogglePanel.rendered}"
+ switchType="#{simpleTogglePanel.switchType}" opened="false"
+ onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}">
+ <h:graphicImage value="/pics/podb109_61.jpg" width="500" height="300"></h:graphicImage>
+ </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP2" label="Focus simpleTogglePanle" width="#{simpleTogglePanel.width}" ignoreDupResponses="true" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- focus="#{simpleTogglePanel.focus}" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <f:facet name="closeMarker">
- <h:graphicImage value="/pics/ajax_stoped.gif"></h:graphicImage>
- </f:facet>
- <f:facet name="openMarker">
- <h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
- </f:facet>
- <rich:simpleTogglePanel id="INsTP">
- <h:panelGrid columns="2">
- <h:graphicImage value="/pics/podb109_61.jpg" width="250px" height="200px"></h:graphicImage>
- <f:verbatim>
+ <rich:simpleTogglePanel id="sTP2" label="Focus simpleTogglePanle"
+ width="#{simpleTogglePanel.width}" ignoreDupResponses="true"
+ action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ focus="#{simpleTogglePanel.focus}" onclick="#{event.onclick}"
+ oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
+ <f:facet name="closeMarker">
+ <h:graphicImage value="/pics/ajax_stoped.gif"></h:graphicImage>
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
+ </f:facet>
+ <rich:simpleTogglePanel id="INsTP">
+ <h:panelGrid columns="2">
+ <h:graphicImage value="/pics/podb109_61.jpg" width="250px"
+ height="200px"></h:graphicImage>
+ <f:verbatim>
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
@@ -64,13 +99,14 @@
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
</f:verbatim>
- </h:panelGrid>
- </rich:simpleTogglePanel>
- </rich:simpleTogglePanel>
+ </h:panelGrid>
+ </rich:simpleTogglePanel>
+ </rich:simpleTogglePanel>
<h:panelGrid id="simpleTogglePanelActionID" columns="1">
- <a4j:commandButton value="Show action" reRender="simpleTogglePanelActionID" style=" width : 95px;"></a4j:commandButton>
+ <a4j:commandButton value="Show action"
+ reRender="simpleTogglePanelActionID" style=" width : 95px;"></a4j:commandButton>
<h:outputText value="#{simpleTogglePanel.action}" />
<h:outputText value="#{simpleTogglePanel.actionListener}" />
- </h:panelGrid>
- <rich:spacer height="20px"></rich:spacer>
+ </h:panelGrid>
+ <rich:spacer height="20px"></rich:spacer>
</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -4,7 +4,8 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="stpPropertySubviewID">
-<h:commandButton value="add test" action="#{simpleTogglePanel.addHtmlSimpleTogglePanel}"></h:commandButton>
+ <h:commandButton value="add test"
+ action="#{simpleTogglePanel.addHtmlSimpleTogglePanel}"></h:commandButton>
<h:panelGrid columns="2" border="1">
<h:outputText value="Width:">
</h:outputText>
@@ -33,6 +34,7 @@
</h:panelGrid>
<br />
<br />
+ <%--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -42,4 +44,5 @@
<h:outputText value="#{rich:findComponent('sTP').value}" />
</rich:column>
</h:panelGrid>
+ --%>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -163,10 +163,12 @@
</h:panelGrid>
<br />
<br />
+ <%--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<a4j:commandLink value="getSubmitedValue" reRender="findID"></a4j:commandLink>
<h:outputText id="findID" value="#{rich:findComponent('suggestionBoxId').submitedValue}"/>
</h:panelGrid>
+ --%>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -5,18 +5,26 @@
<f:subview id="togglePanelSubviewID">
- <rich:togglePanel id="panel1" binding="#{togglePanel.htmlTogglePanel}" switchType="#{togglePanel.switchType}" initialState="asus" stateOrder="asus,blank" styleClass="#{style.styleClass}" style="width:300px!important;#{style.style};"
- onclick="#{event.onclick}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
- onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
- onmouseup="#{event.onmouseup}">
+ <rich:togglePanel id="panel1" binding="#{togglePanel.htmlTogglePanel}"
+ switchType="#{togglePanel.switchType}" initialState="asus"
+ stateOrder="asus,blank" styleClass="#{style.styleClass}"
+ style="width:300px!important;#{style.style};"
+ onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
+ immediate="#{togglePanel.immediate}"
+ valueChangeListener="#{togglePanel.valueChangeListener}">
<f:facet name="blank">
<rich:panel>
<f:facet name="header">
<h:panelGroup>
- <rich:toggleControl id="toggleControl_blank" for="togglePanelSubviewID:panel1">
+ <rich:toggleControl id="toggleControl_blank"
+ for="togglePanelSubviewID:panel1">
<h:outputText value="Expand" style="font-weight: bold;" />
- <h:graphicImage url="/pics/collapse.gif" style="border-width: 0px;" />
+ <h:graphicImage url="/pics/collapse.gif"
+ style="border-width: 0px;" />
</rich:toggleControl>
</h:panelGroup>
</f:facet>
@@ -27,16 +35,21 @@
<rich:panel style="overflow: auto">
<f:facet name="header">
<h:panelGroup>
- <rich:toggleControl id="toggleControl_panel1" for="togglePanelSubviewID:panel1">
+ <rich:toggleControl id="toggleControl_panel1"
+ for="togglePanelSubviewID:panel1">
<h:outputText value="Collapse" style="font-weight: bold;" />
<h:graphicImage url="/pics/expand.gif" style="border-width: 0px;" />
</rich:toggleControl>
</h:panelGroup>
</f:facet>
- <h:panelGrid columns="2" border="0" style="width: 100%;background-color: white;">
- <h:graphicImage url="/pics/asus.jpg" height="300" width="300" alt="asus.jpg" />
+ <h:panelGrid columns="2" border="0"
+ style="width: 100%;background-color: white;">
+ <h:graphicImage url="/pics/asus.jpg" height="300" width="300"
+ alt="asus.jpg" />
+ <h:inputText value="input" required="true" />
<h:panelGroup>
- <h:outputText style="font: 18px;font-weight: bold;" value="Asus F 3 Tc" />
+ <h:outputText style="font: 18px;font-weight: bold;"
+ value="Asus F 3 Tc" />
<f:verbatim>
Processor: AMD Turion 64 X 2 - 1600 Mhz<br />
RAM: 1024 Mb<br />
@@ -45,7 +58,9 @@
Video: NVIDIA GeForce Go 7300<br />
Drive: DVD- RW DL<br />
</f:verbatim>
- <h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
+ <h:outputLink value="http://www.jboss.com/">
+ <f:verbatim>Link</f:verbatim>
+ </h:outputLink>
</h:panelGroup>
</h:panelGrid>
</rich:panel>
@@ -57,26 +72,35 @@
<br />
</f:verbatim>
- <rich:togglePanel id="panel2" switchType="#{togglePanel.switchType}" initialState="#{togglePanel.initialState}"
- stateOrder="#{togglePanel.stateOrder}" onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
- onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
- onmouseup="#{event.onmouseup}">
+ <rich:togglePanel id="panel2" switchType="#{togglePanel.switchType}"
+ initialState="#{togglePanel.initialState}"
+ stateOrder="#{togglePanel.stateOrder}" onclick="#{event.onclick}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}" immediate="#{togglePanel.immediate}">
<f:facet name="asus">
<rich:panel>
<f:facet name="header">
<h:panelGroup>
- <h:outputText value="Customizable toggle panel" style="font-weight: bold;" />
- <rich:toggleControl id="toggleControl_panel_1" for="togglePanelSubviewID:panel2">
+ <h:outputText value="Customizable toggle panel"
+ style="font-weight: bold;" />
+ <rich:toggleControl id="toggleControl_panel_1"
+ for="togglePanelSubviewID:panel2">
<h:outputText value="Next"></h:outputText>
<h:graphicImage url="/pics/expand.gif" style="border-width: 0px;" />
</rich:toggleControl>
</h:panelGroup>
</f:facet>
- <h:panelGrid columns="2" border="0" style="width: 100%;background-color: white;">
- <h:graphicImage url="/pics/asus.jpg" height="300" width="300" alt="asus.jpg" />
+ <h:panelGrid columns="2" border="0"
+ style="width: 100%;background-color: white;">
+ <h:graphicImage url="/pics/asus.jpg" height="300" width="300"
+ alt="asus.jpg" />
+ <h:inputText value="input" required="true" />
<h:panelGroup>
- <h:outputText style="font: 18px;font-weight: bold;" value="Asus F 3 Tc" />
+ <h:outputText style="font: 18px;font-weight: bold;"
+ value="Asus F 3 Tc" />
<f:verbatim>
Processor: AMD Turion 64 X 2 - 1600 Mhz<br />
RAM: 1024 Mb<br />
@@ -94,17 +118,22 @@
<rich:panel>
<f:facet name="header">
<h:panelGroup>
- <h:outputText value="Customizable toggle panel" style="font-weight: bold;" />
- <rich:toggleControl id="toggleControl_panel_2" for="togglePanelSubviewID:panel2">
+ <h:outputText value="Customizable toggle panel"
+ style="font-weight: bold;" />
+ <rich:toggleControl id="toggleControl_panel_2"
+ for="togglePanelSubviewID:panel2">
<h:outputText value="Next"></h:outputText>
<h:graphicImage url="/pics/expand.gif" style="border-width: 0px;" />
</rich:toggleControl>
</h:panelGroup>
</f:facet>
- <h:panelGrid columns="2" border="0" style="width: 100%;background-color: yellow;">
- <h:graphicImage url="/pics/benq.jpg" height="300" width="300" alt="benq.jpg" />
+ <h:panelGrid columns="2" border="0"
+ style="width: 100%;background-color: yellow;">
+ <h:graphicImage url="/pics/benq.jpg" height="300" width="300"
+ alt="benq.jpg" />
<h:panelGroup>
- <h:outputText style="font: 18px;font-weight: bold;" value="BenQ A 52" />
+ <h:outputText style="font: 18px;font-weight: bold;"
+ value="BenQ A 52" />
<f:verbatim>
Processor: Core Duo T2250 (1.73GHz)<br />
RAM: 1024 Mb<br />
@@ -122,17 +151,22 @@
<rich:panel>
<f:facet name="header">
<h:panelGroup>
- <h:outputText value="Customizable toggle panel" style="font-weight: bold;" />
- <rich:toggleControl id="toggleControl_panel_3" for="togglePanelSubviewID:panel2">
+ <h:outputText value="Customizable toggle panel"
+ style="font-weight: bold;" />
+ <rich:toggleControl id="toggleControl_panel_3"
+ for="togglePanelSubviewID:panel2">
<h:outputText value="Next"></h:outputText>
<h:graphicImage url="/pics/expand.gif" style="border-width: 0px;" />
</rich:toggleControl>
</h:panelGroup>
</f:facet>
- <h:panelGrid columns="2" border="0" style="width: 100%;background-color: orange;">
- <h:graphicImage url="/pics/toshiba.jpg" height="300" width="300" alt="toshiba.jpg" />
+ <h:panelGrid columns="2" border="0"
+ style="width: 100%;background-color: orange;">
+ <h:graphicImage url="/pics/toshiba.jpg" height="300" width="300"
+ alt="toshiba.jpg" />
<h:panelGroup>
- <h:outputText style="font: 18px;font-weight: bold;" value="Toshiba Satellite A 100-784" />
+ <h:outputText style="font: 18px;font-weight: bold;"
+ value="Toshiba Satellite A 100-784" />
<f:verbatim>
Processor: Intel Core Duo T2250 - 1.73GHz<br />
RAM: 1024 Mb<br />
Modified: trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanelProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanelProperty.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanelProperty.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -30,9 +30,13 @@
<f:selectItem itemLabel="ajax" itemValue="ajax" />
<a4j:support event="onclick" reRender="panel1,panel2"></a4j:support>
</h:selectOneRadio>
+
+ <h:outputText value="immediate:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{togglePanel.immediate}" onchange="submit();"/>
</h:panelGrid>
<br />
<br />
+ <%--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -42,4 +46,5 @@
<h:outputText value="#{rich:findComponent('panel2').stateOrder}" />
</rich:column>
</h:panelGrid>
+ --%>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/VirtualEarth/VirtualEarthProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/VirtualEarth/VirtualEarthProperty.jsp 2008-12-10 16:07:30 UTC (rev 11702)
+++ trunk/test-applications/jsp/src/main/webapp/VirtualEarth/VirtualEarthProperty.jsp 2008-12-10 16:08:47 UTC (rev 11703)
@@ -67,6 +67,7 @@
<br />
<h:commandButton value="add test" action="#{virtualEarth.addHtmlVirtualEarth}"></h:commandButton>
<br />
+ <%--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -76,4 +77,5 @@
<h:outputText value="#{rich:findComponent('vEarthID').rendererType}" />
</rich:column>
</h:panelGrid>
+ --%>
</f:subview>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r11702 - trunk/test-applications/seamApp/web/src/main/webapp/Editor.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-10 11:07:30 -0500 (Wed, 10 Dec 2008)
New Revision: 11702
Modified:
trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml
Log:
delete onsave attribute of editor
Modified: trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml 2008-12-10 16:02:56 UTC (rev 11701)
+++ trunk/test-applications/seamApp/web/src/main/webapp/Editor/Editor.xhtml 2008-12-10 16:07:30 UTC (rev 11702)
@@ -2,7 +2,8 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich" id="editorSubviewID">
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib" id="editorSubviewID">
<h:panelGrid id="EditorPanelID" columns="2" border="1">
@@ -10,7 +11,7 @@
value="#{editor.value}" width="#{editor.width}"
height="#{editor.height}" theme="#{editor.theme}"
onchange="#{event.onchange}" oninit="#{event.oninit}"
- onsave="#{event.onsave}" onsetup="#{event.onsetup}"
+ onsetup="#{event.onsetup}"
autoResize="#{editor.autoResize}" immediate="#{editor.immediate}"
rendered="#{editor.rendered}" required="#{editor.required}"
requiredMessage="requiredMessage" useSeamText="#{editor.useSeamText}"
17 years, 5 months
JBoss Rich Faces SVN: r11701 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/calendar and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 11:02:56 -0500 (Wed, 10 Dec 2008)
New Revision: 11701
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/dataTable.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/modalPanel.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/simple.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5231
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-12-10 16:00:00 UTC (rev 11700)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-12-10 16:02:56 UTC (rev 11701)
@@ -48,6 +48,8 @@
public static final String VALIDATOR_DEFAULT_ID = "autoTestDefaultValidator";
public static final String ONCOMPLETE = "window._ajaxOncomplete = true;";
+
+ public static final String VALIDATOR_MESSAGE = "Validator message";
// private String input = INPUT_TEXT;
@@ -68,7 +70,7 @@
private String oncomplete = ONCOMPLETE;
private String validatorId = VALIDATOR_DEFAULT_ID;
-
+
public void actionListener(ActionEvent event) {
setStatus(getStatus() + ACTION_LISTENER_STATUS);
}
@@ -331,4 +333,12 @@
this.validatorId = validatorId;
}
+ /**
+ * @return the validatorMessage
+ */
+ public String getValidatorMessage() {
+ return VALIDATOR_MESSAGE;
+ }
+
+
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml 2008-12-10 16:02:56 UTC (rev 11701)
@@ -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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.autoTestTemplate}">
+ <ui:define name="component">
+ <rich:calendar id="componentId"
+ immediate="#{autoTestBean.immediate}"
+ ajaxSingle="#{autoTestBean.ajaxSingle}"
+ reRender="#{autoTestBean.reRender}"
+ limitToList="#{autoTestBean.limitToList}"
+ bypassUpdates="#{autoTestBean.bypassUpdate}"
+ rendered="#{autoTestBean.rendered}"
+ oncomplete="#{autoTestBean.oncomplete}"
+ validatorMessage="#{autoTestBean.validatorMessage}"
+ mode="ajax"
+ popup="false"
+ >
+ <f:validator validatorId="#{autoTestBean.validatorId}" />
+ <f:param name="parameter1" value="value1" />
+ </rich:calendar>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/dataTable.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/dataTable.xhtml 2008-12-10 16:00:00 UTC (rev 11700)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/dataTable.xhtml 2008-12-10 16:02:56 UTC (rev 11701)
@@ -17,6 +17,8 @@
<h:form id="autoTestForm">
<ui:include src="../../layout/autotest/autoTestHiddens.xhtml" />
<ui:insert name="component" />
+ <br/>
+ <h:message id="_auto_messageId" for="componentId"></h:message>
</h:form>
</h:panelGroup>
<h:outputText value="#{row}" rendered="#{templateBean.dataTableRowIndex != row}" />
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/modalPanel.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/modalPanel.xhtml 2008-12-10 16:00:00 UTC (rev 11700)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/modalPanel.xhtml 2008-12-10 16:02:56 UTC (rev 11701)
@@ -19,6 +19,8 @@
<h:form id="autoTestForm">
<ui:include src="../../layout/autotest/autoTestHiddens.xhtml" />
<ui:insert name="component" />
+ <br/>
+ <h:message id="_auto_messageId" for="componentId"></h:message>
</h:form>
<ui:include src="../../layout/controlLayout.xhtml" />
</rich:modalPanel>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/simple.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/simple.xhtml 2008-12-10 16:00:00 UTC (rev 11700)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/autotest/simple.xhtml 2008-12-10 16:02:56 UTC (rev 11701)
@@ -11,6 +11,8 @@
<h:form id="autoTestForm">
<ui:include src="../../layout/autotest/autoTestHiddens.xhtml" />
<ui:insert name="component" />
+ <br/>
+ <h:message id="_auto_messageId" for="componentId"></h:message>
</h:form>
</ui:define>
</ui:composition>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-10 16:00:00 UTC (rev 11700)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-10 16:02:56 UTC (rev 11701)
@@ -31,6 +31,8 @@
public static final String STATUS_ID = "_auto_status";
private static final String TIME_ID = "_auto_time";
+
+ private static final String MESSAGE_FOR_ID = "_auto_messageId";
public static final String COMPONENT_ID = "componentId";
@@ -41,6 +43,8 @@
private static final String AJAX_SUBMIT = "_auto_ajax_submit";
private static final String AJAX_RESET = "_auto_ajax_reset";
+
+ private
// /private String componentName;
@@ -377,6 +381,18 @@
private void changeValue() {
base.changeValue();
}
+
+ private void setInternalValidation(boolean passed) {
+ setupControl(TestSetupEntry.validatorId, (passed) ? AutoTestBean.VALIDATOR_DEFAULT_ID : AutoTestBean.VALIDATOR_ID);
+ }
+
+ private String getValidatorMessage() {
+ String id = base.getParentId() + AUTOTEST_FORM_ID + MESSAGE_FOR_ID;
+ if (base.isPresent(id)) {
+ return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + MESSAGE_FOR_ID);
+ }
+ return "";
+ }
public void setupControl(TestSetupEntry attr, Object o) {
final String idPrefix = "_auto_";
@@ -387,6 +403,35 @@
base.runScript("document.getElementById('" + controlId + "').checked = " + o.toString());
}
}
+
+ public void testValidatorAndValidatorMessageAttributes() {
+ setInternalValidation(true);
+ clickLoad();
+ renderPage(base.getTemplate(), null);
+
+ changeValue();
+ clickSubmit();
+
+ String validatorMessage = getValidatorMessage();
+ if (!"".equals(validatorMessage)) {
+ Assert.fail("Validator attribute does not work. Validation failed, but should not.");
+ }
+
+ setInternalValidation(false);
+ clickLoad();
+ renderPage(base.getTemplate(), null);
+
+ changeValue();
+ clickSubmit();
+
+ validatorMessage = getValidatorMessage();
+ if ("".equals(validatorMessage)) {
+ Assert.fail("Validator attribute does not work. Validation passed, should be failed.");
+ }else if (!AutoTestBean.VALIDATOR_MESSAGE.equals(validatorMessage)) {
+ Assert.fail("ValidatorMessage attribute does not work. ValidationMessage expected: [" + AutoTestBean.VALIDATOR_MESSAGE+"].But was [" + validatorMessage + "]");
+ }
+
+ }
public void checkActionListener(boolean passed) {
String status = getStatus();
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 16:00:00 UTC (rev 11700)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 16:02:56 UTC (rev 11701)
@@ -30,6 +30,7 @@
import org.ajax4jsf.bean.CalendarTestBean;
import org.ajax4jsf.template.Template;
import org.ajax4jsf.util.DateUtils;
+import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -265,7 +266,16 @@
}
}
+
@Test
+ public void testValidatorAndValidatorMessageAttributes(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ tester.testValidatorAndValidatorMessageAttributes();
+ }
+
+ @Test
public void testClientMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -406,7 +416,7 @@
}
- //@Test
+ @Test
public void testCalendarComponent(Template template) {
renderPage(template);
@@ -435,7 +445,7 @@
Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
}
- // @Test
+ @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -527,7 +537,7 @@
Assert.assertEquals(currentDate, month_year, "Calendar shows wrong current date");
}
- @Test
+ @Test
public void testValueAndCurrentDateOfCalendarWithPopupFalse(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -890,4 +900,14 @@
public String getTestUrl() {
return "pages/calendar/calendarTest.xhtml";
}
+
+ @Override
+ public String getAutoTestUrl() {
+ return "pages/calendar/calendarAutoTest.xhtml";
+ }
+
+ @Override
+ public void changeValue() {
+ changeDate();
+ }
}
17 years, 5 months
JBoss Rich Faces SVN: r11700 - trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-10 11:00:00 -0500 (Wed, 10 Dec 2008)
New Revision: 11700
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
Log:
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-10 15:57:40 UTC (rev 11699)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-10 16:00:00 UTC (rev 11700)
@@ -26,6 +26,9 @@
* @see org.richfaces.realworld.service.IAlbumAction#addAlbum()
*/
public void addAlbum(Album album) {
+ if(album.getChangedName() != album.getName()){
+ album.setName(album.getChangedName());
+ }
em.persist(album);
user.addAlbum(album);
em.flush();
17 years, 5 months
JBoss Rich Faces SVN: r11699 - trunk/ui/dataFilterSlider/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-10 10:57:40 -0500 (Wed, 10 Dec 2008)
New Revision: 11699
Modified:
trunk/ui/dataFilterSlider/src/main/templates/dataFilterSlider.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4874
Modified: trunk/ui/dataFilterSlider/src/main/templates/dataFilterSlider.jspx
===================================================================
--- trunk/ui/dataFilterSlider/src/main/templates/dataFilterSlider.jspx 2008-12-10 15:55:25 UTC (rev 11698)
+++ trunk/ui/dataFilterSlider/src/main/templates/dataFilterSlider.jspx 2008-12-10 15:57:40 UTC (rev 11699)
@@ -21,7 +21,7 @@
<![CDATA[org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
</jsp:scriptlet>
- <div class="slider-container rich-dataFilterSlider-container #{component.styleClass}">
+ <div class="slider-container rich-dataFilterSlider-container #{component.styleClass}" style="#{component.attributes['style']}">
<div id="#{clientId}slider-range" class="range rich-dataFilterSlider-range #{component.rangeStyleClass}" style="width:#{component.attributes['width']}">
<div id="#{clientId}slider-range-decor" class="range-decor rich-dataFilterSlider-range-decor">
<jsp:scriptlet>
17 years, 5 months
JBoss Rich Faces SVN: r11698 - trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-10 10:55:25 -0500 (Wed, 10 Dec 2008)
New Revision: 11698
Modified:
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Rich Faces SVN: r11697 - in trunk/test-applications/realworld/web/src/main: webapp and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-10 10:45:01 -0500 (Wed, 10 Dec 2008)
New Revision: 11697
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld/web/src/main/webapp/search.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-10 15:33:41 UTC (rev 11696)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-10 15:45:01 UTC (rev 11697)
@@ -265,7 +265,9 @@
private void setDataScrollerIndex(int index) {
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller = (UIDatascroller)component.findComponent("mainform:sc1");
- scroller.setPage(index+1);
+ //scroller.setPage(index+1);
+ Map<String, Object> attributes = scroller.getDataTable().getAttributes();
+ attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+1);
selectedImageIndex.setSelectedImageIndex(index+1);
}
@@ -277,7 +279,9 @@
selectedImage = selectedAlbum.getImages().get(index +1);
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller = (UIDatascroller)component.findComponent("mainform:sc1");
- scroller.setPage(index+2);
+ //scroller.setPage(index+2);
+ Map<String, Object> attributes = scroller.getDataTable().getAttributes();
+ attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+2);
selectedImageIndex.setSelectedImageIndex(index+2);
}
Modified: trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/search.xhtml
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Rich Faces SVN: r11696 - trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-10 10:33:41 -0500 (Wed, 10 Dec 2008)
New Revision: 11696
Modified:
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
Log:
RF-5245
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-12-10 15:12:55 UTC (rev 11695)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-12-10 15:33:41 UTC (rev 11696)
@@ -371,6 +371,10 @@
}
}
+ private boolean isDefOptionValue(Object value) {
+ return value != null ? "".equals(((String)value).trim()) : true;
+ }
+
/**
* Gets script.
*
@@ -397,8 +401,17 @@
String option = OPTIONS[i];
Object value = attributes.get(option);
+ if(option.equals("entryClass") && isDefOptionValue(value)) {
+ value = "richfaces_suggestionEntry";
+ }
+
+ if(option.equals("selectValueClass") && isDefOptionValue(value)) {
+ value = "richfaces_suggestionSelectValue";
+ }
+
if (null != value) {
if (!"frequency".equals(option) || ((Double) value).doubleValue() > 1E-9) {
+
options.put(option, value);
}
}
@@ -429,7 +442,11 @@
}
if (component.getValueBinding("fetchValue") != null
|| attributes.get("fetchValue") != null) {
- options.put("select", attributes.get("selectValueClass"));
+ Object select = attributes.get("selectValueClass");
+ if (isDefOptionValue(select)) {
+ select = "richfaces_suggestionSelectValue";
+ }
+ options.put("select", select);
}
UISuggestionBox suggestionBox = (UISuggestionBox) component;
@@ -890,8 +907,10 @@
public final String getEntryClass(final FacesContext context,
final UIComponent component) {
String entryClass = (String) component.getAttributes().get("entryClass");
- if (null == entryClass)
- entryClass = "";
+ if (isDefOptionValue(entryClass)) {
+ entryClass = "richfaces_suggestionEntry";
+ }
+
String rowClass = (String) component.getAttributes().get("rowClasses");
if (null == rowClass)
rowClass = "";
17 years, 5 months
JBoss Rich Faces SVN: r11695 - trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-10 10:12:55 -0500 (Wed, 10 Dec 2008)
New Revision: 11695
Modified:
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
https://jira.jboss.org/jira/browse/RF-4459
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-12-10 14:20:41 UTC (rev 11694)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-12-10 15:12:55 UTC (rev 11695)
@@ -238,7 +238,11 @@
if (e.srcElement)
this.hintParentElement = e.srcElement;
-
+ if (this.hidingTimerHandle)
+ {
+ window.clearTimeout(this.hidingTimerHandle);
+ this.hidingTimerHandle = undefined;
+ }
if(this.mode == 'ajax'){
if(this.toolTipDefaultContent){
this.toolTipContent.innerHTML = this.toolTipDefaultContent.innerHTML;
@@ -267,11 +271,6 @@
eval(this.ajaxExecuteString);
} else {
this.setToolTipPosition(e);
- if (this.hidingTimerHandle)
- {
- window.clearTimeout(this.hidingTimerHandle);
- this.hidingTimerHandle = undefined;
- }
if (this.delay>0)
{
this.activationTimerHandle = window.setTimeout(function()
@@ -345,6 +344,11 @@
this.hidingTimerHandle = window.setTimeout(function()
{
this.hideDiv(event);
+ if (this.hidingTimerHandle)
+ {
+ window.clearTimeout(this.hidingTimerHandle);
+ this.hidingTimerHandle = undefined;
+ }
}.bindAsEventListener(this), this.hideDelay);
}
else this.hideDiv();
17 years, 5 months
JBoss Rich Faces SVN: r11694 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-12-10 09:20:41 -0500 (Wed, 10 Dec 2008)
New Revision: 11694
Modified:
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-5042
added some selectors to the guide
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-10 14:19:54 UTC (rev 11693)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-10 14:20:41 UTC (rev 11694)
@@ -1186,8 +1186,16 @@
<entry>Defines styles for the menus</entry>
</row>
+ <row>
+ <entry>.richfacesSkin .mceMenu .mceMenuItemActive</entry>
+ <entry>Defines styles for the active menu items</entry>
+ </row>
+ <row>
+ <entry>.richfacesSkin .mceMenu .mceMenuItemActive</entry>
+ <entry>Defines styles for the active menu items</entry>
+ </row>
</tbody>
</tgroup>
</table>
17 years, 5 months
JBoss Rich Faces SVN: r11693 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-12-10 09:19:54 -0500 (Wed, 10 Dec 2008)
New Revision: 11693
Modified:
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-5042
added some selectors to the guide
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-10 14:18:38 UTC (rev 11692)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2008-12-10 14:19:54 UTC (rev 11693)
@@ -461,6 +461,7 @@
<entry>Skin parameters</entry>
<entry>CSS properties</entry>
+
</row>
</thead>
@@ -1128,50 +1129,69 @@
<tbody>
<row>
<entry>.richfacesSkin table.mceToolbar</entry>
- <entry></entry>
+ <entry>Defines styles for the rows of icons within toolbar</entry>
</row>
<row>
<entry>.richfacesSkin .mceButton</entry>
- <entry></entry>
+ <entry>Defines styles for the buttons</entry>
</row>
<row>
<entry>.richfacesSkin .mceButtonDisabled .mceIcon </entry>
- <entry></entry>
+ <entry>Defines styles for the icons</entry>
</row>
<row>
<entry>.richfacesSkin .mceListBox</entry>
- <entry></entry>
+ <entry>Defines styles for the list box</entry>
</row>
<row>
<entry>.richfacesSkin .mceSeparator</entry>
- <entry></entry>
+ <entry>Defines styles for the buttons separator</entry>
</row>
<row>
<entry>.richfacesSkin .mceIframeContainer</entry>
- <entry></entry>
+ <entry>Defines styles for the container</entry>
</row>
+
<row>
- <entry>.richfacesSkin table.mceLayout tr.mceLast td</entry>
- <entry></entry>
+ <entry>.richfacesSkin table.mceLayout</entry>
+ <entry>Defines styles for the table layout</entry>
</row>
<row>
- <entry>.richfacesSkin table.mceLayout tr.mceFirst td</entry>
- <entry></entry>
+ <entry>.richfacesSkin .mceToolbar</entry>
+ <entry>Defines styles for the toolbar</entry>
</row>
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
+ <table>
+ <title>CSS selectors for the menus</title>
+
+ <tgroup cols="2">
+ <thead>
<row>
- <entry>.richfacesSkin .mceToolbar</entry>
- <entry></entry>
+ <entry>Selector</entry>
+
+ <entry>Description</entry>
</row>
+ </thead>
+
+ <tbody>
<row>
- <entry>.richfacesSkin table.mceLayout</entry>
- <entry></entry>
+ <entry>.richfacesSkin .mceMenu</entry>
+ <entry>Defines styles for the menus</entry>
</row>
+
+
</tbody>
</tgroup>
</table>
-
17 years, 5 months
JBoss Rich Faces SVN: r11691 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-10 08:58:28 -0500 (Wed, 10 Dec 2008)
New Revision: 11691
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
Log:
RF-4164
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-12-10 13:37:40 UTC (rev 11690)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-12-10 13:58:28 UTC (rev 11691)
@@ -872,9 +872,12 @@
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
if(component instanceof UIScrollableDataTable){
-
- if(!onlyPartialUpdateNeeded(component)){
- super.encodeEnd(context, component);
+ UIScrollableDataTable table = (UIScrollableDataTable)component;
+ if(!onlyPartialUpdateNeeded(table)){
+ Object rowKey = table.getRowKey();
+ table.setRowKey(context, null);
+ super.encodeEnd(context, table);
+ table.setRowKey(context, rowKey);
}
}
}
17 years, 5 months
JBoss Rich Faces SVN: r11690 - in trunk/test-applications/realworld: ejb/src/main/java/org/richfaces/realworld/service and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-10 08:37:40 -0500 (Wed, 10 Dec 2008)
New Revision: 11690
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java
Removed:
trunk/test-applications/realworld/web/src/main/webapp/layout/display.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/edit.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menuShared.xhtml
trunk/test-applications/realworld/web/src/main/webapp/sharedAlbum.xhtml
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
trunk/test-applications/realworld/web/src/main/webapp/META-INF/MANIFEST.MF
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml
trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld/web/src/main/webapp/main.xhtml
trunk/test-applications/realworld/web/src/main/webapp/search.xhtml
Log:
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -24,7 +24,6 @@
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.Version;
-
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -1,6 +1,7 @@
package org.richfaces.realworld.service;
import java.util.List;
+import java.util.Map;
import javax.ejb.Local;
import javax.ejb.Remove;
@@ -10,11 +11,11 @@
@Local
public interface ISearchService {
- public abstract List<Image> searchImages(String searchPattern);
+ public abstract List<Image> searchImages(String searchPattern, String additionalParams, Map<String, Object> paramMap);
- public List<Image> popularImages();
+ public List<Image> popularImages(String additionalParams, Map<String, Object> paramMap);
- public List<Image> worstImages();
+ public List<Image> worstImages(String additionalParams, Map<String, Object> paramMap);
@Remove
public void remove();
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -33,4 +33,5 @@
public void addFriend(User user, User friend, FriendshipRequest request);
public void removeFromSharedAlbums(User user, Album album);
public void addSharedAlbum(Album album);
+ public void loginAnonymous();
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -2,12 +2,14 @@
import java.io.Serializable;
import java.util.List;
+import java.util.Map;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;
+import javax.persistence.Query;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.Destroy;
@@ -31,20 +33,62 @@
* @see org.richfaces.realworld.service.ISearchService#searchImages(java.lang.String)
*/
@Begin(join=true)
- public List<Image> searchImages(String searchPattern){
- List<Image> images = em.createQuery("select i from MetaTag t join t.parent i where t.tag like:metatag and i.album.shared=true order by i.rank.total/i.rank.hits desc").setParameter("metatag", searchPattern+"%").getResultList();
+ public List<Image> searchImages(String searchPattern, String additionalParams, Map<String, Object> paramMap){
+ String fullQuery = "select i from MetaTag t join t.parent i where t.tag like:metatag and i.album.shared=true" + additionalParams + " order by i.rank.total/i.rank.hits desc";
+ Query prepared = em.createQuery(fullQuery).setParameter("metatag", searchPattern+"%");
+ if(paramMap != null && paramMap.get(":spinnerValue") != null){
+ prepared.setParameter("spinnerValue", paramMap.get(":spinnerValue"));
+ }
+ if(paramMap != null && paramMap.get(":choice") != null){
+ prepared.setParameter("choice", paramMap.get(":choice"));
+ }
+ if(paramMap != null && paramMap.get(":date") != null){
+ prepared.setParameter("date", paramMap.get(":date"));
+ }
+ List<Image> images = prepared.getResultList();
+ for(Image image:images){
+ image.getAlbum().getOwner().getLogin();
+ }
return images;
}
@Begin(join=true)
- public List<Image> popularImages(){
- List<Image> images = em.createQuery("select i from Image i join i.rank r where i.album.shared=true order by r.total/r.hits desc").setMaxResults(10).getResultList();
+ public List<Image> popularImages(String additionalParams, Map<String, Object> paramMap){
+ String fullQuery = "select i from Image i join i.rank r where i.album.shared=true" + additionalParams + " order by r.total/r.hits desc";
+ Query prepared = em.createQuery(fullQuery);
+ if(paramMap != null && paramMap.get(":spinnerValue") != null){
+ prepared.setParameter("spinnerValue", paramMap.get(":spinnerValue"));
+ }
+ if(paramMap != null && paramMap.get(":choice") != null){
+ prepared.setParameter("choice", paramMap.get(":choice"));
+ }
+ if(paramMap != null && paramMap.get(":date") != null){
+ prepared.setParameter("date", paramMap.get(":date"));
+ }
+ List<Image> images = prepared.getResultList();
+ for(Image image:images){
+ image.getAlbum().getOwner().getLogin();
+ }
return images;
}
@Begin(join=true)
- public List<Image> worstImages(){
- List<Image> images = em.createQuery("select i from Image i join i.rank r where i.album.shared=true order by r.total/r.hits asc").setMaxResults(10).getResultList();
+ public List<Image> worstImages(String additionalParams, Map<String, Object> paramMap){
+ String fullQuery = "select i from Image i join i.rank r where i.album.shared=true" + additionalParams + " order by r.total/r.hits asc";
+ Query prepared = em.createQuery(fullQuery);
+ if(paramMap != null && paramMap.get(":spinnerValue") != null){
+ prepared.setParameter("spinnerValue", paramMap.get(":spinnerValue"));
+ }
+ if(paramMap != null && paramMap.get(":choice") != null){
+ prepared.setParameter("choice", paramMap.get(":choice"));
+ }
+ if(paramMap != null && paramMap.get(":date") != null){
+ prepared.setParameter("date", paramMap.get(":date"));
+ }
+ List<Image> images = prepared.getResultList();
+ for(Image image:images){
+ image.getAlbum().getOwner().getLogin();
+ }
return images;
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -54,7 +54,6 @@
public void register(User user) {
em.persist(user);
- this.user = user;
}
public void updateUser(User user) {
@@ -115,4 +114,8 @@
user.addSharedAlbum(album);
}
+
+ public void loginAnonymous() {
+ user = new User();
+ }
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -10,7 +10,9 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.faces.model.SelectItem;
@@ -40,9 +42,6 @@
@In(create=true)
private ISearchService searchService;
- @In(create=true)
- private FileManager fileManager;
-
private String searchPattern;
private Long spinnerChoice;
@@ -59,69 +58,85 @@
public List<SelectItem> getItems() {
List<SelectItem> list = new ArrayList<SelectItem>(4);
+ list.add(new SelectItem(Long.valueOf(0L), "No Matter"));
list.add(new SelectItem(Long.valueOf(1L), "More"));
list.add(new SelectItem(Long.valueOf(2L), "Less"));
list.add(new SelectItem(Long.valueOf(3L), "Equals"));
return list;
}
- public synchronized void paint(OutputStream stream, Object object) throws IOException {
- Image painted = (Image)object;
-
- File image = fileManager.getImage(painted.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + painted.getAlbum().getName()+ fileManager.getFileSeparator() + painted.getPath());
- InputStream paintData = null;
- byte[] data = new byte[(int)image.length() - 1];
- FileInputStream fileInputStream = null;
- BufferedInputStream bufferedInputStream = null;
- if (image != null) {
- try {
- fileInputStream = new FileInputStream(image);
- bufferedInputStream = new BufferedInputStream(fileInputStream);
- paintData = bufferedInputStream;
- paintData.read(data);
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }finally{
- try {
- fileInputStream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- bufferedInputStream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- paintData.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- stream.write(data);
+ private String getAstFromIndex(Long item){
+ if(item == 1L){
+ return "> ";
+ }else if(item == 2L){
+ return "< ";
+ }else if(item == 3L){
+ return "= ";
+ }
+ return null;
}
public List<Image> searchImages(){
- findedImages = searchService.searchImages(this.searchPattern);
+ String additionalParams = populateAdditionalParams();
+ Map<String, Object> paramMap = null;
+ if(!additionalParams.equals("")){
+ paramMap = populateMap(additionalParams);
+ }
+ findedImages = searchService.searchImages(this.searchPattern, additionalParams, paramMap);
return findedImages;
}
public List<Image> popularImages(){
- findedImages = searchService.popularImages();
+ String additionalParams = populateAdditionalParams();
+ Map<String, Object> paramMap = null;
+ if(!additionalParams.equals("")){
+ paramMap = populateMap(additionalParams);
+ }
+ findedImages = searchService.popularImages(additionalParams, paramMap);
return findedImages;
}
+ private Map<String, Object> populateMap(String additionalParams) {
+ Map<String, Object> map = new HashMap<String, Object>();
+ if(additionalParams.lastIndexOf(":spinnerValue") != -1){
+ map.put(":spinnerValue", Long.valueOf(helper.getInputSpinner().getValue().toString()));
+ }
+ if(additionalParams.lastIndexOf(":choice") != -1){
+ map.put(":choice", numberOfVotes);
+ }
+ if(additionalParams.lastIndexOf(":date") != -1){
+ map.put(":date", date);
+ }
+ return map;
+ }
+
+ private String populateAdditionalParams() {
+ StringBuilder additionalParams = new StringBuilder("");
+ if(spinnerChoice != null && spinnerChoice > 0L){
+ additionalParams.append(" and i.rank.total/i.rank.hits");
+ additionalParams.append(getAstFromIndex(spinnerChoice));
+ additionalParams.append(":spinnerValue");
+ }
+ if(votesChoice != null && votesChoice > 0L){
+ additionalParams.append(" and i.rank.hits");
+ additionalParams.append(getAstFromIndex(votesChoice));
+ additionalParams.append(":choice");
+ }
+ if(dateChoice != null && dateChoice > 0L){
+ additionalParams.append(" and i.created");
+ additionalParams.append(getAstFromIndex(dateChoice));
+ additionalParams.append(":date");
+ }
+ return additionalParams.toString();
+ }
+
public List<Image> worstImages(){
- findedImages = searchService.worstImages();
+ String additionalParams = populateAdditionalParams();
+ Map<String, Object> paramMap = null;
+ if(!additionalParams.equals("")){
+ paramMap = populateMap(additionalParams);
+ }
+ findedImages = searchService.worstImages(additionalParams, paramMap);
return findedImages;
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -8,11 +8,13 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.core.Events;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Identity;
@@ -23,6 +25,8 @@
import org.richfaces.realworld.fileupload.AvatarUpload;
import org.richfaces.realworld.fileupload.FileManager;
import org.richfaces.realworld.service.IUserAction;
+import org.richfaces.realworld.tree.TreeSelectionManager;
+import org.richfaces.realworld.util.NavigationEnum;
@Name("authenticator")
@Scope(ScopeType.CONVERSATION)
@@ -32,13 +36,13 @@
@In Identity identity;
- @Out
+ @Out(required=false)
private Image selectedImage;
@Out(required=false)
private User selectedUser;
- @Out
+ @Out(required=false)
private Album selectedAlbum;
@In FacesMessages facesMessages;
@@ -58,7 +62,12 @@
@Begin
public boolean authenticate()
{
- log.info("authenticating #0", identity.getUsername());
+ if(null == identity.getUsername() || identity.getUsername().equals("")){
+ identity.addRole("guest");
+ Events.instance().raiseEvent("updateMainArea", NavigationEnum.SEARCH);
+ userAction.loginAnonymous();
+ return true;
+ }
try{
User user = userAction.login(identity.getUsername(), identity.getPassword());
if(user != null){
@@ -71,8 +80,9 @@
if(selectedAlbum.getImages().size() > 0){
selectedImage = selectedAlbum.getImages().get(0);
}
- selectedUser = user;
}
+ selectedUser = user;
+ Events.instance().raiseEvent("updateMainArea", NavigationEnum.IMAGE_PREVIEW);
return true;
}
}catch(Exception nre){
@@ -82,6 +92,7 @@
return false;
}
+ @Begin @End
public String register(User user){
boolean errorHappened = false;
if(!user.getPassword().equals(user.getConfirmPassword())){
@@ -113,15 +124,15 @@
e.printStackTrace();
}
}
- return "main";
+ return "index";
}
/**
* Logout from session.
*
* @return outcome which redirects to login page.
- */
+ *//*
public void logout() {
Session.instance().invalidate();
- }
+ }*/
}
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -0,0 +1,56 @@
+package org.richfaces.realworld.slideshow;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.tree.TreeSelectionManager;
+import org.richfaces.realworld.util.SlideshowHelper;
+
+@Name("slideshow")
+(a)Scope(ScopeType.CONVERSATION)
+public class SlideshowBean {
+
+ @In(required=false) @Out(required=false)
+ SlideshowHelper slideshowHelper;
+
+ @In
+ TreeSelectionManager treeSelectionManager;
+
+ private boolean active;
+
+ private int interval = 10000;
+
+ public int getInterval() {
+ return interval;
+ }
+
+ public void setInterval(int interval) {
+ this.interval = interval;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+ public void startSlideshow(){
+ active = true;
+ }
+
+ public void stopSlideshow(){
+ active = false;
+ }
+
+ public void updateInterval(){
+ this.setInterval((int)(1000 * Long.valueOf(slideshowHelper.getInputSlider().getValue().toString())));
+ }
+
+ public void incrementSlide(){
+ treeSelectionManager.incrementSlideshowIndex();
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -24,6 +24,7 @@
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
@@ -49,18 +50,18 @@
@Synchronized(timeout=2000)
public class TreeSelectionManager implements Serializable{
- @In
+ @In(required=false)
private User user;
- private NavigationEnum mainArea = NavigationEnum.IMAGE_PREVIEW;
+ private NavigationEnum mainArea;
- @In(required=false) @Out
+ @In(required=false) @Out(required=false)
private Image selectedImage;
- @In(required=false) @Out
+ @In(required=false) @Out(required=false)
private Album selectedAlbum;
- @In(create=true) @Out
+ @In(create=true) @Out(required=false)
private SelectedImageIndex selectedImageIndex;
@In(create=true)
@@ -81,6 +82,11 @@
this.setMainArea(NavigationEnum.FILE_UPLOAD);
}
+ @Observer("updateMainArea")
+ public void updateMainArea(NavigationEnum mainArea) {
+ this.setMainArea(mainArea);
+ }
+
public void scrollerListener(DataScrollerEvent event) {
List<Image> images = selectedAlbum.getImages();
if (event.getNewScrolVal().equals("previous")) {
@@ -262,6 +268,18 @@
scroller.setPage(index+1);
selectedImageIndex.setSelectedImageIndex(index+1);
}
+
+ public void incrementSlideshowIndex() {
+ int index = selectedAlbum.getIndex(selectedImage);
+ if(selectedAlbum.getImages().size() == index +1){
+ index = -1;
+ }
+ selectedImage = selectedAlbum.getImages().get(index +1);
+ UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
+ UIDatascroller scroller = (UIDatascroller)component.findComponent("mainform:sc1");
+ scroller.setPage(index+2);
+ selectedImageIndex.setSelectedImageIndex(index+2);
+ }
public String getNodeTitle() {
return nodeTitle;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -20,13 +20,13 @@
@Out(required=false)
private User selectedUser;
- @In(required=false) @Out
+ @In(required=false) @Out(required=false)
private Image selectedImage;
- @In(required=false) @Out
+ @In(required=false) @Out(required=false)
private Album selectedAlbum;
- @In(create=true) @Out
+ @In(create=true) @Out(required=false)
private SelectedImageIndex selectedImageIndex;
private String albumName;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -4,6 +4,7 @@
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -26,9 +27,54 @@
@In(create=true)
FileManager fileManager;
- @In
+ @In(required=false)
private User user;
+ public synchronized void paintSearchImage(OutputStream stream, Object object) throws IOException {
+ Image painted = (Image)object;
+
+ File image = fileManager.getImage(painted.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + painted.getAlbum().getName()+ fileManager.getFileSeparator() + painted.getPath());
+ InputStream paintData = null;
+ byte[] data = new byte[(int)image.length() - 1];
+ FileInputStream fileInputStream = null;
+ BufferedInputStream bufferedInputStream = null;
+ if (image != null) {
+ try {
+ fileInputStream = new FileInputStream(image);
+ bufferedInputStream = new BufferedInputStream(fileInputStream);
+ paintData = bufferedInputStream;
+ paintData.read(data);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }finally{
+ try {
+ fileInputStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ bufferedInputStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ paintData.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ stream.write(data);
+ }
+
public synchronized void paint(OutputStream out, Object data) throws IOException{
if (null == data) {
return;
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java 2008-12-10 13:37:40 UTC (rev 11690)
@@ -0,0 +1,25 @@
+package org.richfaces.realworld.util;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.UIInputNumberSlider;
+
+@Name("slideshowHelper")
+(a)Scope(ScopeType.EVENT)
+public class SlideshowHelper {
+
+ private UIInputNumberSlider inputSlider;
+
+ public UIInputNumberSlider getInputSlider() {
+ return inputSlider;
+ }
+
+ public void setInputSlider(UIInputNumberSlider inputSlider) {
+ this.inputSlider = inputSlider;
+ }
+
+
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/META-INF/MANIFEST.MF 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/webapp/META-INF/MANIFEST.MF 2008-12-10 13:37:40 UTC (rev 11690)
@@ -1,3 +1,15 @@
Manifest-Version: 1.0
-Class-Path:
+Class-Path: avalon-framework-4.1.3.jar
+ commons-beanutils-1.7.0.jar
+ commons-digester-1.8.jar
+ commons-logging-1.1.jar
+ jboss-seam-debug-2.1.0.SP1.jar
+ jboss-seam-jul-2.1.0.SP1.jar
+ jboss-seam-remoting-2.1.0.SP1.jar
+ jboss-seam-ui-2.1.0.SP1.jar
+ jsf-facelets-1.1.14.jar
+ log4j-1.2.14.jar
+ logkit-1.0.1.jar
+ richfaces-impl-3.3.0-SNAPSHOT.jar
+ richfaces-ui-3.3.0-SNAPSHOT.jar
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml 2008-12-10 13:06:12 UTC (rev 11689)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml 2008-12-10 13:37:40 UTC (rev 11690)
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<pages xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
- no-conversation-view-id="/home.xhtml"
- login-view-id="/home.xhtml">
+ no-conversation-view-id="/index.xhtml"
+ login-view-id="/index.xhtml">
<page view-id="*">
<navigation>
<rule if-outcome="home">
- <redirect view-id="/home.xhtml"/>
+ <redirect view-id="/index.xhtml"/>
</rule>
<rule if-outcome="register">
<redirect view-id="/register.xhtml"/>
Modified: trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/layout/display.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/layout/edit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/layout/menuShared.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/main.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/search.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/sharedAlbum.xhtml
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Rich Faces SVN: r11689 - trunk/ui/dropdown-menu/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-10 08:06:12 -0500 (Wed, 10 Dec 2008)
New Revision: 11689
Modified:
trunk/ui/dropdown-menu/src/main/config/component/dropdownmenu.xml
Log:
RF-2087: DDMenu description update
Modified: trunk/ui/dropdown-menu/src/main/config/component/dropdownmenu.xml
===================================================================
--- trunk/ui/dropdown-menu/src/main/config/component/dropdownmenu.xml 2008-12-10 12:06:16 UTC (rev 11688)
+++ trunk/ui/dropdown-menu/src/main/config/component/dropdownmenu.xml 2008-12-10 13:06:12 UTC (rev 11689)
@@ -186,7 +186,7 @@
<name>disabledLabelClass</name>
<classname>java.lang.String</classname>
<description>
- Space-separated list of CSS style class(es) that are be applied to disabled label of DD menu
+ Space-separated list of CSS style class(es) applied to dropdown menu label when it is disabled.
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -194,11 +194,20 @@
<name>selectedLabelClass</name>
<classname>java.lang.String</classname>
<description>
- Space-separated list of CSS style class(es) that are be applied to selected label of DD menu
+ Space-separated list of CSS style class(es) applied to dropdown menu label when it is selected.
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>labelClass</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Space-separated list of CSS style class(es) applied to dropdown menu label in it normal (neither selected nor disabled) sate.
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
<property>
<name>itemStyle</name>
<classname>java.lang.String</classname>
17 years, 5 months
JBoss Rich Faces SVN: r11688 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-10 07:06:16 -0500 (Wed, 10 Dec 2008)
New Revision: 11688
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-4848
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-10 09:32:00 UTC (rev 11687)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-10 12:06:16 UTC (rev 11688)
@@ -1108,8 +1108,9 @@
var allowFlash = this.options.allowFlash;
if (allowFlash=="auto" || allowFlash=="true")
{
+ var httpsSuffix = window.location.href.substr(0,5).toLowerCase()=="https" ? "s" : "";
var div = document.createElement('div');
- div.innerHTML = '<a href="http://www.adobe.com/go/getflashplayer"><img style="border:0px; margin:2px" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>';
+ div.innerHTML = '<a href="http'+httpsSuffix+'://www.adobe.com/go/getflashplayer"><img style="border:0px; margin:2px" src="http'+httpsSuffix+'://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>';
var oid = this.id+":flashContainer";
var object = document.getElementById(oid);
this.isFlash = swfobject.hasFlashPlayerVersion("9.0.28");
17 years, 5 months
JBoss Rich Faces SVN: r11687 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/calendar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-10 04:32:00 -0500 (Wed, 10 Dec 2008)
New Revision: 11687
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/todayControlModeTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5250
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-09 22:14:40 UTC (rev 11686)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-10 09:32:00 UTC (rev 11687)
@@ -432,4 +432,22 @@
showWeeksBar = true;
}
+ private String todayControlMode = "select";
+
+ /**
+ * Gets value of todayControlMode field.
+ * @return value of todayControlMode field
+ */
+ public String getTodayControlMode() {
+ return todayControlMode;
+ }
+
+ /**
+ * Set a new value for todayControlMode field.
+ * @param todayControlMode a new value for todayControlMode field
+ */
+ public void setTodayControlMode(String todayControlMode) {
+ this.todayControlMode = todayControlMode;
+ }
+
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/todayControlModeTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/todayControlModeTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-09 22:14:40 UTC (rev 11686)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 09:32:00 UTC (rev 11687)
@@ -22,6 +22,7 @@
package org.richfaces.testng;
import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
@@ -45,6 +46,8 @@
static final String SHOW_ATTRIBURES_TEST_URL = "pages/calendar/showAttributesTest.xhtml";
+ static final String TODAY_CONTROL_MODE_URL = "pages/calendar/todayControlModeTest.xhtml";
+
static final String CONTROLS_FORM_ID = "_controls:";
static final String availableDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-btn";
@@ -117,6 +120,10 @@
String showPopupId;
+ String todayControlModeId;
+
+ String todayControlXpath;
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
calendarHeaderId = calendarId + "Header";
@@ -151,6 +158,8 @@
showWeeksBarId = parentId + FORM_ID + "showWeeksBar";
showPopupId = parentId + FORM_ID + "showPopup";
weekDaysBarId = calendarId + "WeekDay";
+ todayControlModeId = parentId + FORM_ID + "todayControlMode";
+ todayControlXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[5]";
}
String getStatus() {
@@ -774,6 +783,89 @@
Assert.assertFalse(isVisible(applyButtonXpath), "Apply button is visible");
}
+ @Test
+ public void testTodayControlMode(Template template) {
+ renderPage(TODAY_CONTROL_MODE_URL, template, null);
+ initIds(getParentId());
+
+ String datePattern = selenium.getText(getParentId() + FORM_ID + "datePattern");
+ Locale locale = new Locale(selenium.getText(getParentId() + FORM_ID + "locale"));
+ Date presentTime = Calendar.getInstance(locale).getTime();
+ String month = DateUtils.month(presentTime, locale);
+ int year = DateUtils.year(presentTime);
+ String expectedCurrentMonthYearHeader = month + ", " + year;
+ String expectedTodaySelectedDate = new SimpleDateFormat(datePattern).format(new Date());
+
+ writeStatus("Check 'todayControlMode' attribute");
+
+ //select mode
+ writeStatus("Check 'select' mode (default). Control 'Today' should scroll calendar to current date and set selected date to today");
+ selenium.select(todayControlModeId, "select");
+ writeStatus("Non-popup mode");
+ check(showPopupId, false);
+
+ selenium.click(todayControlXpath + "/div");
+ String actualSelectedDate = selenium.getValue(inputDateId);
+ String actualCurrentDate = selenium.getText(currentDateHeaderXpath);
+
+ writeStatus("Check selected date and current date set to now");
+ //TODO: time ain't set to current time ... is it true? find out!
+ Assert.assertEquals(actualSelectedDate, expectedTodaySelectedDate);
+ Assert.assertEquals(actualCurrentDate, expectedCurrentMonthYearHeader);
+
+ writeStatus("Popup mode");
+ check(showPopupId, true);
+ showPopup();
+ writeStatus("Check calendar popup is shown up");
+ Assert.assertTrue(isVisible(calendarId), "Calendar popup is not visible");
+
+ selenium.click(todayControlXpath + "/div");
+ Assert.assertEquals(actualSelectedDate, expectedTodaySelectedDate);
+ Assert.assertEquals(actualCurrentDate, expectedCurrentMonthYearHeader);
+
+ //scroll mode
+ writeStatus("Check 'scroll' mode. Control 'Today' should just scroll calendar to current date not changing selected date");
+ selenium.select(todayControlModeId, "scroll");
+ writeStatus("Non-popup mode");
+ check(showPopupId, false);
+
+ String previuosSelectedDate = selenium.getValue(inputDateId);
+ selenium.click(todayControlXpath + "/div");
+ actualSelectedDate = selenium.getValue(inputDateId);
+ actualCurrentDate = selenium.getText(currentDateHeaderXpath);
+
+ writeStatus("Check selected date is not affected, current date set to now (month, year)");
+ Assert.assertEquals(actualSelectedDate, previuosSelectedDate);
+ Assert.assertEquals(actualCurrentDate, expectedCurrentMonthYearHeader);
+
+ writeStatus("Popup mode");
+ check(showPopupId, true);
+ showPopup();
+ writeStatus("Check calendar popup is shown up");
+ Assert.assertTrue(isVisible(calendarId), "Calendar popup is not visible");
+
+ previuosSelectedDate = selenium.getValue(inputDateId);
+ selenium.click(todayControlXpath + "/div");
+ actualSelectedDate = selenium.getValue(inputDateId);
+ actualCurrentDate = selenium.getText(currentDateHeaderXpath);
+ Assert.assertEquals(actualSelectedDate, previuosSelectedDate);
+ Assert.assertEquals(actualCurrentDate, expectedCurrentMonthYearHeader);
+
+ //hidden mode
+ writeStatus("Check 'hidden' mode. Control 'Today' has to be hidden");
+ selenium.select(todayControlModeId, "hidden");
+ writeStatus("Non-popup mode");
+ check(showPopupId, false);
+ Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
+
+ writeStatus("Popup mode");
+ check(showPopupId, true);
+ showPopup();
+ writeStatus("Check calendar popup is shown up");
+ Assert.assertTrue(isVisible(calendarId), "Calendar popup is not visible");
+ Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
+ }
+
private void setPopup(boolean isPopup) {
runScript("$('" + isPopupId + "').checked=" + isPopup);
}
17 years, 5 months
JBoss Rich Faces SVN: r11686 - trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-09 17:14:40 -0500 (Tue, 09 Dec 2008)
New Revision: 11686
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
https://jira.jboss.org/jira/browse/RF-4489
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2008-12-09 22:14:20 UTC (rev 11685)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2008-12-09 22:14:40 UTC (rev 11686)
@@ -366,7 +366,9 @@
/^(input|select|option|button|textarea)$/i.test(src.tagName))
return;
- Event.stop(e);
+ if (this.isDragEnabled()) {
+ Event.stop(e);
+ }
} else {
//do not process non-left clicks
return ;
17 years, 5 months
JBoss Rich Faces SVN: r11685 - trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-09 17:14:20 -0500 (Tue, 09 Dec 2008)
New Revision: 11685
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
Log:
https://jira.jboss.org/jira/browse/RF-4489
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2008-12-09 19:23:39 UTC (rev 11684)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2008-12-09 22:14:20 UTC (rev 11685)
@@ -179,10 +179,12 @@
}
},
+ isDragEnabled: function() {
+ return !!this.getContentType();
+ },
+
startDrag : function(event) {
- var contentType = this.getContentType();
-
- if (contentType) {
+ if (this.isDragEnabled()) {
if(this.grabbingCursor) {
if(this.grabCursor && this.grabCursor.visible) {
this.grabCursor.hideCursor();
17 years, 5 months
JBoss Rich Faces SVN: r11684 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-09 14:23:39 -0500 (Tue, 09 Dec 2008)
New Revision: 11684
Added:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/FileUploadComponent.swf
Log:
https://jira.jboss.org/jira/browse/RF-4917
Added: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/FileUploadComponent.swf
===================================================================
(Binary files differ)
Property changes on: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/FileUploadComponent.swf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 5 months