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" />
16 years, 1 month
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);
16 years, 1 month
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);
}
}
16 years, 1 month
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()));
16 years, 1 month
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
16 years, 1 month
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)
16 years, 1 month
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
16 years, 1 month
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>
16 years, 1 month
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>
16 years, 1 month
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)},
16 years, 1 month