JBoss Rich Faces SVN: r11913 - 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-19 08:42:01 -0500 (Fri, 19 Dec 2008)
New Revision: 11913
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5348
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-19 13:32:41 UTC (rev 11912)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-19 13:42:01 UTC (rev 11913)
@@ -457,6 +457,7 @@
showWeeksBar = true;
firstWeekDay = 0;
disabled = false;
+ enableManualInput = false;
}
private String todayControlMode = "select";
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.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-19 13:32:41 UTC (rev 11912)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-19 13:42:01 UTC (rev 11913)
@@ -185,6 +185,8 @@
String jointPointId;
String directionId;
+
+ String enableManualInputId;
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
@@ -233,6 +235,7 @@
resetTimeOnDateSelectId = parentId + CONTROLS_FORM_ID + "resetTimeOnDateSelect";
jointPointId = parentId + FORM_ID + "jointPoint";
directionId = parentId + FORM_ID + "direction";
+ enableManualInputId = parentId + FORM_ID + "enableManualInput";
}
String getStatus() {
@@ -1319,6 +1322,23 @@
}
@Test
+ public void testEnableManualInputAttribute(Template template) {
+ renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
+ initIds(getParentId());
+
+ writeStatus("Check 'enableManualInput' attribute");
+ check(showPopupId, true);
+
+ writeStatus("Set 'enableManualInput' to false. Date input has to be read only. Check it");
+ check(enableManualInputId, false);
+ Assert.assertFalse(selenium.isEditable(inputDateId), "Date input has to be read only");
+
+ writeStatus("Set 'enableManualInput' to true. Date input has to become editable. Check it");
+ check(enableManualInputId, true);
+ Assert.assertTrue(selenium.isEditable(inputDateId), "Date input has to be editable");
+ }
+
+ @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
17 years, 4 months
JBoss Rich Faces SVN: r11912 - in trunk/test-applications/realworld/Upload/root: Avatars and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-19 08:32:41 -0500 (Fri, 19 Dec 2008)
New Revision: 11912
Added:
trunk/test-applications/realworld/Upload/root/Avatars/
trunk/test-applications/realworld/Upload/root/Avatars/pupkind.jpg
Log:
RF-4494: Tutorial about developing this sample application
Added: trunk/test-applications/realworld/Upload/root/Avatars/pupkind.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/Upload/root/Avatars/pupkind.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 4 months
JBoss Rich Faces SVN: r11911 - trunk/ui/extendedDataTable/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-19 07:53:43 -0500 (Fri, 19 Dec 2008)
New Revision: 11911
Modified:
trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java
Log:
added setter ad getter for tableState property
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java 2008-12-19 12:53:05 UTC (rev 11910)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java 2008-12-19 12:53:43 UTC (rev 11911)
@@ -86,4 +86,16 @@
public void setGroupingColumn(String groupingColumn) {
}
+ @Override
+ public String getTableState() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void setTableState(String tableState) {
+ // TODO Auto-generated method stub
+
+ }
+
}
17 years, 4 months
JBoss Rich Faces SVN: r11910 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-19 07:53:05 -0500 (Fri, 19 Dec 2008)
New Revision: 11910
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
Log:
changed tableState mechanism
https://jira.jboss.org/jira/browse/RF-5041
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-12-19 12:52:52 UTC (rev 11909)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-12-19 12:53:05 UTC (rev 11910)
@@ -28,7 +28,6 @@
import java.util.Iterator;
import java.util.List;
-import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -49,12 +48,8 @@
private static final long serialVersionUID = -3103664821855261335L;
- public static final String TABLE_STATE_ATTR_NAME = "tableState";
-
public static final String NONE_COLUMN_ID = "none";
- //protected static final String SEP = ":";
-
protected ColumnsOrder columnsOrder;
protected ColumnsVisibility columnsVisibility;
protected ColumnsSizeState columnsSizeState;
@@ -71,7 +66,7 @@
*/
protected void init(UIExtendedDataTable extendedDataTable){
//get state value from components attribute
- String value = (String)extendedDataTable.getAttributes().get(TABLE_STATE_ATTR_NAME);
+ String value = extendedDataTable.getTableState();
JSONMap stateMap = null;
if ((value != null) && (value.length() > 0)){
try {
@@ -108,19 +103,9 @@
catch(Exception e){
columnGroupingState = ColumnGroupingState.getColumnGropingState(extendedDataTable, (JSONMap)null);
}
- }//init
+ }//init
/**
- * Puts own state into component state.
- */
- public void publishChanges(FacesContext context, UIExtendedDataTable extendedDataTable){
- ValueExpression ve = extendedDataTable.getValueExpression(TABLE_STATE_ATTR_NAME);
- if ((null != ve) && (!ve.isReadOnly(context.getELContext()))) {
- ve.setValue(context.getELContext(), toString());
- }
- }//publishChanges
-
- /**
* Converts its state to String representation in JSON format.
*/
public String toString(){
17 years, 4 months
JBoss Rich Faces SVN: r11909 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-19 07:52:52 -0500 (Fri, 19 Dec 2008)
New Revision: 11909
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
Log:
changed tableState mechanism
https://jira.jboss.org/jira/browse/RF-5041
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-12-19 12:51:44 UTC (rev 11908)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-12-19 12:52:52 UTC (rev 11909)
@@ -27,9 +27,9 @@
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
@@ -73,7 +73,7 @@
* COMPONENT_FAMILY
*/
public static final String COMPONENT_FAMILY = "org.richfaces.ExtendedDataTable";
-
+
protected ExtendedDataTableState state;
public abstract Object getActiveRowKey();
@@ -83,6 +83,10 @@
public abstract String getGroupingColumn();
public abstract void setGroupingColumn(String groupingColumn);
+
+ public abstract void setTableState(String tableState);
+
+ public abstract String getTableState();
public void broadcast(FacesEvent event) throws AbortProcessingException {
super.broadcast(event);
@@ -109,12 +113,12 @@
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else if (event instanceof DragDropEvent) {
new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
} else if (event instanceof ChangeColumnVisibilityEvent) {
new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
} else if (event instanceof ColumnResizeEvent) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
} else if (event instanceof ExtTableSortEvent) {
new AjaxEvent(this).queue();
event.setPhaseId(PhaseId.INVOKE_APPLICATION);
@@ -138,29 +142,16 @@
String dragValue = event.getDragValue().toString();// dnd_drag_script
String dropValue = event.getDropValue().toString();// dnd_drop_script
- ensureTableStateInitialized();
- state.changeColumnsOrder(dragValue, dropValue, event.isDropBefore());
- state.publishChanges(getFacesContext(), this);
-
+ getState().changeColumnsOrder(dragValue, dropValue, event.isDropBefore());
getFacesContext().renderResponse();
}
public List<UIComponent> getSortedChildren() {
- ensureTableStateInitialized();
- return state.sortColumns(getFacesContext(), super.getChildren());
+ return getState().sortColumns(getFacesContext(), super.getChildren());
}
- public void ensureTableStateInitialized() {
- if (state == null) {
- state = ExtendedDataTableState.getExtendedDataTableState(this);
- }
- }
-
public void processChangeColumnVisibility(ChangeColumnVisibilityEvent event) {
- ensureTableStateInitialized();
- state.toggleColumnVisibility(this, event.getColumnId());
- state.publishChanges(getFacesContext(), this);
-
+ getState().toggleColumnVisibility(this, event.getColumnId());
getFacesContext().renderResponse();
}
@@ -188,21 +179,16 @@
}
public boolean isColumnVisible(UIComponent column) {
- ensureTableStateInitialized();
- return state.isColumnVisible(column.getId());
+ return getState().isColumnVisible(column.getId());
}
public void processColumnResize(ColumnResizeEvent event) {
- ensureTableStateInitialized();
- state.changeColumnSize(this, event.getColumnWidths());
- state.publishChanges(getFacesContext(), this);
-
+ getState().changeColumnSize(this, event.getColumnWidths());
getFacesContext().renderResponse();
}
public String getColumnSize(UIComponent column) {
- ensureTableStateInitialized();
- return state.getColumnSize(column);
+ return getState().getColumnSize(column);
}
public boolean isGroupingOn() {
@@ -219,8 +205,7 @@
* @return id of column which the data is grouped by
*/
public String getGroupByColumnId() {
- ensureTableStateInitialized();
- String id = state.getGroupingColumnId();
+ String id = getState().getGroupingColumnId();
if (id == null){//grouping is not saved in state
//get column id from attribute
id = getGroupingColumn();
@@ -250,35 +235,27 @@
}
public void setGroupByColumn(org.richfaces.component.UIColumn column) {
- ensureTableStateInitialized();
if (column == null) {
- state.disableGrouping();
+ getState().disableGrouping();
} else {
- state.groupBy(column.getId(), column.getSortOrder());
+ getState().groupBy(column.getId(), column.getSortOrder());
}
- state.publishChanges(getFacesContext(), this);
}
protected void resetGroupVisibilityState() {
- ensureTableStateInitialized();
- state.resetGroupVisibilityState();
+ getState().resetGroupVisibilityState();
}
public void disableGrouping() {
- ensureTableStateInitialized();
- state.disableGrouping();
- state.publishChanges(getFacesContext(), this);
+ getState().disableGrouping();
}
public boolean groupIsExpanded(int index) {
- ensureTableStateInitialized();
- return state.groupIsExpanded(index);
+ return getState().groupIsExpanded(index);
}
public void toggleGroup(int index) {
- ensureTableStateInitialized();
- state.toggleGroup(index);
- state.publishChanges(getFacesContext(), this);
+ getState().toggleGroup(index);
}
protected Collection<Object> getGroupPriority(){
@@ -302,19 +279,19 @@
return priority;
}
- public Object saveState(FacesContext context) {
- Object values[] = new Object[2];
- values[0] = super.saveState(context);
- values[1] = state;
- return values;
- }
+// public Object saveState(FacesContext context) {
+// Object values[] = new Object[2];
+// values[0] = super.saveState(context);
+// values[1] = state;
+// return values;
+// }
+//
+// public void restoreState(FacesContext context, Object state) {
+// Object values[] = (Object[]) state;
+// super.restoreState(context, values[0]);
+// this.state = (ExtendedDataTableState) values[1];
+// }
- public void restoreState(FacesContext context, Object state) {
- Object values[] = (Object[]) state;
- super.restoreState(context, values[0]);
- this.state = (ExtendedDataTableState) values[1];
- }
-
public int getVisibleColumnsCount() {
int count = 0;
for (Iterator<UIColumn> iter = getChildColumns(); iter.hasNext();) {
@@ -449,6 +426,27 @@
}
}
+ @Override
+ public void processUpdates(FacesContext context){
+ super.processUpdates(context);
+ updateTableState(context);
+ }
+ /**
+ * Puts own state into component state.
+ */
+ protected void updateTableState(FacesContext context){
+ ValueExpression ve = getValueExpression("tableState");
+ if ((null != ve) && (!ve.isReadOnly(context.getELContext()))) {
+ ve.setValue(context.getELContext(), getState().toString());
+ }
+ }//publishChanges
+
+ protected ExtendedDataTableState getState() {
+ if (state == null){
+ state = ExtendedDataTableState.getExtendedDataTableState(this);
+ }
+ return state;
+ }
}
17 years, 4 months
JBoss Rich Faces SVN: r11908 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-19 07:51:44 -0500 (Fri, 19 Dec 2008)
New Revision: 11908
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
organized imports
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-12-19 12:14:55 UTC (rev 11907)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-12-19 12:51:44 UTC (rev 11908)
@@ -37,7 +37,6 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
@@ -45,8 +44,6 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.richfaces.component.Column;
import org.richfaces.component.Row;
import org.richfaces.component.UIColumn;
@@ -108,7 +105,7 @@
private static final String MIN_COLUMN_WIDTH = "20";
- private final Log log = LogFactory.getLog(UIExtendedDataTable.class);
+ //private final Log log = LogFactory.getLog(UIExtendedDataTable.class);
/**
* Encode all table structure - colgroups definitions, caption, header,
17 years, 4 months
JBoss Rich Faces SVN: r11907 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-19 07:14:55 -0500 (Fri, 19 Dec 2008)
New Revision: 11907
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5346 completed
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-19 12:01:08 UTC (rev 11906)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-19 12:14:55 UTC (rev 11907)
@@ -1568,9 +1568,6 @@
public void testJointPointAndDirectionAttributes(Template template) {
renderPage(JOINTPOINT_DIRECTION_TEST_URL, template, null);
initIds(getParentId());
-
- String calendarLeft = "$('" + calendarId + "').cumulativeOffset().left";
- String calendarTop = "$('" + calendarId + "').cumulativeOffset().top";
String topLeftPointLeft = "$('" + inputDateId + "').cumulativeOffset().left";
String topLeftPointTop = "$('" + inputDateId + "').cumulativeOffset().top";
@@ -1582,46 +1579,58 @@
String topRightPointTop = "$('" + popupButtonId + "').cumulativeOffset().top";
String bottomRightPointLeft = topRightPointLeft;
- String bottomRightPointTop = "($('" + popupButtonId + "').cumulativeOffset().top + $('" + popupButtonId + "').getHeight()))";
+ String bottomRightPointTop = "($('" + popupButtonId + "').cumulativeOffset().top + $('" + popupButtonId + "').getHeight())";
- //point:
- //"top-left"
- //"top-right"
- //"bottom-left"
- //"bottom-right"
- //waiteForCondition("$('" + popupButtonId + "').getStyle('display') != 'none'", 1000);
+ testJointPoint("top-left", topLeftPointLeft, topLeftPointTop);
+ testJointPoint("top-right", topRightPointLeft, topRightPointTop);
+ testJointPoint("bottom-left", bottomLeftPointLeft, bottomLeftPointTop);
+ testJointPoint("bottom-right", bottomRightPointLeft, bottomRightPointTop);
+ }
- //top-left joint point
- selenium.select(jointPointId, "top-left");
+ private void testJointPoint(String jointPointValue, String jointPointLeft, String jointPointTop) {
+ String calendarLeft = "$('" + calendarId + "').cumulativeOffset().left";
+ String calendarTop = "$('" + calendarId + "').cumulativeOffset().top";
+ writeStatus("Check [" + jointPointValue + "] joint point with all directions");
+ selenium.select(jointPointId, jointPointValue);
+
//top-left direction
selenium.select(directionId, "top-left");
showPopup();
- assertTrue(calendarLeft, "<", topLeftPointLeft);
- assertTrue(calendarTop, "<", topLeftPointTop);
+ assertTrue(calendarLeft, "<", jointPointLeft);
+ assertTrue(calendarTop, "<", jointPointTop);
//top-right direction
selenium.select(directionId, "top-right");
showPopup();
- assertTrue(calendarLeft, "==", topLeftPointLeft);
- assertTrue(calendarTop, "<", topLeftPointTop);
+ assertTrue(calendarLeft, "==", jointPointLeft);
+ assertTrue(calendarTop, "<", jointPointTop);
//bottom-right direction
selenium.select(directionId, "bottom-right");
showPopup();
- assertTrue(calendarLeft, "==", topLeftPointLeft);
- assertTrue(calendarTop, "==", topLeftPointTop);
+ assertTrue(calendarLeft, "==", jointPointLeft);
+ assertTrue(calendarTop, "==", jointPointTop);
//bottom-left direction
selenium.select(directionId, "bottom-left");
showPopup();
- assertTrue(calendarLeft, "<", topLeftPointLeft);
- assertTrue(calendarTop, "==", topLeftPointTop);
+ assertTrue(calendarLeft, "<", jointPointLeft);
+ assertTrue(calendarTop, "==", jointPointTop);
+
+ //waiteForCondition("$('" + popupButtonId + "').getStyle('display') != 'none'", 1000);
}
private void assertTrue(String calendarPoint, String operation, String jointPoint) {
- Assert.assertTrue(Boolean.parseBoolean(selenium.getEval(WINDOW_JS_RESOLVER + calendarPoint + " " + operation
- + " " + WINDOW_JS_RESOLVER + jointPoint)), runScript(calendarPoint) + operation + runScript(jointPoint));
+ calendarPoint = calendarPoint.replaceAll("\\$", WINDOW_JS_RESOLVER + "\\$");
+ jointPoint = jointPoint.replaceAll("\\$", WINDOW_JS_RESOLVER + "\\$");
+ String expression;
+ if ("==".equals(operation)) {
+ expression = "Math.abs(" + calendarPoint + " - " + jointPoint + ") < 2";
+ } else {
+ expression = calendarPoint + " " + operation + " " + jointPoint;
+ }
+ Assert.assertTrue(Boolean.parseBoolean(selenium.getEval(expression)), selenium.getEval(calendarPoint) + operation + selenium.getEval(jointPoint));
}
private void setPopup(boolean isPopup) {
17 years, 4 months
JBoss Rich Faces SVN: r11906 - trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-19 07:01:08 -0500 (Fri, 19 Dec 2008)
New Revision: 11906
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
small fix
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-12-19 10:39:07 UTC (rev 11905)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-12-19 12:01:08 UTC (rev 11906)
@@ -152,9 +152,13 @@
this.onScrollListener = this.onScroll.bindAsEventListener(this);
- if (options.popupClass)
- Element.addClassName(this.update.select(".dr-sb-ext-decor-3")[0], options.popupClass);
-
+// if (options.popupClass)
+// Element.addClassName(this.update.select(".dr-sb-ext-decor-3")[0], options.popupClass);
+ if (options.popupClass) {
+ var selected = Element.select(this.update,".dr-sb-ext-decor-3");
+ Element.addClassName(selected[0], options.popupClass);
+ }
+
this.onNothingLabelClick = this.hideNLabel.bindAsEventListener(this);
},
@@ -223,8 +227,12 @@
if (RichFaces.SAFARI == RichFaces.navigatorType()) {
this.wasScroll = false;
this.wasBlur = false;
- if (!this.overflow)
- this.overflow = this.update.select(".dr-sb-overflow")[0];
+// if (!this.overflow)
+// this.overflow = this.update.select(".dr-sb-overflow")[0];
+ if (!this.overflow) {
+ var selected = Element.select(this.update,".dr-sb-overflow");
+ this.overflow = selected[0];
+ }
Event.observe(this.overflow, "scroll", this.onScrollListener);
}
if (Element.getStyle(this.update, 'display')
@@ -515,8 +523,10 @@
countVisibleEntries: function() {
var entry = this.getEntry(this.index);
- var scroll = this.update.select("._suggestion_size_")[0]
- || this.update;
+// var scroll = this.update.select("._suggestion_size_")[0]
+// || this.update;
+ var selected = Element.select(this.update, "._suggestion_size_");
+ var scroll = selected[0] || this.update;
var entryPosition = this.calcEntryPosition(entry,scroll);
@@ -541,8 +551,10 @@
// Calc scroll position :
if (this.keyEvent) {
- var scroll = this.update.select("._suggestion_size_")[0]
- || this.update;
+// var scroll = this.update.select("._suggestion_size_")[0]
+// || this.update;
+ var selected = Element.select(this.update,"._suggestion_size_");
+ var scroll = selected[0] || this.update;
var entryPosition = this.calcEntryPosition(entry,scroll);
@@ -672,8 +684,10 @@
// TODO - get entry elements by tag name or class
var entryes = [];
if (this.options.entryClass) {
- entryes = this.update.select("."+this.options.entryClass)
- || [];
+ //entryes = this.update.select("."+this.options.entryClass)|| [];
+ var selected = Element.select(this.update, "."+this.options.entryClass);
+ entryes = selected || [];
+
} else if (this.update.firstChild
&& this.update.firstChild.firstChild
&& this.update.firstChild.firstChild.childNodes) {
@@ -693,8 +707,10 @@
}
this.stopIndicator();
- var scroll = this.update.select("._suggestion_size_")[0]
- || this.update;
+// var scroll = this.update.select("._suggestion_size_")[0]
+// || this.update;
+ var selected = Element.select(this.update,"._suggestion_size_");
+ var scroll = selected[0] || this.update;
scroll.scrollTop = -1;
scroll.scrollLeft = -1;
this.index = 0;
17 years, 4 months
JBoss Rich Faces SVN: r11905 - trunk/test-applications/jsp/src/main/webapp/InplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: tromanovich
Date: 2008-12-19 05:39:07 -0500 (Fri, 19 Dec 2008)
New Revision: 11905
Modified:
trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelectProperty.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelectProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelectProperty.jsp 2008-12-19 10:38:39 UTC (rev 11904)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelectProperty.jsp 2008-12-19 10:39:07 UTC (rev 11905)
@@ -106,8 +106,13 @@
value="getValue"></a4j:commandLink>
<br />
<a4j:commandLink
- onclick="$('formID:inplaceSelectSubviewID:inplaceSelectID').component.setValue(event,{itemLabel:'passeds', itemValue:'passeds'})"
+ onclick="$('formID:inplaceSelectSubviewID:inplaceSelectID').component.setValue(event,{value:'passeds'})"
value="setValue(e,{params})"></a4j:commandLink>
+ <br />
+
+ <a4j:commandLink
+ onclick="$('formID:inplaceSelectSubviewID:inplaceSelectID').component.setValue('1234')"
+ value="setValue('infos')"></a4j:commandLink>
<br />
<f:verbatim>
@@ -122,7 +127,7 @@
<br />
<a href="#" id="getValueID">getValue()</a>
<br />
- <a href="#" id="setValueID">setValue('passeds','passeds')</a>
+ <a href="#" id="setValueID">setValue('warns')</a>
</f:verbatim>
<rich:componentControl attachTo="editID" event="onclick"
@@ -136,8 +141,7 @@
</rich:componentControl>
<rich:componentControl attachTo="setValueID" event="onclick"
for="inplaceSelectID" operation="setValue">
- <f:param name="itemValue" value="passeds"/>
- <f:param name="itemLabel" value="passeds"/>
+ <f:param name="value" value="warns"/>
</rich:componentControl>
<br />
<br />
17 years, 4 months
JBoss Rich Faces SVN: r11904 - trunk/test-applications/jsp/src/main/webapp/InplaceInput.
by richfaces-svn-commits@lists.jboss.org
Author: tromanovich
Date: 2008-12-19 05:38:39 -0500 (Fri, 19 Dec 2008)
New Revision: 11904
Modified:
trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp 2008-12-19 10:05:24 UTC (rev 11903)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp 2008-12-19 10:38:39 UTC (rev 11904)
@@ -114,7 +114,19 @@
onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.setValue('setValue')"
value="setValuel"></a4j:commandLink>
<br />
+ <f:verbatim>
+ <h:outputText value="Component Control test"
+ style="FONT-WEIGHT: bold;"></h:outputText>
+ <br />
+ <a href="#" id="setValueID">setValue('testValue: ~!@#$%^&*()_+=-[]{}"|;<>/')</a>
+ <br />
+ </f:verbatim>
<br />
+ <rich:componentControl attachTo="setValueID" event="onclick"
+ for="inplaceInputId" operation="setValue">
+ <f:param name="value" value="testValue: ~!@#$%^&*()_+=-[]{}|;<>/"/>
+ </rich:componentControl>
+ <br />
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
17 years, 4 months