JBoss Rich Faces SVN: r9633 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-07-16 08:31:39 -0400 (Wed, 16 Jul 2008)
New Revision: 9633
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-3877
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-07-16 12:15:47 UTC (rev 9632)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-07-16 12:31:39 UTC (rev 9633)
@@ -1016,13 +1016,13 @@
'<div id="'+id+'BtnUp" class="rich-calendar-spinner-up"'+
' onmousedown="this.className=\'rich-calendar-spinner-up rich-calendar-spinner-pressed\'"'+
' onmouseup="this.className=\'rich-calendar-spinner-up\'"'+
- ' onmouseout="this.className=\'rich-calendar-spinner-up\'"/>'+
+ ' onmouseout="this.className=\'rich-calendar-spinner-up\'"><span></span></div>'+
'</td></tr>'+
'<tr><td>'+
'<div id="'+id+'BtnDown" class="rich-calendar-spinner-down"'+
' onmousedown="this.className=\'rich-calendar-spinner-down rich-calendar-spinner-pressed\'"'+
' onmouseup="this.className=\'rich-calendar-spinner-down\'"'+
- ' onmouseout="this.className=\'rich-calendar-spinner-down\'" />'+
+ ' onmouseout="this.className=\'rich-calendar-spinner-down\'"><span></span></div>'+
'</td></tr>'+
'</tbody></table>'+
'</td>'+
16 years, 2 months
JBoss Rich Faces SVN: r9632 - in trunk/test-applications/facelets/src/main: java/util/style and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-16 08:15:47 -0400 (Wed, 16 Jul 2008)
New Revision: 9632
Modified:
trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java
trunk/test-applications/facelets/src/main/java/util/style/Style.java
trunk/test-applications/facelets/src/main/webapp/Combobox/ComboboxProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml
trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml
trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
Log:
1. Minor changes in comboBox and modalPanel
2. Fixed bug in Safari (deleted DOCTYPE from page)
Modified: trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/java/modalPanel/ModalPanel.java 2008-07-16 12:15:47 UTC (rev 9632)
@@ -1,11 +1,13 @@
package modalPanel;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
import org.richfaces.component.html.HtmlModalPanel;
import util.componentInfo.ComponentInfo;
public class ModalPanel {
- private String id;
private boolean autosized;
private boolean keepVisualState;
private String left;
@@ -23,23 +25,19 @@
private boolean resizeable;
private String inputTextTest;
private String selectOneListboxTest;
- private HtmlModalPanel htmlModalPanel = null;
+ private String visualOptions;
+ private String bindLabel;
+ private HtmlModalPanel htmlModalPanel;
- public HtmlModalPanel getHtmlModalPanel() {
- return htmlModalPanel;
+ public String getVisualOptions() {
+ return visualOptions;
}
- public void setHtmlModalPanel(HtmlModalPanel htmlModalPanel) {
- this.htmlModalPanel = htmlModalPanel;
+ public void setVisualOptions(String visualOptions) {
+ this.visualOptions = visualOptions;
}
-
- public String add(){
- ComponentInfo info = ComponentInfo.getInstance();
- info.addField(htmlModalPanel);
- return null;
- }
-
+
public String getInputTextTest() {
return inputTextTest;
}
@@ -57,6 +55,7 @@
}
public ModalPanel() {
+ this.visualOptions = "";
this.inputTextTest = "text";
this.selectOneListboxTest = "1";
this.minHeight = 100;
@@ -67,15 +66,22 @@
this.resizeable=true;
this.autosized = false;
this.keepVisualState = false;
- this.left = "100";
- this.top = "100";
+ this.left = "auto";
+ this.top = "auto";
this.rendered = true;
this.shadowDepth = "3";
this.shadowOpacity = "3";
this.zindex = 3;
this.showWhenRendered = false;
+ this.bindLabel = "not ready";
+ this.htmlModalPanel = null;
}
-
+
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = htmlModalPanel.getClientId(context);
+ }
+
public int getHeight() {
return height;
}
@@ -242,11 +248,24 @@
this.zindex = zindex;
}
- public String getId() {
- return id;
+ public String getBindLabel() {
+ return bindLabel;
}
- public void setId(String id) {
- this.id = id;
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
}
+
+ public HtmlModalPanel getHtmlModalPanel() {
+ return htmlModalPanel;
+ }
+
+ public void setHtmlModalPanel(HtmlModalPanel myModalPanel) {
+ this.htmlModalPanel = myModalPanel;
+ }
+
+ public void addHtmlModalPanel(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlModalPanel);
+ }
}
Modified: trunk/test-applications/facelets/src/main/java/util/style/Style.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/style/Style.java 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/java/util/style/Style.java 2008-07-16 12:15:47 UTC (rev 9632)
@@ -76,6 +76,7 @@
private String columnClassesA;
private String footerClassA;
private String headerClassA;
+ private String controlsClass;
public Style() {
style = "style";
@@ -150,6 +151,7 @@
columnClassesA = "columnClassesA";
footerClassA = "footerClassA";
headerClassA = "headerClassA";
+ controlsClass = "controlsClass";
}
public String getStyle() {
@@ -735,4 +737,12 @@
public void setContentStyle(String contentStyle) {
this.contentStyle = contentStyle;
}
+
+ public String getControlsClass() {
+ return controlsClass;
+ }
+
+ public void setControlsClass(String controlsClass) {
+ this.controlsClass = controlsClass;
+ }
}
Modified: trunk/test-applications/facelets/src/main/webapp/Combobox/ComboboxProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Combobox/ComboboxProperty.xhtml 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/webapp/Combobox/ComboboxProperty.xhtml 2008-07-16 12:15:47 UTC (rev 9632)
@@ -1,21 +1,16 @@
-
-
-
-
-
<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="comboboxPropertySubviewID">
+
<h:commandButton action="#{combobox.add}" value="add test" />
<h:panelGrid columns="2">
<h:outputText value="defaultLabel"></h:outputText>
<h:inputText value="#{combobox.defaultLabel}" onchange="submit();"></h:inputText>
<h:outputText value="filterNewValues"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.filterNewValues}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.filterNewValues}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="tabindex"></h:outputText>
<h:inputText value="#{combobox.tabindex}" onchange="submit();"></h:inputText>
@@ -30,59 +25,43 @@
<h:inputText value="#{combobox.listWidth}" onchange="submit();"></h:inputText>
<h:outputText value="enableManualInput"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.enableManualInput}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.enableManualInput}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="selectFirstOnUpdate"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.selectFirstOnUpdate}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.selectFirstOnUpdate}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="directInputSuggestions"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.directInputSuggestions}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.directInputSuggestions}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="disabled"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.disabled}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.disabled}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="rendered"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.rendered}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.rendered}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="immediate"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.immediate}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.immediate}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="required"></h:outputText>
- <h:selectBooleanCheckbox value="#{combobox.required}"
- onchange="submit();"></h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{combobox.required}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="requiredMessage"></h:outputText>
<h:inputText value="#{combobox.requiredMessage}" onchange="submit();"></h:inputText>
- <h:commandButton actionListener="#{combobox.checkBinding}"
- value="Binding"></h:commandButton>
+ <h:commandButton actionListener="#{combobox.checkBinding}" value="Binding"></h:commandButton>
<h:outputText value="#{combobox.bindLabel}"></h:outputText>
<h:outputText value="align"></h:outputText>
<h:inputText value="#{combobox.align}" onchange="submit();"></h:inputText>
</h:panelGrid>
- <a4j:commandLink
- onclick="$('formID:comboboxSubviewID:comboboxID').component.showList()"
- value="showList"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:comboboxSubviewID:comboboxID').component.showList()" value="showList"></a4j:commandLink>
<br />
- <a4j:commandLink
- onclick="$('formID:comboboxSubviewID:comboboxID').component.hideList()"
- value="hideList"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:comboboxSubviewID:comboboxID').component.hideList()" value="hideList"></a4j:commandLink>
<br />
- <a4j:commandLink
- onclick="$('formID:comboboxSubviewID:comboboxID').component.enable()"
- value="enable"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:comboboxSubviewID:comboboxID').component.enable()" value="enable"></a4j:commandLink>
<br />
- <a4j:commandLink
- onclick="$('formID:comboboxSubviewID:comboboxID').component.disable()"
- value="disable"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:comboboxSubviewID:comboboxID').component.disable()" value="disable"></a4j:commandLink>
<br />
<br />
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
@@ -91,8 +70,7 @@
<a4j:commandLink value="getValue" reRender="findID"></a4j:commandLink>
</rich:column>
<rich:column id="findID">
- <h:outputText
- value="#{rich:findComponent('comboboxID').value}" />
+ <!--<h:outputText value="#{rich:findComponent('comboboxID').value}" />-->
</rich:column>
</h:panelGrid>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml 2008-07-16 12:15:47 UTC (rev 9632)
@@ -83,7 +83,7 @@
<a4j:commandLink value="getRendererType" reRender="findID"></a4j:commandLink>
</rich:column>
<rich:column id="findID">
- <h:outputText value="#{rich:findComponent('hotKeyID').rendererType}" />
+ <!--<h:outputText value="#{rich:findComponent('hotKeyID').rendererType}" />-->
</rich:column>
</h:panelGrid>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2008-07-16 12:15:47 UTC (rev 9632)
@@ -5,21 +5,21 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="modalPanelSubviewID">
+
<script type="text/javascript">
function multiply(height,width){
- var tbody = document.getElementById('tbodyID');
- var trs = tbody.getElementsByTagName('TR');
- var y = parseInt(height);
- var x = parseInt(width);
- trs[1].innerHTML = 'modalPanel\'s size: ' + x*y + ' px*px';
- return false;
- }
-</script>
- <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
- <f:selectItems value="#{richBean.listContainer}" />
- </h:selectOneMenu>
+ var tbody = document.getElementById('tbodyID');
+ var trs = tbody.getElementsByTagName('TR');
+ var y = parseInt(height);
+ var x = parseInt(width);
+ trs[1].innerHTML = 'modalPanel\'s size: ' + x + 'x' +y + ' px*px';
+ return false;
+ }
+ </script>
- <rich:modalPanel id="modalPanelID" left="#{modalPanel.left}"
+ <rich:modalPanel id="modalPanelID"
+ binding="#{modalPanel.htmlModalPanel}"
+ visualOptions="#{modalPanel.visualOptions}" left="#{modalPanel.left}"
top="#{modalPanel.top}" minHeight="#{modalPanel.minHeight}"
minWidth="#{modalPanel.minWidth}" height="#{modalPanel.height}"
width="#{modalPanel.width}" moveable="#{modalPanel.moveable}"
@@ -30,6 +30,7 @@
shadowDepth="#{modalPanel.shadowDepth}"
shadowOpacity="#{modalPanel.shadowOpacity}"
showWhenRendered="#{modalPanel.showWhenRendered}"
+ controlsClass="#{style.controlsClass}"
headerClass="#{style.headerClass}" styleClass="#{style.styleClass}"
onhide="#{event.onhide}" onmaskclick="#{event.onmaskclick}"
onmaskcontextmenu="#{event.onmaskcontextmenu}"
@@ -39,27 +40,29 @@
onmaskmouseout="#{event.onmaskmouseout}"
onmaskmouseover="#{event.onmaskmouseover}"
onmaskmouseup="#{event.onmaskmouseup}" onmove="#{event.onmove}"
- onresize="#{event.onresize}" onshow="#{event.onshow}" binding="#{modalPanel.htmlModalPanel}">
+ onresize="#{event.onresize}" onshow="#{event.onshow}"
+ onbeforehide="#{event.onbeforehide}"
+ onbeforeshow="#{event.onbeforeshow}" >
<f:facet name="header">
<h:outputText value="Heder goes here..." />
</f:facet>
<f:facet name="controls">
- <h:graphicImage value="/pics/error.gif"
- onclick="Richfaces.hideModalPanel('modalPanelID');return false;" />
+ <h:graphicImage value="/pics/error.gif" onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
</f:facet>
- <br />
- <br />
+
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2" id="findComponentID">
- <tbody id="tbodyID">
- <tr>
- <td><a4j:commandLink value="getSize" reRender="findID"
- onclick="javascript:multiply(#{rich:findComponent('modalPanelID').height},#{rich:findComponent('modalPanelID').width});"></a4j:commandLink>
- </td>
- </tr>
- <tr>
- <td><h:outputText /></td>
- </tr>
+ <tbody id="tbodyID">
+ <tr>
+ <td>
+ <a4j:commandLink value="getSize" reRender="findID" onclick="javascript:multiply(#('formID:modalPanelSubviewID:modalPanelID').component.height},#('formID:modalPanelSubviewID:modalPanelID').component.width});"></a4j:commandLink>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:outputText/>
+ </td>
+ </tr>
</tbody>
</h:panelGrid>
<br />
@@ -67,12 +70,7 @@
<h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
<f:selectItems value="#{richBean.listContainer}" />
</h:selectOneMenu>
-
- <applet code="ArcTest.class" width="400" height="400"
- codebase="http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/"
- alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason.">
-
- Your browser is completely ignoring the <APPLET> tag! </applet>
+
<h:inputText value="#{modalPanel.inputTextTest}" />
<h:selectOneListbox value="#{modalPanel.selectOneListboxTest}">
<f:selectItem itemLabel="1" itemValue="1" />
@@ -80,104 +78,62 @@
<f:selectItem itemLabel="3" itemValue="3" />
</h:selectOneListbox>
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
+ <f:verbatim><br /><br /></f:verbatim>
<rich:spacer width="20" height="20"></rich:spacer>
+
<a4j:commandButton value="submit" onclick="submit"></a4j:commandButton>
- <h:outputLink value="http://www.jboss.com/">
- <f:verbatim>Link</f:verbatim>
- </h:outputLink>
+ <h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
+ <f:verbatim><br /><br /></f:verbatim>
+ <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
+ <f:verbatim><br /><br /></f:verbatim>
+ <h:outputLink onclick="Richfaces.hideModalPanel('modalPanelID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
+ </rich:modalPanel>
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
-
- <a4j:commandLink
- onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
- value="show ModalPanel 2">
- </a4j:commandLink>
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
- <h:outputLink
- onclick="Richfaces.hideModalPanel('modalPanelID');return false;"
- value="Close">
- <f:verbatim>Close</f:verbatim>
- </h:outputLink>
-
+ <rich:modalPanel id="modalPanel2ID"
+ visualOptions="#{modalPanel.visualOptions}"
+ left="#{modalPanel.left}" top="#{modalPanel.top}"
+ minHeight="#{modalPanel.minHeight}" minWidth="#{modalPanel.minWidth}"
+ moveable="true" resizeable="false"
+ keepVisualState="#{modalPanel.keepVisualState}"
+ rendered="#{modalPanel.rendered}" zindex="#{modalPanel.zindex}"
+ autosized="true"
+ shadowDepth="#{modalPanel.shadowDepth}"
+ shadowOpacity="#{modalPanel.shadowOpacity}"
+ showWhenRendered="#{modalPanel.showWhenRendered}" >
+ <br />
+ <h:inputText value="input"></h:inputText>
+ <br />
+ <h:outputLink onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
+ <rich:pickList id="pickListID" >
+ <f:selectItem itemValue="selectItem 0" itemLabel="selectItem 0" />
+ <f:selectItem itemValue="selectItem 1" itemLabel="selectItem 1" />
+ <f:selectItem itemValue="selectItem 2" itemLabel="selectItem 2" />
+
+ </rich:pickList>
+ <br />
+ <a4j:commandButton reRender="pickListTargetID" value="refresh target"></a4j:commandButton>
</rich:modalPanel>
- <rich:modalPanel id="modalPanelID2">
+ <rich:modalPanel id="modalPanel3ID" minHeight="100" minWidth="200" moveable="true">
+ <f:facet name="header">
+ <h:outputText value="Events..." />
+ </f:facet>
<f:facet name="controls">
- <h:graphicImage value="/pics/error.gif"
- onclick="Richfaces.hideModalPanel('modalPanelID2');return false;" />
-
- <a4j:commandLink action="#"
- oncomplete="Richfaces.hideModalPanel('modalPanelID2')"
- value="close" />
-
+ <h:commandLink value="Close" onclick="Richfaces.hideModalPanel('modalPanel3ID');" />
</f:facet>
- <h:inputText value="#{sb.property}" id="text" />
- <rich:suggestionbox id="suggestionBoxId" eventsQueue="myEventsQueue"
- ajaxSingle="#{sb.ajaxSingle}" dir="#{sb.dir}"
- rendered="#{sb.rendered}" requestDelay="#{sb.requestDelay}"
- selfRendered="#{sb.selfRendered}" value="#{sb.value}" for="text"
- var="result" fetchValue="#{result.text}"
- suggestionAction="#{sb.autocomplete}" width="#{sb.width}"
- height="#{sb.height}" border="#{sb.border}" zindex="#{sb.zindex}"
- rules="#{sb.rules}" cellpadding="#{sb.cellpadding}"
- cellspacing="#{sb.cellspacing}" first="#{sb.first}"
- minChars="#{sb.minchars}" tokens="#{sb.tokens}"
- bgcolor="#{sb.bgColor}" focus="#{sb.forcus}" title="#{result.text}"
- summary="summary" shadowOpacity="#{sb.shadowOpacity}"
- shadowDepth="#{sb.shadowDepth}" selectValueClass="mousemove"
- frequency="#{sb.frequency}" nothingLabel="nothingLabel work! "
- entryClass="#{style.entryClass}" popupClass="#{style.popupClass}"
- popupStyle="#{style.popupStyle}" style="#{style.style}"
- styleClass="#{style.styleClass}"
- selectedClass="#{style.selectedClass}"
- rowClasses="#{style.rowClasses}" oncomplete="#{event.oncomplete}"
- onselect="#{event.onselect}"
- onbeforedomupdate="#{event.onbeforedomupdate}"
- onsubmit="#{event.onsubmit}">
- <h:column>
- <h:outputText value="#{result.city}" />
- </h:column>
- <h:column>
- <h:outputText value="#{result.contry}" />
- </h:column>
- <h:column>
- <h:outputText value="#{result.flag}" />
- </h:column>
- <h:column>
- <h:outputLink value="http://www.jboss.com/">
- <f:verbatim>Link</f:verbatim>
- </h:outputLink>
- </h:column>
- </rich:suggestionbox>
+
+ <h:outputText value="Eventsaaaaaaaaaaaaaaaa ..." />
+ <rich:calendar popup="true" />
</rich:modalPanel>
- <a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">Show
- MP</a>
+ <a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">show ModalPanel 1</a>
<br />
- <a onclick="Richfaces.showModalPanel('modalPanelID2');" href="#">Show
- MP2</a>
-
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
-
- <h:graphicImage value="/pics/info.gif"
- onclick="Richfaces.showModalPanel('modalPanelID');" />
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
- <div
- style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index</div>
-
+ <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
+ <f:verbatim><br /></f:verbatim>
+ <h:outputText value="click on image for open Modal Panel 3" />
+ <h:graphicImage value="/pics/info.gif">
+ <rich:componentControl event="onclick" for="modalPanel3ID" operation="show"></rich:componentControl>
+ </h:graphicImage>
+ <f:verbatim><br /><br /></f:verbatim>
+ <div id="idDiv1" style="position: relative; font-size: 50px; z-index: 2; color: navy" >z-index1</div>
+ <div id="idDiv2" style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index2</div>
</f:subview>
Modified: trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml 2008-07-16 12:15:47 UTC (rev 9632)
@@ -1,82 +1,86 @@
<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="ModalPanelPropertySubviewID">
-<h:commandButton action="#{modalPanel.add}" value="add test" />
- <h:panelGrid columns="2">
- <h:outputText value="shadowDepth" />
- <h:inputText value="#{modalPanel.shadowDepth}" >
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
-
- <h:outputText value="shadowOpacity" />
- <h:inputText value="#{modalPanel.shadowOpacity}" >
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
+<h:commandButton value="add test" action="#{modalPanel.addHtmlModalPanel}"></h:commandButton>
+ <h:panelGrid columns="2">
+ <h:outputText value="visualOptions"></h:outputText>
+ <h:inputText value="#{modalPanel.visualOptions}" onchange="submit();"></h:inputText>
- <h:outputText value="keepVisualState" />
- <h:selectBooleanCheckbox value="#{modalPanel.keepVisualState}" >
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:selectBooleanCheckbox>
+ <h:outputText value="shadowDepth" />
+ <h:inputText value="#{modalPanel.shadowDepth}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
- <h:outputText value="left" />
- <h:inputText value="#{modalPanel.left}" >
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
-
- <h:outputText value="top" />
- <h:inputText value="#{modalPanel.top}" >
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
-
- <h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{modalPanel.rendered}" onchange="submit();">
- </h:selectBooleanCheckbox>
-
- <h:outputText value="showWhenRendered" />
- <h:selectBooleanCheckbox value="#{modalPanel.showWhenRendered}" >
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:selectBooleanCheckbox>
-
- <h:outputText value="zindex" />
- <h:selectOneRadio value="#{modalPanel.zindex}">
- <f:selectItem itemLabel="1" itemValue="1" />
- <f:selectItem itemLabel="3" itemValue="3" />
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:selectOneRadio>
-
- <h:outputText value="Width:" />
- <h:inputText value="#{modalPanel.width}">
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
+ <h:outputText value="shadowOpacity" />
+ <h:inputText value="#{modalPanel.shadowOpacity}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Height:" />
- <h:inputText value="#{modalPanel.height}">
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
+ <h:outputText value="keepVisualState" />
+ <h:selectBooleanCheckbox value="#{modalPanel.keepVisualState}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
- <h:outputText value="minWidth:" />
- <h:inputText value="#{modalPanel.minWidth}">
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
+ <h:outputText value="left" />
+ <h:inputText value="#{modalPanel.left}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
- <h:outputText value="minHeight:" />
- <h:inputText value="#{modalPanel.minHeight}">
- <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
- </h:inputText>
-
- <h:outputText value="autosized:" />
- <h:selectBooleanCheckbox value="#{modalPanel.autosized}" onchange="submit();">
- </h:selectBooleanCheckbox>
+ <h:outputText value="top" />
+ <h:inputText value="#{modalPanel.top}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
- <h:outputText value="resizeable:" />
- <h:selectBooleanCheckbox value="#{modalPanel.resizeable}" onchange="submit();">
- </h:selectBooleanCheckbox>
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox value="#{modalPanel.rendered}"
+ onchange="submit();">
- <h:outputText value="Moveable:" />
- <h:selectBooleanCheckbox value="#{modalPanel.moveable}">
- <a4j:support event="onclick" reRender="modalPanelID"></a4j:support>
- </h:selectBooleanCheckbox>
-
- <a4j:commandLink onclick="$('formID:ModalPanelPropertySubviewID:modalPanelID').component.show(event)" value="show"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:ModalPanelPropertySubviewID:modalPanelID').component.hide(event)" value="hide"></a4j:commandLink>
- </h:panelGrid>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="showWhenRendered" />
+ <h:selectBooleanCheckbox value="#{modalPanel.showWhenRendered}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="zindex" />
+ <h:selectOneRadio value="#{modalPanel.zindex}">
+ <f:selectItem itemLabel="1" itemValue="1" />
+ <f:selectItem itemLabel="3" itemValue="3" />
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:selectOneRadio>
+
+ <h:outputText value="Width:" />
+ <h:inputText value="#{modalPanel.width}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="Height:" />
+ <h:inputText value="#{modalPanel.height}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="minWidth:" />
+ <h:inputText value="#{modalPanel.minWidth}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="minHeight:" />
+ <h:inputText value="#{modalPanel.minHeight}">
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="autosized:" />
+ <h:selectBooleanCheckbox value="#{modalPanel.autosized}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="resizeable:" />
+ <h:selectBooleanCheckbox value="#{modalPanel.resizeable}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="Moveable:" />
+ <h:selectBooleanCheckbox value="#{modalPanel.moveable}">
+ <a4j:support event="onclick" reRender="modalPanelID"></a4j:support>
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml 2008-07-16 12:15:47 UTC (rev 9632)
@@ -1,4 +1,3 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
Modified: trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-07-16 12:14:35 UTC (rev 9631)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-07-16 12:15:47 UTC (rev 9632)
@@ -28,8 +28,29 @@
</head>
<body>
<h:form id="formID">
- <div id="divOpthID" align="right" style="z-index: 200"><ui:include
- src="/pages/RichMenu/RichMenu.xhtml" /></div>
+ <div id="divOpthID" align="right" style="z-index: 200"><ui:include src="/pages/RichMenu/RichMenu.xhtml" /></div>
+
+ <rich:messages id="richMessagesID" ajaxRendered="true" showSummary="true">
+ <f:facet name="errorMarker">
+ <h:graphicImage url="/pics/error.gif" />
+ </f:facet>
+
+ <f:facet name="fatalMarker">
+ <h:graphicImage url="/pics/fatal.gif" />
+ </f:facet>
+
+ <f:facet name="infoMarker">
+ <h:graphicImage url="/pics/info.gif" />
+ </f:facet>
+
+ <f:facet name="warnMarker">
+ <h:graphicImage url="/pics/warn.gif" />
+ </f:facet>
+
+ <f:facet name="passedMarker">
+ <h:graphicImage url="/pics/passed.gif" />
+ </f:facet>
+ </rich:messages>
<h:messages showDetail="true" showSummary="true"></h:messages>
<h:panelGrid id="richGridID" columns="1" width="100%">
16 years, 2 months
JBoss Rich Faces SVN: r9631 - in trunk/test-applications/jsp/src/main/webapp: ModalPanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-16 08:14:35 -0400 (Wed, 16 Jul 2008)
New Revision: 9631
Modified:
trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp
trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp
trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp
trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp
Log:
minor changes in modalPanel and comboBox
Modified: trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp 2008-07-16 11:43:39 UTC (rev 9630)
+++ trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp 2008-07-16 12:14:35 UTC (rev 9631)
@@ -44,10 +44,12 @@
onmouseout="#{event.onmouseout}"
onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
- onselect="#{event.onselect}"
+ onselect="#{event.onselect}"
binding="#{combobox.htmlComboBox}"
- align="#{combobox.align}">
- <f:selectItem itemValue="GoshaGoshaGoshaGoshaGosha"/>
+ 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>
Modified: trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp 2008-07-16 11:43:39 UTC (rev 9630)
+++ trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp 2008-07-16 12:14:35 UTC (rev 9631)
@@ -71,7 +71,7 @@
<br />
<a href="#" id="disableID">disable</a>
</f:verbatim>
- <rich:componentControl attachTo="showListID" event="onclick" for="comboboxID" operation="showList" params="label:label"></rich:componentControl>
+ <rich:componentControl attachTo="showListID" event="onclick" for="comboboxID" operation="showList"></rich:componentControl>
<rich:componentControl attachTo="hideListID" event="onclick" for="comboboxID" operation="hideList"></rich:componentControl>
<rich:componentControl attachTo="enableID" event="onclick" for="comboboxID" operation="enable"></rich:componentControl>
<rich:componentControl attachTo="disableID" event="onclick" for="comboboxID" operation="disable"></rich:componentControl>
Modified: trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp 2008-07-16 11:43:39 UTC (rev 9630)
+++ trunk/test-applications/jsp/src/main/webapp/ModalPanel/ModalPanel.jsp 2008-07-16 12:14:35 UTC (rev 9631)
@@ -8,13 +8,12 @@
var trs = tbody.getElementsByTagName('TR');
var y = parseInt(height);
var x = parseInt(width);
- trs[1].innerHTML = 'modalPanel\'s size: ' + x*y + ' px*px';
+ trs[1].innerHTML = 'modalPanel\'s size: ' + x + 'x' +y + ' px*px';
return false;
}
</script>
<style>
.rich-mpnl-mask-div {
- background-color: #fae6b0;
}
</style>
@@ -22,10 +21,6 @@
<f:subview id="modalPanelSubviewID">
- <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
- <f:selectItems value="#{richBean.listContainer}" />
- </h:selectOneMenu>
-
<rich:modalPanel id="modalPanelID"
binding="#{modalPanel.htmlModalPanel}"
visualOptions="#{modalPanel.visualOptions}" left="#{modalPanel.left}"
@@ -48,17 +43,18 @@
onmaskmousemove="#{event.onmaskmousemove}"
onmaskmouseout="#{event.onmaskmouseout}"
onmaskmouseover="#{event.onmaskmouseover}"
- onmaskmouseup="#{event.onmaskmouseup}" onmove="#{event.onmove}"
- onresize="#{event.onresize}" onshow="#{event.onshow}">
+ onmaskmouseup="#{event.onmaskmouseup}"
+ onmove="#{event.onmove}"
+ onresize="#{event.onresize}" onshow="#{event.onshow}"
+ onbeforehide="#{event.onbeforehide}"
+ onbeforeshow="#{event.onbeforeshow}" >
<f:facet name="header">
<h:outputText value="Heder goes here..." />
</f:facet>
<f:facet name="controls">
- <h:graphicImage value="/pics/error.gif"
- onclick="Richfaces.hideModalPanel('modalPanelID');return false;" />
+ <h:graphicImage value="/pics/error.gif" onclick="Richfaces.hideModalPanel('modalPanelID'); return false;" />
</f:facet>
- <br />
- <br />
+
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2" id="findComponentID">
<tbody id="tbodyID">
@@ -79,11 +75,7 @@
<h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
<f:selectItems value="#{richBean.listContainer}" />
</h:selectOneMenu>
- <applet code="ArcTest.class" width="400" height="400"
- codebase="http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/"
- alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason.">
-
- Your browser is completely ignoring the <APPLET> tag! </applet>
+
<h:inputText value="#{modalPanel.inputTextTest}" />
<h:selectOneListbox value="#{modalPanel.selectOneListboxTest}">
<f:selectItem itemLabel="1" itemValue="1" />
@@ -91,151 +83,62 @@
<f:selectItem itemLabel="3" itemValue="3" />
</h:selectOneListbox>
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
+ <f:verbatim><br /><br /></f:verbatim>
<rich:spacer width="20" height="20"></rich:spacer>
<a4j:commandButton value="submit" onclick="submit"></a4j:commandButton>
- <h:outputLink value="http://www.jboss.com/">
- <f:verbatim>Link</f:verbatim>
- </h:outputLink>
-
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
-
- <a4j:commandLink
- onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
- value="show ModalPanel 2">
- </a4j:commandLink>
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
- <h:outputLink
- onclick="Richfaces.hideModalPanel('modalPanelID');return false;"
- value="Close">
- <f:verbatim>Close</f:verbatim>
- </h:outputLink>
+ <h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
+ <f:verbatim><br /><br /></f:verbatim>
+ <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
+ <f:verbatim><br /><br /></f:verbatim>
+ <h:outputLink onclick="Richfaces.hideModalPanel('modalPanelID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
</rich:modalPanel>
<rich:modalPanel id="modalPanel2ID"
- visualOptions="#{modalPanel.visualOptions}" left="#{modalPanel.left}"
- top="#{modalPanel.top}" minHeight="#{modalPanel.minHeight}"
- minWidth="#{modalPanel.minWidth}" height="550" width="850"
- moveable="false" resizeable="false"
+ visualOptions="#{modalPanel.visualOptions}"
+ left="#{modalPanel.left}" top="#{modalPanel.top}"
+ minHeight="#{modalPanel.minHeight}" minWidth="#{modalPanel.minWidth}"
+ moveable="true" resizeable="false"
keepVisualState="#{modalPanel.keepVisualState}"
rendered="#{modalPanel.rendered}" zindex="#{modalPanel.zindex}"
- autosized="#{modalPanel.autosized}"
+ autosized="true"
shadowDepth="#{modalPanel.shadowDepth}"
shadowOpacity="#{modalPanel.shadowOpacity}"
- showWhenRendered="#{modalPanel.showWhenRendered}"
- controlsClass="#{style.controlsClass}"
- styleClass="#{style.styleClass}" onhide="#{event.onhide}"
- onmaskclick="#{event.onmaskclick}"
- onmaskcontextmenu="#{event.onmaskcontextmenu}"
- onmaskdblclick="#{event.onmaskdblclick}"
- onmaskmousedown="#{event.onmaskmousedown}"
- onmaskmousemove="#{event.onmaskmousemove}"
- onmaskmouseout="#{event.onmaskmouseout}"
- onmaskmouseover="#{event.onmaskmouseover}"
- onmaskmouseup="#{event.onmaskmouseup}" onmove="#{event.onmove}"
- onresize="#{event.onresize}" onshow="#{event.onshow}">
+ showWhenRendered="#{modalPanel.showWhenRendered}" >
<br />
<h:inputText value="input"></h:inputText>
<br />
- <h:outputLink
- onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;"
- value="Close">
- <f:verbatim>Close</f:verbatim>
- </h:outputLink>
- <rich:pickList id="pickListID" value="#{pickList.value}"
- showButtonsLabel="#{pickList.showButtonLabels}"
- valueChangeListener="#{pickList.valueChangeListener}"
- controlClass="#{style.controlClass}" listClass="#{style.listClass}"
- style="#{style.style}" styleClass="#{style.styleClass}"
- copyAllControlLabel="#{pickList.copyAllControlLabel}"
- copyControlLabel="#{pickList.copyControlLabel}"
- disabled="#{pickList.copyControlLabel}"
- immediate="#{pickList.immediate}"
- listsHeight="#{pickList.listsHeight}"
- moveControlsVerticalAlign="#{pickList.moveControlsVerticalAlign}"
- removeAllControlLabel="#{pickList.removeAllControlLabel}"
- removeControlLabel="#{pickList.removeControlLabel}"
- rendered="#{pickList.rendered}"
- sourceListWidth="#{pickList.sourceListWidth}"
- title="#{pickList.title}" switchByClick="#{pickList.switchByClick}"
- targetListWidth="#{pickList.targetListWidth}"
- required="#{pickList.required}"
- requiredMessage="#{pickList.requiredMessage}"
- onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
- onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
- onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
- onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
- binding="#{pickList.myPickList}">
- <f:selectItem itemValue="selectItem" itemLabel="selectItem" />
+ <h:outputLink onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;" ><f:verbatim>Close</f:verbatim></h:outputLink>
+ <rich:pickList id="pickListID" >
+ <f:selectItem itemValue="selectItem 0" itemLabel="selectItem 0" />
<f:selectItem itemValue="selectItem 1" itemLabel="selectItem 1" />
<f:selectItem itemValue="selectItem 2" itemLabel="selectItem 2" />
- <f:selectItems value="#{pickList.data}" />
+
</rich:pickList>
<br />
<a4j:commandButton reRender="pickListTargetID" value="refresh target"></a4j:commandButton>
- <h:dataTable id="pickListTargetID" value="#{pickList.value}"
- var="list" border="1">
- <h:column>
- <h:outputText value="#{list}"></h:outputText>
- </h:column>
- </h:dataTable>
</rich:modalPanel>
- <rich:modalPanel id="_panel" minHeight="100" minWidth="200"
- moveable="true">
+ <rich:modalPanel id="modalPanel3ID" minHeight="100" minWidth="200" moveable="true">
<f:facet name="header">
<h:outputText value="Events..." />
</f:facet>
<f:facet name="controls">
- <h:graphicImage value="/pics/error.gif"
- onclick="Richfaces.hideModalPanel('_panel');" />
+ <h:commandLink value="Close" onclick="Richfaces.hideModalPanel('modalPanel3ID');" />
</f:facet>
<h:outputText value="Eventsaaaaaaaaaaaaaaaa ..." />
<rich:calendar popup="true" />
</rich:modalPanel>
- <a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">Show
- MP</a>
+ <a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">show ModalPanel 1</a>
<br />
- <a4j:commandLink
- onclick="Richfaces.showModalPanel('modalPanel2ID');return false;"
- value="show ModalPanel 2">
- </a4j:commandLink>
-
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
-
+ <a4j:commandLink onclick="Richfaces.showModalPanel('modalPanel2ID');return false;" value="show ModalPanel 2"></a4j:commandLink>
+ <f:verbatim><br /></f:verbatim>
+ <h:outputText value="click on image for open Modal Panel 3" />
<h:graphicImage value="/pics/info.gif">
- <rich:componentControl event="onclick" for="_panel" operation="show"></rich:componentControl>
+ <rich:componentControl event="onclick" for="modalPanel3ID" operation="show"></rich:componentControl>
</h:graphicImage>
- <br />
- <br />
- <h:graphicImage value="/pics/warn.gif">
- </h:graphicImage>
- <f:verbatim>
- <br />
- <br />
- </f:verbatim>
- <div id="idDiv1"
- style="position: relative; font-size: 50px; z-index: 2; color: navy">
- z-index1 <rich:componentControl attachTo="idDiv1" event="onclick"
- for="modalPanelID" operation="show"></rich:componentControl></div>
- <br />
- <div id="idDiv2"
- style="position: relative; font-size: 50px; z-index: 2; color: navy">
- z-index2 <rich:componentControl attachTo="idDiv2" event="onclick"
- for="modalPanelID" operation="hide"></rich:componentControl></div>
+ <f:verbatim><br /><br /></f:verbatim>
+ <div id="idDiv1" style="position: relative; font-size: 50px; z-index: 2; color: navy" >z-index1</div>
+ <div id="idDiv2" style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index2</div>
</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp 2008-07-16 11:43:39 UTC (rev 9630)
+++ trunk/test-applications/jsp/src/main/webapp/Skinning/Skinning.jsp 2008-07-16 12:14:35 UTC (rev 9631)
@@ -58,7 +58,7 @@
<input class="rich-input" value="input" ></input>
</rich:column>
<rich:column>
- <input class="rich-input" value="input" disabled="true" /></input>
+ <input class="rich-input" value="input" disabled="true" ></input>
</rich:column>
</rich:columnGroup>
<rich:columnGroup>
@@ -69,10 +69,10 @@
<h:outputText value="#{skinning.inputTextareaStyleClass}" />
</rich:column>
<rich:column>
- <h:inputTextarea styleClass="#{skinning.inputTextareaStyleClass}" value="#{skinning.inputTextarea}" />
+ <%--<h:inputTextarea styleClass="#{skinning.inputTextareaStyleClass}" value="#{skinning.inputTextarea}" />--%>
</rich:column>
<rich:column>
- <h:inputTextarea styleClass="#{skinning.inputTextareaStyleClass}" value="#{skinning.inputTextarea}" disabled="true" />
+ <%--<h:inputTextarea styleClass="#{skinning.inputTextareaStyleClass}" value="#{skinning.inputTextarea}" disabled="true" />--%>
</rich:column>
</rich:columnGroup>
<rich:columnGroup>
@@ -307,7 +307,7 @@
<h:outputText value="rich-isindex" />
</rich:column>
<rich:column>
- <isindex class="rich-isindex" />
+ <isindex class="rich-isindex" prompt="Enter"/>
</rich:column>
<rich:column>
<h:outputText value="components have not disabled state" />
16 years, 2 months
JBoss Rich Faces SVN: r9630 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-07-16 07:43:39 -0400 (Wed, 16 Jul 2008)
New Revision: 9630
Modified:
trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml
Log:
RF-3100:rich:componentControl rewrite
Modified: trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml 2008-07-16 07:22:19 UTC (rev 9629)
+++ trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml 2008-07-16 11:43:39 UTC (rev 9630)
@@ -80,16 +80,98 @@
]]></programlisting>
</section>
+
+
+
+
+
<section>
<title>Details of Usage</title>
<para>
- In order to use the <emphasis role="bold"><property><rich:componentControl></property></emphasis> with another components you need to take the following steps:
+ <emphasis role="bold"><property><rich:componentControl></property></emphasis>
+ is a command component, that allows to call JavaScript API function on some defined event.
+ Look at the example:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:componentControl attachTo="doExpandCalendarID" event="onclick" for="ccCalendarID" operation="Expand"/>
+...
+]]></programlisting>
+ <para>
+ In other words it means "clicking on the component with ID 'doExpandCalendarID',
+ expands the component with ID 'ccCalendarID'".
+ It can be said, that <emphasis role="bold"><property><rich:componentControl></property></emphasis>
+ connects two components with the help of JavaScript API function.
+ </para>
+ <para>
+ Component ID, to wich the event, that invokes JavaScript API function is applied,
+ is defined with <emphasis><property>"attachTo"</property></emphasis> attribute
+ (see the exapmle above).
+ If <emphasis><property>"attachTo"</property></emphasis> attribute is not defined,
+ the component will be attached to the parent component.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:commandButton value="Show Modal Panel">
+ <rich:componentControl for="ccModalPanelID" event="onclick" operation="show"/> <!--attached to the commandButton-->
+</h:commandButton>
+...
+]]></programlisting>
+ <para>
+ On the result page the component is rendered to JavaScript code.
+ This means, that it is possible to invoke the <emphasis role="bold"><property><rich:componentControl></property></emphasis>
+ handler operation as usual JavaScript function.
+ This function is called by name, specified in the component <emphasis><property>"name"</property></emphasis> attribute.
+ The definition of <emphasis><property>"name"</property></emphasis> attribute is shown on the example below:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:componentControl name="func" event="onRowClick" for="menu" operation="show" />
+...
+]]></programlisting>
+ <para>
+ The generated JavaScript function will look as shown below:
+ </para>
+ <programlisting role="XML"><![CDATA[function func (event) {
+}
+]]></programlisting>
+ <para>
+ An important <emphasis role="bold"><property><rich:componentControl></property></emphasis> feature,
+ is that it allows transferring parameters, with the help of special attribute <emphasis><property>"params"</property></emphasis>.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:componentControl name="func" event="onRowClick" for="menu" operation="show" params=”#{car.model}"/>
+...
+]]></programlisting>
+ <para>
+ The alternative way for parameters transferring uses <emphasis role="bold"><property><f:param></property></emphasis> attribute.
+ As the code above, the following code will represent the same functionality.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:componentControl event="onRowClick" for="menu" operation="show">
+ <f:param value="#{car.model}" name="model"/>
+</rich:componentControl>
+...
+]]></programlisting>
- <!--
- There are three ways to use the <emphasis role="bold">
- <property><rich:componentControl></property>
- </emphasis> to another component.
- -->
+
+
+
+
+
+
+
+
+
+ <!-- In order to use the <emphasis role="bold"><property><rich:componentControl></property></emphasis> with another components you need to take the following steps:
+
+
</para>
<itemizedlist>
<listitem><para>Define a name of a function that is generated (definition is similar to a
@@ -176,7 +258,11 @@
<property>"operation"</property>
</emphasis> attribute contains a name of JavaScript API function. Thus, clicking on the link
represents the next year on the calendar.
- </para>
+ </para> -->
+
+
+
+
<para>
With the help of the <emphasis><property>"attachTiming"</property></emphasis> attribute you can define the page loading phase when
<emphasis role="bold"><property><rich:componentControl></property></emphasis> is attached to source component. Possible values are:
16 years, 2 months
JBoss Rich Faces SVN: r9629 - in trunk/test-applications/facelets/src/main: webapp/pages and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-16 03:22:19 -0400 (Wed, 16 Jul 2008)
New Revision: 9629
Removed:
trunk/test-applications/facelets/src/main/webapp/pages/Action/
Modified:
trunk/test-applications/facelets/src/main/java/util/event/Event.java
trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
Log:
Events were fixed
Modified: trunk/test-applications/facelets/src/main/java/util/event/Event.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/util/event/Event.java 2008-07-15 23:04:50 UTC (rev 9628)
+++ trunk/test-applications/facelets/src/main/java/util/event/Event.java 2008-07-16 07:22:19 UTC (rev 9629)
@@ -7,7 +7,7 @@
* User: ayanul Date: Feb 11, 2008 Time: 10:15:14 AM
*/
public class Event {
- private String onmouseup;
+ private String onmouseup;
private String ontabenter;
private String ontableave;
private String onLoadMap;
@@ -32,6 +32,7 @@
private String onclick;
private String oncollapse;
private String oncomplete;
+ private String onclear;
private String ondblclick;
private String ondragend;
private String ondragenter;
@@ -92,7 +93,7 @@
private String ongroupexpand;
private String oncontextmenu;
private String ongroupcollapse;
- private String opened;
+ private String onSlideSubmit;
private String oneditactivated;
private String oneditactivation;
private String oninputdblclick;
@@ -101,107 +102,150 @@
private String oninputmouseout;
private String oninputmouseover;
private String oninputmouseup;
+ private String onsizerejected;
+ private String ontyperejected;
+ private String onupload;
+ private String onuploadcanceled;
+ private String onuploadcomplete;
private String onviewactivated;
private String onviewactivation;
+ private String onbeforehide;
+ private String onbeforeshow;
+ private String opened;
+ private String onobjectchange;
+ private String onadd;
+ /* Events for toolBar */
+ private String onitemclick;
+ private String onitemdblclick;
+ private String onitemkeydown;
+ private String onitemkeypress;
+ private String onitemkeyup;
+ private String onitemmousedown;
+ private String onitemmousemove;
+ private String onitemmouseout;
+ private String onitemmouseover;
+ private String onitemmouseup;
// showEvent('onkeypressInputID', 'onkeypress work!')
public Event() {
- onLoadMap = "showEvent('onLoadMapInputID', 'onLoadMap work!')";
- onRowClick = "showEvent('onRowClickInputID', 'onRowClick work!')";
- onRowDblClick = "showEvent('onRowDblClickInputID', 'onRowDblClick work!')";
- onRowMouseDown = "showEvent('onRowMouseDownInputID', 'onRowMouseDown work!')";
- onRowMouseMove = "showEvent('onRowMouseMoveInputID', 'onRowMouseMove work!')";
- onRowMouseOut = "showEvent('onRowMouseOutInputID', 'onRowMouseOut work!')";
- onRowMouseOver = "showEvent('onRowMouseOverInputID', 'onRowMouseOver work!')";
- onRowMouseUp = "showEvent('onRowMouseUpInputID', 'onRowMouseUp work!')";
- onbeforedomupdate = "showEvent('onbeforedomupdateInputID', 'onbeforedomupdate work!')";
- onblur = "showEvent('onblurInputID', 'onblur work!')";
- onbottomclick = "showEvent('onbottomclickInputID', 'onbottomclick work!')";
- onchange = "showEvent('onchangeInputID', 'onchange work!')";
- onchanged = "showEvent('onchangedInputID', 'onchanged work!')";
- onclick = "showEvent('onclickInputID', 'onclick work!')";
- oncollapse = "showEvent('oncollapseInputID', 'oncollapse work!')";
- oncomplete = "showEvent('oncompleteInputID', 'oncomplete work!')";
- oncontextmenu = "showEvent('oncontextmenuInputID', 'oncontextmenu work!')";
- oncurrentdateselect = "showEvent('oncurrentdateselectInputID', 'oncurrentdateselect work!')";
- ondatemouseout = "showEvent('ondatemouseoutInputID', 'ondatemouseout work!')";
- ondatemouseover = "showEvent('ondatemouseoverInputID', 'ondatemouseover work!')";
- ondateselect = "showEvent('ondateselectInputID', 'ondateselect work!')";
- ondateselected = "showEvent('ondateselectedInputID', 'ondateselected work!')";
- ondblclick = "showEvent('ondblclickInputID', 'ondblclick work!')";
- ondownclick = "showEvent('ondownclickInputID', 'ondownclick work!')";
- ondragend = "showEvent('ondragendInputID', 'ondragend work!')";
- ondragenter = "showEvent('ondragenterInputID', 'ondragenter work!')";
- ondragexit = "showEvent('ondragexitInputID', 'ondragexit work!')";
- ondragstart = "showEvent('ondragstartInputID', 'ondragstart work!')";
- ondrop = "showEvent('ondropInputID', 'ondrop work!')";
- ondropend = "showEvent('ondropendInputID', 'ondropend work!')";
- ondropout = "showEvent('ondropoutInputID', 'ondropout work!')";
- ondropover = "showEvent('ondropoverInputID', 'ondropover work!')";
- onerror = "showEvent('onerrorInputID', 'onerror work!')";
- onexpand = "showEvent('onexpandInputID', 'onexpand work!')";
- onfocus = "showEvent('onfocusInputID', 'onfocus work!')";
- ongroupactivate = "showEvent('ongroupactivateInputID', 'ongroupactivate work!')";
- ongroupexpand = "showEvent('ongroupexpandInputID', 'ongroupexpand work!')";
- onheaderclick = "showEvent('onheaderclickInputID', 'onheaderclick work!')";
- onhide = "showEvent('onhideInputID', 'onhide work!')";
- oninit = "showEvent('oninitInputID', 'oninit work!')";
- oninputblur = "showEvent('oninputblurInputID', 'oninputblur work!')";
- oninputchange = "showEvent('oninputchangeInputID', 'oninputchange work!')";
- oninputclick = "showEvent('oninputclickInputID', 'oninputclick work!')";
- oninputfocus = "showEvent('oninputfocusInputID', 'oninputfocus work!')";
- oninputkeydown = "showEvent('oninputkeydownInputID', 'oninputkeydown work!')";
- oninputkeypress = "showEvent('oninputkeypressInputID', 'oninputkeypress work!')";
- oninputkeyup = "showEvent('oninputkeyupInputID', 'oninputkeyup work!')";
- oninputselect = "showEvent('oninputselectInputID', 'oninputselect work!')";
- onitemchange = "showEvent('onitemchangeInputID', 'onitemchange work!')";
- onitemhover = "showEvent('onitemhoverInputID', 'onitemhover work!')";
- onitemselect = "showEvent('onitemselectInputID', 'onitemselect work!')";
- onitemselected = "showEvent('onitemselectedInputID', 'onitemselected work!')";
- onkeydown = "showEvent('onkeydownInputID', 'onkeydown work!')";
- onkeypress = "showEvent('onkeypressInputID', 'onkeypress work!')";
- onkeyup = "showEvent('onkeyupInputID', 'onkeyup work!')";
- onlistcall = "showEvent('onlistcallInputID', 'onlistcall work!')";
- onmaskclick = "showEvent('onmaskclickInputID', 'onmaskclick work!')";
- onmaskcontextmenu = "showEvent('onmaskcontextmenuInputID', 'onmaskcontextmenu work!')";
- onmaskdblclick = "showEvent('onmaskdblclickInputID', 'onmaskdblclick work!')";
- onmaskmousedown = "showEvent('onmaskmousedownInputID', 'onmaskmousedown work!')";
- onmaskmousemove = "showEvent('onmaskmousemoveInputID', 'onmaskmousemove work!')";
- onmaskmouseout = "showEvent('onmaskmouseoutInputID', 'onmaskmouseout work!')";
- onmaskmouseover = "showEvent('onmaskmouseoverInputID', 'onmaskmouseover work!')";
- onmaskmouseup = "showEvent('onmaskmouseupInputID', 'onmaskmouseup work!')";
- onmousedown = "showEvent('onmousedownInputID', 'onmousedown work!')";
- onmousemove = "showEvent('onmousemoveInputID', 'onmousemove work!')";
- onmouseout = "showEvent('onmouseoutInputID', 'onmouseout work!')";
- onmouseover = "showEvent('onmouseoverInputID', 'onmouseover work!')";
- onmouseup = "showEvent('onmouseupInputID', 'onmouseup work!')";
- onmove = "showEvent('onmoveInputID', 'onmove work!')";
- onorderchanged = "showEvent('onorderchangedInputID', 'onorderchanged work!')";
- onresize = "showEvent('onresizeInputID', 'onresize work!')";
- onselect = "showEvent('onselectInputID', 'onselect work!')";
- onselected = "showEvent('onselectedInputID', 'onselected work!')";
- onselectionchange = "showEvent('onselectionchangeInputID', 'onselectionchange work!')";
- onshow = "showEvent('onshowInputID', 'onshow work!')";
- onslide = "showEvent('onslideInputID', 'onslide work!')";
- onsubmit = "showEvent('onsubmitInputID', 'onsubmit work!')";
- ontabenter = "showEvent('ontabenterInputID', 'ontabenter work!')";
- ontableave = "showEvent('ontableaveInputID', 'ontableave work!')";
- ontimeselect = "showEvent('ontimeselectInputID', 'ontimeselect work!')";
- ontimeselected = "showEvent('ontimeselectedInputID', 'ontimeselected work!')";
- ontopclick = "showEvent('ontopclickInputID', 'ontopclick work!')";
- onupclick = "showEvent('onupclickInputID', 'onupclick work!')";
- ongroupcollapse = "showEvent('ongroupcollapseInputID', 'ongroupcollapse work!')";
- opened = "showEvent('openedInputID', 'opened work!')";
- oneditactivated = "showEvent('oneditactivatedInputID', 'oneditactivated work!')";
- oneditactivation = "showEvent('oneditactivationInputID', 'oneditactivation work!')";
- oninputdblclick = "showEvent('oninputdblclickInputID', 'oninputdblclick work!')";
- oninputmousedown = "showEvent('oninputmousedownInputID', 'oninputmousedown work!')";
- oninputmousemove = "showEvent('oninputmousemoveInputID', 'oninputmousemove work!')";
- oninputmouseout = "showEvent('oninputmouseoutInputID', 'oninputmouseout work!')";
- oninputmouseover = "showEvent('oninputmouseoverInputID', 'oninputmouseover work!')";
- oninputmouseup = "showEvent('oninputmouseupInputID', 'oninputmouseup work!')";
- onviewactivated = "showEvent('onviewactivatedInputID', 'onviewactivated work!')";
- onviewactivation = "showEvent('onviewactivationInputID', 'onviewactivation work!')";
+ onitemclick = "showEvent('formID:infoFormID:infoSubview:onitemclickInputID', 'onitemclick work!')";
+ onitemdblclick = "showEvent('formID:infoFormID:infoSubview:onitemdblclickInputID', 'onitemdblclick work!')";
+ onitemkeydown = "showEvent('formID:infoFormID:infoSubview:onitemkeydownInputID', 'onitemkeydown work!')";
+ onitemkeypress = "showEvent('formID:infoFormID:infoSubview:onitemkeypressInputID', 'onitemkeypress work!')";
+ onitemkeyup = "showEvent('formID:infoFormID:infoSubview:onitemkeyupInputID', 'onitemkeyup work!')";
+ onitemmousedown = "showEvent('formID:infoFormID:infoSubview:onitemmousedownInputID', 'onitemmousedown work!')";
+ onitemmousemove = "showEvent('formID:infoFormID:infoSubview:onitemmousemoveInputID', 'onitemmousemove work!')";
+ onitemmouseout = "showEvent('formID:infoFormID:infoSubview:onitemmouseoutInputID', 'onitemmouseout work!')";
+ onitemmouseover = "showEvent('formID:infoFormID:infoSubview:onitemmouseoverInputID', 'onitemmouseover work!')";
+ onitemmouseup = "showEvent('formID:infoFormID:infoSubview:onitemmouseupInputID', 'onitemmouseup work!')";
+ /* --- */
+ onobjectchange = "showEvent('formID:infoFormID:infoSubview:onobjectchangeInputID', 'onobjectchange work!')";
+ onLoadMap = "showEvent('formID:infoFormID:infoSubview:onLoadMapInputID', 'onLoadMap work!')";
+ opened = "showEvent('formID:infoFormID:infoSubview:openedInputID', 'opened work!')";
+ onRowClick = "showEvent('formID:infoFormID:infoSubview:onRowClickInputID', 'onRowClick work!')";
+ onRowDblClick = "showEvent('formID:infoFormID:infoSubview:onRowDblClickInputID', 'onRowDblClick work!')";
+ onRowMouseDown = "showEvent('formID:infoFormID:infoSubview:onRowMouseDownInputID', 'onRowMouseDown work!')";
+ onRowMouseMove = "showEvent('formID:infoFormID:infoSubview:onRowMouseMoveInputID', 'onRowMouseMove work!')";
+ onRowMouseOut = "showEvent('formID:infoFormID:infoSubview:onRowMouseOutInputID', 'onRowMouseOut work!')";
+ onRowMouseOver = "showEvent('formID:infoFormID:infoSubview:onRowMouseOverInputID', 'onRowMouseOver work!')";
+ onRowMouseUp = "showEvent('formID:infoFormID:infoSubview:onRowMouseUpInputID', 'onRowMouseUp work!')";
+ onbeforedomupdate = "showEvent('formID:infoFormID:infoSubview:onbeforedomupdateInputID', 'onbeforedomupdate work!')";
+ onblur = "showEvent('formID:infoFormID:infoSubview:onblurInputID', 'onblur work!')";
+ onbottomclick = "showEvent('formID:infoFormID:infoSubview:onbottomclickInputID', 'onbottomclick work!')";
+ onchange = "showEvent('formID:infoFormID:infoSubview:onchangeInputID', 'onchange work!')";
+ onchanged = "showEvent('formID:infoFormID:infoSubview:onchangedInputID', 'onchanged work!')";
+ onclick = "showEvent('formID:infoFormID:infoSubview:onclickInputID', 'onclick work!')";
+ oncollapse = "showEvent('formID:infoFormID:infoSubview:oncollapseInputID', 'oncollapse work!')";
+ oncomplete = "showEvent('formID:infoFormID:infoSubview:oncompleteInputID', 'oncomplete work!')";
+ oncontextmenu = "showEvent('formID:infoFormID:infoSubview:oncontextmenuInputID', 'oncontextmenu work!')";
+ onclear = "showEvent('formID:infoFormID:infoSubview:onclearInputID', 'onclear work!')";
+ oncurrentdateselect = "showEvent('formID:infoFormID:infoSubview:oncurrentdateselectInputID', 'oncurrentdateselect work!')";
+ ondatemouseout = "showEvent('formID:infoFormID:infoSubview:ondatemouseoutInputID', 'ondatemouseout work!')";
+ ondatemouseover = "showEvent('formID:infoFormID:infoSubview:ondatemouseoverInputID', 'ondatemouseover work!')";
+ ondateselect = "showEvent('formID:infoFormID:infoSubview:ondateselectInputID', 'ondateselect work!')";
+ ondateselected = "showEvent('formID:infoFormID:infoSubview:ondateselectedInputID', 'ondateselected work!')";
+ ondblclick = "showEvent('formID:infoFormID:infoSubview:ondblclickInputID', 'ondblclick work!')";
+ ondownclick = "showEvent('formID:infoFormID:infoSubview:ondownclickInputID', 'ondownclick work!')";
+ ondragend = "showEvent('formID:infoFormID:infoSubview:ondragendInputID', 'ondragend work!')";
+ ondragenter = "showEvent('formID:infoFormID:infoSubview:ondragenterInputID', 'ondragenter work!')";
+ ondragexit = "showEvent('formID:infoFormID:infoSubview:ondragexitInputID', 'ondragexit work!')";
+ ondragstart = "showEvent('formID:infoFormID:infoSubview:ondragstartInputID', 'ondragstart work!')";
+ ondrop = "showEvent('formID:infoFormID:infoSubview:ondropInputID', 'ondrop work!')";
+ ondropend = "showEvent('formID:infoFormID:infoSubview:ondropendInputID', 'ondropend work!')";
+ ondropout = "showEvent('formID:infoFormID:infoSubview:ondropoutInputID', 'ondropout work!')";
+ ondropover = "showEvent('infoFormID:infoSubview:ondropoverInputID', 'ondropover work!')";
+ onerror = "showEvent('formID:infoFormID:infoSubview:onerrorInputID', 'onerror work!')";
+ onexpand = "showEvent('formID:infoFormID:infoSubview:onexpandInputID', 'onexpand work!')";
+ onfocus = "showEvent('formID:infoFormID:infoSubview:onfocusInputID', 'onfocus work!')";
+ ongroupactivate = "showEvent('formID:infoFormID:infoSubview:ongroupactivateInputID', 'ongroupactivate work!')";
+ ongroupexpand = "showEvent('formID:infoFormID:infoSubview:ongroupexpandInputID', 'ongroupexpand work!')";
+ onheaderclick = "showEvent('formID:infoFormID:infoSubview:onheaderclickInputID', 'onheaderclick work!')";
+ onhide = "showEvent('formID:infoFormID:infoSubview:onhideInputID', 'onhide work!')";
+ oninit = "showEvent('formID:infoFormID:infoSubview:oninitInputID', 'oninit work!')";
+ oninputblur = "showEvent('formID:infoFormID:infoSubview:oninputblurInputID', 'oninputblur work!')";
+ oninputchange = "showEvent('formID:infoFormID:infoSubview:oninputchangeInputID', 'oninputchange work!')";
+ oninputclick = "showEvent('formID:infoFormID:infoSubview:oninputclickInputID', 'oninputclick work!')";
+ oninputfocus = "showEvent('formID:infoFormID:infoSubview:oninputfocusInputID', 'oninputfocus work!')";
+ oninputkeydown = "showEvent('formID:infoFormID:infoSubview:oninputkeydownInputID', 'oninputkeydown work!')";
+ oninputkeypress = "showEvent('formID:infoFormID:infoSubview:oninputkeypressInputID', 'oninputkeypress work!')";
+ oninputkeyup = "showEvent('formID:infoFormID:infoSubview:oninputkeyupInputID', 'oninputkeyup work!')";
+ oninputselect = "showEvent('formID:infoFormID:infoSubview:oninputselectInputID', 'oninputselect work!')";
+ onitemchange = "showEvent('formID:infoFormID:infoSubview:onitemchangeInputID', 'onitemchange work!')";
+ onitemhover = "showEvent('formID:infoFormID:infoSubview:onitemhoverInputID', 'onitemhover work!')";
+ onitemselect = "showEvent('formID:infoFormID:infoSubview:onitemselectInputID', 'onitemselect work!')";
+ onitemselected = "showEvent('formID:infoFormID:infoSubview:onitemselectedInputID', 'onitemselected work!')";
+ onkeydown = "showEvent('formID:infoFormID:infoSubview:onkeydownInputID', 'onkeydown work!')";
+ onkeypress = "showEvent('formID:infoFormID:infoSubview:onkeypressInputID', 'onkeypress work!')";
+ onkeyup = "showEvent('formID:infoFormID:infoSubview:onkeyupInputID', 'onkeyup work!')";
+ onlistcall = "showEvent('formID:infoFormID:infoSubview:onlistcallInputID', 'onlistcall work!')";
+ onmaskclick = "showEvent('formID:infoFormID:infoSubview:onmaskclickInputID', 'onmaskclick work!')";
+ onmaskcontextmenu = "showEvent('formID:infoFormID:infoSubview:onmaskcontextmenuInputID', 'onmaskcontextmenu work!')";
+ onmaskdblclick = "showEvent('formID:infoFormID:infoSubview:onmaskdblclickInputID', 'onmaskdblclick work!')";
+ onmaskmousedown = "showEvent('formID:infoFormID:infoSubview:onmaskmousedownInputID', 'onmaskmousedown work!')";
+ onmaskmousemove = "showEvent('formID:infoFormID:infoSubview:onmaskmousemoveInputID', 'onmaskmousemove work!')";
+ onmaskmouseout = "showEvent('formID:infoFormID:infoSubview:onmaskmouseoutInputID', 'onmaskmouseout work!')";
+ onmaskmouseover = "showEvent('formID:infoFormID:infoSubview:onmaskmouseoverInputID', 'onmaskmouseover work!')";
+ onmaskmouseup = "showEvent('formID:infoFormID:infoSubview:onmaskmouseupInputID', 'onmaskmouseup work!')";
+ onmousedown = "showEvent('formID:infoFormID:infoSubview:onmousedownInputID', 'onmousedown work!')";
+ onmousemove = "showEvent('formID:infoFormID:infoSubview:onmousemoveInputID', 'onmousemove work!')";
+ onmouseout = "showEvent('formID:infoFormID:infoSubview:onmouseoutInputID', 'onmouseout work!')";
+ onmouseover = "showEvent('formID:infoFormID:infoSubview:onmouseoverInputID', 'onmouseover work!')";
+ onmouseup = "showEvent('formID:infoFormID:infoSubview:onmouseupInputID', 'onmouseup work!')";
+ onmove = "showEvent('formID:infoFormID:infoSubview:onmoveInputID', 'onmove work!')";
+ onorderchanged = "showEvent('formID:infoFormID:infoSubview:onorderchangedInputID', 'onorderchanged work!')";
+ onresize = "showEvent('formID:infoFormID:infoSubview:onresizeInputID', 'onresize work!')";
+ onselect = "showEvent('formID:infoFormID:infoSubview:onselectInputID', 'onselect work!')";
+ onselected = "showEvent('formID:infoFormID:infoSubview:onselectedInputID', 'onselected work!')";
+ onselectionchange = "showEvent('formID:infoFormID:infoSubview:onselectionchangeInputID', 'onselectionchange work!')";
+ onshow = "showEvent('formID:infoFormID:infoSubview:onshowInputID', 'onshow work!')";
+ onslide = "showEvent('formID:infoFormID:infoSubview:onslideInputID', 'onslide work!')";
+ onsubmit = "showEvent('formID:infoFormID:infoSubview:onsubmitInputID', 'onsubmit work!')";
+ ontabenter = "showEvent('formID:infoFormID:infoSubview:ontabenterInputID', 'ontabenter work!')";
+ ontableave = "showEvent('formID:infoFormID:infoSubview:ontableaveInputID', 'ontableave work!')";
+ ontimeselect = "showEvent('formID:infoFormID:infoSubview:ontimeselectInputID', 'ontimeselect work!')";
+ ontimeselected = "showEvent('formID:infoFormID:infoSubview:ontimeselectedInputID', 'ontimeselected work!')";
+ ontopclick = "showEvent('formID:infoFormID:infoSubview:ontopclickInputID', 'ontopclick work!')";
+ onupclick = "showEvent('formID:infoFormID:infoSubview:onupclickInputID', 'onupclick work!')";
+ ongroupcollapse = "showEvent('formID:infoFormID:infoSubview:ongroupcollapseInputID', 'ongroupcollapse work!')";
+ onSlideSubmit = "showEvent('formID:infoFormID:infoSubview:onSlideSubmitInputID', 'onSlideSubmit work!')";
+ oneditactivated = "showEvent('formID:infoFormID:infoSubview:oneditactivatedInputID', 'oneditactivated work!')";
+ oneditactivation = "showEvent('formID:infoFormID:infoSubview:oneditactivationInputID', 'oneditactivation work!')";
+ oninputdblclick = "showEvent('formID:infoFormID:infoSubview:oninputdblclickInputID', 'oninputdblclick work!')";
+ oninputmousedown = "showEvent('formID:infoFormID:infoSubview:oninputmousedownInputID', 'oninputmousedown work!')";
+ oninputmousemove = "showEvent('formID:infoFormID:infoSubview:oninputmousemoveInputID', 'oninputmousemove work!')";
+ oninputmouseout = "showEvent('formID:infoFormID:infoSubview:oninputmouseoutInputID', 'oninputmouseout work!')";
+ oninputmouseover = "showEvent('formID:infoFormID:infoSubview:oninputmouseoverInputID', 'oninputmouseover work!')";
+ oninputmouseup = "showEvent('formID:infoFormID:infoSubview:oninputmouseupInputID', 'oninputmouseup work!')";
+ onsizerejected = "showEvent('formID:infoFormID:infoSubview:onsizerejectedInputID', 'onsizerejected work!')";
+ ontyperejected = "showEvent('formID:infoFormID:infoSubview:ontyperejectedInputID', 'ontyperejected work!')";
+ onupload = "showEvent('formID:infoFormID:infoSubview:onuploadInputID', 'onupload work!')";
+ onuploadcanceled = "showEvent('formID:infoFormID:infoSubview:onuploadcanceledInputID', 'onuploadcanceled work!')";
+ onuploadcomplete = "showEvent('formID:infoFormID:infoSubview:onuploadcompleteInputID', 'onuploadcomplete work!')";
+ onviewactivated = "showEvent('formID:infoFormID:infoSubview:onviewactivatedInputID', 'onviewactivated work!')";
+ onviewactivation = "showEvent('formID:infoFormID:infoSubview:onviewactivationInputID', 'onviewactivation work!')";
+ onbeforehide = "showEvent('formID:infoFormID:infoSubview:onbeforehideInputID', 'onbeforehide work!')";
+ onbeforeshow = "showEvent('formID:infoFormID:infoSubview:onbeforeshowInputID', 'onbeforeshow work!')";
+ onadd = "showEvent('formID:infoFormID:infoSubview:onaddInputID', 'onadd work!')";
}
public String getOncontextmenu() {
@@ -1167,4 +1211,172 @@
this.oneditactivation = oneditactivation;
}
+ public String getOnclear() {
+ return onclear;
+ }
+
+ public void setOnclear(String onclear) {
+ this.onclear = onclear;
+ }
+
+ public String getOnSlideSubmit() {
+ return onSlideSubmit;
+ }
+
+ public void setOnSlideSubmit(String onSlideSubmit) {
+ this.onSlideSubmit = onSlideSubmit;
+ }
+
+ public String getOnsizerejected() {
+ return onsizerejected;
+ }
+
+ public void setOnsizerejected(String onsizerejected) {
+ this.onsizerejected = onsizerejected;
+ }
+
+ public String getOntyperejected() {
+ return ontyperejected;
+ }
+
+ public void setOntyperejected(String ontyperejected) {
+ this.ontyperejected = ontyperejected;
+ }
+
+ public String getOnupload() {
+ return onupload;
+ }
+
+ public void setOnupload(String onupload) {
+ this.onupload = onupload;
+ }
+
+ public String getOnuploadcanceled() {
+ return onuploadcanceled;
+ }
+
+ public void setOnuploadcanceled(String onuploadcanceled) {
+ this.onuploadcanceled = onuploadcanceled;
+ }
+
+ public String getOnuploadcomplete() {
+ return onuploadcomplete;
+ }
+
+ public void setOnuploadcomplete(String onuploadcomplete) {
+ this.onuploadcomplete = onuploadcomplete;
+ }
+
+ public String getOnbeforehide() {
+ return onbeforehide;
+ }
+
+ public void setOnbeforehide(String onbeforehide) {
+ this.onbeforehide = onbeforehide;
+ }
+
+ public String getOnbeforeshow() {
+ return onbeforeshow;
+ }
+
+ public void setOnbeforeshow(String onbeforeshow) {
+ this.onbeforeshow = onbeforeshow;
+ }
+
+ public String getOnobjectchange() {
+ return onobjectchange;
+ }
+
+ public void setOnobjectchange(String onobjectchange) {
+ this.onobjectchange = onobjectchange;
+ }
+
+ public String getOnadd() {
+ return onadd;
+ }
+
+ public void setOnadd(String onadd) {
+ this.onadd = onadd;
+ }
+
+ public String getOnitemclick() {
+ return onitemclick;
+ }
+
+ public void setOnitemclick(String onitemclick) {
+ this.onitemclick = onitemclick;
+ }
+
+ public String getOnitemdblclick() {
+ return onitemdblclick;
+ }
+
+ public void setOnitemdblclick(String onitemdblclick) {
+ this.onitemdblclick = onitemdblclick;
+ }
+
+ public String getOnitemkeydown() {
+ return onitemkeydown;
+ }
+
+ public void setOnitemkeydown(String onitemkeydown) {
+ this.onitemkeydown = onitemkeydown;
+ }
+
+ public String getOnitemkeypress() {
+ return onitemkeypress;
+ }
+
+ public void setOnitemkeypress(String onitemkeypress) {
+ this.onitemkeypress = onitemkeypress;
+ }
+
+ public String getOnitemkeyup() {
+ return onitemkeyup;
+ }
+
+ public void setOnitemkeyup(String onitemkeyup) {
+ this.onitemkeyup = onitemkeyup;
+ }
+
+ public String getOnitemmousedown() {
+ return onitemmousedown;
+ }
+
+ public void setOnitemmousedown(String onitemmousedown) {
+ this.onitemmousedown = onitemmousedown;
+ }
+
+ public String getOnitemmousemove() {
+ return onitemmousemove;
+ }
+
+ public void setOnitemmousemove(String onitemmousemove) {
+ this.onitemmousemove = onitemmousemove;
+ }
+
+ public String getOnitemmouseout() {
+ return onitemmouseout;
+ }
+
+ public void setOnitemmouseout(String onitemmouseout) {
+ this.onitemmouseout = onitemmouseout;
+ }
+
+ public String getOnitemmouseover() {
+ return onitemmouseover;
+ }
+
+ public void setOnitemmouseover(String onitemmouseover) {
+ this.onitemmouseover = onitemmouseover;
+ }
+
+ public String getOnitemmouseup() {
+ return onitemmouseup;
+ }
+
+ public void setOnitemmouseup(String onitemmouseup) {
+ this.onitemmouseup = onitemmouseup;
+ }
+
}
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-07-15 23:04:50 UTC (rev 9628)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-07-16 07:22:19 UTC (rev 9629)
@@ -13,9 +13,9 @@
<script type="text/javascript">
function showEvent(elementID, value) {
var oldObject = window.document.getElementById(elementID);
- if(oldObject == null || oldObject.type == "text") return;
+ if(oldObject == null) return;
var newObject = window.document.createElement('input');
- if(oldObject.type) newObject.type = "text";
+ if(oldObject.type) newObject.type = oldObject.type;
if(oldObject.size) newObject.size = oldObject.size;
if(oldObject.value) newObject.value = value;
if(oldObject.id) newObject.id = oldObject.id;
@@ -51,21 +51,6 @@
<ui:include src="/pages/Info/Info.xhtml" />
</h:form>
- <rich:modalPanel id="eventInfoID" autosized="true" minHeight="550"
- minWidth="200" moveable="true" style="overflow: true;">
- <f:facet name="header">
- <h:outputText value="Events ..." />
- </f:facet>
- <f:facet name="controls">
- <h:graphicImage value="/pics/error.gif"
- onclick="Richfaces.hideModalPanel('eventInfoID');" />
- </f:facet>
-
- <ui:include src="/pages/Action/EventInfo.xhtml" />
-
- </rich:modalPanel>
- <a4j:commandButton value="Show event"
- onclick="Richfaces.showModalPanel('eventInfoID');return false;"></a4j:commandButton>
</h:form>
</body>
</f:view>
16 years, 2 months
JBoss Rich Faces SVN: r9628 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-07-15 19:04:50 -0400 (Tue, 15 Jul 2008)
New Revision: 9628
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
http://jira.jboss.org/jira/browse/RF-3703
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-07-15 21:50:27 UTC (rev 9627)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-07-15 23:04:50 UTC (rev 9628)
@@ -1431,30 +1431,6 @@
}
-// Test for re-evaluate Scripts in updated part. Opera & Safari do it.
-A4J.AJAX._scriptEvaluated=false;
-if (!document.all || window.opera){
- setTimeout(function(){
- try{
- // Simulate same calls as on XmlHttp
- var oDomDoc = Sarissa.getDomDocument();
- var _span = document.createElement("span");
- document.documentElement.appendChild(_span);
- // If script evaluated with used replace method, variable will be set to true
- var xmlString = "<html xmlns='http://www.w3.org/1999/xhtml'><sc"+"ript>A4J.AJAX._scriptEvaluated=true;</scr"+"ipt></html>";
- oDomDoc = (new DOMParser()).parseFromString(xmlString, "text/xml");
- var _script=oDomDoc.getElementsByTagName("script")[0];
- if(!window.opera && _span.outerHTML){
- _span.outerHTML = new XMLSerializer().serializeToString(_script);
- } else {
- var importednode ;
- importednode = window.document.importNode(_script, true);
- document.documentElement.replaceChild(importednode,_span);
- }
-
- } catch(e){ /* Mozilla in XHTML mode not have innerHTML */ };
- },0);
-}
A4J.AJAX.getText = function(oNode, includeComment) {
var s = "";
@@ -1510,3 +1486,28 @@
return this._xhtmlScriptMode > 1;
}
+
+//Test for re-evaluate Scripts in updated part. Opera & Safari do it.
+A4J.AJAX._scriptEvaluated=false;
+if (!document.all || window.opera){
+ setTimeout(function(){
+ try{
+ // Simulate same calls as on XmlHttp
+ var oDomDoc = Sarissa.getDomDocument();
+ var _span = document.createElement("span");
+ document.documentElement.appendChild(_span);
+ // If script evaluated with used replace method, variable will be set to true
+ var xmlString = "<html xmlns='http://www.w3.org/1999/xhtml'><sc"+"ript>A4J.AJAX._scriptEvaluated=true;</scr"+"ipt></html>";
+ oDomDoc = (new DOMParser()).parseFromString(xmlString, "text/xml");
+ var _script=oDomDoc.getElementsByTagName("script")[0];
+ if(!window.opera && _span.outerHTML){
+ _span.outerHTML = new XMLSerializer().serializeToString(_script);
+ } else {
+ var importednode ;
+ importednode = window.document.importNode(_script, true);
+ document.body.replaceChild(importednode,_span);
+ }
+
+ } catch(e){ /* Mozilla in XHTML mode not have innerHTML */ };
+ },0);
+}
16 years, 2 months
JBoss Rich Faces SVN: r9627 - trunk/ui/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-15 17:50:27 -0400 (Tue, 15 Jul 2008)
New Revision: 9627
Modified:
trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
Log:
Expanded leaves now have right icon
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2008-07-15 18:23:28 UTC (rev 9626)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2008-07-15 21:50:27 UTC (rev 9627)
@@ -123,7 +123,7 @@
} else {
variables.setVariable("line", "dr-tree-h-ic-line-node");
}
- if (tree.isExpanded()) {
+ if (tree.isExpanded() && !tree.isLeaf()) {
variables
.setVariable("lineFirst", "dr-tree-h-ic-line-exp");
} else {
16 years, 2 months
JBoss Rich Faces SVN: r9626 - trunk/test-applications/jsp/src/main/java/validator.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-15 14:23:28 -0400 (Tue, 15 Jul 2008)
New Revision: 9626
Added:
trunk/test-applications/jsp/src/main/java/validator/Bean.java
trunk/test-applications/jsp/src/main/java/validator/DataBean.java
trunk/test-applications/jsp/src/main/java/validator/LengthBean.java
trunk/test-applications/jsp/src/main/java/validator/MaxBean.java
trunk/test-applications/jsp/src/main/java/validator/MinBean.java
trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java
trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java
trunk/test-applications/jsp/src/main/java/validator/NotNullBean.java
trunk/test-applications/jsp/src/main/java/validator/Validable.java
Log:
Added: trunk/test-applications/jsp/src/main/java/validator/Bean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/Bean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/Bean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,33 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package validator;
+
+import org.hibernate.validator.Email;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+
+}
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/java/validator/DataBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/DataBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package validator;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Valid;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataBean {
+
+ private final List<Validable> beans;
+
+ /**
+ * @return the beans
+ */
+ @Valid
+ public List<Validable> getBeans() {
+ return beans;
+ }
+
+ public DataBean() {
+ beans = new ArrayList<Validable>(6);
+ beans.add(new NotNullBean());
+ beans.add(new NotEmptyBean());
+ beans.add(new LengthBean());
+ beans.add(new MinBean());
+ beans.add(new MaxBean());
+ beans.add(new MinMaxBean());
+ }
+
+ @Max(value=20,message="Total value should be less then 20")
+ public int getTotal(){
+ int total = 0;
+ for (Validable bean : beans) {
+ total += bean.getIntValue();
+ }
+ return total;
+ }
+
+
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/LengthBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/LengthBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/LengthBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,58 @@
+/**
+ *
+ */
+package validator;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class LengthBean implements Validable {
+
+ @Length(max=10,min=4,message="incorrect field length")
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Validate String Length, for a range 4-10 chars";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/MaxBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/MaxBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/MaxBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,60 @@
+/**
+ *
+ */
+package validator;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MaxBean implements Validable {
+
+ private String text;
+
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, less then 10";
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/MinBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/MinBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/MinBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,59 @@
+/**
+ *
+ */
+package validator;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, more then 1";
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/MinMaxBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,61 @@
+/**
+ *
+ */
+package validator;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinMaxBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, valid values from 2 to 10";
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/NotEmptyBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package validator;
+
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotEmptyBean implements Validable {
+
+ @NotEmpty
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, Not Empty Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/NotNullBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/NotNullBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/NotNullBean.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,56 @@
+/**
+ *
+ */
+package validator;
+
+import org.hibernate.validator.NotNull;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotNullBean implements Validable {
+
+ @NotNull
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, Not Null Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/validator/Validable.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/Validable.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/validator/Validable.java 2008-07-15 18:23:28 UTC (rev 9626)
@@ -0,0 +1,19 @@
+/**
+ *
+ */
+package validator;
+
+/**
+ * @author asmirnov
+ *
+ */
+public interface Validable {
+
+ public String getText();
+
+ public String getTextDescription();
+
+ public int getIntValue();
+
+ public String getIntDescription();
+}
16 years, 2 months
JBoss Rich Faces SVN: r9625 - in trunk/test-applications/jsp/src/main: webapp/Validator and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-15 14:23:04 -0400 (Tue, 15 Jul 2008)
New Revision: 9625
Modified:
trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
Modified: trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2008-07-15 17:56:39 UTC (rev 9624)
+++ trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2008-07-15 18:23:04 UTC (rev 9625)
@@ -1,16 +1,37 @@
package validator;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.validator.Validator;
-import javax.faces.validator.ValidatorException;
+import javax.faces.component.UIMessages;
-public class ValidatorBean implements Validator {
+import org.hibernate.validator.CreditCardNumber;
+import org.hibernate.validator.Email;
- public void validate(FacesContext context, UIComponent component,
- Object value) throws ValidatorException {
- // TODO Auto-generated method stub
+public class ValidatorBean {
+ @Email(message="not a valid email value!")
+ private String mailValue;
+ @CreditCardNumber(message="not a valid credit card number")
+ private String creditValue;
+ public String getCreditValue() {
+ return creditValue;
}
+ public void setCreditValue(String creditValue) {
+ this.creditValue = creditValue;
+ }
+
+ public String getMailValue() {
+ return mailValue;
+ }
+
+ public ValidatorBean(){
+ this.mailValue = "";
+ this.creditValue = "";
+ }
+ public String getMailDescription() {
+ return "E-mail validation:";
+ }
+
+ public String getCreditDescription() {
+ return "Credit card validation:";
+ }
}
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp 2008-07-15 17:56:39 UTC (rev 9624)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp 2008-07-15 18:23:04 UTC (rev 9625)
@@ -3,5 +3,61 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="validatorSubviewID">
-<div style="FONT-WEIGHT:bold;">Insert rich:validator</div>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText>Single input field with label and message. Validated by AJAX on every changing.</h:outputText>
+ </f:facet>
+ <h:outputLabel for="ltext" value="#{lengthBean.textDescription}" />
+ <h:inputText id="ltext" value="#{lengthBean.text}">
+ <rich:ajaxValidator event="onchange" />
+ </h:inputText>
+ <rich:message for="ltext" showDetail="true" showSummary="true" />
+ </rich:panel>
+ <h2>Input fields with label and message in the JSF dataTable. Each
+ field validated by AJAX on "onchange" event</h2>
+ <rich:graphValidator value="#{data}">
+ <rich:dataTable value="#{data.beans}" var="bean" id="table">
+ <f:facet name="header">
+ <h:outputText
+ value="Validate values in the data table. Total sum for an all integer values validated for a value less then 20" />
+ </f:facet>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="text field" />
+ </f:facet>
+ <h:outputLabel for="text" value="#{bean.textDescription}" />
+ <h:inputText id="text" value="#{bean.text}">
+ <rich:ajaxValidator event="onchange" />
+ </h:inputText>
+ <rich:message for="text" showDetail="true" showSummary="true" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="integer field" />
+ </f:facet>
+ <h:outputLabel for="intValue" value="#{bean.intDescription}" />
+ <h:inputText id="intValue" value="#{bean.intValue}">
+ <rich:ajaxValidator event="onchange" />
+ </h:inputText>
+ <rich:message for="intValue" showDetail="true" showSummary="true" />
+ </h:column>
+ <f:facet name="footer">
+ <h:panelGroup>
+ <h:outputText>in addition to fields validation, total sum for an all integer values validated for a value less then 20.</h:outputText>
+ <h:commandButton value="Submit all fields"></h:commandButton>
+ </h:panelGroup>
+ </f:facet>
+ </rich:dataTable>
+ </rich:graphValidator>
+ <br />
+
+
+ <h:panelGroup>
+ <h:outputLabel for="mailValue" value="#{validator.mailDescription}" />
+ <h:inputText value="#{validator.someValue}" id="mailValue">
+ <rich:ajaxValidator event="onchange"></rich:ajaxValidator>
+ </h:inputText>
+ <rich:message for="mailValue" showDetail="true" showSummary="true" />
+ </h:panelGroup>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml 2008-07-15 17:56:39 UTC (rev 9624)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Validator.xml 2008-07-15 18:23:04 UTC (rev 9625)
@@ -3,6 +3,21 @@
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>validator.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>data</managed-bean-name>
+ <managed-bean-class>validator.DataBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>lengthBean</managed-bean-name>
+ <managed-bean-class>validator.LengthBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+<managed-bean>
<managed-bean-name>validator</managed-bean-name>
<managed-bean-class>validator.ValidatorBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-07-15 17:56:39 UTC (rev 9624)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-07-15 18:23:04 UTC (rev 9625)
@@ -20,7 +20,7 @@
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml!
,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/!
faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml</param-valu
e>
+ <param-value>/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.x!
ml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/fac!
es-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF
/faces-config-Custom.xml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
16 years, 2 months
JBoss Rich Faces SVN: r9624 - trunk/samples/treeModelDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-15 13:56:39 -0400 (Tue, 15 Jul 2008)
New Revision: 9624
Modified:
trunk/samples/treeModelDemo/src/main/webapp/pages/rf-1081.jsp
Log:
RF-1081 demo updated
Modified: trunk/samples/treeModelDemo/src/main/webapp/pages/rf-1081.jsp
===================================================================
--- trunk/samples/treeModelDemo/src/main/webapp/pages/rf-1081.jsp 2008-07-15 17:55:49 UTC (rev 9623)
+++ trunk/samples/treeModelDemo/src/main/webapp/pages/rf-1081.jsp 2008-07-15 17:56:39 UTC (rev 9624)
@@ -17,54 +17,58 @@
<h:messages />
</a4j:outputPanel>
- <h:panelGrid columns="2">
- <tree:tree switchType="client" id="tree" reRender="tree" dropListener="#{loaderBean.treeDrop}">
- <model:treeNodesAdaptor id="project" nodes="#{loaderBean.projects}" var="project">
- <tree:treeNode dragType="project" acceptedTypes="srcDir,dir">
- <h:outputText value="Project: #{project.name}" />
- </tree:treeNode>
-
- <model:treeNodesAdaptor id="srcDir" var="srcDir" nodes="#{project.srcDirs}">
- <tree:treeNode dragType="srcDir" acceptedTypes="pkg">
- <h:outputText value="Source directory: #{srcDir.name}" />
+ <dnd:dragIndicator id="indicator" />
+
+ <tree:tree dragIndicator="indicator" switchType="client" id="tree" reRender="tree" dropListener="#{loaderBean.treeDrop}" style="width: 400px;">
+ <dnd:dndParam name="label" value="Tree" />
+
+ <model:treeNodesAdaptor id="project" nodes="#{loaderBean.projects}" var="project">
+ <tree:treeNode dragType="project" acceptedTypes="srcDir,dir">
+ <h:outputText value="Project: #{project.name}" />
+ </tree:treeNode>
+
+ <model:treeNodesAdaptor id="srcDir" var="srcDir" nodes="#{project.srcDirs}">
+ <tree:treeNode dragType="srcDir" acceptedTypes="pkg">
+ <h:outputText value="Source directory: #{srcDir.name}" />
+ </tree:treeNode>
+
+ <model:treeNodesAdaptor id="pkg" var="pkg" nodes="#{srcDir.packages}">
+ <tree:treeNode dragType="pkg" acceptedTypes="class">
+ <h:outputText value="Package: #{pkg.name}" />
</tree:treeNode>
-
- <model:treeNodesAdaptor id="pkg" var="pkg" nodes="#{srcDir.packages}">
- <tree:treeNode dragType="pkg" acceptedTypes="class">
- <h:outputText value="Package: #{pkg.name}" />
+
+ <model:treeNodesAdaptor id="class" var="class" nodes="#{pkg.classes}">
+ <tree:treeNode dragType="class">
+ <h:outputText value="Class: #{class.name}" />
</tree:treeNode>
-
- <model:treeNodesAdaptor id="class" var="class" nodes="#{pkg.classes}">
- <tree:treeNode dragType="class">
- <h:outputText value="Class: #{class.name}" />
- </tree:treeNode>
- </model:treeNodesAdaptor>
</model:treeNodesAdaptor>
-
</model:treeNodesAdaptor>
+
+ </model:treeNodesAdaptor>
+
+ <model:recursiveTreeNodesAdaptor id="dir" var="dir"
+ roots="#{project.dirs}" nodes="#{dir.directories}">
+ <tree:treeNode dragType="dir" acceptedTypes="dir,file">
+ <h:outputText value="Directory: #{dir.name}" />
+ </tree:treeNode>
- <model:recursiveTreeNodesAdaptor id="dir" var="dir"
- roots="#{project.dirs}" nodes="#{dir.directories}">
- <tree:treeNode dragType="dir" acceptedTypes="file">
- <h:outputText value="Directory: #{dir.name}" />
+ <model:treeNodesAdaptor id="file" var="file" nodes="#{dir.files}">
+ <tree:treeNode dragType="file">
+ <h:outputText value="File: #{file.name}" />
</tree:treeNode>
-
- <model:treeNodesAdaptor id="file" var="file" nodes="#{dir.files}">
- <tree:treeNode dragType="file">
- <h:outputText value="File: #{file.name}" />
- </tree:treeNode>
- </model:treeNodesAdaptor>
-
- </model:recursiveTreeNodesAdaptor>
- </model:treeNodesAdaptor>
- </tree:tree>
+ </model:treeNodesAdaptor>
- <h:panelGroup id="trash" layout="block" style="border: 1px dotted navy; padding: 15px; text-align: center;">
- <h:outputText value="Trash" />
- <dnd:dropSupport dropListener="#{loaderBean.trashDrop}" acceptedTypes="project,srcDir,pkg,class,dir,file" />
- </h:panelGroup>
- </h:panelGrid>
+ </model:recursiveTreeNodesAdaptor>
+ </model:treeNodesAdaptor>
+ </tree:tree>
+ <h:panelGroup id="trash" layout="block" style="border: 1px dotted navy; text-align: center; position: absolute; left: 450px; top: 25px; padding: 25px; background-color: white;">
+ <h:outputText value="Trash" />
+ <dnd:dropSupport dropListener="#{loaderBean.trashDrop}" acceptedTypes="project,srcDir,pkg,class,dir,file">
+ <dnd:dndParam name="label" value="Trash" />
+ </dnd:dropSupport>
+ </h:panelGroup>
+
<a4j:log popup="false" />
</h:form>
</f:view>
16 years, 2 months