JBoss Rich Faces SVN: r3805 - trunk/ui/core/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-06 14:21:15 -0500 (Tue, 06 Nov 2007)
New Revision: 3805
Modified:
trunk/ui/core/src/main/config/component/repeat.xml
Log:
http://jira.jboss.com/jira/browse/RF-1291
Modified: trunk/ui/core/src/main/config/component/repeat.xml
===================================================================
--- trunk/ui/core/src/main/config/component/repeat.xml 2007-11-06 19:07:14 UTC (rev 3804)
+++ trunk/ui/core/src/main/config/component/repeat.xml 2007-11-06 19:21:15 UTC (rev 3805)
@@ -55,8 +55,8 @@
<description>The attribute provides access to a component state on the client side.</description>
</property>
<property>
- <name>value</name>
- <classname>java.lang.String</classname>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
<description>The current value for this component.</description>
</property>
<property>
18 years, 6 months
JBoss Rich Faces SVN: r3804 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-06 14:07:14 -0500 (Tue, 06 Nov 2007)
New Revision: 3804
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
Log:
http://jira.jboss.com/jira/browse/RF-696 -fixed errors in examples
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2007-11-06 17:56:09 UTC (rev 3803)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2007-11-06 19:07:14 UTC (rev 3804)
@@ -106,7 +106,8 @@
<title>JSP Page</title>
<para>Here is the necessary page (echo.jsp):</para>
<programlisting role="XML"><![CDATA[
- <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+ <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+ <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
@@ -234,7 +235,7 @@
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
- </filter-map>
+ </filter-mapping>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
18 years, 6 months
JBoss Rich Faces SVN: r3802 - in branches/3.1.x: ui/effect/src/main/java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-06 12:42:28 -0500 (Tue, 06 Nov 2007)
New Revision: 3802
Modified:
branches/3.1.x/samples/effect-sample/src/main/webapp/effect.xhtml
branches/3.1.x/ui/effect/src/main/java/org/richfaces/renderkit/EffectRendererBase.java
branches/3.1.x/ui/effect/src/main/templates/effect.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1265
Modified: branches/3.1.x/samples/effect-sample/src/main/webapp/effect.xhtml
===================================================================
--- branches/3.1.x/samples/effect-sample/src/main/webapp/effect.xhtml 2007-11-06 17:12:40 UTC (rev 3801)
+++ branches/3.1.x/samples/effect-sample/src/main/webapp/effect.xhtml 2007-11-06 17:42:28 UTC (rev 3802)
@@ -18,6 +18,10 @@
<span onclick="hideIt()">Hide</span>
<span onclick="showIt()">Show</span>
+ <div id="my:text" style="width:100px;height:100px;background-color:lightgreen"> </div>
+
+ <e:effect for="my:text" event="onmouseover" type="Fade" params="duration:ma"/>
+
<div id="my" style="width:100px;height:100px;background-color:lightblue"> </div>
<e:effect for="my" name="hideIt" type="Fade"/>
Modified: branches/3.1.x/ui/effect/src/main/java/org/richfaces/renderkit/EffectRendererBase.java
===================================================================
--- branches/3.1.x/ui/effect/src/main/java/org/richfaces/renderkit/EffectRendererBase.java 2007-11-06 17:12:40 UTC (rev 3801)
+++ branches/3.1.x/ui/effect/src/main/java/org/richfaces/renderkit/EffectRendererBase.java 2007-11-06 17:42:28 UTC (rev 3802)
@@ -9,6 +9,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.javascript.JSEncoder;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.richfaces.component.UIEffect;
import org.richfaces.json.JSONTokener;
@@ -129,4 +130,21 @@
}
}
}
+
+ public String escapeJavaScript(Object s) {
+ if (s != null) {
+ JSEncoder encoder = new JSEncoder();
+ StringBuffer result = new StringBuffer();
+ String string = s.toString();
+ int length = string.length();
+
+ for (int i = 0; i < length; i++) {
+ result.append(encoder.encode(string.charAt(i)));
+ }
+
+ return result.toString();
+ } else {
+ return null;
+ }
+ }
}
Modified: branches/3.1.x/ui/effect/src/main/templates/effect.jspx
===================================================================
--- branches/3.1.x/ui/effect/src/main/templates/effect.jspx 2007-11-06 17:12:40 UTC (rev 3801)
+++ branches/3.1.x/ui/effect/src/main/templates/effect.jspx 2007-11-06 17:42:28 UTC (rev 3802)
@@ -86,8 +86,21 @@
var pm = Object.extend( Object.extend(#{typePart},#{forPart}), #{targetPart} );
/* pm.id can have a special meaning, let's check */
//pm.id = #{this:convertElementParameter(pmId)};
-if (typeof #{attachObj} == 'object') {pm.attachId= #{attachObj};if (#{targetObj}=='') pm.targetId=#{attachObj}; };
-if (typeof #{targetObj} == 'object') pm.targetId= #{targetObj};
+var attachObj;
+try {
+ attachObj = eval('#{this:escapeJavaScript(attachObj)}');
+} catch (e) {
+}
+
+var targetObj;
+try {
+ targetObj = eval('#{this:escapeJavaScript(targetObj)}');
+} catch (e) {
+}
+
+if (typeof attachObj == 'object') {pm.attachId = attachObj;if (targetObj == '') pm.targetId = attachObj; };
+if (typeof targetObj == 'object') pm.targetId = targetObj;
+
pm = Object.extend(pm, #{params});
var ename = Richfaces.effectEventOnOut('#{event}');
var bindedFunction = function(event){ return Richfaces.processEffect(this); }.bindAsEventListener(pm);
18 years, 6 months
JBoss Rich Faces SVN: r3801 - in trunk/ui/tabPanel/src/main: java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-06 12:12:40 -0500 (Tue, 06 Nov 2007)
New Revision: 3801
Added:
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelInfoCollector.java
Modified:
trunk/ui/tabPanel/src/main/config/component/tabPanel.xml
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js
trunk/ui/tabPanel/src/main/templates/tabPanel.jspx
Log:
add ontabchange event to the tabPanel component in the context of RF-262
Modified: trunk/ui/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/ui/tabPanel/src/main/config/component/tabPanel.xml 2007-11-06 17:11:12 UTC (rev 3800)
+++ trunk/ui/tabPanel/src/main/config/component/tabPanel.xml 2007-11-06 17:12:40 UTC (rev 3801)
@@ -135,6 +135,15 @@
<classname>java.lang.Object</classname>
<description></description>
</property>
+
+ <property>
+ <name>ontabchange</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Event must occurs on than tab has been changed
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
&html_attributes;
&html_events;
@@ -230,7 +239,7 @@
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
-
+
<property>
<name>onlabelkeypress</name>
<classname>java.lang.String</classname>
Added: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelInfoCollector.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelInfoCollector.java (rev 0)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelInfoCollector.java 2007-11-06 17:12:40 UTC (rev 3801)
@@ -0,0 +1,11 @@
+package org.richfaces.renderkit;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.UITabPanel;
+
+public interface TabPanelInfoCollector {
+
+ public Object collectTabPanelInfo(FacesContext context, UITabPanel tabPanel);
+
+}
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-11-06 17:11:12 UTC (rev 3800)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-11-06 17:12:40 UTC (rev 3801)
@@ -136,7 +136,22 @@
}
};
- /**
+ private static final TabPanelInfoCollector panelInfoCollector = new TabPanelInfoCollector(){
+
+ private final JSReference JSR_ONTABCHANGE = new JSReference("ontabchange");
+ private final JSReference JSR_ID = new JSReference("id");
+
+ public Object collectTabPanelInfo(FacesContext context, UITabPanel tabPanel) {
+ Map info = new HashMap();
+ info.put(JSR_ONTABCHANGE, tabPanel.getAttributes().get("ontabchange"));
+ info.put(JSR_ID, tabPanel.getClientId(context));
+
+ return info;
+ }
+
+ };
+
+ /**
* @param context
* @param component
* @return
@@ -274,6 +289,15 @@
}
}
+
+ protected void preEncodeBegin(FacesContext context, UIComponent component) throws IOException {
+ if(component instanceof UITabPanel){
+ UITabPanel tabPanel = (UITabPanel)component;
+ ComponentVariables componentVariables = ComponentsVariableResolver.getVariables(this, tabPanel);
+ componentVariables.setVariable("tabPanel", getTabPanelInfoCollector().collectTabPanelInfo(context, (UITabPanel)component));
+ }
+ }
+
public void encodeTabs(FacesContext context, UITabPanel tabPanel) throws IOException {
ComponentVariables componentVariables = ComponentsVariableResolver.getVariables(this, tabPanel);
@@ -382,11 +406,21 @@
// TODO - create tab control function.
getUtils().writeScript(context, pane, "RichFaces.panelTabs['" + pane.getClientId(context) + "']=" + ScriptUtils.toScript(tabs) + ";");
}
+
+ public void encodeTabPanelScript(FacesContext context, UITabPanel pane) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, pane);
+ Object tabPanel = variables.getVariable("tabPanel");
+ getUtils().writeScript(context, pane, "RichFaces.tabPanel['" + pane.getClientId(context) + "']=" + ScriptUtils.toScript(tabPanel) + ";");
+ }
protected TabInfoCollector getTabInfoCollector() {
return collector;
}
+ protected TabPanelInfoCollector getTabPanelInfoCollector(){
+ return panelInfoCollector;
+ }
+
public String encodeHeaderSpacing(FacesContext context, UITabPanel pane) throws IOException {
String headerSpacing = pane.getHeaderSpacing();
Double decoded = HtmlDimensions.decode(headerSpacing);
Modified: trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js
===================================================================
--- trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js 2007-11-06 17:11:12 UTC (rev 3800)
+++ trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js 2007-11-06 17:12:40 UTC (rev 3801)
@@ -3,6 +3,7 @@
var RichFaces_FF_Loaded = (RichFaces.navigatorType() == RichFaces.FF);
RichFaces.panelTabs={};
+RichFaces.tabPanel={};
RichFaces.createImage =
function (src) {
@@ -171,6 +172,15 @@
var result = func(event, lastActive.name,newActive.name);
if (typeof(result) == 'boolean' && !result) return false;
}
+
+ var tabPanel = RichFaces.tabPanel[pane];
+
+ if (tabPanel.ontabchange && tabPanel.ontabchange != "") {
+ var func = new Function("event","leftTabName","enteredTabName",tabPanel.ontabchange);
+ var result = func(event, lastActive.name,newActive.name);
+ if (typeof(result) == 'boolean' && !result) return false;
+ }
+
}
return true;
}
Modified: trunk/ui/tabPanel/src/main/templates/tabPanel.jspx
===================================================================
--- trunk/ui/tabPanel/src/main/templates/tabPanel.jspx 2007-11-06 17:11:12 UTC (rev 3800)
+++ trunk/ui/tabPanel/src/main/templates/tabPanel.jspx 2007-11-06 17:12:40 UTC (rev 3801)
@@ -23,7 +23,9 @@
<f:clientid var="clientId" />
<f:resource name="images/spacer.gif" var="spacer" />
-
+
+ <f:call name="encodeTabPanelScript"/>
+
<table border="0" cellpadding="0" cellspacing="0" id="#{clientId}"
class="rich-tabpanel #{component.attributes['styleClass']}"
style="#{this:encodeStyles(context, component)}">
18 years, 6 months
JBoss Rich Faces SVN: r3800 - in branches/3.1.x/ui/tree/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-06 12:11:12 -0500 (Tue, 06 Nov 2007)
New Revision: 3800
Modified:
branches/3.1.x/ui/tree/src/main/config/component/tree.xml
branches/3.1.x/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
http://jira.jboss.com/jira/browse/RF-1160
Modified: branches/3.1.x/ui/tree/src/main/config/component/tree.xml
===================================================================
--- branches/3.1.x/ui/tree/src/main/config/component/tree.xml 2007-11-06 16:59:46 UTC (rev 3799)
+++ branches/3.1.x/ui/tree/src/main/config/component/tree.xml 2007-11-06 17:11:12 UTC (rev 3800)
@@ -115,7 +115,7 @@
</property>
<property>
<name>value</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>The current value for this component</description>
</property>
<property>
Modified: branches/3.1.x/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- branches/3.1.x/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-11-06 16:59:46 UTC (rev 3799)
+++ branches/3.1.x/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-11-06 17:11:12 UTC (rev 3800)
@@ -32,10 +32,6 @@
this.eventMouseOut = this.processMouseOut.bindAsEventListener(this);
this.eventMouseOver = this.processMouseOver.bindAsEventListener(this);
- if (this.onContextMenu) {
- this.eventRightClick = this.onContextMenu.bindAsEventListener();
- }
-
this.observeEvents(element);
},
@@ -63,12 +59,20 @@
eIcon = cells[this.elementID.icon];
eText = cells[this.elementID.text];
}
+
if (eIcon) {
+ var contextMenu = Richfaces.getNSAttribute("oncontextmenu", eIcon);
+ if (contextMenu && contextMenu.length > 0) {
+ this.onContextMenu = new Function("event", contextMenu + "; return true;").bindAsEventListener(this);
+ }
+ }
+
+ if (eIcon) {
Event.observe(eIcon, "mousedown", this.eventSelectionClick);
Event.observe(eIcon, "mouseout", this.eventMouseOut);
Event.observe(eIcon, "mouseover", this.eventMouseOver);
- if (this.eventRightClick) {
- eIcon.oncontextmenu = this.eventRightClick;
+ if (this.onContextMenu) {
+ eIcon.oncontextmenu = this.onContextMenu;
}
}
if (eText)
@@ -76,8 +80,8 @@
Event.observe(eText, "mousedown", this.eventSelectionClick);
Event.observe(eText, "mouseout", this.eventMouseOut);
Event.observe(eText, "mouseover", this.eventMouseOver);
- if (this.eventRightClick) {
- eText.oncontextmenu = this.eventRightClick;
+ if (this.onContextMenu) {
+ eText.oncontextmenu = this.onContextMenu;
}
}
@@ -92,11 +96,6 @@
getElements: function(element, ajaxUpdate) {
this.childs = [];
- /*var contextMenu = Richfaces.getNSAttribute("oncontextmenu", $(this.elementID.icon));
- if (contextMenu && contextMenu.length > 0) {
- this.onContextMenu = new Function(contextMenu + "; return true;");
- }*/
-
var childsTd = element.nextSibling;//$(this.elementID.children);
if (ajaxUpdate && this.tree.showConnectingLines) {
18 years, 6 months
JBoss Rich Faces SVN: r3799 - trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-06 11:59:46 -0500 (Tue, 06 Nov 2007)
New Revision: 3799
Modified:
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
implementation of items : "Keyboard usage for elements section", "Keyboard usage for elements reordering"
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-06 16:15:34 UTC (rev 3798)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-06 16:59:46 UTC (rev 3799)
@@ -163,8 +163,7 @@
return extremeItem;
}
-Shuttle.prototype.onclickHandler = function(event) {
- //var activeElem = event.target || event.srcElement;
+Shuttle.prototype.getEventTargetRow = function(event) {
var activeElem;
if (event.rangeParent) {
activeElem = event.rangeParent.parentNode;
@@ -183,39 +182,101 @@
}
}
- var key = event.keyCode || event.which;
+ return activeElem;
+}
+
+Shuttle.prototype.onclickHandler = function(event) {
+ var activeElem = this.getEventTargetRow(event);
+ if (activeElem == null) {
+ return;
+ }
if (event.ctrlKey) {
- if (key == 65) {
- //Ctrl + A
- this.selectAll();
- } else {
- this.addSelectedItem(activeElem);
- this.activeItem = activeElem;
- }
+ this.addSelectedItem(activeElem);
+ this.activeItem = activeElem;
} else if (event.shiftKey) {
this.selectItemGroup(activeElem);
- } else if (key == 13) {
- //space
} else {
this.selectionItem(activeElem);
this.activeItem = activeElem;
}
this.activeItem.className = Shuttle.ACTIVE_ITEM_CLASS;
-
this.saveState();
}
Shuttle.prototype.onkeydownHandler = function(event) {
switch (event.keyCode) {
case 34 : this.moveSelectedItems('last'); break; //page down
- case 33: this.moveSelectedItems('first'); break; //page up
- case 38 : this.moveSelectedItems('up'); break; //up arrow
- case 40 : this.moveSelectedItems('down'); break; //down arrow
+ case 33 : this.moveSelectedItems('first'); break; //page up
+ case 38 : //up arrow
+ if (event.ctrlKey) {
+ this.moveSelectedItems('up');
+ } else {
+ this.moveActiveItem('up');
+ }
+ break;
+ case 40 : //down arrow
+ if (event.ctrlKey) {
+ this.moveSelectedItems('down');
+ } else {
+ this.moveActiveItem('down');
+ }
+ break;
+ case 65 : // Ctrl + A
+ if (event.ctrlKey) {
+ this.selectAll();
+ if (event.stopPropagation) {
+ event.preventDefault();
+ event.stopPropagation();
+ } else {
+ event.cancelBubble = true;
+ }
+ }
+ this.activeItem.className = Shuttle.ACTIVE_ITEM_CLASS;
+ this.saveState();
+ break;
+ case 32 : this.invertSelection(event); break; //blank
}
+ this.saveState();
}
+Shuttle.prototype.invertSelection = function(event) {
+ var eventItem = this.activeItem;
+ var eventShuttleItem = this.getSelectItemByNode(eventItem);
+ if (eventShuttleItem._selected) {
+ eventShuttleItem._selected = false;
+ this.selectedItems.remove(eventShuttleItem);
+ } else {
+ eventShuttleItem._selected = true;
+ this.selectedItems.push(eventShuttleItem);
+ }
+}
+
+Shuttle.prototype.moveActiveItem = function(action) {
+ var item = this.activeItem;
+ var rows = this.shuttleTbody.rows;
+ if ((action == 'up') && (item.rowIndex > 0)) {
+ this.changeActiveItems(rows[item.rowIndex - 1], item);
+ } else if ((action == 'down') && (item.rowIndex < this.shuttleItems.length - 1)) {
+ this.changeActiveItems(rows[item.rowIndex + 1], item);
+ }
+}
+
+Shuttle.prototype.changeActiveItems = function(newItem, item) {
+ var shuttleItem = this.getSelectItemByNode(item);
+ var newShuttleItem = this.getSelectItemByNode(newItem);
+
+ this.resetMarked();
+
+ newItem.className = Shuttle.ACTIVE_ITEM_CLASS;
+ newItem._selected = true;
+ this.activeItem = newItem;
+ this.selectedItems.push(newItem);
+}
+
Shuttle.prototype.selectAll = function() {
+ var startIndex = 0;
+ var endIndex = this.shuttleItems.length - 1;
this.selectItemRange(startIndex, endIndex);
}
18 years, 6 months
JBoss Rich Faces SVN: r3798 - in branches/3.1.x/test-applications/facelets/src/main/webapp/pages: Select and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-11-06 11:15:34 -0500 (Tue, 06 Nov 2007)
New Revision: 3798
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml
Log:
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml 2007-11-06 16:03:38 UTC (rev 3797)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml 2007-11-06 16:15:34 UTC (rev 3798)
@@ -40,6 +40,18 @@
<ui:include src="${richBean.pathStraightforward}" />
<ui:include src="${richBean.pathProperty}" />
</h:form>
+ <rich:modalPanel id="eventInfoID" autosize="true" minHeight="550" minWidth="200" moveable="true" resizeable="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>
</div>
</div>
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml 2007-11-06 16:03:38 UTC (rev 3797)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml 2007-11-06 16:15:34 UTC (rev 3798)
@@ -34,11 +34,24 @@
</div>
<div id="divPageID" style="position: absolute; background-color:gray; top:60px; left: 10px; z-index: 2">
- <ui:include src="${richBean.pathComponent}" />
+ <ui:include src="${richBean.pathComponent}" />\
<h:form>
<ui:include src="${richBean.pathStraightforward}" />
<ui:include src="${richBean.pathProperty}" />
</h:form>
+
+ <rich:modalPanel id="eventInfoID" autosize="true" minHeight="550" minWidth="200" moveable="true" resizeable="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>
</div>
<div id="divID" style="absolute; relative; top:60px; left: 10px; z-index: 1">
18 years, 6 months
JBoss Rich Faces SVN: r3797 - in branches/3.1.x/test-applications/facelets/src/main/webapp/pages: Div and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-11-06 11:03:38 -0500 (Tue, 06 Nov 2007)
New Revision: 3797
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/main.xhtml
Log:
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml 2007-11-06 14:46:48 UTC (rev 3796)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Div/Div.xhtml 2007-11-06 16:03:38 UTC (rev 3797)
@@ -8,6 +8,22 @@
<f:view>
<head>
<title></title>
+ <script type="text/javascript">
+ function print(elementID, value) {
+ var oldObject = window.document.getElementById(elementID);
+ var newObject = window.document.createElement('input');
+ newObject.type = "text";
+ newObject.size = oldObject.size;
+ newObject.value = value;
+ newObject.id = oldObject.id;
+ //if(oldObject.size) newObject.size = oldObject.size;
+ //if(oldObject.value) newObject.value = value;
+ //if(oldObject.id) newObject.id = oldObject.id;
+ //if(oldObject.name) newObject.name = oldObject.name;
+ //if(oldObject.className) newObject.className = oldObject.className;
+ oldObject.parentNode.replaceChild(newObject,oldObject);
+ }
+ </script>
<link rel="stylesheet"
href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
type="text/css" />
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml 2007-11-06 14:46:48 UTC (rev 3796)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Select/Map.xhtml 2007-11-06 16:03:38 UTC (rev 3797)
@@ -8,6 +8,22 @@
<f:view>
<head>
<title></title>
+ <script type="text/javascript">
+ function print(elementID, value) {
+ var oldObject = window.document.getElementById(elementID);
+ var newObject = window.document.createElement('input');
+ newObject.type = "text";
+ newObject.size = oldObject.size;
+ newObject.value = value;
+ newObject.id = oldObject.id;
+ //if(oldObject.size) newObject.size = oldObject.size;
+ //if(oldObject.value) newObject.value = value;
+ //if(oldObject.id) newObject.id = oldObject.id;
+ //if(oldObject.name) newObject.name = oldObject.name;
+ //if(oldObject.className) newObject.className = oldObject.className;
+ oldObject.parentNode.replaceChild(newObject,oldObject);
+ }
+ </script>
<link rel="stylesheet"
href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
type="text/css" />
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/pages/main.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/pages/main.xhtml 2007-11-06 14:46:48 UTC (rev 3796)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/pages/main.xhtml 2007-11-06 16:03:38 UTC (rev 3797)
@@ -11,7 +11,7 @@
<body>
<h:form>
<rich:panel>
- <f:verbatim><div align="center"><font size="15px" color="#191970">RichFaces Test Application (JSF 1.1RI(1.2RI) with Facelets)</font></div></f:verbatim>
+ <f:verbatim><div align="center"><font size="4" color="#191970">RichFaces Test Application (JSF 1.1RI(1.2RI) with Facelets)</font></div></f:verbatim>
</rich:panel>
<rich:spacer></rich:spacer>
<rich:panel>
@@ -24,7 +24,7 @@
</rich:panel>
<rich:spacer></rich:spacer>
<rich:panel>
- <div align="right"><font size="4px" color="#000000">RichFace: #{a4j.version}</font></div>
+ <div align="right"><font size="3" color="#000000">RichFace: #{a4j.version}</font></div>
</rich:panel>
</h:form>
</body>
18 years, 6 months
JBoss Rich Faces SVN: r3796 - in trunk/sandbox/samples/orderingListDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-06 09:46:48 -0500 (Tue, 06 Nov 2007)
New Revision: 3796
Modified:
trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OptionItem.java
trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java
trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp
Log:
Demo application for ordering list component. ( http://jira.jboss.com/jira/browse/RF-1191 ).
Modified: trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java 2007-11-06 13:56:22 UTC (rev 3795)
+++ trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java 2007-11-06 14:46:48 UTC (rev 3796)
@@ -20,10 +20,39 @@
*/
package org.richfaces;
+
+import java.util.ArrayList;
+import java.util.List;
+
/**
* @author $Autor$
*
*/
public class Bean {
+ private List<OrderingListDemoBean> lists = new ArrayList<OrderingListDemoBean>();
+ private String [] simpleItems = new String [] {
+ "First", "Second", "Third", "Fourth"
+ };
+ public Bean() {
+ for (int i = 0; i < 3; i++) {
+ lists.add(new OrderingListDemoBean());
+ }
+ }
+
+ public List<OrderingListDemoBean> getLists() {
+ return lists;
+ }
+
+ public void setLists(List<OrderingListDemoBean> lists) {
+ this.lists = lists;
+ }
+
+ public String[] getSimpleItems() {
+ return simpleItems;
+ }
+
+ public void setSimpleItems(String[] simpleItems) {
+ this.simpleItems = simpleItems;
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OptionItem.java
===================================================================
--- trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OptionItem.java 2007-11-06 13:56:22 UTC (rev 3795)
+++ trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OptionItem.java 2007-11-06 14:46:48 UTC (rev 3796)
@@ -15,6 +15,10 @@
public String getName() {
return name;
}
+
+ public void setName(String name) {
+ this.name = name;
+ }
public int getPrice() {
return price;
@@ -32,4 +36,5 @@
public String toString() {
return this.getClass().getSimpleName() + " [" + name + "] by " + price;
}
+
}
Modified: trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java
===================================================================
--- trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java 2007-11-06 13:56:22 UTC (rev 3795)
+++ trunk/sandbox/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java 2007-11-06 14:46:48 UTC (rev 3796)
@@ -9,9 +9,6 @@
public class OrderingListDemoBean {
private List<OptionItem> items = new ArrayList<OptionItem>();
- private String [] items2 = new String [] {
- "First", "Second", "Third", "Fourth"
- };
private String controlsType = "button";
private String controlsHorizontalAlign = "right";
@@ -23,7 +20,7 @@
public OrderingListDemoBean() {
for (int i = 0; i < 10; i++) {
- items.add(new OptionItem("Item " + i, new Random().nextInt(200)));
+ items.add(new OptionItem("Item " + i, new Random().nextInt(2000)));
}
}
@@ -35,14 +32,6 @@
return items;
}
- public String[] getItems2() {
- return items2;
- }
-
- public void setItems2(String[] items2) {
- this.items2 = items2;
- }
-
public String getControlsType() {
return controlsType;
}
Modified: trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-11-06 13:56:22 UTC (rev 3795)
+++ trunk/sandbox/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-11-06 14:46:48 UTC (rev 3796)
@@ -1,3 +1,5 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/orderingList" prefix="ol" %>
@@ -17,7 +19,10 @@
<h:form>
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin" />
-
+ <br />
+ <a4j:status startText="START" startStyle="color: red;"
+ stopText="STOP" stopStyle="color: green;" />
+ <br />
<h:panelGrid columns="2" columnClasses="columnClass">
<h:panelGroup>
<ol:orderingList id="orderingList1"
@@ -106,13 +111,50 @@
</h:panelGrid>
</h:panelGroup>
<h:panelGroup>
- <ol:orderingList value="#{demoBean.items2}" var="item" >
+ <ol:orderingList value="#{bean.simpleItems}" var="item" >
<h:column>
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
<h:outputText value="#{item}" />
</h:column>
</ol:orderingList>
</h:panelGroup>
</h:panelGrid>
+ <h3>Ordering lists within a4j:repeat</h3>
+ <a4j:commandButton reRender="repeat" value="Rerender a4j:repeat" />
+ <h:panelGrid columns="3" >
+ <a4j:repeat value="#{bean.lists}" var="list" id="repeat">
+ <%--ol:orderingList value="#{list.items}" var="item" >
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
+ <h:inputText value="#{item.name}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{item.price}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Ajax Action" />
+ </f:facet>
+ <a4j:commandButton value="Ajax Action" reRender="actionResult"
+ action="#{item.action}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Server Action" />
+ </f:facet>
+ <h:commandLink value="Server Action" action="#{item.action}" />
+ </h:column>
+ </ol:orderingList--%>
+ </a4j:repeat>
+ </h:panelGrid>
+ <a4j:log popup="false" />
</h:form>
</f:view>
</body>
18 years, 6 months