JBoss Rich Faces SVN: r19904 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-11-03 02:47:48 -0400 (Wed, 03 Nov 2010)
New Revision: 19904
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js
Log:
Remove unnecessary code from TabPanel.js
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js 2010-11-03 00:07:19 UTC (rev 19903)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js 2010-11-03 06:47:48 UTC (rev 19904)
@@ -41,19 +41,6 @@
this.items = [];
this.isKeepHeight = options["isKeepHeight"] || false
- },
-
- /***************************** Public Methods ****************************************************************/
-
-
-
- /***************************** Private Methods ********************************************************/
-
-
- destroy: function () {
- rf.Event.unbindById(this.id, "."+this.namespace);
-
- rf.ui.TogglePanel.prototype.destroy.call(this);
}
});
})(jQuery, RichFaces);
14 years, 2 months
JBoss Rich Faces SVN: r19903 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-11-02 20:07:19 -0400 (Tue, 02 Nov 2010)
New Revision: 19903
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js
Log:
https://jira.jboss.org/browse/RF-9555
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js 2010-11-02 23:23:49 UTC (rev 19902)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TabPanel.js 2010-11-03 00:07:19 UTC (rev 19903)
@@ -53,7 +53,7 @@
destroy: function () {
rf.Event.unbindById(this.id, "."+this.namespace);
- rf.ui.TogglePanel.destroy.call(this);
+ rf.ui.TogglePanel.prototype.destroy.call(this);
}
});
})(jQuery, RichFaces);
14 years, 2 months
JBoss Rich Faces SVN: r19902 - in trunk: ui/iteration/ui/src/main/java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-11-02 19:23:49 -0400 (Tue, 02 Nov 2010)
New Revision: 19902
Modified:
trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
Log:
https://jira.jboss.org/browse/RF-9392
Modified: trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml
===================================================================
--- trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml 2010-11-02 19:20:52 UTC (rev 19901)
+++ trunk/examples/iteration-demo/src/main/webapp/rf-9392.xhtml 2010-11-02 23:23:49 UTC (rev 19902)
@@ -39,15 +39,15 @@
<h:panelGroup styleClass="removalTestClass" layout="block"></h:panelGroup>
<script type="text/javascript">/* <![CDATA[ */
- function addCss(eltId, cssText) {
- var style = jQuery("<style></style>").attr({type: 'text/css', id: eltId}).appendTo("head");
+ function addCss(cssText, elementId) {
+ var style = jQuery("<style></style>").attr({type: 'text/css', id: elementId}).appendTo("head");
try {
style.html(cssText);
} catch (e) {
//IE
style[0].styleSheet.cssText = cssText;
}
- }
+ };
jQuery(document).ready(function() {
module("rf-9392");
@@ -59,7 +59,7 @@
expect(2);
equals(additionTestElt.height(), 0);
- addCss("additionTest", ".additionTestClass { height: 140px; }");
+ addCss(".additionTestClass { height: 140px; }", "additionTest");
equals(additionTestElt.height(), 140);
});
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-11-02 19:20:52 UTC (rev 19901)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-11-02 23:23:49 UTC (rev 19902)
@@ -44,6 +44,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.PartialResponseWriter;
+import javax.faces.context.PartialViewContext;
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.javascript.JSFunction;
@@ -76,7 +77,18 @@
public class ExtendedDataTableRenderer extends SelectionRenderer implements MetaComponentRenderer {
private static enum PartName {
- frozen, normal
+
+ frozen, normal;
+
+ private String id;
+
+ private PartName() {
+ id = String.valueOf(this.toString().charAt(0));
+ }
+
+ public String getId() {
+ return id;
+ }
}
private class Part {
@@ -246,11 +258,11 @@
writer.startElement(HtmlConstants.DIV_ELEM, column);
writer.writeAttribute(
HtmlConstants.CLASS_ATTRIBUTE,
- HtmlUtil.concatClasses("rf-edt-" + facetName.charAt(0) + facetName.charAt(3) + "r-c", "rf-edt-c-"
+ HtmlUtil.concatClasses("rf-edt-" + getFacetClassName(facetName) + "-c", "rf-edt-c-"
+ column.getId(), (String) column.getAttributes().get(classAttribute)), null);
writer.startElement(HtmlConstants.DIV_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-" + facetName.charAt(0) + facetName.charAt(3)
- + "r-c-cnt", null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-" + getFacetClassName(facetName)
+ + "-c-cnt", null);
UIComponent facet = column.getFacet(facetName);
if (facet != null && facet.isRendered()) {
facet.encodeAll(context);
@@ -261,6 +273,16 @@
}
}
+ private String getFacetClassName(String name) {
+ if ("header".equals(name)) {
+ return "hdr";
+ } else if ("footer".equals(name)) {
+ return "ftr";
+ }
+
+ throw new IllegalArgumentException(name);
+ }
+
private void encodeHeaderOrFooter(RendererState state, String name) throws IOException {
FacesContext context = state.getContext();
ResponseWriter writer = context.getResponseWriter();
@@ -268,8 +290,8 @@
boolean columnFacetPresent = table.isColumnFacetPresent(name);
if (columnFacetPresent || "footer".equals(name)) {
writer.startElement(HtmlConstants.DIV_ELEM, table);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, HtmlUtil.concatClasses("rf-edt-" + name.charAt(0)
- + name.charAt(3) + "r", (String) table.getAttributes().get(name + "Class")), null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, HtmlUtil.concatClasses("rf-edt-" + getFacetClassName(name),
+ (String) table.getAttributes().get(name + "Class")), null);
writer.startElement(HtmlConstants.TABLE_ELEMENT, table);
writer.writeAttribute(HtmlConstants.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HtmlConstants.CELLSPACING_ATTRIBUTE, "0", null);
@@ -296,7 +318,7 @@
+ ("footer".equals(name) ? " rf-edt-ftr-cnt" : ""), null);
}
- String tableId = table.getClientId(context) + ":cf" + name.charAt(0) + partName.name().charAt(0);
+ String tableId = table.getClientId(context) + ":cf" + name.charAt(0) + partName.getId();
EncoderVariance encoderVariance = state.getEncoderVariance();
encoderVariance.encodeStartUpdate(context, tableId);
@@ -393,14 +415,14 @@
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, table.getClientId(context) + ":body", null);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-cnt", null);
}
- String targetId = table.getClientId(context) + ":tbt" + partName.name().charAt(0);
+ String targetId = table.getClientId(context) + ":tbt" + partName.getId();
writer.startElement(HtmlConstants.TABLE_ELEMENT, table);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, targetId, null);
writer.writeAttribute(HtmlConstants.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HtmlConstants.CELLSPACING_ATTRIBUTE, "0", null);
writer.startElement(HtmlConstants.TBODY_ELEMENT, table);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, table.getClientId(context) + ":tb"
- + partName.toString().charAt(0), null);
+ + partName.getId(), null);
encodeRows(context, state);
writer.endElement(HtmlConstants.TBODY_ELEMENT);
writer.endElement(HtmlConstants.TABLE_ELEMENT);
@@ -481,14 +503,14 @@
final RendererState state = createRowHolder(context, table, null);
// TODO 1. Encode fixed children
for (state.startIterate(); state.hasNextPart();) {
- char partNameFirstChar = state.nextPart().getName().toString().charAt(0);
+ String partId = state.nextPart().getName().getId();
final List<String> ids = new LinkedList<String>();
table.walk(context, new DataVisitor() {
public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
UIDataTableBase dataTable = state.getRow();
dataTable.setRowKey(context, rowKey);
ids.add(dataTable.getClientId(context) + ":"
- + state.getPart().getName().toString().charAt(0));
+ + state.getPart().getName().getId());
return DataVisitResult.CONTINUE;
}
}, removeRange, null);
@@ -498,7 +520,7 @@
dataTable.setRowKey(context, rowKey);
HashMap<String, String> attributes = new HashMap<String, String>(1);
String id = dataTable.getClientId(context) + ":"
- + state.getPart().getName().toString().charAt(0);
+ + state.getPart().getName().getId();
attributes.put("id", id);
try {
writer.updateAttributes(ids.remove(0), attributes);
@@ -518,7 +540,7 @@
//TODO nick - move this to external JavaScript file
writer.write("var richTBody = document.getElementById('" + component.getClientId(context) + ":tb"
- + partNameFirstChar + "');");
+ + partId + "');");
writer.write("var richRows = richTBody.rows;");
writer.write("for (var i = 0; i < " + difference
+ "; i++ ) richTBody.appendChild(richTBody.removeChild(richRows[0]));");
@@ -684,11 +706,33 @@
FacesContext context = state.getContext();
ResponseWriter writer = context.getResponseWriter();
UIDataTableBase table = state.getRow();
- writer.startElement("style", table);
- writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/css", null);
- writer.writeText("div.rf-edt-cnt {", null); // TODO getNormalizedId(context, state.getGrid())
- writer.writeText("width: 100%;", "width");
- writer.writeText("}", null);
+
+ PartialViewContext pvc = context.getPartialViewContext();
+ if (!pvc.isAjaxRequest()) {
+ writer.startElement("style", table);
+ writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/css", null);
+ writer.writeText(getCSSText(context, table), null);
+ writer.endElement("style");
+ } else {
+ writer.startElement(HtmlConstants.SCRIPT_ELEM, table);
+ writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.TEXT_JAVASCRIPT_TYPE, null);
+
+ String cssText = getCSSText(context, table);
+ JSFunction function = new JSFunction("RichFaces.utils.addCSSText", cssText, table.getClientId(context)
+ + ":st");
+
+ writer.writeText(function.toScript(), null);
+
+ writer.endElement(HtmlConstants.SCRIPT_ELEM);
+ }
+
+ }
+
+ protected String getCSSText(FacesContext context, UIDataTableBase table) throws IOException {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("div.rf-edt-cnt { width: 100%; }"); // TODO getNormalizedId(context, state.getGrid())
+
Iterator<UIComponent> columns = table.columns();
while (columns.hasNext()) {
UIComponent column = (UIComponent) columns.next();
@@ -698,11 +742,12 @@
id = column.getId();
}
String width = getColumnWidth(column);
- writer.writeText(".rf-edt-c-" + id + " {", "width"); // TODO getNormalizedId(context,
- writer.writeText("width: " + width + ";", "width");
- writer.writeText("}", "width");
+ sb.append(".rf-edt-c-" + id + " {"); // TODO getNormalizedId(context,
+ sb.append("width: " + width + ";");
+ sb.append("}");
}
- writer.endElement("style");
+
+ return sb.toString();
}
public void encodeRow(ResponseWriter writer, FacesContext facesContext, RowHolderBase rowHolder)
@@ -733,7 +778,7 @@
Iterator<UIComponent> columns = null;
Part part = state.getPart();
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE,
- table.getClientId(facesContext) + ":" + part.getName().toString().charAt(0), null);
+ table.getClientId(facesContext) + ":" + part.getName().getId(), null);
columns = part.getColumns().iterator();
while (columns.hasNext()) {
UIComponent column = (UIComponent) columns.next();
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-11-02 19:20:52 UTC (rev 19901)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-11-02 23:23:49 UTC (rev 19902)
@@ -22,6 +22,16 @@
(function(richfaces, jQuery) {
richfaces.utils = richfaces.utils || {};
+ richfaces.utils.addCSSText = function(cssText, elementId) {
+ var style = jQuery("<style></style>").attr({type: 'text/css', id: elementId}).appendTo("head");
+ try {
+ style.html(cssText);
+ } catch (e) {
+ //IE
+ style[0].styleSheet.cssText = cssText;
+ }
+ };
+
richfaces.utils.getCSSRule = function (className) {
var rule = null;
var sheets = document.styleSheets;
@@ -622,11 +632,12 @@
jQuery(element).bind("rich:onajaxcomplete", ajaxComplete);
//JS API
- element["richfaces"] = element["richfaces"] || {}; // TODO ExtendedDataTable should extend richfaces.BaseComponent instead of using it.
- element.richfaces.component = this;
+ element[richfaces.RICH_CONTAINER] = element[richfaces.RICH_CONTAINER] || {}; // TODO ExtendedDataTable should extend richfaces.BaseComponent instead of using it.
+ element[richfaces.RICH_CONTAINER].component = this;
this.destroy = function() {
- element.richfaces.component = null;
+ element[richfaces.RICH_CONTAINER] = null;
jQuery(window).unbind("resize", updateLayout);
+ jQuery(richfaces.getDomElement(id + ':st')).remove();
}
this.getColumnPosition = function(id) {
14 years, 2 months
JBoss Rich Faces SVN: r19901 - in trunk: examples/output-demo/src/main/webapp/WEB-INF and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-11-02 15:20:52 -0400 (Tue, 02 Nov 2010)
New Revision: 19901
Added:
trunk/examples/output-demo/src/main/java/org/richfaces/TemplateBean.java
trunk/examples/output-demo/src/main/webapp/examples/accordion/RF-9364.xhtml
Modified:
trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
trunk/examples/output-demo/src/main/webapp/examples/togglePanel-client.xhtml
trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
Log:
RF-9364 Accordion: server switch type doesn't work inside iteration components
Added: trunk/examples/output-demo/src/main/java/org/richfaces/TemplateBean.java
===================================================================
--- trunk/examples/output-demo/src/main/java/org/richfaces/TemplateBean.java (rev 0)
+++ trunk/examples/output-demo/src/main/java/org/richfaces/TemplateBean.java 2010-11-02 19:20:52 UTC (rev 19901)
@@ -0,0 +1,63 @@
+/**
+ * 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 org.richfaces;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author akolonitsky
+ * @since Nov 2, 2010
+ */
+@ManagedBean
+@SessionScoped
+public class TemplateBean implements Serializable {
+
+ private static final long serialVersionUID = 5078700314562231363L;
+ private List<String> dataTableModel = new ArrayList<String>();
+ private boolean renderForm;
+
+ @PostConstruct
+ public void init() {
+ dataTableModel.add("row 1");
+ dataTableModel.add("row 2");
+ dataTableModel.add("row 3");
+ dataTableModel.add("row 4");
+ }
+
+ public List<String> getDataTableModel() {
+ return dataTableModel;
+ }
+
+ public boolean isRenderForm() {
+ return renderForm;
+ }
+
+ public void setRenderForm(boolean renderForm) {
+ this.renderForm = renderForm;
+ }
+
+}
Modified: trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-11-02 18:58:49 UTC (rev 19900)
+++ trunk/examples/output-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-11-02 19:20:52 UTC (rev 19901)
@@ -58,6 +58,10 @@
<to-view-id>/examples/accordion.xhtml</to-view-id>
</navigation-case>
<navigation-case>
+ <from-outcome>RF-9364</from-outcome>
+ <to-view-id>/examples/accordion/RF-9364.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
<from-outcome>qunit/accordion</from-outcome>
<to-view-id>/qunit/accordion.xhtml</to-view-id>
</navigation-case>
Added: trunk/examples/output-demo/src/main/webapp/examples/accordion/RF-9364.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/accordion/RF-9364.xhtml (rev 0)
+++ trunk/examples/output-demo/src/main/webapp/examples/accordion/RF-9364.xhtml 2010-11-02 19:20:52 UTC (rev 19901)
@@ -0,0 +1,39 @@
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:pn="http://richfaces.org/output">
+
+<body>
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="title">Accordion Example</ui:define>
+ <ui:define name="body_head">Accordion Example</ui:define>
+
+ <ui:define name="body">
+ <p>Page</p>
+
+ <h:form id="f" style="border:blue solid thin;">
+ <h:dataTable value="#{templateBean.dataTableModel}" var="item" id="containerHDataTable1" >
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="JSF Data Table"/>
+ </f:facet>
+ <h:panelGroup columns="1" rendered="#{item == 'row 1'}">
+ <pn:accordion width="500px" height="300px" switchType="server">
+ <pn:accordionItem
+ header="label 1">Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.</pn:accordionItem>
+ <pn:accordionItem header="label 2">content 2</pn:accordionItem>
+ <pn:accordionItem header="label 3">content 3</pn:accordionItem>
+ </pn:accordion>
+ </h:panelGroup>
+ <h:outputText value="#{item}" rendered="#{item != 'row 1'}"/>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</body>
+</html>
+
Modified: trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2010-11-02 18:58:49 UTC (rev 19900)
+++ trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2010-11-02 19:20:52 UTC (rev 19901)
@@ -15,11 +15,13 @@
<p>Page</p>
<h:form id="f" style="border:blue solid thin;">
- <pn:accordion width="500px" height="300px">
- <pn:accordionItem header="label 1">Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.</pn:accordionItem>
- <pn:accordionItem header="label 2">content 2</pn:accordionItem>
- <pn:accordionItem header="label 3">content 3</pn:accordionItem>
- </pn:accordion>
+ <h:panelGroup>
+ <pn:accordion width="500px" height="300px">
+ <pn:accordionItem header="label 1">Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.</pn:accordionItem>
+ <pn:accordionItem header="label 2">content 2</pn:accordionItem>
+ <pn:accordionItem header="label 3">content 3</pn:accordionItem>
+ </pn:accordion>
+ </h:panelGroup>
</h:form>
</ui:define>
</ui:composition>
Modified: trunk/examples/output-demo/src/main/webapp/examples/togglePanel-client.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/togglePanel-client.xhtml 2010-11-02 18:58:49 UTC (rev 19900)
+++ trunk/examples/output-demo/src/main/webapp/examples/togglePanel-client.xhtml 2010-11-02 19:20:52 UTC (rev 19901)
@@ -13,7 +13,7 @@
<ui:define name="body">
<h:form id="f">
- <pn:togglePanel id="panel" switchType="client" lang="en">
+ <pn:togglePanel id="panel" switchType="null" lang="en">
<pn:togglePanelItem name="name1">hello name1</pn:togglePanelItem>
<pn:togglePanelItem name="name2">hello name2</pn:togglePanelItem>
<pn:togglePanelItem name="name3">hello name3</pn:togglePanelItem>
Modified: trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-11-02 18:58:49 UTC (rev 19900)
+++ trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2010-11-02 19:20:52 UTC (rev 19901)
@@ -67,12 +67,20 @@
<ul>
<li><h:commandLink value="accordion" action="accordion" /></li>
</ul>
+ </li>
+ <li>
<p>QUnit</p>
<ul>
<li><h:commandLink value="accordion" action="qunit/accordion" /></li>
<li><h:commandLink value="accordionHeaders" action="qunit/accordionHeaders" /></li>
</ul>
</li>
+ <li>
+ <p>Bugs</p>
+ <ul>
+ <li><h:commandLink value="RF-9364" action="RF-9364" /></li>
+ </ul>
+ </li>
</ul>
<p>Collapsible Panel</p>
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-11-02 18:58:49 UTC (rev 19900)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-11-02 19:20:52 UTC (rev 19901)
@@ -120,7 +120,7 @@
* @private
* */
__getParentForm : function () {
- return $(rf.getDomElement(this.comp.id)).parent('form');
+ return $(rf.getDomElement(this.comp.id)).parents('form:first');
},
/**
14 years, 2 months
JBoss Rich Faces SVN: r19900 - trunk/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-11-02 14:58:49 -0400 (Tue, 02 Nov 2010)
New Revision: 19900
Modified:
trunk/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/component-control.js
Log:
https://jira.jboss.org/browse/RF-9530
Modified: trunk/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/component-control.js
===================================================================
--- trunk/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/component-control.js 2010-11-02 18:15:34 UTC (rev 19899)
+++ trunk/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/component-control.js 2010-11-02 18:58:49 UTC (rev 19900)
@@ -28,8 +28,9 @@
invokeOnComponent : function(event, target, callback) {
if(callback && typeof callback == 'function') {
$(target).each(function() {
- if (this.richfaces && this.richfaces.component) {
- callback(event, this.richfaces.component);
+ var component = richfaces.$(this);
+ if (component) {
+ callback(event, component);
}
});
}
14 years, 2 months
JBoss Rich Faces SVN: r19899 - trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/tree.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-11-02 14:15:34 -0400 (Tue, 02 Nov 2010)
New Revision: 19899
Modified:
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/tree/CDCatalog.xml
Log:
Fixed incorrect encoding type
Modified: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/tree/CDCatalog.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/tree/CDCatalog.xml 2010-11-02 16:19:41 UTC (rev 19898)
+++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/tree/CDCatalog.xml 2010-11-02 18:15:34 UTC (rev 19899)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO8859-1" ?>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
14 years, 2 months
JBoss Rich Faces SVN: r19898 - trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-11-02 12:19:41 -0400 (Tue, 02 Nov 2010)
New Revision: 19898
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java
Log:
implements Serializable added to View scoped bean.
Modified: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java 2010-11-02 15:57:11 UTC (rev 19897)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java 2010-11-02 16:19:41 UTC (rev 19898)
@@ -1,19 +1,22 @@
package org.richfaces.demo.tooltip;
+import java.io.Serializable;
import java.util.Date;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
+
@ManagedBean
@ViewScoped
-public class TooltipData {
- private int tooltipCounter = 0;
+public class TooltipData implements Serializable {
+ private int tooltipCounter = 0;
- public int getTooltipCounter() {
- return tooltipCounter++;
- }
- public Date getTooltipDate() {
- return new Date();
- }
+ public int getTooltipCounter() {
+ return tooltipCounter++;
+ }
-}
+ public Date getTooltipDate() {
+ return new Date();
+ }
+
+}
14 years, 2 months
JBoss Rich Faces SVN: r19897 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-11-02 11:57:11 -0400 (Tue, 02 Nov 2010)
New Revision: 19897
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RF-9178
* added one page for rich:calendar
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-02 15:48:32 UTC (rev 19896)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-02 15:57:11 UTC (rev 19897)
@@ -114,6 +114,7 @@
components.put("richAccordion", "Rich Accordion");
components.put("richAccordionItem", "Rich Accordion Item");
components.put("richAutocomplete", "Rich Autocomplete");
+ components.put("richCalendar", "Rich Calendar");
components.put("richCollapsiblePanel", "Rich Collapsible Panel");
components.put("richColumn", "Rich Column");
components.put("richColumnGroup", "Rich Column Group");
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2010-11-02 15:57:11 UTC (rev 19897)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import org.richfaces.component.UICalendar;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:calendar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richCalendarBean")
+@SessionScoped
+public class RichCalendarBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private Date date = new Date();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UICalendar.class, getClass(), false);
+
+ attributes.setAttribute("popup", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showFooter", true);
+ attributes.setAttribute("showInput", true);
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("validator");
+ attributes.remove("valueChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+}
Property changes on: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2010-11-02 15:57:11 UTC (rev 19897)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Calendar</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page containing <b>rich:calendar</b> and inputs for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-11-02 15:57:11 UTC (rev 19897)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <script type="text/javascript">
+ testedComponentId = "#{rich:clientId('calendar')}";
+ </script>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:calendar id="calendar"
+ boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
+ buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
+ buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
+ buttonIconDisabled="#{richCalendarBean.attributes['buttonIconDisabled'].value}"
+ buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
+ converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
+ currentDate="#{richCalendarBean.attributes['currentDate'].value}"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ dayEnabled="#{richCalendarBean.attributes['dayEnabled'].value}"
+ dayStyleClass="#{richCalendarBean.attributes['dayStyleClass'].value}"
+ defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
+ direction="#{richCalendarBean.attributes['direction'].value}"
+ disable="#{richCalendarBean.attributes['disable'].value}"
+ enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
+ firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
+ hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
+ horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
+ immediate="#{richCalendarBean.attributes['immediate'].value}"
+ inputClass="#{richCalendarBean.attributes['inputClass'].value}"
+ inputSize="#{richCalendarBean.attributes['inputSize'].value}"
+ inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
+ jointPoint="#{richCalendarBean.attributes['jointPoint'].value}"
+ locale="#{richCalendarBean.attributes['locale'].value}"
+ minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
+ monthLabels="#{richCalendarBean.attributes['monthLabels'].value}"
+ monthLabelsShort="#{richCalendarBean.attributes['monthLabelsShort'].value}"
+ oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
+ oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
+ oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
+ oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
+ oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
+ oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
+ oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
+ oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
+ oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
+ oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
+ oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
+ oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
+ oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
+ oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
+ popup="#{richCalendarBean.attributes['popup'].value}"
+ rendered="#{richCalendarBean.attributes['rendered'].value}"
+ required="#{richCalendarBean.attributes['required'].value}"
+ requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
+ resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
+ showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
+ showFooter="#{richCalendarBean.attributes['showFooter'].value}"
+ showHeader="#{richCalendarBean.attributes['showHeader'].value}"
+ showInput="#{richCalendarBean.attributes['showInput'].value}"
+ showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
+ showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
+ style="#{richCalendarBean.attributes['style'].value}"
+ tabindex="#{richCalendarBean.attributes['tabindex'].value}"
+ timeZone="#{richCalendarBean.attributes['timeZone'].value}"
+ todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
+ validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
+ value="#{richCalendarBean.attributes['value'].value}"
+ verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
+ weekDayLabels="#{richCalendarBean.attributes['weekDayLabels'].value}"
+ weekDayLabelsShort="#{richCalendarBean.attributes['weekDayLabelsShort'].value}"
+ zindex="#{richCalendarBean.attributes['zindex'].value}"
+ />
+
+ <br/><br/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richCalendarBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
14 years, 2 months
JBoss Rich Faces SVN: r19896 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-11-02 11:48:32 -0400 (Tue, 02 Nov 2010)
New Revision: 19896
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml
Log:
https://jira.jboss.org/browse/RF-9583
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml 2010-11-02 15:46:12 UTC (rev 19895)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml 2010-11-02 15:48:32 UTC (rev 19896)
@@ -7,13 +7,25 @@
xmlns:rich="http://richfaces.org/rich">
<style>
.tooltip {
- background-color: #{richSkin.generalBackgroundColor};
- border-width:3px;
- padding:10px;
+ background-color: #{ richSkin.generalBackgroundColor
}
-.tooltip-custom-body{
- background-color:orange;
+
+;
+border-width
+:
+3px;
+
+
+padding
+:
+10px;
+
+
}
+.tooltip-custom-body {
+ background-color: orange;
+}
+
.tooltip-text {
width: 350px;
height: 80px;
@@ -30,7 +42,7 @@
</style>
<h:panelGrid columns="2">
- <rich:panel id="sample1" styleClass="tooltip-text"
+ <rich:panel id="sample1" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
<p>Here you can see <b>default client-side</b> tool-tip</p>
<rich:tooltip id="tt1">
@@ -41,23 +53,21 @@
</rich:panel>
<rich:panel id="sample2" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
- <p>This tool-tip will not <b>follow mouse</b>. Also this tool-tip has
- a <b>delay 1.5 sec</b>, so be patient!</p>
- <rich:tooltip followMouse="false"
- showDelay="1500" bodyClass="tooltip-custom-body" styleClass="qqq">
+ <p>This tool-tip will not <b>follow mouse</b>. Also this tool-tip
+ has a <b>delay 1.5 sec</b>, so be patient!</p>
+ <rich:tooltip followMouse="false" showDelay="1500"
+ bodyClass="tooltip-custom-body" styleClass="qqq">
<span style="white-space: nowrap"> This tool-tip content also
<strong>pre-rendered</strong> to the page.<br />
- However, the look of this tool-tip is customized<br />
- by styleClass attribute. </span>
+ </span>
</rich:tooltip>
</rich:panel>
- <h:form>
+ <h:form>
<rich:panel id="sample3" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
<p>This tool-tip rendered on server <b>in separate request</b>.
</p>
- <rich:tooltip mode="ajax" styleClass="tooltip"
- layout="block">
+ <rich:tooltip mode="ajax" styleClass="tooltip" layout="block">
<f:facet name="defaultContent">
<strong>Wait...</strong>
</f:facet>
@@ -75,10 +85,9 @@
<h:form>
<rich:panel id="sample4" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
- <p>This tool-tip will be <b>activated on mouse click</b>. It
- also has a <b>bottom-left</b> position.</p>
- <rich:tooltip showEvent="click"
- mode="ajax" styleClass="tooltip" layout="block">
+ <p>This tool-tip will be <b>activated on mouse click</b>.</p>
+ <rich:tooltip showEvent="click" mode="ajax" styleClass="tooltip"
+ layout="block">
<f:facet name="defaultContent">
<strong>Wait...</strong>
</f:facet>
14 years, 2 months
JBoss Rich Faces SVN: r19895 - in trunk/examples/richfaces-showcase/src/main: java/org/richfaces/demo/tooltip and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-11-02 11:46:12 -0400 (Tue, 02 Nov 2010)
New Revision: 19895
Added:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml
Log:
https://jira.jboss.org/browse/RF-9611
https://jira.jboss.org/browse/RF-9583
Added: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tooltip/TooltipData.java 2010-11-02 15:46:12 UTC (rev 19895)
@@ -0,0 +1,19 @@
+package org.richfaces.demo.tooltip;
+
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+@ManagedBean
+@ViewScoped
+public class TooltipData {
+ private int tooltipCounter = 0;
+
+ public int getTooltipCounter() {
+ return tooltipCounter++;
+ }
+ public Date getTooltipDate() {
+ return new Date();
+ }
+
+}
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml 2010-11-02 15:35:52 UTC (rev 19894)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tooltip/samples/tooltip-sample.xhtml 2010-11-02 15:46:12 UTC (rev 19895)
@@ -11,6 +11,9 @@
border-width:3px;
padding:10px;
}
+.tooltip-custom-body{
+ background-color:orange;
+}
.tooltip-text {
width: 350px;
height: 80px;
@@ -27,28 +30,28 @@
</style>
<h:panelGrid columns="2">
- <rich:panel id="sample1" styleClass="tooltip-text"
+ <rich:panel id="sample1" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
<p>Here you can see <b>default client-side</b> tool-tip</p>
- <rich:tooltip target="sample1" id="tt1" label="123123231">
+ <rich:tooltip id="tt1">
<span style="white-space: nowrap"> This tool-tip content was
<strong>pre-rendered</strong> to the page.<br />
- The look of this tool-tip is 100% defined by skin. </span>
+ Also the tooltip following mouse by default </span>
</rich:tooltip>
</rich:panel>
<rich:panel id="sample2" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
- <p>This tool-tip will <b>follow mouse</b>. Also this tool-tip has
- a <b>delay 0.5 sec</b>, so be patient!</p>
- <rich:tooltip followMouse="true"
- showDelay="500" styleClass="tooltip">
+ <p>This tool-tip will not <b>follow mouse</b>. Also this tool-tip has
+ a <b>delay 1.5 sec</b>, so be patient!</p>
+ <rich:tooltip followMouse="false"
+ showDelay="1500" bodyClass="tooltip-custom-body" styleClass="qqq">
<span style="white-space: nowrap"> This tool-tip content also
<strong>pre-rendered</strong> to the page.<br />
However, the look of this tool-tip is customized<br />
by styleClass attribute. </span>
</rich:tooltip>
</rich:panel>
- <h:form>
+ <h:form>
<rich:panel id="sample3" styleClass="tooltip-text"
bodyClass="rich-laguna-panel-no-header">
<p>This tool-tip rendered on server <b>in separate request</b>.
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml 2010-11-02 15:35:52 UTC (rev 19894)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml 2010-11-02 15:46:12 UTC (rev 19895)
@@ -5,22 +5,19 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form id="form">
- <rich:tree id="tree" nodeType="#{node.type}" var="node"
- value="#{treeBean.rootNodes}" toggleType="client">
- <rich:treeNode type="country">
+<h:form>
+ <rich:tree id="tree" nodeType="#{node.type}" var="node"
+ value="#{treeBean.rootNodes}" toggleType="client">
+ <rich:treeNode type="country">
#{node.name}
</rich:treeNode>
- <rich:treeNode type="company">
+ <rich:treeNode type="company" icon="/images/tree/disc.gif">
#{node.name}
</rich:treeNode>
- <rich:treeNode type="cd">
- #{node.artist}:#{node.title}
+ <rich:treeNode type="cd" icon="/images/tree/song.gif">
+ #{node.artist} - #{node.title}
</rich:treeNode>
- <rich:treeNode>
- node not found for some reason
- </rich:treeNode>
- </rich:tree>
-
- </h:form>
+ </rich:tree>
+ <a4j:commandButton execute="@all" render="@all"></a4j:commandButton>
+</h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml 2010-11-02 15:35:52 UTC (rev 19894)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml 2010-11-02 15:46:12 UTC (rev 19895)
@@ -5,7 +5,14 @@
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition>
- <p>DESC</p>
+ <p><b>rich:tree</b> is a component that renders a tree control on the page. The
+ most important tree features are:</p>
+ <ul>
+ <li>Native support for Ajax operations</li>
+ <li>Support for "ajax", "client" and "server" switch types</li>
+ <li>Selection capabilities</li>
+ <li>Flexible look</li>
+ </ul>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
14 years, 2 months