JBoss Rich Faces SVN: r11743 - in trunk/samples/richfaces-demo/src/main: webapp/richfaces/editor/examples and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-12 10:12:45 -0500 (Fri, 12 Dec 2008)
New Revision: 11743
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml
trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js
Log:
queue demo updated
editor seam usage support demo started.
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java 2008-12-12 15:04:06 UTC (rev 11742)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java 2008-12-12 15:12:45 UTC (rev 11743)
@@ -11,6 +11,7 @@
private String viewMode = "visual";
private String value;
private boolean liveUpdatesEnabled=false;
+ private boolean useSeamText=false;
private static final String CONFIGS_PACKAGE = "/org/richfaces/demo/editor/";
List<SelectItem> configurations = new ArrayList<SelectItem>();
@@ -55,6 +56,14 @@
public void setLiveUpdatesEnabled(boolean liveUpdatesEnabled) {
this.liveUpdatesEnabled = liveUpdatesEnabled;
}
+
+ public boolean isUseSeamText() {
+ return useSeamText;
+ }
+
+ public void setUseSeamText(boolean useSeamText) {
+ this.useSeamText = useSeamText;
+ }
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml 2008-12-12 15:04:06 UTC (rev 11742)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml 2008-12-12 15:12:45 UTC (rev 11743)
@@ -8,6 +8,10 @@
.column{
width:50%;
vertical-align:top;
+ }
+ .pbody{
+ height:200px;
+ overflow:auto;
}
</style>
<h:form>
@@ -34,6 +38,10 @@
</h:selectOneRadio>
<h:outputText value="Toggle Preview: " />
<h:selectBooleanCheckbox value="#{editorBean.liveUpdatesEnabled}" >
+ <a4j:support event="onchange" reRender="result"/>
+ </h:selectBooleanCheckbox>
+ <h:outputText value="Use Seam Text Format:"/>
+ <h:selectBooleanCheckbox value="#{editorBean.useSeamText}" >
<a4j:support event="onchange" reRender="editor, result"/>
</h:selectBooleanCheckbox>
</h:panelGrid>
@@ -41,7 +49,7 @@
</h:panelGrid>
<a4j:outputPanel layout="block" id="result">
- <rich:panel rendered="#{editorBean.liveUpdatesEnabled}">
+ <rich:panel rendered="#{editorBean.liveUpdatesEnabled}" bodyClass="pbody">
<f:facet name="header">
<h:outputText value="Preview"/>
</f:facet>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml 2008-12-12 15:04:06 UTC (rev 11742)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml 2008-12-12 15:12:45 UTC (rev 11743)
@@ -8,7 +8,7 @@
<a4j:loadScript src="/scripts/queueUi.js"/>
<a4j:loadStyle src="/css/queueStylesheet.js"/>
<h:form id="form1" prependId="false">
- <a4j:queue />
+ <a4j:queue requestDelay="1000" ignoreDupResponce="true"/>
<h:panelGrid columns="2" cellspacing="5">
<h:panelGrid id="board1" columns="6" border="1">
@@ -22,7 +22,7 @@
style="height:50px;width:50px;"
onclick="buttonpush('_#{i}');"
oncomplete="buttonpop('_#{i}');"
- actionListener="#{mojarraBean.process}" />
+ actionListener="#{mojarraBean.process}" value="submit"/>
<h:panelGrid cellpadding="5">
<h:outputText value="#{i}" style="font-weight:bold"/>
</h:panelGrid>
Modified: trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js 2008-12-12 15:04:06 UTC (rev 11742)
+++ trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js 2008-12-12 15:12:45 UTC (rev 11743)
@@ -1,16 +1,25 @@
var disabledImage = 'queue/examples/resources/button3.gif';
var enabledImage = 'queue/examples/resources/button2.gif';
+var lastButtonActivated;
+var lastButtonCounter;
function buttonpush(buttonName) {
var button = document.getElementById(buttonName);
- if (!button.disabled) {
+ var txt = document.createTextNode(buttonName);
+ if (button.value=='submit') {
button.src = disabledImage;
- button.disabled = true;
+ button.value = 'progress';
}
- var txt = document.createTextNode(buttonName);
- addCell(txt);
+ if ((typeof lastButtonActivated=='undefined')||(lastButtonActivated.nodeValue != txt.nodeValue)){
+ lastButtonActivated=txt;
+ lastButtonCounter=1;
+ addCell(txt);
+ }
+ else{
+ changeCounterInCell(txt,++lastButtonCounter);
+ }
}
-
+
function buttonpop(buttonName) {
var txt = document.createTextNode(buttonName);
removeCell(txt);
@@ -19,20 +28,29 @@
function addCell(cellData) {
var cell = document.getElementById("tr1").insertCell(0);
cell.setAttribute("height", "50px");
- cell.setAttribute("width", "50px");
- cell.innerHTML = cellData.nodeValue;
+ cell.setAttribute("width", "50px");
+ cell.innerHTML = cellData.nodeValue + '(1)';
cell.className = "queueCell";
}
+function changeCounterInCell(cellData, counter){
+ var row = document.getElementById("tr1");
+ var cells = row.getElementsByTagName("td");
+ cells[0].innerHTML=cellData.nodeValue + '(' + counter + ')';
+}
function removeCell(cellData) {
var row = document.getElementById("tr1");
var cells = row.getElementsByTagName("td");
+ if (cells.length==1) {
+ lastButtonActivated=undefined;
+ lastButtonCounter=undefined;
+ }
if (typeof cells != 'undefined' || cells != null) {
for (var i=0; i<cells.length; i++) {
- if (cells[i].firstChild.nodeValue == cellData.nodeValue) {
+ if (cells[i].firstChild.nodeValue.indexOf(cellData.nodeValue)==0) {
row.deleteCell(i);
var button = document.getElementById(cellData.nodeValue);
- button.disabled = false;
+ button.value = 'submit';
button.src = enabledImage;
break;
}
16 years, 1 month
JBoss Rich Faces SVN: r11742 - trunk/ui/beanValidator/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-12 10:04:06 -0500 (Fri, 12 Dec 2008)
New Revision: 11742
Modified:
trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
Log:
RF-3903: Describing attributes for <rich:graphValidator> and editing images
Modified: trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-12-12 15:02:32 UTC (rev 11741)
+++ trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-12-12 15:04:06 UTC (rev 11742)
@@ -2,6 +2,8 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
<components>
+
+<!--AJAX VALIDATOR-->
<component>
<name>org.richfaces.BeanValidator</name>
<family>org.richfaces.BeanValidator</family>
@@ -91,6 +93,9 @@
<name>submitted</name>
</property>
</component>
+
+
+ <!--GRAPH VALIDATOR-->
<component>
<name>org.richfaces.GraphValidator</name>
<family>org.richfaces.GraphValidator</family>
@@ -118,7 +123,34 @@
<property hidden="true">
<name>rendered</name>
</property>
+
+ <property >
+ <name>profile</name>
+
+ <description>
+ This attribute is reserved till the implementation of JavaBean Validation feature (JSR-303).
+ </description>
+ </property>
+
+ <property exist="true">
+ <name>summary</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Summary message for a validation errors.
+ </description>
+ </property>
+
+ <property exist="true">
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>
+ The current value for this component.
+ </description>
+ </property>
</component>
+
+
+ <!--BEAN VALIDATOR-->
<validator generate="false">
<id>org.richfaces.BeanValidator</id>
<classname>
16 years, 1 month
JBoss Rich Faces SVN: r11741 - trunk/ui/editor/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-12 10:02:32 -0500 (Fri, 12 Dec 2008)
New Revision: 11741
Modified:
trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-5325
Modified: trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-12-12 14:59:27 UTC (rev 11740)
+++ trunk/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-12-12 15:02:32 UTC (rev 11741)
@@ -331,7 +331,7 @@
}
if (component.getOnsave() != null && component.getOnsave().length() > 0) {
writer.writeText(
- "tinyMceParams.save_callback = function (event, element_id, html, body) {\n"
+ "tinyMceParams.save_callback = function (event, element_id, html, body) {\n return "
+ component.getOnsave() + "\n" + "};\n", null);
}
if (component.getOnchange() != null
16 years, 1 month
JBoss Rich Faces SVN: r11740 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-12 09:59:27 -0500 (Fri, 12 Dec 2008)
New Revision: 11740
Modified:
trunk/docs/userguide/en/src/main/resources/images/graphValidator11.png
trunk/docs/userguide/en/src/main/resources/images/graphValidator12.png
Log:
RF-3903: Describing attributes for <rich:graphValidator> and editing images
Modified: trunk/docs/userguide/en/src/main/resources/images/graphValidator11.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/graphValidator12.png
===================================================================
(Binary files differ)
16 years, 1 month
JBoss Rich Faces SVN: r11739 - in trunk/ui: editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-12 09:58:14 -0500 (Fri, 12 Dec 2008)
New Revision: 11739
Modified:
trunk/ui/assembly/pom.xml
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
Log:
https://jira.jboss.org/jira/browse/RF-5058
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2008-12-12 14:54:12 UTC (rev 11738)
+++ trunk/ui/assembly/pom.xml 2008-12-12 14:58:14 UTC (rev 11739)
@@ -203,6 +203,13 @@
${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/common-scrollable-data-table-min.js
</include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/editor-min.js
+ </include>
+
<include>**/*-min.js</include>
</includes>
<!-- files to exclude, path relative to output's directory -->
@@ -215,15 +222,10 @@
-->
<!-- rich:editor configuration -->
+
<exclude>**/tiny_mce/**</exclude>
- <exclude>**/editor-min.js</exclude>
+ <!--exclude>**/editor-min.js</exclude-->
- <!-- include>
- ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src-min.js
- </include>
- <include>
- ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/editor-min.js
- </include -->
<!-- -->
<exclude>**/scriptaculo*</exclude>
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-12-12 14:54:12 UTC (rev 11738)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-12-12 14:58:14 UTC (rev 11739)
@@ -42,14 +42,20 @@
}
function getBase(n) {
- if (n.src && /tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(n.src)) {
- if (/_(src|dev)\.js/g.test(n.src))
+
+ //RF: added by PY
+ var local_src = n.src.replace("/org/richfaces/ui.pack.js", "scripts/tiny_mce/tiny_mce_src.js");
+ //RF: end
+
+ //RF: changed "n.src" to "local_src" by PY
+ if (local_src && /tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(local_src)) {
+ if (/_(src|dev)\.js/g.test(local_src))
t.suffix = '_src';
- if ((p = n.src.indexOf('?')) != -1)
- t.query = n.src.substring(p + 1);
+ if ((p = local_src.indexOf('?')) != -1)
+ t.query = local_src.substring(p + 1);
- t.baseURL = n.src.substring(0, n.src.lastIndexOf('/'));
+ t.baseURL = local_src.substring(0, local_src.lastIndexOf('/'));
// If path to script is relative and a base href was found add that one infront
if (base && t.baseURL.indexOf('://') == -1)
@@ -57,6 +63,7 @@
return t.baseURL;
}
+ //RF: end
return null;
};
16 years, 1 month
JBoss Rich Faces SVN: r11738 - trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-12 09:54:12 -0500 (Fri, 12 Dec 2008)
New Revision: 11738
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml
Log:
RF-5197
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml 2008-12-12 14:36:33 UTC (rev 11737)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/testng/hudson/testng.xml 2008-12-12 14:54:12 UTC (rev 11738)
@@ -1,6 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="seleniumTestAANe">
- <test name="all_all_neko">
+ <!--test name="all_all_neko">
<parameter name="browser" value="*firefox"/>
<parameter name="loadStyleStrategy" value="ALL"/>
<parameter name="loadScriptStrategy" value="ALL"/>
@@ -8,7 +8,7 @@
<packages>
<package name="org.richfaces.testng" />
</packages>
- </test>
+ </test-->
<test name="all_all_none">
<parameter name="browser" value="*firefox"/>
<parameter name="loadStyleStrategy" value="ALL"/>
@@ -18,7 +18,7 @@
<package name="org.richfaces.testng" />
</packages>
</test>
- <test name="all_all_tidy">
+ <!--test name="all_all_tidy">
<parameter name="loadStyleStrategy" value="ALL"/>
<parameter name="loadScriptStrategy" value="ALL"/>
<parameter name="filterPrefix" value="/faces/TIDY/"/>
@@ -80,7 +80,7 @@
<packages>
<package name="org.richfaces.testng" />
</packages>
- </test>
+ </test-->
<test name="default_default_neko">
<parameter name="browser" value="*firefox"/>
<parameter name="loadStyleStrategy" value="DEFAULT"/>
16 years, 1 month
JBoss Rich Faces SVN: r11737 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/message and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-12 09:36:33 -0500 (Fri, 12 Dec 2008)
New Revision: 11737
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithGlobalOnlyAttribute.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5302
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-12 12:02:10 UTC (rev 11736)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-12 14:36:33 UTC (rev 11737)
@@ -11,6 +11,10 @@
private String string;
+ private String string2;
+
+ private String string3;
+
private Boolean rendered;
private Boolean showDetail;
@@ -25,12 +29,22 @@
public void init() {
string = "something";
+ string2 = "something2";
+ string3 = "something3";
rendered = true;
showDetail = true;
showSummary = false;
ajaxRendered = false;
}
+ public String addGlobalMessage() {
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_INFO, "globalMessageSummary",
+ "globalMessageDetail"));
+ return null;
+ }
+
public void validate(FacesContext context, UIComponent component,
Object value) throws ValidatorException {
Severity severity = null;
@@ -88,5 +102,33 @@
public Boolean getAjaxRendered() {
return ajaxRendered;
}
+
+ /**
+ * @return the string2
+ */
+ public String getString2() {
+ return string2;
+ }
+
+ /**
+ * @param string2 the string2 to set
+ */
+ public void setString2(String string2) {
+ this.string2 = string2;
+ }
+
+ /**
+ * @return the string3
+ */
+ public String getString3() {
+ return string3;
+ }
+
+ /**
+ * @param string3 the string3 to set
+ */
+ public void setString3(String string3) {
+ this.string3 = string3;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithGlobalOnlyAttribute.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithGlobalOnlyAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-12 12:02:10 UTC (rev 11736)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-12 14:36:33 UTC (rev 11737)
@@ -8,6 +8,7 @@
private static String TEST_MORE_THAN_ONE_MESSAGE = "pages/message/testMoreThanOneMessage.xhtml";
private static String TEST_MESSAGES_WITH_FOR_ATTRIBUTE = "pages/message/testMessagesWithForAttribute.xhtml";
+ private static String TEST_MESSAGES_GLOBAL_ONLY_ATTRIBUTE = "pages/message/testMessagesWithGlobalOnlyAttribute.xhtml";
@Override
protected void init(Template template) {
@@ -71,4 +72,33 @@
AssertNotPresent(mainForm + ":fatalMarker");
AssertNotPresent(mainForm + ":errorMarker");
}
+
+ @Test
+ public void testMessagesGlobalOnlyAttribute(Template template) {
+ init(template, TEST_MESSAGES_GLOBAL_ONLY_ATTRIBUTE);
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ AssertNotPresent(mainForm + ":warnMarker");
+ AssertNotPresent(mainForm + ":infoMarker");
+
+ clickAjaxCommandAndWait(mainForm + ":invalidate");
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ AssertNotPresent(mainForm + ":warnMarker");
+ AssertPresent(mainForm + ":infoMarker");
+ Assert.assertEquals("globalMessageSummary", selenium.getText("xpath=id('" + message + "')/dt[1]/span[2]"));
+
+ selenium.type(inputText, "fatal");
+ selenium.type(inputText + "2", "");
+ selenium.type(inputText + "3", "");
+
+ clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ AssertNotPresent(mainForm + ":warnMarker");
+ AssertNotPresent(mainForm + ":infoMarker");
+ }
}
16 years, 1 month
JBoss Rich Faces SVN: r11736 - trunk/cdk/generator/src/main/resources/META-INF/schema/entities.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-12 07:02:10 -0500 (Fri, 12 Dec 2008)
New Revision: 11736
Modified:
trunk/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent
Log:
RF-5219: dropSupport: typeMapping attribute have wrong description.
Modified: trunk/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent 2008-12-12 12:00:37 UTC (rev 11735)
+++ trunk/cdk/generator/src/main/resources/META-INF/schema/entities/dropzone_attributes.ent 2008-12-12 12:02:10 UTC (rev 11736)
@@ -7,7 +7,7 @@
<property>
<name>typeMapping</name>
<classname>java.lang.Object</classname>
- <description><![CDATA[Map between a draggable type and an indicator name on zone. it's defined with the pair (drag type:indicator name))]]></description>
+ <description><![CDATA[The attribute associates a type of dragable zone (dragType) with <rich:dndParam> defined for <rich:dropSupport> for passing parameter value to <rich:dragIndicator>. It uses JSON format: (drag_type: parameter_name).]]></description>
<!-- <defaultvalue><![CDATA[]]></defaultvalue> -->
</property>
<property>
16 years, 1 month
JBoss Rich Faces SVN: r11735 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-12 07:00:37 -0500 (Fri, 12 Dec 2008)
New Revision: 11735
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml
Log:
RF-5219: dropSupport: typeMapping attribute have wrong description.
Modified: trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml 2008-12-12 11:52:46 UTC (rev 11734)
+++ trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml 2008-12-12 12:00:37 UTC (rev 11735)
@@ -95,66 +95,68 @@
<section>
<title>Details of Usage</title>
- <para>
- As shown in the example, the key attribute for
- <emphasis role="bold">
- <property><rich:dropSupport></property>
- </emphasis>
- is
- <emphasis>
- <property>"acceptedTypes"</property>
- </emphasis>
- . This attribute defines the types of draggable items that
- can be dropped onto the designated drop zone.
+ <para>The key attribute for <emphasis role="bold"><property><rich:dropSupport></property></emphasis> is <emphasis><property>"acceptedTypes"</property></emphasis>.
+ It defines, which types of dragable items (zones) could be accepted by the current drop zone. Check the example below:
</para>
-
- <para>
- The second most important attribute for
- <emphasis role="bold">
- <property><rich:dropSupport></property>
- </emphasis>
- is
- <emphasis>
- <property>"typeMapping"</property>
- </emphasis>
- . This attribute maps a specific type among the acceptable
- types for draggable items to a specific
- <emphasis role="bold">
- <property><rich:dndParam></property>
- </emphasis>
- child element under
- <emphasis role="bold">
- <property><rich:dropSupport></property>
- </emphasis>
- .
- </para>
-
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="XML"><![CDATA[...
- <rich:dropSupport acceptedTypes="[iconsDragged, textDragged]" typeMapping="{iconsDragged: DropIcon}">
- <rich:dndParam name="DropIcon">
- <h:graphicImage value="/images/drop-icon.png"/>
- </rich:dndParam>
+ <programlisting role="XML"><![CDATA[...
+<rich:panel styleClass="dropTargetPanel">
+ <f:facet name="header">
+ <h:outputText value="PHP Frameworks" />
+ </f:facet>
+
+ <rich:dropSupport id="php" acceptedTypes="PHP" dropValue="PHP" dropListener="#{eventBean.processDrop}" reRender="phptable, src">
+ </rich:dropSupport>
+ ...
+</rich:panel>
...
]]></programlisting>
+ <para>and here is what happens on the page:</para>
+ <figure>
+ <title>Drop zone accepts dragable item with "PHP" type only</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropSupport1.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><emphasis><property>"typeMapping"</property></emphasis>. Previous example shows that a drop zone could accept a dragable item or not.
+ Special markers, which are placed at <emphasis role="bold"><property><rich:dragIndicator></property></emphasis>, inform user about drop zone’s possible behaviors:
+ "checkmark" appears if drop is accepted and "No stop" sign if it is not.
+ Moreover, some extra information (e.g. text message) could be put into the Indicator to reinforce the signal about drop zone’s behavior or pass some other additional sense.
+ This reinforcement could be programmed and attributed to drop zone via <emphasis><property>"typeMapping"</property></emphasis> attribute using JSON syntax.
+ The type of dragged zone (dragType) should be passed as "key" and name of <emphasis role="bold"><property><rich:dndParam></property></emphasis>
+ that gives needed message to Indicator as "value":
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:panel styleClass="dropTargetPanel">
+ <f:facet name="header">
+ <h:outputText value="PHP Frameworks" />
+ </f:facet>
+
+ <rich:dropSupport id="php" acceptedTypes="PHP" dropValue="PHP" dropListener="#{eventBean.processDrop}" reRender="phptable, src"
+ typeMapping="{PHP: text_for_accpet, DNET: text_for_rejection}">
+ <rich:dndParam name="text_for_accepting" value="Drop accepted!" />
+ <rich:dndParam name="text_for_rejecting" value="Drop is not accepted!" />
+ </rich:dropSupport>
+ ...
+</rich:panel>
+...
+]]></programlisting>
+ <para>What happens on the page:</para>
+ <figure>
+ <title>"typeMapping" helps to add some extra information to <rich:drag indicator> </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/dropSupport1a.png" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In examples above dropping a dragable item triggers the use a parameter in the event processing; Ajax request is sent and dropListener defined for the component is called.
+ </para>
<para>
- In this example, dropping a draggable item of an
- <emphasis>
- <property>"iconsDragged"</property>
- </emphasis>
- type will trigger the use a parameter named
- <code>"DropIcon"</code>
- in the event processing after a drop event. (Also, an Ajax
- request is sent, and the action and dropListener defined for
- the component are called.)
- </para>
-
- <para>
Here is an example of moving records between tables. The
example describes all the pieces for drag-and-drop. (To get
extra information on these components, read the sections for
16 years, 1 month
JBoss Rich Faces SVN: r11734 - in trunk/test-applications/jsp/src/main: webapp/pics and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-12 06:52:46 -0500 (Fri, 12 Dec 2008)
New Revision: 11734
Added:
trunk/test-applications/jsp/src/main/webapp/pics/1.gif
trunk/test-applications/jsp/src/main/webapp/pics/2.gif
trunk/test-applications/jsp/src/main/webapp/pics/3.gif
trunk/test-applications/jsp/src/main/webapp/pics/4.gif
Modified:
trunk/test-applications/jsp/src/main/java/tTree/PVisability.java
trunk/test-applications/jsp/src/main/java/tTree/TTree.java
trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp
trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp
trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp
Log:
+ some attributes to tTree
Modified: trunk/test-applications/jsp/src/main/java/tTree/PVisability.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/PVisability.java 2008-12-12 11:51:34 UTC (rev 11733)
+++ trunk/test-applications/jsp/src/main/java/tTree/PVisability.java 2008-12-12 11:52:46 UTC (rev 11734)
@@ -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/jsp/src/main/java/tTree/TTree.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/TTree.java 2008-12-12 11:51:34 UTC (rev 11733)
+++ trunk/test-applications/jsp/src/main/java/tTree/TTree.java 2008-12-12 11:52:46 UTC (rev 11734)
@@ -5,15 +5,29 @@
import java.util.Map;
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;
+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";
+ 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()
@@ -35,6 +49,79 @@
}
}
+ 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"))
+ 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) {
+ 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;
}
@@ -58,4 +145,52 @@
public void setTree(UITree tree) {
this.tree = tree;
}
+
+ 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;
+ }
+
+ 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;
+ }
}
Added: trunk/test-applications/jsp/src/main/webapp/pics/1.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/jsp/src/main/webapp/pics/1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/jsp/src/main/webapp/pics/2.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/jsp/src/main/webapp/pics/2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/jsp/src/main/webapp/pics/3.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/jsp/src/main/webapp/pics/3.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/jsp/src/main/webapp/pics/4.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/jsp/src/main/webapp/pics/4.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp 2008-12-12 11:51:34 UTC (rev 11733)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp 2008-12-12 11:52:46 UTC (rev 11734)
@@ -9,47 +9,124 @@
<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">
- <rich:treeNode>
- <h:outputText value="#{defTree} : " />
- <h:inputText value="#{defTree.name}" />
- </rich:treeNode>
+ <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}" 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}"
+ 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}" />
- </rich:treeNode>
- </rich:tree>
+ <rich:treeNode>
+ <h:outputText value="#{defTree} : " />
+ <h:inputText value="#{defTree.name}" />
+ </rich:treeNode>
- <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>
+ <rich:treeNode>
+ <h:outputText value="#{defTree}" />
+ </rich:treeNode>
+ </rich:tree>
+ <hr />
+ <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" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <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();" />
+
+ <h:outputText value="immediate:" />
+ <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" />
+ <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/jsp/src/main/webapp/tTree/tTreeProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp 2008-12-12 11:51:34 UTC (rev 11733)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTreeProperty.jsp 2008-12-12 11:52:46 UTC (rev 11734)
@@ -3,26 +3,28 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-<f:subview id="tTreePropertySubviewID"
- 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="#{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">
+<f:subview id="tTreePropertySubviewID">
+ <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>
Modified: trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp 2008-12-12 11:51:34 UTC (rev 11733)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp 2008-12-12 11:52:46 UTC (rev 11734)
@@ -4,7 +4,7 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="tTreeStraightforwardSubviewID">
-<style type="text/css">
+ <style type="text/css">
.LeftTreePane {
}
@@ -20,91 +20,96 @@
}
</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>
+
+ <a4j:outputPanel id="tTreeDNDPanelID">
+ <h:panelGrid columns="1"
+ rendered="#{pVisability.tTreeDefaultSubviewID}">
+ <h:outputText value="Tree with Drag and Drop functionality"
+ style="color: red" />
- <rich:dragIndicator id="treeIndicator">
- <f:facet name="single">
- <f:verbatim>{marker} {nodeParam}({treeParam})</f:verbatim>
- </f:facet>
- </rich:dragIndicator>
+ <rich:dragIndicator id="treeIndicator">
+ <f:facet name="single">
+ <f:verbatim>{marker} {nodeParam}({treeParam})</f:verbatim>
+ </f:facet>
+ </rich:dragIndicator>
- <h:panelGrid columns="2" columnClasses="LeftTreePane,RightTreePane">
+ <h:panelGrid columns="2" columnClasses="LeftTreePane,RightTreePane">
- <h:panelGroup id="leftContainer" layout="block"
- styleClass="TreeContainer">
- <h:outputText escape="false"
- value="Selected Node: <b>#{tTreeDND.leftSelectedNodeTitle}</b>"
- id="selectedNodeL" />
+ <h:panelGroup id="leftContainer" layout="block"
+ styleClass="TreeContainer">
+ <h:outputText escape="false"
+ value="Selected Node: <b>#{tTreeDND.leftSelectedNodeTitle}</b>"
+ id="selectedNodeL" />
- <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">
+ <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">
- <rich:dndParam name="treeParam" value="leftTree" />
- </rich:tree>
+ <rich:dndParam name="treeParam" value="leftTree" />
+ </rich:tree>
- </h:panelGroup>
+ </h:panelGroup>
- <h:panelGroup id="rightContainer" layout="block"
- styleClass="TreeContainer">
- <h:outputText escape="false"
- value="Selected Node: <b>#{tTreeDND.rightSelectedNodeTitle}</b>"
- id="selectedNodeR" />
+ <h:panelGroup id="rightContainer" layout="block"
+ styleClass="TreeContainer">
+ <h:outputText escape="false"
+ value="Selected Node: <b>#{tTreeDND.rightSelectedNodeTitle}</b>"
+ id="selectedNodeR" />
- <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: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>
-
+ <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