JBoss Rich Faces SVN: r10965 - in trunk/sandbox/ui/editor/src/main: java/org/richfaces/component and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-10-29 10:40:30 -0400 (Wed, 29 Oct 2008)
New Revision: 10965
Modified:
trunk/sandbox/ui/editor/src/main/config/component/editor.xml
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
RichEditor: adjust Faces suffix transferring
implement basic attributes
change editor initialization mode
Modified: trunk/sandbox/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-10-29 14:36:58 UTC (rev 10964)
+++ trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-10-29 14:40:30 UTC (rev 10965)
@@ -26,6 +26,18 @@
</test>
</tag>
&ui_component_attributes;
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) is/are to be applied when this component is rendered</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
<property hidden="true">
<name>type</name>
<classname>java.lang.String</classname>
@@ -58,14 +70,6 @@
</description>
<defaultvalue>"simple"</defaultvalue>
</property>
- <property hidden="true">
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Attribute defines Editor mode
- </description>
- <defaultvalue>"textareas"</defaultvalue>
- </property>
<property>
<name>useSeamText</name>
<classname>java.lang.Boolean</classname>
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-10-29 14:36:58 UTC (rev 10964)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-10-29 14:40:30 UTC (rev 10965)
@@ -59,10 +59,6 @@
public abstract String getTheme();
- public abstract void setMode(String mode);
-
- public abstract String getMode();
-
public abstract void setUseSeamText(Boolean useSeamText);
public abstract Boolean getUseSeamText();
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-10-29 14:36:58 UTC (rev 10964)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-10-29 14:40:30 UTC (rev 10965)
@@ -106,11 +106,24 @@
}
protected String getFacesMappingSuffix(FacesContext context) {
- String suffix = WebXml.getInstance(context).getFacesServletSuffix();
- if (suffix == null) {
- suffix = "";
+ WebXml webXml = WebXml.getInstance(context);
+ String suffix = webXml.getFacesServletSuffix();
+ String prefix = webXml.getFacesServletPrefix();
+ String filterPrefix = webXml.getFacesFilterPrefix();
+ String filterSuffix = webXml.getFacesFilterSuffix();
+ if (filterPrefix != null) {
+ return "";
}
- return suffix;
+ if (filterSuffix != null) {
+ return filterSuffix;
+ }
+ if (prefix != null) {
+ return "";
+ }
+ if (suffix != null) {
+ return suffix;
+ }
+ return "";
}
}
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java 2008-10-29 14:36:58 UTC (rev 10964)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/resources/EditorHTMLRenderer.java 2008-10-29 14:40:30 UTC (rev 10965)
@@ -138,9 +138,24 @@
* @return
*/
private String getFacesMappingSuffix(InternetResource resource) {
- WebXml w = WebXml.getInstance();
- String suffix = w.getFacesServletSuffix();
- return suffix;
+ WebXml webXml = WebXml.getInstance();
+ String suffix = webXml.getFacesServletSuffix();
+ String prefix = webXml.getFacesServletPrefix();
+ String filterPrefix = webXml.getFacesFilterPrefix();
+ String filterSuffix = webXml.getFacesFilterSuffix();
+ if (filterPrefix != null) {
+ return "";
+ }
+ if (filterSuffix != null) {
+ return filterSuffix;
+ }
+ if (prefix != null) {
+ return "";
+ }
+ if (suffix != null) {
+ return suffix;
+ }
+ return "";
}
/**
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-29 14:36:58 UTC (rev 10964)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-29 14:40:30 UTC (rev 10965)
@@ -15,13 +15,14 @@
obj.richfacesComponent="richfaces:editor";
this["rich:destructor"] = "destruct";
- Richfaces.Editor.extSuffix = params.suffix;
+ Richfaces.Editor.extSuffix = params.extSuffix;
this.tinyMCE_editor = null;
this.onInitInstanceCallbackFunction = tinyparams.onInitInstanceCallback;
tinyMCE.init({
- mode: tinyparams.mode,
+ mode: 'exact',
+ elements: this.editorTextAreaId,
theme: tinyparams.theme,
init_instance_callback : this.onInitInstanceCallback.bind(this)
});
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-10-29 14:36:58 UTC (rev 10964)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-10-29 14:40:30 UTC (rev 10965)
@@ -13,8 +13,8 @@
<f:clientid var="clientId"/>
<h:styles>css/editor.xcss</h:styles>
<h:scripts>new org.ajax4jsf.javascript.AjaxScript(), new org.ajax4jsf.javascript.PrototypeScript(), scripts/editor.js, scripts/tiny_mce/tiny_mce_src.js</h:scripts>
- <div id="#{clientId}" x:passThruWithExclusions="id,value"
- class="rich-editor">
+ <div id="#{clientId}" x:passThruWithExclusions="id,value,styleClass,class"
+ class="rich-editor #{component.attributes['styleClass']}" style="#{component.attributes['style']}">
<textarea id="#{clientId}TextArea" name='#{clientId}TextArea'
style="width: #{component.attributes['width']}px; height: #{component.attributes['height']}px; visibility: hidden">
@@ -23,7 +23,6 @@
<script type="text/javascript">
new RichEditor('#{clientId}', {extSuffix:'#{this:getFacesMappingSuffix(context)}'}, {
- mode: '#{component.attributes["mode"]}',
theme: '#{component.attributes["theme"]}'}
);
</script>
16 years, 2 months
JBoss Rich Faces SVN: r10964 - in trunk/test-applications/seleniumTest/richfaces/src: main/resources/script and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-10-29 10:36:58 -0400 (Wed, 29 Oct 2008)
New Revision: 10964
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/script/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/script/selenium/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/script/selenium/user-extensions.js
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
keyboard navigation works for component
Added: trunk/test-applications/seleniumTest/richfaces/src/main/resources/script/selenium/user-extensions.js
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/script/selenium/user-extensions.js (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/script/selenium/user-extensions.js 2008-10-29 14:36:58 UTC (rev 10964)
@@ -0,0 +1,49 @@
+IEBrowserBot.prototype._fireEventOnElement = function(eventType, element, clientX, clientY) {
+ var win = this.getCurrentWindow();
+ triggerEvent(element, 'focus', false);
+
+ var wasChecked = element.checked;
+
+ // Set a flag that records if the page will unload - this isn't always accurate, because
+ // <a href="javascript:alert('foo'):"> triggers the onbeforeunload event, even thought the page won't unload
+ var pageUnloading = false;
+ var pageUnloadDetector = function() {
+ pageUnloading = true;
+ };
+ win.attachEvent("onbeforeunload", pageUnloadDetector);
+ this._modifyElementTarget(element);
+ if (element[eventType] && !this.controlKeyDown && !this.altKeyDown && !this.shiftKeyDown && !this.metaKeyDown) {
+ element[eventType]();
+ }
+ else {
+ this.browserbot.triggerMouseEvent(element, eventType, true, clientX, clientY);
+ }
+
+
+ // If the page is going to unload - still attempt to fire any subsequent events.
+ // However, we can't guarantee that the page won't unload half way through, so we need to handle exceptions.
+ try {
+ win.detachEvent("onbeforeunload", pageUnloadDetector);
+
+ if (this._windowClosed(win)) {
+ return;
+ }
+
+ // Onchange event is not triggered automatically in IE.
+ if (isDefined(element.checked) && wasChecked != element.checked) {
+ triggerEvent(element, 'change', true);
+ }
+
+ }
+ catch (e) {
+ // If the page is unloading, we may get a "Permission denied" or "Unspecified error".
+ // Just ignore it, because the document may have unloaded.
+ if (pageUnloading) {
+ LOG.logHook = function() {
+ };
+ LOG.warn("Caught exception when firing events on unloading page: " + e.message);
+ return;
+ }
+ throw e;
+ }
+};
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-10-29 12:07:43 UTC (rev 10963)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-10-29 14:36:58 UTC (rev 10964)
@@ -21,6 +21,7 @@
package org.richfaces;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -115,6 +116,7 @@
public void startSeleniumServer() throws Exception {
RemoteControlConfiguration config = new RemoteControlConfiguration();
config.setMultiWindow(false);
+ config.setUserExtensions(new File(getClass().getClassLoader().getResource("script/selenium/user-extensions.js").toURI()));
seleniumServer = new SeleniumServer(false, config);
seleniumServer.start();
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-29 12:07:43 UTC (rev 10963)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-29 14:36:58 UTC (rev 10964)
@@ -111,6 +111,36 @@
}
/**
+ * keyboard navigation works for component
+ */
+ @Test
+ public void testHTMLKeyboardNavigation(Template template) {
+ init(template);
+ _selectItem(parentId + "ls:0", true, false);
+ _selectItem(parentId + "ls:1", true, false);
+ _selectItem(parentId + "ls:2", true, false);
+ _selectItem(parentId + "ls:4", true, false);
+ _selectItem(parentId + "ls:1", true, false);
+ clickById(copyId);
+ _assertTableRowsCount(targetListId, 3);
+ clickById(removeAllId);
+
+ _selectItem(parentId + "ls:1", false, false);
+ _selectItem(parentId + "ls:0", false, true);
+ clickById(copyId);
+ _assertTableRowsCount(targetListId, 3);
+ clickById(removeAllId);
+
+ _selectItem(parentId + "ls:0", false, false);
+ selenium.controlKeyDown();
+ selenium.keyDown("id=" + lsId + "focusKeeper", "A");
+ selenium.controlKeyUp();
+ clickById(copyId);
+ _assertTableRowsCount(targetListId, 5);
+ clickById(removeAllId);
+ }
+
+ /**
* style and classes, standard HTML attributes are output to client
*/
@Test
@@ -144,14 +174,14 @@
_assertTableRowsCount(sourceSelectionTableId, 0);
_assertTableRowsCount(targetSelectionTableId, 0);
- _selectItem(parentId + "ls:0", true);
- _selectItem(parentId + "ls:2", true);
+ _selectItem(parentId + "ls:0", true, false);
+ _selectItem(parentId + "ls:2", true, false);
clickById(copyId);
- _selectItem(parentId + "ls:1", true);
- _selectItem(parentId + "ls:3", true);
- _selectItem(parentId + "ls:0", true);
+ _selectItem(parentId + "ls:1", true, false);
+ _selectItem(parentId + "ls:3", true, false);
+ _selectItem(parentId + "ls:0", true, false);
clickAjaxCommandAndWait(submitId);
@@ -520,10 +550,22 @@
}
}
- private void _selectItem(String itemId, boolean ctrl) {
+ private void _selectItem(String itemId, boolean ctrl, boolean shift) {
writeStatus("Select item id: " + itemId);
try {
- fireMouseEvent(itemId, "click", 0, 0, ctrl);
+ if (ctrl) {
+ selenium.controlKeyDown();
+ }
+ if (shift) {
+ selenium.shiftKeyDown();
+ }
+ selenium.click("id=" + itemId);
+ if (ctrl) {
+ selenium.controlKeyUp();
+ }
+ if (shift) {
+ selenium.shiftKeyUp();
+ }
} catch (Exception e) {
writeStatus("Selection item id: " + itemId + " failed.");
Assert.fail("No item was found. Item id: " + itemId + e);
@@ -531,7 +573,7 @@
}
private void _selectItem(String itemId) {
- _selectItem(itemId, false);
+ _selectItem(itemId, false, false);
}
private void _checkItemText(String text, String listId, int i) {
16 years, 2 months
JBoss Rich Faces SVN: r10963 - in trunk/sandbox/ui/editor/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-10-29 08:07:43 -0400 (Wed, 29 Oct 2008)
New Revision: 10963
Modified:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/css/editor.xcss
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/css/editor.xcss
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/css/editor.xcss 2008-10-29 10:34:56 UTC (rev 10962)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/css/editor.xcss 2008-10-29 12:07:43 UTC (rev 10963)
@@ -11,9 +11,4 @@
</f:verbatim>
- <u:selector name=".rich-editor">
- <u:style name="background-color" skin="generalBackgroundColor" />
- <u:style name="border-color" skin="panelBorderColor" />
- </u:selector>
-
</f:template>
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-29 10:34:56 UTC (rev 10962)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-29 12:07:43 UTC (rev 10963)
@@ -1,7 +1,7 @@
if (!window.Richfaces) window.Richfaces = {};
Richfaces.Editor = {};
Richfaces.Editor.REGEXP_CSS = /(\/tiny_mce\/(?:themes|plugins)\/[\w\.\\\/]*[\w\.]+\.)(c|C)[sS]{2}$/;
-Richfaces.Editor.extSuffix = ".jsf";
+Richfaces.Editor.extSuffix = "";
RichEditor = Class.create();
Object.extend(RichEditor.prototype, {
@@ -18,11 +18,11 @@
Richfaces.Editor.extSuffix = params.suffix;
this.tinyMCE_editor = null;
- this.onInitInstanceCallback = tinyparams.onInitInstanceCallback;
+ this.onInitInstanceCallbackFunction = tinyparams.onInitInstanceCallback;
tinyMCE.init({
- mode: this.tinyparams.mode,
- theme: this.tinyparams.theme,
+ mode: tinyparams.mode,
+ theme: tinyparams.theme,
init_instance_callback : this.onInitInstanceCallback.bind(this)
});
@@ -34,8 +34,10 @@
A4J.AJAX.removeListener(this.onBeforeAjaxListener);
if(isAjax){
- this.tinyMCE_editor.remove();
+ this.tinyMCE_editor.remove();
}
+ this.onInitInstanceCallbackFunction = null;
+ this.tinyMCE_editor = null;
},
onBeforeAjax: function() {
@@ -44,7 +46,7 @@
onInitInstanceCallback: function(inst) {
this.tinyMCE_editor = tinyMCE.get(this.editorTextAreaId);
- if (this.onInitInstanceCallback) this.onInitInstanceCallback.call(this, inst);
+ if (this.onInitInstanceCallbackFunction) this.onInitInstanceCallbackFunction.call(this, inst);
}
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-10-29 10:34:56 UTC (rev 10962)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-10-29 12:07:43 UTC (rev 10963)
@@ -21,7 +21,7 @@
#{this:getFormattedComponentStringValue(context, component)}
</textarea>
- <script type="text/javascript">
+ <script type="text/javascript">
new RichEditor('#{clientId}', {extSuffix:'#{this:getFacesMappingSuffix(context)}'}, {
mode: '#{component.attributes["mode"]}',
theme: '#{component.attributes["theme"]}'}
16 years, 2 months
JBoss Rich Faces SVN: r10962 - trunk/test-applications/auto-jsp/src/main/java/util/parser.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-10-29 06:34:56 -0400 (Wed, 29 Oct 2008)
New Revision: 10962
Modified:
trunk/test-applications/auto-jsp/src/main/java/util/parser/AttributesList.java
Log:
getGeneralAttributes
Modified: trunk/test-applications/auto-jsp/src/main/java/util/parser/AttributesList.java
===================================================================
--- trunk/test-applications/auto-jsp/src/main/java/util/parser/AttributesList.java 2008-10-29 10:18:42 UTC (rev 10961)
+++ trunk/test-applications/auto-jsp/src/main/java/util/parser/AttributesList.java 2008-10-29 10:34:56 UTC (rev 10962)
@@ -65,7 +65,7 @@
return result;
}
- public ArrayList<Attribute> getCommonAttributes(){
+ public ArrayList<Attribute> getGeneralAttributes(){
ArrayList<Attribute> result = new ArrayList<Attribute>();
for(Attribute attr:this){
if(!(attr.getName().startsWith("on") || (attr.getName().indexOf("tyle") != -1) || (attr.getName().indexOf("lass") != -1))){
16 years, 2 months
JBoss Rich Faces SVN: r10961 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/contextMenu and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-29 06:18:42 -0400 (Wed, 29 Oct 2008)
New Revision: 10961
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
Log:
RF-4766
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java 2008-10-28 18:45:15 UTC (rev 10960)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ContextMenuTestBean.java 2008-10-29 10:18:42 UTC (rev 10961)
@@ -28,6 +28,7 @@
private String value;
private int value2;
+
public ContextMenuTestBean() {
value = "";
value2 = 0;
@@ -61,5 +62,14 @@
public void setValue2(int value2) {
this.value2 = value2;
}
+
+ public String getMessage3() {
+ return "Menu3";
+ }
+
+ public String getMessage4() {
+ return "Menu4";
+ }
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-10-28 18:45:15 UTC (rev 10960)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-10-29 10:18:42 UTC (rev 10961)
@@ -28,31 +28,89 @@
public class ContextMenuTest extends SeleniumTestBase {
+ static final String FORMID = "_form:";
+ static final String UNATTACHED_CONTEXTMENU = "contextMenu";
+ String linkShowId;
+ String linkHideId;
+ String componentControlShowLinkId;
+ String componentControlHideLinkId;
+ String contextMenuId;
+ String autoCreatedId;
+ String contextMenuBody;
+ void initIds(String parentId, String contextMenuId) {
+ parentId = getParentId() + FORMID;
+ linkShowId = "showMenu";
+ linkHideId = "hideMenu";
+ componentControlShowLinkId = parentId + linkShowId;
+ componentControlHideLinkId = parentId + linkHideId;
+ contextMenuId = parentId + contextMenuId;
+ autoCreatedId = contextMenuId + ":_auto_created";
+ contextMenuBody = contextMenuId + "_menu";
+ }
+
+
@Test
public void testContextMenuStandAlone(Template template) {
renderPage(template);
- String parentId = getParentId() + "_form:";
- String contextMenuId = parentId + "contextMenu";
- String menuItemId = parentId + "item1";
- String autoCreatedId = contextMenuId + ":_auto_created";
+ initIds(getParentId(), UNATTACHED_CONTEXTMENU);
- String linkId = "showMenu";
+ String menuItemId = getParentId() + FORMID + "item2";
+
+ AssertNotPresent(menuItemId, "Context menu should be hidden");
+ AssertNotPresent(autoCreatedId, "Context menu should be hidden");
+
+ clickById(linkShowId);
+
+ AssertPresent(menuItemId, "Context menu has not been shown");
+ AssertPresent(autoCreatedId, "Context menu has not been shown");
+ AssertTextEquals(menuItemId, "Menu2", "Context menu displays incorrect.");
+
+ clickById(linkHideId);
+
+ AssertNotVisible(contextMenuBody, "Context menu has not been hidden");
+ }
+
+ @Test
+ public void testComponentControlManagement(Template template) {
+ renderPage(template);
+ initIds(getParentId(), UNATTACHED_CONTEXTMENU);
+
+ String menuItemId = getParentId() + FORMID + "item2";
+
AssertNotPresent(menuItemId, "Context menu should be hidden");
AssertNotPresent(autoCreatedId, "Context menu should be hidden");
- clickById(linkId);
+ clickById(componentControlShowLinkId);
AssertPresent(menuItemId, "Context menu has not been shown");
AssertPresent(autoCreatedId, "Context menu has not been shown");
- AssertTextEquals(menuItemId, "Menu1", "Context menu displays incorrect.");
+ AssertTextEquals(menuItemId, "Menu2", "Context menu displays incorrect.");
- menuItemId = parentId + "item2";
- AssertTextEquals(menuItemId, "Menu2", "Macrosubstitution does not work.");
+ clickById(componentControlHideLinkId);
+ AssertNotVisible(contextMenuBody, "Context menu has not been hidden");
}
+
+ @Test
+ public void testMacrodefinitions(Template template) {
+ renderPage(template);
+ initIds(getParentId(), UNATTACHED_CONTEXTMENU);
+ String menuItemId = getParentId() + FORMID + "item1";
+
+ clickById(linkShowId);
+
+ AssertTextEquals(menuItemId, "Menu1", "Macrosubstitution does not work.");
+
+ clickById(componentControlShowLinkId);
+ menuItemId = getParentId() + FORMID + "item3";
+ AssertTextEquals(menuItemId, "Menu3", "Macrosubstitution does not work.");
+ menuItemId = getParentId() + FORMID + "item4";
+ AssertTextEquals(menuItemId, "Menu4", "Macrosubstitution does not work.");
+
+ }
//@Test
public void testContextMenuComponent(Template template) {
16 years, 2 months
JBoss Rich Faces SVN: r10960 - in management/design: jsf2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-10-28 14:45:15 -0400 (Tue, 28 Oct 2008)
New Revision: 10960
Added:
management/design/jsf2.0/
management/design/jsf2.0/tasks.odt
Log:
JSF 2.0 tasks document
Added: management/design/jsf2.0/tasks.odt
===================================================================
(Binary files differ)
Property changes on: management/design/jsf2.0/tasks.odt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 2 months
JBoss Rich Faces SVN: r10959 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-10-28 13:04:54 -0400 (Tue, 28 Oct 2008)
New Revision: 10959
Modified:
trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml
Log:
RF-4216: AjaxKeepAlive is not a component
Modified: trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml 2008-10-28 17:04:11 UTC (rev 10958)
+++ trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml 2008-10-28 17:04:54 UTC (rev 10959)
@@ -31,7 +31,7 @@
</tgroup>
</table>
- <section id="a4jkalpagetag" role="updated">
+ <section id="a4jkalpagetag" role="updated">
<title>Using the tag on a Page</title>
<para>To create the simplest variant on a page use the following syntax:</para>
@@ -40,10 +40,15 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[<a4j:keepAlive beanName = "testBean"/>]]></programlisting>
- <para>Note, that to be put into the request scope the pointed bean should be registered inside faces-config.xml file and marked with <property>org.ajax4jsf.model.KeepAlive</property> annotation.
+ <para>Note, that to be put into the request scope the pointed bean should be
+ registered inside faces-config.xml file and marked with
+ <property>org.ajax4jsf.model.KeepAlive</property>
+ annotation. </para>
+ <para>
+ A bean instance in the request scope could also be saved directly through the declaration of <code>@KeepAlive</code> annotation inside the bean.
</para>
</section>
-
+
<!-- There's no AjaxKeepAlive component nor AjaxKeepAlive class and it cannot be created programmatically and there's no need for that.
<section>
@@ -57,7 +62,7 @@
...]]></programlisting>
</section>
-->
-
+
<section>
<title>Key attributes and ways of usage</title>
<para> If a managed bean is declared with <property>request</property> scope in
16 years, 2 months
JBoss Rich Faces SVN: r10958 - trunk/ui/tree/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-10-28 13:04:11 -0400 (Tue, 28 Oct 2008)
New Revision: 10958
Modified:
trunk/ui/tree/src/main/config/component/commonTreeListeners.ent
Log:
RF-4215:Wrong binding type for tree listeners
Modified: trunk/ui/tree/src/main/config/component/commonTreeListeners.ent
===================================================================
--- trunk/ui/tree/src/main/config/component/commonTreeListeners.ent 2008-10-28 16:39:23 UTC (rev 10957)
+++ trunk/ui/tree/src/main/config/component/commonTreeListeners.ent 2008-10-28 17:04:11 UTC (rev 10958)
@@ -2,6 +2,7 @@
<name>dropListener</name>
<property existintag="true" exist="true" el="true" elonly="true">
<name>binding</name>
+
<classname>org.richfaces.dropListener</classname>
<description>The attribute takes a value-binding expression for a component property of
a backing bean</description>
@@ -26,7 +27,7 @@
<name>dragListener</name>
<property existintag="true" exist="true" el="true" elonly="true">
<name>binding</name>
- <classname>javax.faces.component.UIComponent</classname>
+ <classname>org.richfaces.dragListener</classname>
<description>The attribute takes a value-binding expression for a component property of
a backing bean</description>
</property>
@@ -51,7 +52,7 @@
<name>changeExpandListener</name>
<property existintag="true" exist="true" el="true" elonly="true">
<name>binding</name>
- <classname>javax.faces.component.UIComponent</classname>
+ <classname>org.richfaces.changeExpandListener</classname>
<description>The attribute takes a value-binding expression for a component property of
a backing bean</description>
</property>
@@ -79,7 +80,7 @@
<name>nodeSelectListener</name>
<property existintag="true" exist="true" el="true" elonly="true">
<name>binding</name>
- <classname>javax.faces.component.UIComponent</classname>
+ <classname>org.richfaces.nodeSelectListener</classname>
<description>The attribute takes a value-binding expression for a component property of
a backing bean</description>
</property>
16 years, 2 months
JBoss Rich Faces SVN: r10957 - Plan and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-10-28 12:39:23 -0400 (Tue, 28 Oct 2008)
New Revision: 10957
Modified:
trunk/test-applications/qa/Test Plan/AutomatedAttributesTestApp.doc
Log:
Modified: trunk/test-applications/qa/Test Plan/AutomatedAttributesTestApp.doc
===================================================================
(Binary files differ)
16 years, 2 months
JBoss Rich Faces SVN: r10956 - trunk/test-applications/auto-jsp/src/main/webapp/Combobox.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-10-28 12:31:13 -0400 (Tue, 28 Oct 2008)
New Revision: 10956
Modified:
trunk/test-applications/auto-jsp/src/main/webapp/Combobox/Combobox.jsp
trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxDefault.jsp
trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxProperty.jsp
Log:
Add validator check test
Modified: trunk/test-applications/auto-jsp/src/main/webapp/Combobox/Combobox.jsp
===================================================================
--- trunk/test-applications/auto-jsp/src/main/webapp/Combobox/Combobox.jsp 2008-10-28 16:30:37 UTC (rev 10955)
+++ trunk/test-applications/auto-jsp/src/main/webapp/Combobox/Combobox.jsp 2008-10-28 16:31:13 UTC (rev 10956)
@@ -1,57 +1,61 @@
-<%@ 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="comboboxSubviewID">
- <h:inputText value="For test tabbing tabindex = 3" tabindex="3" size="30"></h:inputText> <br/>
+ <h:inputText value="For test tabbing tabindex = 3" tabindex="3"
+ size="30"></h:inputText>
+ <br />
- <rich:comboBox id="comboboxID" disabled="#{combobox.disabled}" defaultLabel="#{combobox.defaultLabel}"
- buttonClass="#{style.buttonClass}"
- buttonDisabledClass="#{style.buttonDisabledClass}"
- buttonDisabledStyle="#{style.buttonDisabledStyle}"
- buttonInactiveClass="#{style.buttonInactiveClass}"
- buttonInactiveStyle="#{style.buttonInactiveStyle}"
- buttonStyle="#{style.buttonStyle}"
- inputClass="#{style.inputClass}"
- inputDisabledClass="#{style.inputDisabledClass}"
- inputDisabledStyle="#{style.inputDisabledStyle}"
- inputInactiveClass="#{style.inputInactiveClass}"
- inputInactiveStyle="#{style.inputInactiveStyle}"
- itemClass="#{style.itemClass}"
- inputStyle="#{style.inputStyle}"
- listClass="#{style.listClass}"
- listStyle="#{style.listStyle}"
- filterNewValues="#{combobox.filterNewValues}"
- directInputSuggestions="#{combobox.directInputSuggestions}" immediate="#{combobox.immediate}"
- width="#{combobox.width}" valueChangeListener="#{combobox.valueChangeListener}"
- tabindex="#{combobox.tabindex}" suggestionValues="#{combobox.suggestionValues}"
- required="#{combobox.required}" requiredMessage="#{combobox.requiredMessage}"
- rendered="#{combobox.rendered}" selectFirstOnUpdate="#{combobox.selectFirstOnUpdate}"
- enableManualInput="#{combobox.enableManualInput}" listHeight="#{combobox.listHeight}" listWidth="#{combobox.listWidth}" style="#{style.style}" styleClass="#{style.styleClass}"
- onblur="#{event.onblur}"
- onchange="#{event.onchange}"
- onclick="#{event.onclick}"
- ondblclick="#{event.ondblclick}"
- onfocus="#{event.onfocus}"
- onkeydown="#{event.onkeydown}"
- onkeypress="#{event.onkeypress}"
- onkeyup="#{event.onkeyup}"
- onlistcall="#{event.onlistcall}"
- onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}"
- onmouseout="#{event.onmouseout}"
- onmouseover="#{event.onmouseover}"
- onmouseup="#{event.onmouseup}"
- onselect="#{event.onselect}"
- binding="#{combobox.htmlComboBox}"
- align="#{combobox.align}" >
- <f:selectItem itemValue="Gosha"/>
- <f:selectItem itemValue="DubSer_1"/>
- <f:selectItem itemValue="DubSer_2"/>
- </rich:comboBox>
-
- <a4j:commandButton value="reRender" reRender="comboboxID"></a4j:commandButton>
-
+ <rich:comboBox id="comboboxID" disabled="#{combobox.disabled}"
+ defaultLabel="#{combobox.defaultLabel}"
+ buttonClass="#{style.buttonClass}"
+ buttonDisabledClass="#{style.buttonDisabledClass}"
+ buttonDisabledStyle="#{style.buttonDisabledStyle}"
+ buttonInactiveClass="#{style.buttonInactiveClass}"
+ buttonInactiveStyle="#{style.buttonInactiveStyle}"
+ buttonStyle="#{style.buttonStyle}" inputClass="#{style.inputClass}"
+ inputDisabledClass="#{style.inputDisabledClass}"
+ inputDisabledStyle="#{style.inputDisabledStyle}"
+ inputInactiveClass="#{style.inputInactiveClass}"
+ inputInactiveStyle="#{style.inputInactiveStyle}"
+ itemClass="#{style.itemClass}" inputStyle="#{style.inputStyle}"
+ listClass="#{style.listClass}" listStyle="#{style.listStyle}"
+ filterNewValues="#{combobox.filterNewValues}"
+ directInputSuggestions="#{combobox.directInputSuggestions}"
+ immediate="#{combobox.immediate}" width="#{combobox.width}"
+ valueChangeListener="#{combobox.valueChangeListener}"
+ tabindex="#{combobox.tabindex}"
+ suggestionValues="#{combobox.suggestionValues}"
+ required="#{combobox.required}"
+ requiredMessage="#{combobox.requiredMessage}"
+ rendered="#{combobox.rendered}"
+ selectFirstOnUpdate="#{combobox.selectFirstOnUpdate}"
+ enableManualInput="#{combobox.enableManualInput}"
+ listHeight="#{combobox.listHeight}" listWidth="#{combobox.listWidth}"
+ style="#{style.style}" styleClass="#{style.styleClass}"
+ onblur="#{event.onblur}" onchange="#{event.onchange}"
+ onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
+ onfocus="#{event.onfocus}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onlistcall="#{event.onlistcall}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
+ onselect="#{event.onselect}" binding="#{combobox.htmlComboBox}"
+ align="#{combobox.align}" validator="#{combobox.validate}"
+ validatorMessage="#{combobox.validatorMessage}">
+
+ <f:selectItem itemValue="Gosha" />
+ <f:selectItem itemValue="DubSer_1" />
+ <f:selectItem itemValue="DubSer_2" />
+ </rich:comboBox>
+
+ <h:panelGrid id="panel" columns="3" border="1">
+ <a4j:commandButton value="validate" action="#{combobox.validatorCheck}" reRender="comboboxID, panel" />
+ <h:outputText value="status: #{combobox.statusValidator}" />
+ <h:outputText value="phase: #{combobox.phaseValidator}" />
+ </h:panelGrid>
+
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxDefault.jsp
===================================================================
--- trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxDefault.jsp 2008-10-28 16:30:37 UTC (rev 10955)
+++ trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxDefault.jsp 2008-10-28 16:31:13 UTC (rev 10956)
@@ -3,10 +3,3 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
- <rich:comboBox>
- <f:selectItem itemValue="item 1"/>
- <f:selectItem itemValue="item 2"/>
- <f:selectItem itemValue="item 3"/>
- <f:selectItem itemValue="item 4"/>
- <f:selectItem itemValue="item 5"/>
- </rich:comboBox>
Modified: trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxProperty.jsp
===================================================================
--- trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxProperty.jsp 2008-10-28 16:30:37 UTC (rev 10955)
+++ trunk/test-applications/auto-jsp/src/main/webapp/Combobox/ComboboxProperty.jsp 2008-10-28 16:31:13 UTC (rev 10956)
@@ -77,6 +77,7 @@
<rich:componentControl attachTo="disableID" event="onclick" for="comboboxID" operation="disable"></rich:componentControl>
<br/>
<br/>
+ <%--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -85,5 +86,6 @@
<rich:column id="findID">
<h:outputText value="#{rich:findComponent('comboboxID').value}" />
</rich:column>
- </h:panelGrid>
+ </h:panelGrid>
+ --%>
</f:subview>
\ No newline at end of file
16 years, 2 months