JBoss Rich Faces SVN: r17348 - in root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-28 06:50:37 -0400 (Fri, 28 May 2010)
New Revision: 17348
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIColumn.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
Log:
rename breakBefore -> brakeRowBefore
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIColumn.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIColumn.java 2010-05-28 10:44:15 UTC (rev 17347)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIColumn.java 2010-05-28 10:50:37 UTC (rev 17348)
@@ -34,9 +34,16 @@
public class UIColumn extends javax.faces.component.UIColumn implements Column {
protected enum PropertyKeys {
- filter, filterValue, comparator, sortOrder
+ filter, filterValue, comparator, sortOrder, breakRowBefore
}
+ public void setBreakRowBefore(boolean breakRowBefore) {
+ getStateHelper().put(PropertyKeys.breakRowBefore, breakRowBefore);
+ }
+
+ public boolean getBreakRowBefore() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.breakRowBefore, false);
+ }
public void setSortOrder(SortOrder sortOrder) {
getStateHelper().put(PropertyKeys.sortOrder, sortOrder);
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2010-05-28 10:44:15 UTC (rev 17347)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2010-05-28 10:50:37 UTC (rev 17348)
@@ -49,7 +49,7 @@
public static final String CELL_ELEMENT_KEY = "cellElement";
- public static final String BREAK_BEFORE_STRING = "breakBefore";
+ public static final String BREAK_ROW_BEFORE = "breakRowBefore";
public static final String ROWSPAN_STRING = "rowspan";
@@ -62,7 +62,7 @@
if (component instanceof org.richfaces.component.UIColumn) {
Map<String, Object> attributes = component.getAttributes();
- if (Boolean.TRUE.equals(attributes.get(BREAK_BEFORE_STRING)) && rowHolder.getProcessCell() != 0) {
+ if (Boolean.TRUE.equals(attributes.get(BREAK_ROW_BEFORE)) && rowHolder.getProcessCell() != 0) {
encodeRowEnd(writer);
rowHolder.nextRow();
rowHolder.setRowStart(true);
@@ -230,7 +230,7 @@
} else if (component instanceof org.richfaces.component.UIColumn) {
// For new row, save length of previsous.
Map<String, Object> attributes = component.getAttributes();
- if (Boolean.TRUE.equals(attributes.get(BREAK_BEFORE_STRING))) {
+ if (Boolean.TRUE.equals(attributes.get(BREAK_ROW_BEFORE))) {
if (currentLength > count) {
count = currentLength;
}
14 years
JBoss Rich Faces SVN: r17347 - root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-28 06:44:15 -0400 (Fri, 28 May 2010)
New Revision: 17347
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTable.java
Log:
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTable.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTable.java 2010-05-28 10:43:15 UTC (rev 17346)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTable.java 2010-05-28 10:44:15 UTC (rev 17347)
@@ -103,7 +103,7 @@
}
public String getExpandMode() {
- return (String) getStateHelper().eval(PropertyKeys.expandMode, MODE_SERVER);
+ return (String) getStateHelper().eval(PropertyKeys.expandMode, MODE_CLIENT);
}
public void setExpandMode(String expandMode) {
14 years
JBoss Rich Faces SVN: r17346 - root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-28 06:43:15 -0400 (Fri, 28 May 2010)
New Revision: 17346
Added:
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable-toggler.js
Log:
Added: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable-toggler.js
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable-toggler.js (rev 0)
+++ root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable-toggler.js 2010-05-28 10:43:15 UTC (rev 17346)
@@ -0,0 +1,49 @@
+(function ($, richfaces) {
+
+ richfaces.ui = richfaces.ui || {};
+
+ richfaces.ui.SubTableToggler = function(id, options) {
+ this.id = id;
+ this.eventName = options.eventName;
+ this.expandControl = options.expandControl;
+ this.collapseControl = options.collapseControl;
+ this.forId = options.forId;
+
+ richfaces.Event.bindById(this.id, this.eventName, this.toggle, this);
+ };
+
+ $.extend(richfaces.ui.SubTableToggler.prototype, (function () {
+
+ var getElementById= function(id) {
+ return $(document.getElementById(id))
+ }
+
+ return {
+
+ toggle: function(e) {
+ var subtable = richfaces.$(this.forId);
+ if(subtable) {
+ this.toggleControl(subtable.isExpand());
+ subtable.setOption(this.id);
+ subtable.toggle(e);
+ }
+ },
+
+ toggleControl: function(expanded) {
+ var expandControl = getElementById(this.expandControl);
+ var collapseControl = getElementById(this.collapseControl);
+
+ if(expanded) {
+ collapseControl.hide();
+ expandControl.show();
+ } else {
+ expandControl.hide();
+ collapseControl.show();
+ }
+ }
+
+ };
+
+ })());
+
+})(jQuery, window.RichFaces);
\ No newline at end of file
14 years
JBoss Rich Faces SVN: r17345 - in root/ui-sandbox/tables/trunk/ui/src/main: java/org/richfaces/component and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-28 06:40:38 -0400 (Fri, 28 May 2010)
New Revision: 17345
Added:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTableToggleControl.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlSubTableToggleControl.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/down_icon.gif
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/up_icon.gif
Removed:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIToggleControl.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlToggleControl.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ToggleControlRendererBase.java
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/toggler.js
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/config/faces-config.xml
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.ecss
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable.js
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.faces-config.xml
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.taglib.xml
root/ui-sandbox/tables/trunk/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml
Log:
RF-8687, RF-8688, RF-8689
Modified: root/ui-sandbox/tables/trunk/ui/src/main/config/faces-config.xml
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/config/faces-config.xml 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/config/faces-config.xml 2010-05-28 10:40:38 UTC (rev 17345)
@@ -63,8 +63,8 @@
</component-extension>
</component>
<component>
- <component-type>org.richfaces.ToggleControl</component-type>
- <component-class>org.richfaces.component.html.HtmlToggleControl</component-class>
+ <component-type>org.richfaces.SubTableToggleControl</component-type>
+ <component-class>org.richfaces.component.html.HtmlSubTableToggleControl</component-class>
<component-extension>
<cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
</component-extension>
Added: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTableToggleControl.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTableToggleControl.java (rev 0)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UISubTableToggleControl.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.component;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.event.ToggleEvent;
+import org.richfaces.event.ToggleListener;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class UISubTableToggleControl extends UIComponentBase implements ToggleListener {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.SubTableToggleControl";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.SubTableToggleControl";
+
+ enum PropertyKeys {
+ expandIcon, collapseIcon, expandLabel, collapseLabel, forId, switchType, event
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getExpandLabel() {
+ return (String)getStateHelper().eval(PropertyKeys.expandLabel);
+ }
+
+ public void setExpandLabel(String expandLabel) {
+ getStateHelper().put(PropertyKeys.expandLabel, expandLabel);
+ }
+
+ public String getCollapseLabel() {
+ return (String)getStateHelper().eval(PropertyKeys.collapseLabel);
+ }
+
+ public void setCollapseLabel(String collapseLabel) {
+ getStateHelper().put(PropertyKeys.collapseLabel, collapseLabel);
+ }
+
+ public String getExpandIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.expandIcon, null);
+ }
+
+ public void setExpandIcon(String expandIcon) {
+ getStateHelper().put(PropertyKeys.expandIcon, expandIcon);
+ }
+
+ public String getCollapseIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.collapseIcon, null);
+ }
+
+ public void setCollapseIcon(String collapseIcon) {
+ getStateHelper().put(PropertyKeys.collapseIcon, collapseIcon);
+ }
+
+ public String getFor() {
+ return (String) getStateHelper().eval(PropertyKeys.forId, null);
+ }
+
+ public void setFor(String forId) {
+ getStateHelper().put(PropertyKeys.forId, forId);
+ }
+
+ public String getEvent() {
+ return (String) getStateHelper().eval(PropertyKeys.event, "onclick");
+
+ }
+
+ public void setEvent(String event) {
+ getStateHelper().put(PropertyKeys.event, event);
+ }
+
+ @Override
+ public void encodeEnd(FacesContext context) throws IOException {
+ // TODO Auto-generated method stub
+ super.encodeEnd(context);
+ }
+
+ public void processToggle(ToggleEvent event) {
+ getFacesContext().getPartialViewContext().getRenderIds().add(getClientId(getFacesContext()));
+ }
+}
Deleted: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIToggleControl.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIToggleControl.java 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIToggleControl.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.component;
-
-import javax.faces.component.UIComponentBase;
-
-public class UIToggleControl extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.ToggleControl";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.ToggleControl";
-
- enum PropertyKeys {
- expandControl, collapseControl, forId, switchType, event
- }
-
- public String getFamily() {
- return COMPONENT_FAMILY;
- }
-
- public String getExpandControl() {
- return (String) getStateHelper().eval(PropertyKeys.expandControl, null);
- }
-
- public void setExpandControl(String expandControl) {
- getStateHelper().put(PropertyKeys.expandControl, expandControl);
- }
-
- public String getCollapseControl() {
- return (String) getStateHelper().eval(PropertyKeys.collapseControl, null);
- }
-
- public void setCollapseControl(String collapseControl) {
- getStateHelper().put(PropertyKeys.collapseControl, collapseControl);
- }
-
- public String getFor() {
- return (String) getStateHelper().eval(PropertyKeys.forId, null);
- }
-
- public void setFor(String forId) {
- getStateHelper().put(PropertyKeys.forId, forId);
- }
-
- public String getEvent() {
- return (String) getStateHelper().eval(PropertyKeys.event, "onclick");
-
- }
-
- public void setEvent(String event) {
- getStateHelper().put(PropertyKeys.event, event);
- }
-
-}
Added: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlSubTableToggleControl.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlSubTableToggleControl.java (rev 0)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlSubTableToggleControl.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -0,0 +1,7 @@
+package org.richfaces.component.html;
+
+import org.richfaces.component.UISubTableToggleControl;
+
+//TODO nick - behavior support
+public class HtmlSubTableToggleControl extends UISubTableToggleControl {
+}
Deleted: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlToggleControl.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlToggleControl.java 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/html/HtmlToggleControl.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -1,7 +0,0 @@
-package org.richfaces.component.html;
-
-import org.richfaces.component.UIToggleControl;
-
-//TODO nick - behavior support
-public class HtmlToggleControl extends UIToggleControl {
-}
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -135,7 +135,7 @@
if(encodeParentTBody((UIDataTableBase)row)) {
encodeTableBodyEnd(writer);
- encodeScriptContainer(writer, facesContext, (UIDataTableBase)row);
+ encodeHiddenContainer(writer, facesContext, (UIDataTableBase)row);
if(rowHolder.isPartialUpdate()) {
facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
}
@@ -221,8 +221,7 @@
encodeStyleClass(writer, context, component, HTML.STYLE_CLASS_ATTR, styleClass);
}
- protected void encodeScriptContainer(ResponseWriter writer, FacesContext context, UIDataTableBase dataTableBase) throws IOException {
-
+ protected void encodeHiddenContainer(ResponseWriter writer, FacesContext context, UIDataTableBase dataTableBase) throws IOException {
writer.startElement(HTML.TBODY_ELEMENT, dataTableBase);
writer.writeAttribute(HTML.ID_ATTRIBUTE, dataTableBase.getClientId(context) +":sc",null);
writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display: none", null);
@@ -231,6 +230,7 @@
writer.startElement(HTML.TD_ELEM, dataTableBase);
encodeClientScript(writer, context, dataTableBase);
+ encodeHiddenInput(writer, context, dataTableBase);
writer.endElement(HTML.TD_ELEM);
writer.endElement(HTML.TR_ELEMENT);
@@ -243,6 +243,8 @@
}
public abstract void encodeClientScript(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException;
+
+ public abstract void encodeHiddenInput(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException;
public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
throws IOException {
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -268,6 +268,11 @@
writer.endElement(HTML.SCRIPT_ELEM);
}
+ @Override
+ public void encodeHiddenInput(ResponseWriter writer, FacesContext context, UIDataTableBase component)
+ throws IOException {
+ }
+
public String getTableSkinClass() {
return "rf-dt";
}
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -49,14 +49,18 @@
private static final String STATE = ":state";
+ private static final String OPTIONS = ":options";
+
protected void doDecode(FacesContext facesContext, UIComponent component) {
UISubTable subTable = (UISubTable)component;
-
- String clientId = subTable.getClientId(facesContext) + STATE;
+
+ String clientId = subTable.getClientId(facesContext);
+
+ String stateId = clientId + STATE;
Map<String, String> requestMap = facesContext.getExternalContext().getRequestParameterMap();
- String state = (String)requestMap.get(clientId);
+ String state = (String)requestMap.get(stateId);
boolean isExpand = true;
if(state != null) {
@@ -70,7 +74,6 @@
new ToggleEvent(subTable, isExpand).queue();
}
}
-
}
public void encodeTableFacets(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException {
@@ -136,7 +139,7 @@
UISubTable subTable = (UISubTable)row;
encodeFooterFacet(writer, facesContext, subTable, false);
encodeTableBodyEnd(writer);
- encodeScriptContainer(writer, facesContext, subTable);
+ encodeHiddenContainer(writer, facesContext, subTable);
if(rowHolder.isPartialUpdate()) {
facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
}
@@ -147,16 +150,26 @@
return true;
}
- public void encodeStateInput(ResponseWriter writer, FacesContext facesContext, UISubTable subTable) throws IOException {
- String clientId = subTable.getClientId(facesContext) + STATE;
+ public void encodeHiddenInput(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase) throws IOException {
+ UISubTable subTable = (UISubTable)dataTableBase;
+
+ String stateId = subTable.getClientId(facesContext) + STATE;
writer.startElement(HTML.INPUT_ELEM, subTable);
- writer.writeAttribute(HTML.ID_ATTRIBUTE, clientId , null);
- writer.writeAttribute(HTML.NAME_ATTRIBUTE, clientId , null);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, stateId , null);
+ writer.writeAttribute(HTML.NAME_ATTRIBUTE, stateId , null);
writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
int state = subTable.isExpanded() ? 1 : 0;
writer.writeAttribute(HTML.VALUE_ATTRIBUTE, state, null);
writer.endElement(HTML.INPUT_ELEM);
+
+ String optionsId = subTable.getClientId(facesContext) + OPTIONS;
+ writer.startElement(HTML.INPUT_ELEM, subTable);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, optionsId , null);
+ writer.writeAttribute(HTML.NAME_ATTRIBUTE, optionsId , null);
+ writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
+ writer.endElement(HTML.INPUT_ELEM);
+
}
public boolean containsThead() {
@@ -177,7 +190,8 @@
String formId = nestingForm != null ? nestingForm.getClientId(facesContext) : "";
Map<String, Object> options = new HashMap<String, Object>();
- options.put("stateInput", subTable.getClientId(facesContext) +":state");
+ options.put("stateInput", subTable.getClientId(facesContext) +STATE);
+ options.put("optionsInput", subTable.getClientId(facesContext) +OPTIONS);
options.put("expandMode", subTable.getExpandMode());
options.put("eventOptions", AjaxRendererUtils.buildEventOptions(facesContext, subTable));
Added: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java (rev 0)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/SubTableToggleControlRendererBase.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -0,0 +1,179 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.renderkit;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.renderkit.RendererBase;
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.richfaces.component.UISubTable;
+import org.richfaces.component.UISubTableToggleControl;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+@ResourceDependencies( {@ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "richfaces.js"), @ResourceDependency(name = "subtable-toggler.js")})
+
+public class SubTableToggleControlRendererBase extends RendererBase {
+
+ private static final String DISPLAY_NONE = "display: none;";
+
+ private static final String EXPAND_STATE = "expand";
+
+ private static final String COLLAPSE_STATE = "collapse";
+
+ @Override
+ protected void doDecode(FacesContext context, UIComponent component) {
+ context.getPartialViewContext().getRenderIds().add(component.getClientId(context));
+ }
+
+ protected void encodeControl(FacesContext context, UIComponent component) throws IOException {
+
+ UISubTableToggleControl toggleControl = (UISubTableToggleControl) component;
+
+ UISubTable subTable = findComponent(context, toggleControl);
+ if (subTable != null) {
+ ResponseWriter writer = context.getResponseWriter();
+
+ String toggleId = toggleControl.getClientId(context);
+ Map<String, Object> options = encodeOptions(context, toggleControl, subTable);
+ String switchType = subTable.getExpandMode();
+
+ boolean expanded = subTable.isExpanded();
+
+ encodeControl(context, writer, toggleControl, switchType, expanded, false);
+ encodeControl(context, writer, toggleControl, switchType, !expanded, true);
+
+ JSFunction jsFunction = new JSFunction("new RichFaces.ui.SubTableToggler");
+ jsFunction.addParameter(toggleId);
+ jsFunction.addParameter(options);
+
+ writer.startElement(HTML.SCRIPT_ELEM, subTable);
+ writer.writeText(jsFunction.toScript(), null);
+ writer.endElement(HTML.SCRIPT_ELEM);
+
+ subTable.addToggleListener(toggleControl);
+ }
+
+ }
+
+ protected void encodeControl(FacesContext context, ResponseWriter writer, UISubTableToggleControl control,
+ String switchType, boolean expanded, boolean visible) throws IOException {
+ String state = getState(expanded);
+ String styleClass = getStyleClass(context, control);
+ String style = getStyle(context, control);
+
+ writer.startElement(HTML.SPAN_ELEM, control);
+
+ if (!visible) {
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, DISPLAY_NONE, null);
+ }
+
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, control.getClientId() + ":" + state, null);
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, styleClass, null);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, style, null);
+
+ UIComponent controlFacet = control.getFacet(state);
+ if(controlFacet != null && controlFacet.isRendered()) {
+
+ if(!visible) {
+ String facetStyle = (String)controlFacet.getAttributes().get("style");
+ facetStyle = facetStyle != null ? facetStyle + "; display: none" : "; display: none";
+ controlFacet.getAttributes().put("style", facetStyle);
+ }
+
+ controlFacet.encodeAll(context);
+
+ } else {
+
+ String image = expanded ? control.getExpandIcon() : control.getCollapseIcon();
+ if (image != null && image.trim().length() > 0) {
+ writer.startElement(HTML.IMG_ELEMENT, control);
+ writer.writeAttribute(HTML.SRC_ATTRIBUTE, image, null);
+ writer.writeAttribute(HTML.ALT_ATTRIBUTE, "", null);
+ writer.endElement(HTML.IMG_ELEMENT);
+ }
+
+ String label = expanded ? control.getExpandLabel() : control.getCollapseLabel();
+ if(label != null && label.trim().length() > 0) {
+ writer.startElement(HTML.A_ELEMENT, control);
+ writer.writeAttribute(HTML.HREF_ATTR, "javascript:void(0);", null);
+ writer.writeText(label, null);
+ writer.endElement(HTML.A_ELEMENT);
+ }
+ }
+ writer.endElement(HTML.SPAN_ELEM);
+ }
+
+ public HashMap<String, Object> encodeOptions(FacesContext context, UISubTableToggleControl toggleControl, UISubTable subTable) {
+ String forId = subTable.getClientId(context);
+ String toggleControlId = toggleControl.getClientId(context);
+
+ HashMap<String, Object> options = new HashMap<String, Object>();
+ options.put("forId", forId);
+ options.put("expandControl", toggleControlId + ":expand");
+ options.put("collapseControl", toggleControlId + ":collapse");
+
+ String eventName = toggleControl.getEvent();
+ eventName = eventName.trim().startsWith("on") ? eventName.substring(2) : eventName;
+ options.put("eventName", eventName);
+ return options;
+ }
+
+ public String getStyleClass(FacesContext context, UISubTableToggleControl control) {
+ return null;
+ }
+
+ public String getStyle(FacesContext context, UISubTableToggleControl control) {
+ return null;
+ }
+
+ protected UISubTable findComponent(FacesContext context, UISubTableToggleControl toggleControl) {
+ String forId = toggleControl.getFor();
+ if (forId != null && forId.length() > 0) {
+
+ UIComponent subTable = getUtils().findComponentFor(context, toggleControl, forId);
+ if (subTable instanceof UISubTable) {
+ return (UISubTable) subTable;
+ }
+
+ }
+ return null;
+ }
+
+ protected String getState(boolean expand) {
+ return expand ? EXPAND_STATE : COLLAPSE_STATE;
+ }
+
+}
Deleted: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ToggleControlRendererBase.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ToggleControlRendererBase.java 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ToggleControlRendererBase.java 2010-05-28 10:40:38 UTC (rev 17345)
@@ -1,164 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.renderkit;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
-import org.ajax4jsf.javascript.JSFunction;
-import org.ajax4jsf.renderkit.RendererBase;
-import org.ajax4jsf.renderkit.RendererUtils.HTML;
-import org.richfaces.component.UISubTable;
-import org.richfaces.component.UIToggleControl;
-
-/**
- * @author Anton Belevich
- *
- */
-@ResourceDependencies( {@ResourceDependency(library = "javax.faces", name = "jsf.js"),
- @ResourceDependency(name = "richfaces.js"), @ResourceDependency(name = "toggler.js")})
-
-public abstract class ToggleControlRendererBase extends RendererBase {
-
- private static final String DISPLAY_NONE = "display: none;";
-
- private static final String EXPAND_STATE = "expand";
-
- private static final String COLLAPSE_STATE = "collapse";
-
-
- protected void encodeControl(FacesContext context, UIComponent component) throws IOException {
- UIToggleControl toggleControl = (UIToggleControl) component;
-
- UISubTable subTable = findComponent(context, toggleControl);
- if (subTable != null) {
- ResponseWriter writer = context.getResponseWriter();
-
- String toggleId = toggleControl.getClientId(context);
- Map<String, Object> options = encodeOptions(context, toggleControl, subTable);
- String switchType = subTable.getExpandMode();
-
- boolean expanded = subTable.isExpanded();
-
- encodeControl(context, writer, toggleControl, switchType, expanded, false);
- encodeControl(context, writer, toggleControl, switchType, !expanded, true);
-
- JSFunction jsFunction = new JSFunction("new RichFaces.ui.DataTableToggler");
- jsFunction.addParameter(toggleId);
- jsFunction.addParameter(options);
-
- writer.startElement(HTML.SCRIPT_ELEM, subTable);
- writer.writeText(jsFunction.toScript(), null);
- writer.endElement(HTML.SCRIPT_ELEM);
- }
-
- }
-
- protected void encodeControl(FacesContext context, ResponseWriter writer, UIToggleControl control,
- String switchType, boolean expanded, boolean visible) throws IOException {
- String state = getState(expanded);
- String styleClass = getStyleClass(context, control);
- String style = getStyle(context, control);
-
- writer.startElement(HTML.SPAN_ELEM, control);
-
- if (!visible) {
- writer.writeAttribute(HTML.STYLE_ATTRIBUTE, DISPLAY_NONE, null);
- }
-
- writer.writeAttribute(HTML.ID_ATTRIBUTE, control.getClientId() + ":" + state, null);
- writer.writeAttribute(HTML.CLASS_ATTRIBUTE, styleClass, null);
- writer.writeAttribute(HTML.STYLE_ATTRIBUTE, style, null);
-
- UIComponent controlFacet = control.getFacet(state);
- if(controlFacet != null && controlFacet.isRendered()) {
-
- if(!visible) {
- String facetStyle = (String)controlFacet.getAttributes().get("style");
- facetStyle = facetStyle != null ? facetStyle + "; display: none" : "; display: none";
- controlFacet.getAttributes().put("style", facetStyle);
- }
-
- controlFacet.encodeAll(context);
-
- } else {
-
- String image = expanded ? control.getExpandControl() : control.getCollapseControl();
- if (image != null && image.trim().length() > 0) {
- writer.startElement(HTML.IMG_ELEMENT, control);
- writer.writeAttribute(HTML.SRC_ATTRIBUTE, image, null);
- writer.writeAttribute(HTML.ALT_ATTRIBUTE, "", null);
- writer.endElement(HTML.IMG_ELEMENT);
- }
-
- }
- writer.endElement(HTML.SPAN_ELEM);
- }
-
- public HashMap<String, Object> encodeOptions(FacesContext context, UIToggleControl toggleControl, UISubTable subTable) {
- String forId = subTable.getClientId(context);
- String toggleControlId = toggleControl.getClientId(context);
-
- HashMap<String, Object> options = new HashMap<String, Object>();
- options.put("forId", forId);
- options.put("expandControl", toggleControlId + ":expand");
- options.put("collapseControl", toggleControlId + ":collapse");
-
- String eventName = toggleControl.getEvent();
- eventName = eventName.trim().startsWith("on") ? eventName.substring(2) : eventName;
- options.put("eventName", eventName);
- return options;
- }
-
- public String getStyleClass(FacesContext context, UIToggleControl control) {
- return null;
- }
-
- public String getStyle(FacesContext context, UIToggleControl control) {
- return null;
- }
-
- protected UISubTable findComponent(FacesContext context, UIToggleControl toggleControl) {
- String forId = toggleControl.getFor();
- if (forId != null && forId.length() > 0) {
-
- UIComponent subTable = getUtils().findComponentFor(context, toggleControl, forId);
- if (subTable instanceof UISubTable) {
- return (UISubTable) subTable;
- }
-
- }
- return null;
- }
-
- protected String getState(boolean expand) {
- return expand ? EXPAND_STATE : COLLAPSE_STATE;
- }
-}
Modified: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.ecss
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.ecss 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.ecss 2010-05-28 10:40:38 UTC (rev 17345)
@@ -250,3 +250,13 @@
.rf-st-h{
}
+
+
+/*should be generated in M1*/
+.rf-stt-exp{
+ background-image: url("#{resource['up_icon.gif']}");
+}
+
+.rf-stt-col{
+ background-image: url("#{resource['down_icon.gif']}");
+}
Added: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/down_icon.gif
===================================================================
(Binary files differ)
Property changes on: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/down_icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable.js
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable.js 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/subtable.js 2010-05-28 10:40:38 UTC (rev 17345)
@@ -5,6 +5,7 @@
richfaces.ui.SubTable = function(id, f, options) {
this.id = id;
this.stateInput = options.stateInput;
+ this.optionsInput = options.optionsInput;
this.expandMode = options.expandMode;
this.eventOptions = options.eventOptions;
this.formId = f;
@@ -35,21 +36,25 @@
return $(document.getElementById(this.stateInput));
};
+ var optionsInputElem = function() {
+ return $(document.getElementById(this.optionsInput));
+ };
+
var ajax = function(e, options) {
this.switchState();
richfaces.ajax(this.id, e, options);
};
- var server = function() {
+ var server = function(options) {
this.switchState();
$(document.getElementById(this.formId)).submit();
};
- var client = function() {
+ var client = function(options) {
if(this.isExpand()) {
- this.collapse();
+ this.collapse(options);
} else {
- this.expand();
+ this.expand(options);
}
};
@@ -58,22 +63,22 @@
name: "RichFaces.ui.SubTable",
- toggle: function(e) {
+ toggle: function(e, options) {
if(this.expandMode == richfaces.ui.SubTable.MODE_AJAX) {
- ajax.call(this, e, this.eventOptions);
+ ajax.call(this, e, this.eventOptions, options);
}else if(this.expandMode == richfaces.ui.SubTable.MODE_SRV) {
- server.call(this);
+ server.call(this, options);
}else if(this.expandMode == richfaces.ui.SubTable.MODE_CLNT) {
- client.call(this);
+ client.call(this, options);
}
},
- collapse: function() {
+ collapse: function(options) {
this.setState(richfaces.ui.SubTable.collapse);
element.call(this).hide();
},
- expand: function() {
+ expand: function(options) {
this.setState(richfaces.ui.SubTable.expand);
element.call(this).show();
},
@@ -82,7 +87,7 @@
return (this.getState() > richfaces.ui.SubTable.collapse);
},
- switchState: function() {
+ switchState: function(options) {
var state = this.isExpand() ? richfaces.ui.SubTable.collapse : richfaces.ui.SubTable.expand;
this.setState(state);
},
@@ -93,6 +98,10 @@
setState: function(state) {
stateInputElem.call(this).val(state)
+ },
+
+ setOption: function(option) {
+ optionsInputElem.call(this).val(option);
}
};
Deleted: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/toggler.js
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/toggler.js 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/toggler.js 2010-05-28 10:40:38 UTC (rev 17345)
@@ -1,48 +0,0 @@
-(function ($, richfaces) {
-
- richfaces.ui = richfaces.ui || {};
-
- richfaces.ui.DataTableToggler = function(id, options) {
- this.id = id;
- this.eventName = options.eventName;
- this.expandControl = options.expandControl;
- this.collapseControl = options.collapseControl;
- this.forId = options.forId;
-
- richfaces.Event.bindById(this.id, this.eventName, this.toggle, this);
- };
-
- $.extend(richfaces.ui.DataTableToggler.prototype, (function () {
-
- var getElementById= function(id) {
- return $(document.getElementById(id))
- }
-
- return {
-
- toggle: function(e) {
- var subtable = richfaces.$(this.forId);
- if(subtable) {
- this.toggleControl(subtable.isExpand());
- subtable.toggle(e);
- }
- },
-
- toggleControl: function(expanded) {
- var expandControl = getElementById(this.expandControl);
- var collapseControl = getElementById(this.collapseControl);
-
- if(expanded) {
- collapseControl.hide();
- expandControl.show();
- } else {
- expandControl.hide();
- collapseControl.show();
- }
- }
-
- };
-
- })());
-
-})(jQuery, window.RichFaces);
\ No newline at end of file
Added: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/up_icon.gif
===================================================================
(Binary files differ)
Property changes on: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/up_icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.faces-config.xml
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.faces-config.xml 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.faces-config.xml 2010-05-28 10:40:38 UTC (rev 17345)
@@ -63,8 +63,8 @@
</component-extension>
</component>
<component>
- <component-type>org.richfaces.ToggleControl</component-type>
- <component-class>org.richfaces.component.html.HtmlToggleControl</component-class>
+ <component-type>org.richfaces.SubTableToggleControl</component-type>
+ <component-class>org.richfaces.component.html.HtmlSubTableToggleControl</component-class>
<component-extension>
<cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
</component-extension>
@@ -92,5 +92,11 @@
<renderer-type>org.richfaces.ExtendedDataTableRenderer</renderer-type>
<renderer-class>org.richfaces.renderkit.ExtendedDataTableRenderer</renderer-class>
</renderer>
+ <renderer>
+ <component-family>org.richfaces.SubTableToggleControl</component-family>
+ <renderer-type>org.richfaces.SubTableToggleControl</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.SubTableToggleControlRenderer</renderer-class>
+ </renderer>
+
</render-kit>
</faces-config>
\ No newline at end of file
Modified: root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.taglib.xml
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.taglib.xml 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/tables.taglib.xml 2010-05-28 10:40:38 UTC (rev 17345)
@@ -40,10 +40,10 @@
</component>
</tag>
<tag>
- <tag-name>toggleControl</tag-name>
+ <tag-name>subTableToggleControl</tag-name>
<component>
- <component-type>org.richfaces.ToggleControl</component-type>
- <renderer-type>org.richfaces.ToggleControlRenderer</renderer-type>
+ <component-type>org.richfaces.SubTableToggleControl</component-type>
+ <renderer-type>org.richfaces.SubTableToggleControlRenderer</renderer-type>
</component>
</tag>
Modified: root/ui-sandbox/tables/trunk/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml 2010-05-28 10:40:04 UTC (rev 17344)
+++ root/ui-sandbox/tables/trunk/ui/src/main/templates/org/richfaces/renderkit/html/toggle-control.template.xml 2010-05-28 10:40:38 UTC (rev 17345)
@@ -6,10 +6,10 @@
xmlns:javaee="http://java.sun.com/xml/ns/javaee">
<cc:interface>
- <cdk:class>org.richfaces.renderkit.html.ToggleControlRenderer</cdk:class>
- <cdk:superclass>org.richfaces.renderkit.ToggleControlRendererBase</cdk:superclass>
- <cdk:component-family>org.richfaces.ToggleControl</cdk:component-family>
- <cdk:renderer-type>org.richfaces.ToggleControlRenderer</cdk:renderer-type>
+ <cdk:class>org.richfaces.renderkit.html.SubTableToggleControlRenderer</cdk:class>
+ <cdk:superclass>org.richfaces.renderkit.SubTableToggleControlRendererBase</cdk:superclass>
+ <cdk:component-family>org.richfaces.SubTableToggleControl</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.SubTableToggleControlRenderer</cdk:renderer-type>
</cc:interface>
<cc:implementation>
14 years
JBoss Rich Faces SVN: r17344 - in root/examples/richfaces-showcase/trunk/src/main: webapp/richfaces and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-28 06:40:04 -0400 (Fri, 28 May 2010)
New Revision: 17344
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/standardSkinning/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml
Log:
https://jira.jboss.org/browse/RF-8374
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28 09:37:03 UTC (rev 17343)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28 10:40:04 UTC (rev 17344)
@@ -83,11 +83,11 @@
<sample>
<id>skinChange</id>
<name>Parameters for non-Ajax components</name>
- </sample>
+ </sample>
<sample>
<id>clientParam</id>
<name>Parameters from client side</name>
- </sample>
+ </sample>
</samples>
</demo>
</demos>
@@ -264,4 +264,19 @@
</demo>
</demos>
</group>
+ <group new="true">
+ <name>Misc Components/Features</name>
+ <demos>
+ <demo>
+ <id>standardSkinning</id>
+ <name>Standard elements skinning</name>
+ <samples>
+ <sample>
+ <id>standardSkinning</id>
+ <name>Standard elements skinning feature</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
</root>
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/standardSkinning/standardSkinning.xhtml 2010-05-28 10:40:04 UTC (rev 17344)
@@ -0,0 +1,94 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>This section overviews main principles of standard components
+ skinning with the Rich Faces framework.</p>
+ <p>This feature provides styling for standard HTML form elements in
+ order to be highly compilant with RichFaces common look'n'feel. There
+ should be two ways of applying skins to elements:</p>
+ <ul>
+ <li>Skinning style classes are applied to elements by element
+ name and type attribute (where applicable). No additional steps are
+ required from an application developer. Application initialization
+ parameter serves for enabling/disabling the feature.</li>
+ <li>Several style classes are provided for different types of
+ elements. That style classes have predefined names. Application
+ developer should manually assign classes to controls that need
+ skinning or assign a class to an element that contains controls.</li>
+ </ul>
+ <p>Standard controls skinning feature provides 2 levels of
+ skinning:</p>
+ <ol>
+ <li><b>Standard</b> - customization of only basic style
+ properties.</li>
+ <li><b>Extended</b> - extends basic level introducing
+ customizations of a broader number of style properties</li>
+ </ol>
+ <p>Skinning level is calculated automatically at server side
+ depending on user agent info.</p>
+ <rich:panel><b>NOTE:</b>Extended skinning is not applied to browsers with
+ rich visual styling for controls (e.g. Opera and Safari). Also advanced
+ level of skinning requires support of CSS 2 attribute selectors either
+ as implicit type attributes for button/textarea elements (e.g. IE7 in
+ standards compilant mode) or CSS 3 draft namespace selectors (e.g.
+ Mozilla Firefox).</rich:panel>
+
+ <p>Here is the skinned form example. Note there is no styling in
+ sources of that form</p>
+
+ <rich:panel id="panel" width="300" height="230">
+ <f:facet name="header">
+ Standard components skinning
+ </f:facet>
+ <i> All the controls below is just standard JSF components skinned
+ with Rich Faces: </i>
+ <hr />
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Enter Name:" />
+ <h:inputText id="input" />
+ <h:outputText value="Enter you interests:" />
+ <h:inputTextarea />
+ <h:outputText value="Choose your favourite color" />
+ <h:selectOneMenu>
+ <f:selectItem itemLabel="Red" itemValue="0" />
+ <f:selectItem itemLabel="Black" itemValue="1" />
+ <f:selectItem itemLabel="Green" itemValue="2" />
+ <f:selectItem itemLabel="White" itemValue="3" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+ </h:form>
+ <hr />
+ <h:commandButton value="Action Button" />
+ <h:commandLink value="Action Link" />
+ </rich:panel>
+
+ <p>There three ways of applying skinning to application:</p>
+ <ul>
+ <li>By default <b>org.richfaces.ENABLE_CONTROL_SKINNING</b> context
+ param is set to <b>true</b> and it means that all standard elements
+ on the page will be skinned. (CSS style classes for elements based on
+ their names and type attribute values will be applied). You may
+ redefine it to <b>disable</b> in order to turn it off.</li>
+ <li>By default <b>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</b>
+ context param is set to <b>false</b> and it means that basic elements
+ nested to element having <i>rich-container</i> class will be skinned.
+ It could be also turned off using <b>disable</b> value.</li>
+ <li>RichFaces also provides predefined classes which can be
+ applied by an end developer to elements need to be skinned separately.
+ This classes added to the page also according to <b>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</b>
+ context-param.</li>
+ </ul>
+
+ <p>To get a better idea of standard component skinning we recommend
+ to explore CSS files located in
+ ui/core/src/main/resources/org/richfaces/ folder of RichFaces svn.</p>
+</ui:composition>
+
+</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml 2010-05-28 09:37:03 UTC (rev 17343)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml 2010-05-28 10:40:04 UTC (rev 17344)
@@ -4,7 +4,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://java.sun.com/jsf/composite/rich">
- <rich:panel style="width:250px" bodyClass="">
+ <rich:panel style="width:300px" bodyClass="">
<f:facet name="header">
<h:outputText value="Navigation" />
</f:facet>
@@ -12,7 +12,7 @@
<a4j:repeat value="#{demoNavigator.groups}" var="gr">
<li>
<h:outputText value="#{gr.name}" />
- <h:outputText value="NEW!" rendered="#{gr.newItem}"/>
+ <h:outputText value="NEW!" rendered="#{gr.newItem}" style="color:red"/>
</li>
<ul>
<a4j:repeat value="#{gr.demos}" var="d">
14 years
JBoss Rich Faces SVN: r17343 - in root/examples/richfaces-showcase/trunk/src/main: java/org/richfaces/demo/common and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-28 05:37:03 -0400 (Fri, 28 May 2010)
New Revision: 17343
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/param/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/param/ParamBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/clientParam.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/param.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/skinChange.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
https://jira.jboss.org/browse/RF-8294
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java 2010-05-28 09:12:41 UTC (rev 17342)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/UserBean.java 2010-05-28 09:37:03 UTC (rev 17343)
@@ -1,10 +1,10 @@
package org.richfaces.demo.common;
import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
+import javax.faces.bean.RequestScoped;
@ManagedBean(name = "userBean")
-@SessionScoped
+@RequestScoped
public class UserBean {
private String name = "";
private String email = "";
Added: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/param/ParamBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/param/ParamBean.java (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/param/ParamBean.java 2010-05-28 09:37:03 UTC (rev 17343)
@@ -0,0 +1,34 @@
+package org.richfaces.demo.param;
+
+import java.io.Serializable;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+@ManagedBean
+@RequestScoped
+public class ParamBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5704132574704883576L;
+ private String screenWidth;
+ private String screenHeight;
+
+ public String getScreenWidth() {
+ return screenWidth;
+ }
+
+ public void setScreenWidth(String screenWidth) {
+ this.screenWidth = screenWidth;
+ }
+
+ public String getScreenHeight() {
+ return screenHeight;
+ }
+
+ public void setScreenHeight(String screenHeight) {
+ this.screenHeight = screenHeight;
+ }
+}
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28 09:12:41 UTC (rev 17342)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28 09:37:03 UTC (rev 17343)
@@ -72,6 +72,24 @@
</sample>
</samples>
</demo>
+ <demo new="true">
+ <id>param</id>
+ <name>a4j:param</name>
+ <samples>
+ <sample>
+ <id>param</id>
+ <name>Param Simple Usage</name>
+ </sample>
+ <sample>
+ <id>skinChange</id>
+ <name>Parameters for non-Ajax components</name>
+ </sample>
+ <sample>
+ <id>clientParam</id>
+ <name>Parameters from client side</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
<group>
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/clientParam.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/clientParam.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/clientParam.xhtml 2010-05-28 09:37:03 UTC (rev 17343)
@@ -0,0 +1,34 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>It is possible to use javascript variable of custom function for the 'value' attribute.
+ In this case the 'noEscape' attribute should be set to true. When noEscape="true", the
+ 'value' can contain any javascript expression or javascript function invocation and the
+ result of them will be send to the server as a value of a4j:actionparam. The following
+ example demonstrates how to assign the backing bean with browser screen size values.</p>
+ <h:form>
+ <a4j:commandButton value="Show Screen Size" render="infoPanel">
+ <a4j:param name="w" value="screen.width"
+ assignTo="#{paramBean.screenWidth}" noEscape="true" />
+ <a4j:param name="h" value="screen.height"
+ assignTo="#{paramBean.screenHeight}" noEscape="true" />
+ </a4j:commandButton>
+ <br />
+ <rich:panel id="infoPanel">
+ <h:panelGrid columns="2" >
+ <h:outputText value="Width:" />
+ <h:outputText value="#{paramBean.screenWidth}" />
+ <h:outputText value="Height:" />
+ <h:outputText value="#{paramBean.screenHeight}" />
+ </h:panelGrid>
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/param.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/param.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/param.xhtml 2010-05-28 09:37:03 UTC (rev 17343)
@@ -0,0 +1,35 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+<p>
+a4j:actionparam is a component which extends regular f:param with the possibility to
+assign the value to the property of the manager bean directly using the assignTo attribute.
+Using this feature you can update model values without invoking even a single line of java code on the
+ server side.</p>
+ <h:form>
+ <rich:panel>
+ <h:panelGrid columns="2">
+ <a4j:commandButton value="Set Name to Alex" render="rep">
+ <a4j:param name="username" value="Alex" assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+
+ <a4j:commandButton value="Set Name to John" render="rep">
+ <a4j:param name="username" value="John"
+ assignTo="#{userBean.name}" />
+ </a4j:commandButton>
+ </h:panelGrid>
+ </rich:panel>
+<br/>
+ <rich:panel>
+ <h:outputText id="rep" value="Selected Name:#{userBean.name}" />
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/skinChange.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/skinChange.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/param/skinChange.xhtml 2010-05-28 09:37:03 UTC (rev 17343)
@@ -0,0 +1,33 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition>
+ <p>You can use a4j:param not only with ajax components, but with non-ajax command
+ components and for GET navigation components also. In the following example, the used skin of the demo is changed when
+ the whole page is refreshed with the regular h:link. </p>
+ <h:form>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Change Demo Appplication Skin To: " />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:link value="DeepMarine" includeViewParams="true">
+ <a4j:param name="skin" value="deepMarine"
+ assignTo="#{skinBean.skin}" />
+ </h:link>
+
+ <h:link value="BlueSky" includeViewParams="true">
+ <a4j:param name="skin" value="blueSky" assignTo="#{skinBean.skin}" />
+ </h:link>
+ </h:panelGrid>
+
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
14 years
JBoss Rich Faces SVN: r17342 - in root/examples/richfaces-showcase/trunk/src/main: java/org/richfaces/demo/poll and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-28 05:12:41 -0400 (Fri, 28 May 2010)
New Revision: 17342
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
Log:
some refactoring + https://jira.jboss.org/browse/RF-8291
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-28 09:12:41 UTC (rev 17342)
@@ -1,5 +1,6 @@
package org.richfaces.demo.common.navigation;
+import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
@@ -13,7 +14,11 @@
@ManagedBean
@SessionScoped
-public class DemoNavigator {
+public class DemoNavigator implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3970933260901989658L;
private static final String DEMO_VIEW_PARAMETER = "demo";
private static final String SAMPLE_VIEW_PARAMETER = "sample";
private static final String SEPARATOR = "/";
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java 2010-05-28 09:12:41 UTC (rev 17342)
@@ -3,6 +3,7 @@
*/
package org.richfaces.demo.poll;
+import java.io.Serializable;
import java.util.Date;
import javax.faces.bean.ManagedBean;
@@ -14,8 +15,12 @@
*/
@ManagedBean
@ViewScoped
-public class PollBean {
+public class PollBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7871292328251171957L;
private Date pollStartTime;
private boolean pollEnabled;
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-28 09:12:41 UTC (rev 17342)
@@ -33,9 +33,5 @@
public void setUser2(UserBean user2) {
this.user2 = user2;
}
-
- public static long getSerialversionuid() {
- return serialVersionUID;
- }
-
+
}
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java 2010-05-28 09:12:41 UTC (rev 17342)
@@ -1,5 +1,6 @@
package org.richfaces.demo.tables;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -14,8 +15,12 @@
*/
@ManagedBean
@ViewScoped
-public class SlidesBean {
+public class SlidesBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6498592143189891265L;
private static final String FILE_EXT = ".jpg";
private static final int FILES_COUNT = 9;
private static final String PATH_PREFIX = "/images/nature/";
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-28 09:12:41 UTC (rev 17342)
@@ -17,6 +17,10 @@
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml 2010-05-28 09:12:41 UTC (rev 17342)
@@ -22,25 +22,25 @@
<composite:implementation>
<h:outputStylesheet name="rich/css/panel.css" />
- <div class="rich-panel #{compositeComponent.attrs.styleClass}" id="#{cc.attrs.id}"
+ <div class="rich-panel #{cc.attrs.styleClass}" id="#{cc.attrs.id}"
style="#{cc.attrs.style}"
- onclick="#{compositeComponent.attrs.onclick}"
- ondblclick="#{compositeComponent.attrs.ondblclick}"
- onkeydown="#{compositeComponent.attrs.onkeydown}"
- onkeypress="#{compositeComponent.attrs.onkeypress}"
- onkeyup="#{compositeComponent.attrs.onkeyup}"
- onmousedown="#{compositeComponent.attrs.onmousedown}"
- onmousemove="#{compositeComponent.attrs.onmousemove}"
- onmouseout="#{compositeComponent.attrs.onmouseout}"
- onmouseover="#{compositeComponent.attrs.onmouseover}"
- onmouseup="#{compositeComponent.attrs.onmouseup}">
+ onclick="#{cc.attrs.onclick}"
+ ondblclick="#{cc.attrs.ondblclick}"
+ onkeydown="#{cc.attrs.onkeydown}"
+ onkeypress="#{cc.attrs.onkeypress}"
+ onkeyup="#{cc.attrs.onkeyup}"
+ onmousedown="#{cc.attrs.onmousedown}"
+ onmousemove="#{cc.attrs.onmousemove}"
+ onmouseout="#{cc.attrs.onmouseout}"
+ onmouseover="#{cc.attrs.onmouseover}"
+ onmouseup="#{cc.attrs.onmouseup}">
<h:panelGroup rendered="#{not empty cc.facets.header}">
- <div class="rich-panel-header #{compositeComponent.attrs.headerClass}">
+ <div class="rich-panel-header #{cc.attrs.headerClass}">
<composite:renderFacet name="header"/>
</div>
</h:panelGroup>
- <div class="rich-panel-body #{compositeComponent.attrs.bodyClass}" >
+ <div class="rich-panel-body #{cc.attrs.bodyClass}" >
<composite:insertChildren />
</div>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-28 09:12:41 UTC (rev 17342)
@@ -7,19 +7,21 @@
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition>
- <p><b>a4j:region</b> component designed for marking zones which should be
- processed during Ajax requests without using execute definitions at
- Ajax behaviors/components. This allow to decouple the processing definitions from components id's
- and use declarative wrapping by this tag instead.</p>
- <p>In <b>RichFaces 3.3</b> all the view was processed
- if no regions specified as <b>ViewRoot itself was region by default</b>. And in <b>RichFaces 4.x</b> -
- all the controls has <b>execute="@this" by default</b> according to JSF 2 specifications. But if the <b>controls
- wrapped with a4j:region</b> component and has no execute definitions - them uses<b> execute="@region"</b></p>
- <p>
- Look to the simple example bellow. There are two similar user info panels. But the ajax behaviors inside the
- first panel uses execute declarations and pointed to panelGrid id. And the second panel inputs just wrapped
- to region without any additional execute definitions.
- </p>
+ <p><b>a4j:region</b> component designed for marking zones which
+ should be processed during Ajax requests without using execute
+ definitions at Ajax behaviors/components. This allow to decouple the
+ processing definitions from components id's and use declarative
+ wrapping by this tag instead.</p>
+ <p>In <b>RichFaces 3.3</b> all the view was processed if no regions
+ specified as <b>ViewRoot itself was region by default</b>. And in <b>RichFaces
+ 4.x</b> - all the controls has <b>execute="@this" by default</b> according
+ to JSF 2 specifications. But if the <b>controls wrapped with
+ a4j:region</b> component and has no execute definitions - them uses<b>
+ execute="@region"</b></p>
+ <p>Look to the simple example bellow. There are two similar user
+ info panels. But the ajax behaviors inside the first panel uses execute
+ declarations and pointed to panelGrid id. And the second panel inputs
+ just wrapped to region without any additional execute definitions.</p>
<h:form>
<h:panelGrid columns="2">
<rich:panel id="userInfoPanel1">
@@ -39,13 +41,15 @@
</h:inputText>
</h:panelGrid>
</rich:panel>
- <rich:panel id="echopanel1">
+ <h:panelGrid columns="2" id="echopanel1">
<f:facet name="header">
Echo Panel
</f:facet>
+ <h:outputText value="Entered name:" />
<h:outputText value="#{regionBean.user1.name}" />
+ <h:outputText value="Entered email:" />
<h:outputText value="#{regionBean.user1.email}" />
- </rich:panel>
+ </h:panelGrid>
</h:panelGrid>
</h:form>
<h:form>
@@ -67,13 +71,15 @@
</h:panelGrid>
</a4j:region>
</rich:panel>
- <rich:panel id="echopanel2">
+ <h:panelGrid columns="2" id="echopanel2">
<f:facet name="header">
Echo Panel
</f:facet>
- <h:outputText value="#{regionBean.user1.name}" />
- <h:outputText value="#{regionBean.user1.email}" />
- </rich:panel>
+ <h:outputText value="Entered name:" />
+ <h:outputText value="#{regionBean.user2.name}" />
+ <h:outputText value="Entered email:" />
+ <h:outputText value="#{regionBean.user2.email}" />
+ </h:panelGrid>
</h:panelGrid>
</h:form>
14 years
JBoss Rich Faces SVN: r17341 - in root/examples/richfaces-showcase/trunk: src/main/resources/META-INF and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-28 04:47:20 -0400 (Fri, 28 May 2010)
New Revision: 17341
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
Removed:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml
Modified:
root/examples/richfaces-showcase/trunk/pom.xml
root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
Log:
https://jira.jboss.org/browse/RF-8292
https://jira.jboss.org/browse/RF-8693
Modified: root/examples/richfaces-showcase/trunk/pom.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/pom.xml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/pom.xml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -53,6 +53,11 @@
<artifactId>tables-ui</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui-misc-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -417,6 +417,39 @@
</attribute>
</tag>
<tag>
+ <tag-name>param</tag-name>
+ <component>
+ <component-type>org.richfaces.UIParameter</component-type>
+ <renderer-type>org.richfaces.UIParameterRenderer</renderer-type>
+ <handler-class>org.richfaces.view.facelets.html.AbstractParameterHandler</handler-class>
+ </component>
+ <attribute>
+ <description>The value binding expression used to wire up this component to a component property of a JavaBean class</description>
+ <name>binding</name>
+ <type>javax.faces.component.UIComponent</type>
+ </attribute>
+ <attribute>
+ <description>The component identifier for this component. This value must be unique within the closest parent component that is a naming container.</description>
+ <name>id</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Name of the parameter associated with this component.</description>
+ <name>name</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true.</description>
+ <name>rendered</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>Value of the parameter associated with this component.</description>
+ <name>value</name>
+ <type>java.lang.Object</type>
+ </attribute>
+ </tag>
+ <tag>
<tag-name>status</tag-name>
<component>
<component-type>org.richfaces.Status</component-type>
@@ -735,6 +768,78 @@
</attribute>
</tag>
<tag>
+ <tag-name>poll</tag-name>
+ <component>
+ <component-type>org.richfaces.Poll</component-type>
+ <renderer-type>org.richfaces.PollRenderer</renderer-type>
+ <handler-class>org.richfaces.view.facelets.html.AjaxPollHandler</handler-class>
+ </component>
+ <attribute>
+ <description>MethodExpression representing the application action to invoke when this component is activated by the user. The expression must evaluate to a public method that takes no parameters, and returns an Object (the toString() of which is called to derive the logical outcome) which is passed to the NavigationHandler for this application.</description>
+ <name>action</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
+ <description>MethodExpression representing the application action to invoke when this component is activated by the user. The expression must evaluate to a public method that takes no parameters, and returns an Object (the toString() of which is called to derive the logical outcome) which is passed to the NavigationHandler for this application.</description>
+ <name>actionExpression</name>
+ <type>javax.el.MethodExpression</type>
+ </attribute>
+ <attribute>
+ <description><p> MethodExpression representing an action listener method that will be notified when this component is activated by the user. The expression must evaluate to a public method that takes an ActionEvent parameter, with a return type of void, <span class="changed_added_2_0">or to a public method that takes no arguments with a return type of void. In the latter case, the method has no way of easily knowing where the event came from, but this can be useful in cases where a notification is needed that "some action happened".</span> </p></description>
+ <name>actionListener</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
+ <description>The value binding expression used to wire up this component to a component property of a JavaBean class</description>
+ <name>binding</name>
+ <type>javax.faces.component.UIComponent</type>
+ </attribute>
+ <attribute>
+ <name>enabled</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>The component identifier for this component. This value must be unique within the closest parent component that is a naming container.</description>
+ <name>id</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase.</description>
+ <name>immediate</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <name>interval</name>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>onbeforedomupdate</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>onbegin</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>oncomplete</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>ontimer</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true.</description>
+ <name>rendered</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>The current value of this component.</description>
+ <name>value</name>
+ <type>java.lang.Object</type>
+ </attribute>
+ </tag>
+ <tag>
<tag-name>jsFunction</tag-name>
<component>
<component-type>org.richfaces.Function</component-type>
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -239,8 +239,8 @@
<name>DataScroller Basic Usage</name>
</sample>
<sample>
- <id>dataScrollerCustomization</id>
- <name>DataScroller Customization</name>
+ <id>dataScrollerAPI</id>
+ <name>DataScroller API</name>
</sample>
</samples>
</demo>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -17,8 +17,8 @@
<ui:repeat value="#{demoNavigator.currentDemo.samples}" var="s" varStatus="status">
<h:link value="#{s.name}" includeViewParams="true">
<f:param name="sample" value="#{s.id}" />
+ <f:attribute name="style" value="#{(s.id == demoNavigator.currentSample.id) ? 'color:orange' : ''}"/>
</h:link>
- <h:outputText value="CUR" style="color:orange" rendered="#{s.id == demoNavigator.currentSample.id}"/>
<h:outputText value=" | " />
</ui:repeat>
<fieldset><legend>#{demoNavigator.currentSample.name}</legend>
Copied: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml (from rev 17340, root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml)
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -0,0 +1,42 @@
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:tbl="http://richfaces.org/rich"
+ xmlns:ds="http://richfaces.org/datascroller">
+
+<ui:composition>
+ <style>
+.calign {
+ text-align: center;
+}
+</style>
+<p>dataScroller provides cliens side API functions in order to provide control from
+your JavaScript custom handlers. List of api methods:</p>
+<ul style="font-style: italic">
+ <li>next</li>
+ <li>previous</li>
+ <li>first</li>
+ <li>last</li>
+</ul>
+<p>This simple sample shows how the scroller could be controlled via API from external controls(arrows images)</p>
+ <h:form id="form">
+ <h:panelGrid columns="1" rowClasses="calign">
+ <h:panelGrid columns="3" id="repeat">
+ <h:graphicImage value="/images/icons/scroller/arr_left.png"
+ onclick="document.getElementById('form:ds').richfaces.component.previous()" />
+ <a4j:repeat rows="3" value="#{slidesBean.pictures}" var="pic"
+ id="pics">
+ <h:graphicImage value="#{pic.uri}" style="padding:5px;"/>
+ </a4j:repeat>
+ <h:graphicImage value="/images/icons/scroller/arr_right.png"
+ onclick="document.getElementById('form:ds').richfaces.component.next()" />
+ </h:panelGrid>
+ <ds:dataScroller for="pics" id="ds" render="repeat" stepControls="false" boundaryControls="false" fastControls="false" maxPages="10"/>
+ </h:panelGrid>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Deleted: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -1,33 +0,0 @@
-<!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:a4j="http://richfaces.org/a4j"
- xmlns:tbl="http://richfaces.org/rich"
- xmlns:ds="http://richfaces.org/datascroller">
-
-<ui:composition>
- <style>
-.calign {
- text-align: center;
-}
-</style>
- <h:form id="form">
- <h:panelGrid columns="1" rowClasses="calign">
- <h:panelGrid columns="3" id="repeat">
- <h:graphicImage value="/images/icons/scroller/arr_left.png"
- onclick="document.getElementById('form:ds').richfaces.component.previous()" />
- <a4j:repeat rows="3" value="#{slidesBean.pictures}" var="pic"
- id="pics">
- <h:graphicImage value="#{pic.uri}" style="padding:5px;"/>
- </a4j:repeat>
- <h:graphicImage value="/images/icons/scroller/arr_right.png"
- onclick="document.getElementById('form:ds').richfaces.component.next()" />
- </h:panelGrid>
- <ds:dataScroller for="pics" id="ds" render="repeat" stepControls="false" boundaryControls="false" fastControls="false" maxPages="10"/>
- </h:panelGrid>
- </h:form>
-</ui:composition>
-
-</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://java.sun.com/jsf/composite/rich">
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition>
<p>a4j:poll is one of the way how you can organize the periodical
@@ -18,9 +18,12 @@
<p>The following example shows how the date and time is updated on
the page based on the data taken from the server. To turn off polling,
press "Stop Polling" button.</p>
+
<h:form>
+ <a4j:poll id="poll" interval="1500" enabled="#{pollBean.pollEnabled}"
+ render="poll,grid" />
+ </h:form>
- </h:form>
<h:form>
<h:panelGrid columns="2" width="80%" id="grid">
<h:panelGrid columns="1">
@@ -33,8 +36,9 @@
<a4j:commandButton style="width:120px" id="control"
value="#{pollBean.pollEnabled?'Stop':'Start'} Polling"
- reRender="poll, grid">
-
+ render="poll, grid">
+ <a4j:param name="polling" value="#{!pollBean.pollEnabled}"
+ assignTo="#{pollBean.pollEnabled}" />
</a4j:commandButton>
</h:panelGrid>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -18,10 +18,10 @@
<a4j:repeat value="#{gr.demos}" var="d">
<li>
<h:link outcome="/richfaces/component-sample.xhtml" value="#{d.name}" includeViewParams="false">
+ <f:attribute name="style" value="#{(d.id == demoNavigator.currentDemo.id) ? 'color:orange' : ''}"/>
<f:param name="demo" value="#{d.id}"/>
</h:link>
<h:outputText value="NEW!" rendered="#{d.newItem or gr.newItem}" style="color:red"/>
- <h:outputText value="CUR!" rendered="#{d.id == demoNavigator.currentDemo.id}" style="color:orange"/>
</li>
</a4j:repeat>
</ul>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -11,9 +11,9 @@
<a4j:repeat var="skin" value="#{skinBean.skins}">
<h:link value="#{skin}" includeViewParams="true">
<f:param name="skin" value="#{skin}"/>
+ <f:attribute name="style" value="#{(skin==skinBean.skin) ? 'color:orange' : ''}"/>
</h:link>
- <h:outputText value="CUR!" rendered="#{skin==skinBean.skin}" style="color:orange"/>
- <h:outputText value = " | "/>
+ <h:outputText value = " | "/>
</a4j:repeat>
</rich:panel>
</ui:composition>
14 years
JBoss Rich Faces SVN: r17340 - root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-05-28 04:14:16 -0400 (Fri, 28 May 2010)
New Revision: 17340
Added:
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPollHandler.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPushHandler.java
Log:
fix build
Added: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPollHandler.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPollHandler.java (rev 0)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPollHandler.java 2010-05-28 08:14:16 UTC (rev 17340)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright , 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.view.facelets.html;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.view.facelets.*;
+import org.richfaces.MethodMetadata;
+import org.richfaces.component.AbstractPoll;
+
+public class AjaxPollHandler extends ComponentHandler {
+
+ private static final AjaxPollHandlerMetaRule META_RULE = new AjaxPollHandlerMetaRule();
+
+
+ public AjaxPollHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset m = super.createMetaRuleset(type);
+ m.addRule(META_RULE);
+ return m;
+ }
+
+ static class AjaxPollHandlerMetaRule extends MetaRule{
+
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(AbstractPoll.class)) {
+ if ("action".equals(name)) {
+ return new MethodMetadata(attribute) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPoll) instance).setAction(getMethodBinding(ctx));
+ }
+ };
+ }
+ if ("actionExpression".equals(name)) {
+ return new MethodMetadata(attribute) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPoll) instance).setActionExpression(getMethodExpression(ctx));
+ }
+ };
+ }
+ if ("actionListener".equals(name)) {
+ return new MethodMetadata(attribute, ActionEvent.class) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPoll) instance).setActionListener(getMethodBinding(ctx));
+ }
+ };
+ }
+ }
+ return null;
+ }
+ }
+}
Added: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPushHandler.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPushHandler.java (rev 0)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxPushHandler.java 2010-05-28 08:14:16 UTC (rev 17340)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright , 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.view.facelets.html;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.view.facelets.*;
+import org.richfaces.MethodMetadata;
+import org.richfaces.component.AbstractPush;
+
+import java.util.EventListener;
+
+public class AjaxPushHandler extends ComponentHandler {
+
+ private static final AjaxPushHandlerMetaRule META_RULE = new AjaxPushHandlerMetaRule();
+
+
+ public AjaxPushHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset m = super.createMetaRuleset(type);
+ m.addRule(META_RULE);
+ return m;
+ }
+
+ static class AjaxPushHandlerMetaRule extends MetaRule{
+
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(AbstractPush.class)) {
+ if ("action".equals(name)) {
+ return new MethodMetadata(attribute) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPush) instance).setAction(getMethodBinding(ctx));
+ }
+ };
+ }
+ if ("actionExpression".equals(name)) {
+ return new MethodMetadata(attribute) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPush) instance).setActionExpression(getMethodExpression(ctx));
+ }
+ };
+ }
+ if ("actionListener".equals(name)) {
+ return new MethodMetadata(attribute, ActionEvent.class) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPush) instance).setActionListener(getMethodBinding(ctx));
+ }
+ };
+ }
+ if ("eventProducer".equals(name)) {
+ return new MethodMetadata(attribute, EventListener.class) {
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractPush) instance).setEventProducer(getMethodExpression(ctx));
+ }
+ };
+ }
+ }
+ return null;
+ }
+ }
+}
14 years
JBoss Rich Faces SVN: r17339 - in root: build/resources/trunk/faces-shade-transformers and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-05-28 03:18:39 -0400 (Fri, 28 May 2010)
New Revision: 17339
Modified:
root/build/resources/trunk/faces-shade-transformers/pom.xml
root/dist/trunk/pom.xml
root/pom.xml
root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractParameter.java
root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPoll.java
root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java
root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AbstractParameterHandler.java
root/ui/dist/trunk/richfaces-components-api/pom.xml
root/ui/dist/trunk/richfaces-components-impl/pom.xml
root/ui/dist/trunk/richfaces-components-ui/pom.xml
root/ui/iteration/trunk/pom.xml
root/ui/misc/trunk/dist/pom.xml
Log:
fix build
Modified: root/build/resources/trunk/faces-shade-transformers/pom.xml
===================================================================
--- root/build/resources/trunk/faces-shade-transformers/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/build/resources/trunk/faces-shade-transformers/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -12,7 +12,7 @@
<artifactId>faces-shade-transformers</artifactId>
<version>4.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>JSF configuration files ransformers for maven-shade-plugin</name>
+ <name>JSF configuration files transformers for maven-shade-plugin</name>
<build>
<plugins>
Modified: root/dist/trunk/pom.xml
===================================================================
--- root/dist/trunk/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/dist/trunk/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -40,11 +40,11 @@
<module>../../build/bom/trunk</module>
<module>../../commons/trunk</module>
<module>../../core/trunk</module>
+
<!-- call ui assembler -->
<module>../../ui/dist/trunk</module>
<!-- for build examples we need some components from sandbox -->
- <module>../../ui-sandbox/datascroller/trunk</module>
<module>../../examples</module>
</modules>
Modified: root/pom.xml
===================================================================
--- root/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -42,6 +42,7 @@
<module>ui/core/${ui.core.svn.dir}</module>
<module>ui/iteration/${ui.iteration.svn.dir}</module>
<module>ui/misc/${ui.misc.svn.dir}</module>
+ <module>ui/dist/${ui.dist.svn.dir}</module>
<!--<module>ui-sandbox</module>-->
<module>examples</module>
@@ -67,6 +68,7 @@
<cdk.svn.dir>trunk</cdk.svn.dir>
<ui.core.svn.dir>trunk</ui.core.svn.dir>
<ui.misc.svn.dir>trunk</ui.misc.svn.dir>
+ <ui.dist.svn.dir>trunk</ui.dist.svn.dir>
<ui.iteration.svn.dir>trunk</ui.iteration.svn.dir>
<ui-sandbox.svn.dir>trunk</ui-sandbox.svn.dir>
<examples-sandbox.svn.dir>trunk</examples-sandbox.svn.dir>
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractParameter.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractParameter.java 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractParameter.java 2010-05-28 07:18:39 UTC (rev 17339)
@@ -21,6 +21,12 @@
package org.richfaces.component;
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.component.JavaScriptParameter;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+
import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.FacesException;
@@ -32,229 +38,226 @@
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.component.JavaScriptParameter;
-import org.richfaces.cdk.annotations.JsfComponent;
-import org.richfaces.cdk.annotations.Tag;
-import org.richfaces.cdk.annotations.TagType;
-
/**
* @author shura (latest modification by $Author: alexsmirnov $)
* @version $Revision: 1.1.2.2 $ $Date: 2007/02/01 15:31:55 $
- *
*/
-@JsfComponent(tag = @Tag(name = "param", handler = "org.richfaces.view.facelets.html.AbstractParameterHandler",
-
-generate = false, type = TagType.Facelets))
+@JsfComponent(tag = @Tag(name = "param", handler = "org.richfaces.view.facelets.html.AbstractParameterHandler", generate = false, type = TagType.Facelets))
public class AbstractParameter extends UIParameter implements ActionListener,
- JavaScriptParameter {
- public static final String COMPONENT_TYPE = "org.richfaces.UIParameter";
- private static String noEscapeAttr = "noEscape";
+ JavaScriptParameter {
+ public static final String COMPONENT_TYPE = "org.richfaces.UIParameter";
+ private static String noEscapeAttr = "noEscape";
- /** ********************************************************* */
+ /** ********************************************************* */
- /**
- * Binding for update on ActionEvent
- */
- private ValueExpression assignToBinding = null;
+ /**
+ * Binding for update on ActionEvent
+ */
+ private ValueExpression assignToBinding = null;
- /** ********************************************************* */
+ /** ********************************************************* */
- /**
- * Converter for update value with this parameter
- */
- private Converter converter = null;
+ /**
+ * Converter for update value with this parameter
+ */
+ private Converter converter = null;
- /** ********************************************************* */
+ /** ********************************************************* */
- /**
- * Skip quota escaping of parameter value - for substitute JavaScript
- * exspression on submit
- */
- private Boolean noEscape = null;
+ /**
+ * Skip quota escaping of parameter value - for substitute JavaScript
+ * exspression on submit
+ */
+ private Boolean noEscape = null;
- public void setAssignToBinding(ValueExpression propertyBinding) {
- this.assignToBinding = propertyBinding;
- }
+ public void setAssignToBinding(ValueExpression propertyBinding) {
+ this.assignToBinding = propertyBinding;
+ }
- public ValueExpression getAssignToBinding() {
- return assignToBinding;
- }
+ public ValueExpression getAssignToBinding() {
+ return assignToBinding;
+ }
- public void setConverter(Converter converter) {
- this.converter = converter;
- }
+ public void setConverter(Converter converter) {
+ this.converter = converter;
+ }
- public Converter getConverter() {
- return converter;
- }
+ public Converter getConverter() {
+ return converter;
+ }
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.framework.ajax.JavaScriptParameter#setNoEscape(boolean)
- */
- public void setNoEscape(boolean noEscape) {
- this.noEscape = Boolean.valueOf(noEscape);
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.framework.ajax.JavaScriptParameter#setNoEscape(boolean)
+ */
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.framework.ajax.JavaScriptParameter#isNoEscape()
- */
- public boolean isNoEscape() {
- return isValueOrBinding(noEscape, noEscapeAttr);
- }
+ public void setNoEscape(boolean noEscape) {
+ this.noEscape = Boolean.valueOf(noEscape);
+ }
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.event.ActionListener#processAction(javax.faces.event.ActionEvent)
- */
- public void processAction(ActionEvent actionEvent)
- throws AbortProcessingException {
- FacesContext context = getFacesContext();
- ELContext elContext = context.getELContext();
- ValueExpression updateBinding = getAssignToBinding();
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.framework.ajax.JavaScriptParameter#isNoEscape()
+ */
- if (updateBinding != null && (!updateBinding.isReadOnly(elContext))) {
- Object requestValue = context.getExternalContext()
- .getRequestParameterMap().get(getName());
+ public boolean isNoEscape() {
+ return isValueOrBinding(noEscape, noEscapeAttr);
+ }
- if (requestValue != null && requestValue instanceof String) {
- Class<?> type = updateBinding.getType(elContext);
- Converter converter = createConverter(context, type);
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.event.ActionListener#processAction(javax.faces.event.ActionEvent)
+ */
- if (null != converter) {
- requestValue = converter.getAsObject(context, this,
- (String) requestValue);
- }
- }
+ public void processAction(ActionEvent actionEvent)
+ throws AbortProcessingException {
+ FacesContext context = getFacesContext();
+ ELContext elContext = context.getELContext();
+ ValueExpression updateBinding = getAssignToBinding();
- if (null != requestValue) {
- updateBinding.setValue(elContext, requestValue);
- }
- }
- }
+ if (updateBinding != null && (!updateBinding.isReadOnly(elContext))) {
+ Object requestValue = context.getExternalContext()
+ .getRequestParameterMap().get(getName());
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIParameter#getName()
- */
- public String getName() {
- String name = super.getName();
+ if (requestValue != null && requestValue instanceof String) {
+ Class<?> type = updateBinding.getType(elContext);
+ Converter converter = createConverter(context, type);
- // If name not set - use clientId. be Careful !
- if (null == name) {
- name = getClientId(FacesContext.getCurrentInstance());
- }
+ if (null != converter) {
+ requestValue = converter.getAsObject(context, this,
+ (String) requestValue);
+ }
+ }
- return name;
- }
+ if (null != requestValue) {
+ updateBinding.setValue(elContext, requestValue);
+ }
+ }
+ }
- public Object getValue() {
- Object value = super.getValue();
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.UIParameter#getName()
+ */
- // TODO - perform conversion if converter is present.
- if (null != value) {
- Class<?> type = value.getClass();
- FacesContext context = getFacesContext();
- Converter converter = createConverter(context, type);
+ public String getName() {
+ String name = super.getName();
- if (null != converter) {
- value = converter.getAsString(context, this, value);
- }
- }
+ // If name not set - use clientId. be Careful !
+ if (null == name) {
+ name = getClientId(FacesContext.getCurrentInstance());
+ }
- return value;
- }
+ return name;
+ }
- /** ********************************************************* */
+ public Object getValue() {
+ Object value = super.getValue();
- /**
- * @param context
- * @param type
- * @return
- * @throws FacesException
- */
- private Converter createConverter(FacesContext context, Class<?> type)
- throws FacesException {
- Converter converter = getConverter();
+ // TODO - perform conversion if converter is present.
+ if (null != value) {
+ Class<?> type = value.getClass();
+ FacesContext context = getFacesContext();
+ Converter converter = createConverter(context, type);
- if (converter == null && type != null && !type.equals(String.class)
- && !type.equals(Object.class)) {
- try {
- converter = context.getApplication().createConverter(type);
- } catch (Exception e) {
- throw new FacesException(Messages.getMessage(
- Messages.NO_CONVERTER_REGISTERED, type.getName()), e);
- }
- }
+ if (null != converter) {
+ value = converter.getAsString(context, this, value);
+ }
+ }
- return converter;
- }
+ return value;
+ }
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext)
- */
- @Override
- public void restoreState(FacesContext context, Object state) {
- Object[] values = (Object[]) state;
+ /** ********************************************************* */
- super.restoreState(context, values[0]);
+ /**
+ * @param context
+ * @param type
+ * @return
+ * @throws FacesException
+ */
+ private Converter createConverter(FacesContext context, Class<?> type)
+ throws FacesException {
+ Converter converter = getConverter();
- // restore fields values
- assignToBinding = (ValueExpression) UIComponentBase
- .restoreAttachedState(context, values[1]);
- noEscape = (Boolean) values[2];
- converter = (Converter) UIComponentBase.restoreAttachedState(context,
- values[3]);
- }
+ if (converter == null && type != null && !type.equals(String.class)
+ && !type.equals(Object.class)) {
+ try {
+ converter = context.getApplication().createConverter(type);
+ } catch (Exception e) {
+ throw new FacesException(Messages.getMessage(
+ Messages.NO_CONVERTER_REGISTERED, type.getName()), e);
+ }
+ }
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
- */
- @Override
- public Object saveState(FacesContext context) {
- Object[] values = new Object[5];
+ return converter;
+ }
- values[0] = super.saveState(context);
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext)
+ */
- // save fields values
- values[1] = UIComponentBase.saveAttachedState(context, assignToBinding);
- values[2] = noEscape;
- values[3] = UIComponentBase.saveAttachedState(context, converter);
+ @Override
+ public void restoreState(FacesContext context, Object state) {
+ Object[] values = (Object[]) state;
- return values;
- }
+ super.restoreState(context, values[0]);
- /**
- * @param field -
- * value of field to get.
- * @param name -
- * name of field, to get from ValueBinding
- * @return boolean value, based on field or valuebinding.
- */
- private boolean isValueOrBinding(Boolean field, String name) {
- if (null != field) {
- return field.booleanValue();
- }
+ // restore fields values
+ assignToBinding = (ValueExpression) UIComponentBase
+ .restoreAttachedState(context, values[1]);
+ noEscape = (Boolean) values[2];
+ converter = (Converter) UIComponentBase.restoreAttachedState(context,
+ values[3]);
+ }
- ValueExpression vb = getValueExpression(name);
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
+ */
- if (null != vb) {
- FacesContext context = getFacesContext();
- ELContext elContext = context.getELContext();
+ @Override
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[5];
- return ((Boolean) vb.getValue(elContext)).booleanValue();
- } else {
- return false;
- }
- }
+ values[0] = super.saveState(context);
+
+ // save fields values
+ values[1] = UIComponentBase.saveAttachedState(context, assignToBinding);
+ values[2] = noEscape;
+ values[3] = UIComponentBase.saveAttachedState(context, converter);
+
+ return values;
+ }
+
+ /**
+ * @param field -
+ * value of field to get.
+ * @param name -
+ * name of field, to get from ValueBinding
+ * @return boolean value, based on field or valuebinding.
+ */
+ private boolean isValueOrBinding(Boolean field, String name) {
+ if (null != field) {
+ return field.booleanValue();
+ }
+
+ ValueExpression vb = getValueExpression(name);
+
+ if (null != vb) {
+ FacesContext context = getFacesContext();
+ ELContext elContext = context.getELContext();
+
+ return ((Boolean) vb.getValue(elContext)).booleanValue();
+ } else {
+ return false;
+ }
+ }
}
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPoll.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPoll.java 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPoll.java 2010-05-28 07:18:39 UTC (rev 17339)
@@ -37,7 +37,7 @@
*
*/
@JsfComponent(
- tag = @Tag(generate = true, handler = "org.richfaces.view.facelets.html.AjaxPollHandler", type = TagType.Facelets)
+ tag = @Tag(generate = false, handler = "org.richfaces.view.facelets.html.AjaxPollHandler", type = TagType.Facelets)
)
public abstract class AbstractPoll extends UICommand {
public static final String COMPONENT_TYPE = "org.richfaces.Poll";
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java 2010-05-28 07:18:39 UTC (rev 17339)
@@ -46,7 +46,7 @@
*
*/
@JsfComponent(
- tag = @Tag(generate = true, handler = "org.richfaces.view.facelets.html.AjaxPushHandler", type = TagType.Facelets)
+ tag = @Tag(generate = false, handler = "org.richfaces.view.facelets.html.AjaxPushHandler", type = TagType.Facelets)
)
public abstract class AbstractPush extends AbstractActionComponent {
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java 2010-05-28 07:18:39 UTC (rev 17339)
@@ -46,94 +46,96 @@
* @author shura
*/
@ResourceDependencies(value = {
- @ResourceDependency(library = "javax.faces", name = "jsf.js"),
- @ResourceDependency(name = "jquery.js"),
- @ResourceDependency(name = "richfaces.js") })
+ @ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "jquery.js"),
+ @ResourceDependency(name = "richfaces.js")})
@JsfRenderer
public class AjaxPollRenderer extends RendererBase {
- public static final String COMPONENT_FAMILY = "org.richfaces.Poll";
+ public static final String COMPONENT_FAMILY = "org.richfaces.Poll";
- public static final String RENDERER_TYPE = "org.richfaces.PollRenderer";
- private static final String AJAX_POLL_FUNCTION = "RichFaces.startPoll";
+ public static final String RENDERER_TYPE = "org.richfaces.PollRenderer";
+ private static final String AJAX_POLL_FUNCTION = "RichFaces.startPoll";
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.renderkit.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter,
- * javax.faces.context.FacesContext, javax.faces.component.UIComponent)
- */
- protected void doEncodeEnd(ResponseWriter writer, FacesContext context,
- UIComponent component) throws IOException {
- AbstractPoll poll = (AbstractPoll) component;
- writer.startElement(HTML.SPAN_ELEM, component);
- writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display:none;", null);
- getUtils().encodeId(context, component);
- getUtils().encodeBeginFormIfNessesary(context, component);
- // polling script.
- writer.startElement(HTML.SCRIPT_ELEM, component);
- writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
- StringBuffer script = new StringBuffer("\n");
- if (poll.isEnabled()) {
- JSFunction function = new JSFunction(AJAX_POLL_FUNCTION);
- Map<String, Object> options = new HashMap<String, Object>();
- Integer interval = new Integer(poll.getInterval());
- options.put("pollinterval", interval);
- options.put("pollId", component.getClientId(context));
- HandlersChain handlersChain = new HandlersChain(poll);
- handlersChain.addInlineHandlerFromAttribute(context, AbstractPoll.ON_TIMER);
- handlersChain.addBehaviors(context, AbstractPoll.TIMER);
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.renderkit.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter,
+ * javax.faces.context.FacesContext, javax.faces.component.UIComponent)
+ */
- if (!handlersChain.hasSubmittingBehavior()) {
- JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
- context, poll, AjaxRendererUtils.AJAX_FUNCTION_NAME);
- AjaxEventOptions eventOptions = AjaxRendererUtils.buildEventOptions(context, poll);
- if (!eventOptions.isEmpty()) {
- ajaxFunction.addParameter(eventOptions);
- }
- handlersChain.addInlineHandlerAsValue(context, ajaxFunction.toScript());
- }
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context,
+ UIComponent component) throws IOException {
+ AbstractPoll poll = (AbstractPoll) component;
+ writer.startElement(HTML.SPAN_ELEM, component);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display:none;", null);
+ getUtils().encodeId(context, component);
+ getUtils().encodeBeginFormIfNessesary(context, component);
+ // polling script.
+ writer.startElement(HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+ StringBuffer script = new StringBuffer("\n");
+ if (poll.isEnabled()) {
+ JSFunction function = new JSFunction(AJAX_POLL_FUNCTION);
+ Map<String, Object> options = new HashMap<String, Object>();
+ Integer interval = new Integer(poll.getInterval());
+ options.put("pollinterval", interval);
+ options.put("pollId", component.getClientId(context));
+ HandlersChain handlersChain = new HandlersChain(poll);
+ handlersChain.addInlineHandlerFromAttribute(context, AbstractPoll.ON_TIMER);
+ handlersChain.addBehaviors(context, AbstractPoll.TIMER);
- String handler = handlersChain.toScript();
+ if (!handlersChain.hasSubmittingBehavior()) {
+ JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
+ context, poll, AjaxRendererUtils.AJAX_FUNCTION_NAME);
+ AjaxEventOptions eventOptions = AjaxRendererUtils.buildEventOptions(context, poll);
+ if (!eventOptions.isEmpty()) {
+ ajaxFunction.addParameter(eventOptions);
+ }
+ handlersChain.addInlineHandlerAsValue(context, ajaxFunction.toScript());
+ }
- if (handler != null) {
- JSFunctionDefinition timerHandler = new JSFunctionDefinition(JSReference.EVENT);
- timerHandler.addToBody(handler);
- options.put(AbstractPoll.ON_TIMER,timerHandler);
- }
- function.addParameter(options);
- function.appendScript(script);
- } else {
- script.append("RichFaces.stopPoll('").append(component.getClientId(context)).append("')");
- }
- script.append(";\n");
- writer.writeText(script.toString(), null);
- writer.endElement(HTML.SCRIPT_ELEM);
- getUtils().encodeEndFormIfNessesary(context, component);
- writer.endElement(HTML.SPAN_ELEM);
- }
+ String handler = handlersChain.toScript();
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
- */
- protected Class<? extends UIComponent> getComponentClass() {
- // only push component is allowed.
- return AbstractPoll.class;
- }
+ if (handler != null) {
+ JSFunctionDefinition timerHandler = new JSFunctionDefinition(JSReference.EVENT);
+ timerHandler.addToBody(handler);
+ options.put(AbstractPoll.ON_TIMER, timerHandler);
+ }
+ function.addParameter(options);
+ function.appendScript(script);
+ } else {
+ script.append("RichFaces.stopPoll('").append(component.getClientId(context)).append("')");
+ }
+ script.append(";\n");
+ writer.writeText(script.toString(), null);
+ writer.endElement(HTML.SCRIPT_ELEM);
+ getUtils().encodeEndFormIfNessesary(context, component);
+ writer.endElement(HTML.SPAN_ELEM);
+ }
- @Override
- protected void doDecode(FacesContext context, UIComponent component) {
- super.doDecode(context, component);
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
+ */
- AbstractPoll poll = (AbstractPoll) component;
- if (poll.isEnabled()) {
- Map<String, String> requestParameterMap = context.getExternalContext().getRequestParameterMap();
- if (requestParameterMap.get(poll.getClientId(context)) != null) {
- new ActionEvent(poll).queue();
- }
- }
- }
+ protected Class<? extends UIComponent> getComponentClass() {
+ // only push component is allowed.
+ return AbstractPoll.class;
+ }
+ @Override
+ protected void doDecode(FacesContext context, UIComponent component) {
+ super.doDecode(context, component);
+
+ AbstractPoll poll = (AbstractPoll) component;
+ if (poll.isEnabled()) {
+ Map<String, String> requestParameterMap = context.getExternalContext().getRequestParameterMap();
+ if (requestParameterMap.get(poll.getClientId(context)) != null) {
+ new ActionEvent(poll).queue();
+ }
+ }
+ }
+
}
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AbstractParameterHandler.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AbstractParameterHandler.java 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AbstractParameterHandler.java 2010-05-28 07:18:39 UTC (rev 17339)
@@ -21,6 +21,9 @@
package org.richfaces.view.facelets.html;
+import org.ajax4jsf.Messages;
+import org.richfaces.component.AbstractParameter;
+
import javax.faces.component.ActionSource;
import javax.faces.component.UIComponent;
import javax.faces.convert.Converter;
@@ -34,139 +37,137 @@
import javax.faces.view.facelets.TagAttribute;
import javax.faces.view.facelets.TagAttributeException;
-import org.ajax4jsf.Messages;
-import org.richfaces.component.AbstractParameter;
-
/**
* @author shura (latest modification by $Author: alexsmirnov $)
* @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
- *
*/
public class AbstractParameterHandler extends ComponentHandler {
- /**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
- *
- */
- public static class ActionParamMetaRule extends MetaRule {
+ private static final ActionParamMetaRule ACTION_PARAM_META_RULE = new ActionParamMetaRule();
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.tag.SuggestionHandler.SuggestionMetaRule#applyRule(java.lang.String,
- * com.sun.facelets.tag.TagAttribute,
- * com.sun.facelets.tag.MetadataTarget)
- */
- public Metadata applyRule(String name, TagAttribute attribute,
- MetadataTarget meta) {
- if (meta.isTargetInstanceOf(AbstractParameter.class)) {
- if ("assignTo".equals(name)) {
- return new AssignToValueBindingMetadata(attribute);
- } else if ("converter".equals(name)) {
- if (attribute.isLiteral()) {
- return new LiteralConverterMetadata(attribute
- .getValue());
- } else {
- return new DynamicConverterMetadata(attribute);
- }
+ /**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
+ */
+ public static class ActionParamMetaRule extends MetaRule {
- }
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tag.SuggestionHandler.SuggestionMetaRule#applyRule(java.lang.String,
+ * com.sun.facelets.tag.TagAttribute,
+ * com.sun.facelets.tag.MetadataTarget)
+ */
- return null;
- }
+ public Metadata applyRule(String name, TagAttribute attribute,
+ MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(AbstractParameter.class)) {
+ if ("assignTo".equals(name)) {
+ return new AssignToValueBindingMetadata(attribute);
+ } else if ("converter".equals(name)) {
+ if (attribute.isLiteral()) {
+ return new LiteralConverterMetadata(attribute
+ .getValue());
+ } else {
+ return new DynamicConverterMetadata(attribute);
+ }
- }
+ }
+ }
- final static class LiteralConverterMetadata extends Metadata {
+ return null;
+ }
- private final String converterId;
+ }
- public LiteralConverterMetadata(String converterId) {
- this.converterId = converterId;
- }
+ static final class LiteralConverterMetadata extends Metadata {
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((AbstractParameter) instance).setConverter(ctx.getFacesContext()
- .getApplication().createConverter(this.converterId));
- }
- }
+ private final String converterId;
- final static class DynamicConverterMetadata extends Metadata {
+ public LiteralConverterMetadata(String converterId) {
+ this.converterId = converterId;
+ }
- private final TagAttribute attr;
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractParameter) instance).setConverter(ctx.getFacesContext()
+ .getApplication().createConverter(this.converterId));
+ }
+ }
- public DynamicConverterMetadata(TagAttribute attr) {
- this.attr = attr;
- }
+ static final class DynamicConverterMetadata extends Metadata {
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((AbstractParameter) instance).setConverter((Converter) this.attr
- .getObject(ctx, Converter.class));
- }
- }
+ private final TagAttribute attr;
- final static class AssignToValueBindingMetadata extends Metadata {
+ public DynamicConverterMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
- private final TagAttribute attr;
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractParameter) instance).setConverter((Converter) this.attr
+ .getObject(ctx, Converter.class));
+ }
+ }
- public AssignToValueBindingMetadata(TagAttribute attr) {
- this.attr = attr;
- }
+ static final class AssignToValueBindingMetadata extends Metadata {
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((AbstractParameter) instance).setAssignToBinding(attr
- .getValueExpression(ctx, Object.class));
- }
- }
+ private final TagAttribute attr;
- private TagAttribute _assignTo;
- private TagAttribute _converter;
+ public AssignToValueBindingMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
- /**
- * @param config
- */
- public AbstractParameterHandler(ComponentConfig config) {
- super(config);
- _assignTo = getAttribute("assignTo");
- _converter = getAttribute("converter");
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((AbstractParameter) instance).setAssignToBinding(attr
+ .getValueExpression(ctx, Object.class));
+ }
+ }
- if (null != _assignTo) {
- if (_assignTo.isLiteral()) {
- throw new TagAttributeException(this.tag, this._assignTo,
- Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
- }
- }
- }
+ private TagAttribute assignTo;
+ private TagAttribute converter;
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent)
- */
- public void onComponentCreated(FaceletContext ctx, UIComponent c,
- UIComponent parent) {
- if (parent instanceof ActionSource) {
- if (_assignTo != null) {
- AbstractParameter al = (AbstractParameter) c;
- ((ActionSource) parent).addActionListener(al);
- }
- }
- }
+ /**
+ * @param config
+ */
+ public AbstractParameterHandler(ComponentConfig config) {
+ super(config);
+ assignTo = getAttribute("assignTo");
+ converter = getAttribute("converter");
- private static final ActionParamMetaRule actionParamMetaRule = new ActionParamMetaRule();
+ if (null != assignTo) {
+ if (assignTo.isLiteral()) {
+ throw new TagAttributeException(this.tag, this.assignTo,
+ Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
+ }
+ }
+ }
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
- */
- protected MetaRuleset createMetaRuleset(Class type) {
- MetaRuleset metaRules = super.createMetaRuleset(type);
- metaRules.addRule(actionParamMetaRule);
- return metaRules;
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
+ * javax.faces.component.UIComponent)
+ */
+ public void onComponentCreated(FaceletContext ctx, UIComponent c,
+ UIComponent parent) {
+ if (parent instanceof ActionSource) {
+ if (assignTo != null) {
+ AbstractParameter al = (AbstractParameter) c;
+ ((ActionSource) parent).addActionListener(al);
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(ACTION_PARAM_META_RULE);
+ return metaRules;
+ }
+
}
Modified: root/ui/dist/trunk/richfaces-components-api/pom.xml
===================================================================
--- root/ui/dist/trunk/richfaces-components-api/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/dist/trunk/richfaces-components-api/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -133,50 +133,60 @@
</configuration>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.build.resources</groupId>
- <artifactId>faces-shade-transformers</artifactId>
- <version>${faces-shade-transformers.version}</version>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.build.resources</groupId>
+ <artifactId>faces-shade-transformers</artifactId>
+ <version>${faces-shade-transformers.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
- <plugin>
- <!-- unpack necessary dependencies for collecting javadocs -->
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>deps</id>
- <phase>process-sources</phase>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <configuration>
- <classifier>sources</classifier>
-
- <includeGroupIds>${assembly.projects.group}</includeGroupIds>
- <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
- <excludeTransitive>true</excludeTransitive>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
- <executions>
- <execution>
- <id>javadoc-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <sourcepath>${basedir}/target/dependency</sourcepath>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- unpack necessary dependencies for collecting javadocs -->
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deps</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+
+ <includeGroupIds>${assembly.projects.group}</includeGroupIds>
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <sourcepath>${basedir}/target/dependency</sourcepath>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Modified: root/ui/dist/trunk/richfaces-components-impl/pom.xml
===================================================================
--- root/ui/dist/trunk/richfaces-components-impl/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/dist/trunk/richfaces-components-impl/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -35,9 +35,9 @@
<packaging>jar</packaging>
<name>Richfaces UI Components Impl</name>
- <properties>
- <faces-shade-transformers.version>4.0.0-SNAPSHOT</faces-shade-transformers.version>
- </properties>
+ <properties>
+ <faces-shade-transformers.version>4.0.0-SNAPSHOT</faces-shade-transformers.version>
+ </properties>
<dependencyManagement>
<dependencies>
@@ -168,37 +168,48 @@
</configuration>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.build.resources</groupId>
- <artifactId>faces-shade-transformers</artifactId>
- <version>${faces-shade-transformers.version}</version>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.build.resources</groupId>
+ <artifactId>faces-shade-transformers</artifactId>
+ <version>${faces-shade-transformers.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
- <executions>
- <execution>
- <id>javadoc-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <!-- switch on dependency-driven aggregation -->
- <includeDependencySources>true</includeDependencySources>
-
- <dependencySourceIncludes>
- <!-- exclude ONLY commons-cli artifacts -->
- <dependencySourceInclude>org.richfaces.ui:*</dependencySourceInclude>
- <dependencySourceInclude>org.richfaces.ui-sandbox:*</dependencySourceInclude>
- </dependencySourceIncludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <!-- switch on dependency-driven aggregation -->
+ <includeDependencySources>true</includeDependencySources>
+
+ <dependencySourceIncludes>
+ <!-- exclude ONLY commons-cli artifacts -->
+ <dependencySourceInclude>org.richfaces.ui:*</dependencySourceInclude>
+ <dependencySourceInclude>org.richfaces.ui-sandbox:*</dependencySourceInclude>
+ </dependencySourceIncludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Modified: root/ui/dist/trunk/richfaces-components-ui/pom.xml
===================================================================
--- root/ui/dist/trunk/richfaces-components-ui/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/dist/trunk/richfaces-components-ui/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -154,7 +154,7 @@
</includes>
</artifactSet>
<createSourcesJar>true</createSourcesJar>
- <transformers>
+<!-- <transformers>
<transformer implementation="org.richfaces.build.shade.resource.TaglibXmlResourceTransformer">
<taglibs>
<taglib>
@@ -167,7 +167,7 @@
</taglibs>
</transformer>
<transformer implementation="org.richfaces.build.shade.resource.FacesConfigXmlResourceTransformer" />
- </transformers>
+ </transformers>-->
</configuration>
</execution>
</executions>
@@ -179,80 +179,92 @@
</dependency>
</dependencies>
</plugin>
- <plugin>
- <!-- unpack necessary dependencies for collecting jsdoc and javadocs -->
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>deps</id>
- <phase>process-sources</phase>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <configuration>
- <classifier>sources</classifier>
-
- <includeGroupIds>${assembly.projects.group}</includeGroupIds>
- <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
- <excludeTransitive>true</excludeTransitive>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!-- collecting jsdoc -->
- <groupId>gr.abiss.mvn.plugins</groupId>
- <artifactId>maven-jstools-plugin</artifactId>
- <executions>
- <execution>
- <id>jsdoc</id>
- <phase>prepare-package</phase>
- <configuration>
- <outputBaseDirectory>${basedir}/target</outputBaseDirectory>
- <jsDir>${basedir}/target/dependency</jsDir>
- <includes>**/*.js</includes>
- <caseSensitive>true</caseSensitive>
- </configuration>
- <goals>
- <goal>jsdoc</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!-- pack jsdoc to jar -->
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>pack-jsodcs</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classesDirectory>${basedir}/target/jsdoc</classesDirectory>
- <classifier>jsdoc</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!-- collecting javadoc -->
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
- <executions>
- <execution>
- <id>javadoc-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <sourcepath>${basedir}/target/dependency</sourcepath>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- unpack necessary dependencies for collecting jsdoc and javadocs -->
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deps</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+
+ <includeGroupIds>${assembly.projects.group}</includeGroupIds>
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- collecting jsdoc -->
+ <groupId>gr.abiss.mvn.plugins</groupId>
+ <artifactId>maven-jstools-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jsdoc</id>
+ <phase>prepare-package</phase>
+ <configuration>
+ <outputBaseDirectory>${basedir}/target</outputBaseDirectory>
+ <jsDir>${basedir}/target/dependency</jsDir>
+ <includes>**/*.js</includes>
+ <caseSensitive>true</caseSensitive>
+ </configuration>
+ <goals>
+ <goal>jsdoc</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- pack jsdoc to jar -->
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>pack-jsodcs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classesDirectory>${basedir}/target/jsdoc</classesDirectory>
+ <classifier>jsdoc</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- collecting javadoc -->
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <sourcepath>${basedir}/target/dependency</sourcepath>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
\ No newline at end of file
Modified: root/ui/iteration/trunk/pom.xml
===================================================================
--- root/ui/iteration/trunk/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/iteration/trunk/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -40,5 +40,7 @@
<module>bom</module>
<module>parent</module>
<module>datascroller</module>
+
+ <module>dist</module>
</modules>
</project>
\ No newline at end of file
Modified: root/ui/misc/trunk/dist/pom.xml
===================================================================
--- root/ui/misc/trunk/dist/pom.xml 2010-05-28 07:03:55 UTC (rev 17338)
+++ root/ui/misc/trunk/dist/pom.xml 2010-05-28 07:18:39 UTC (rev 17339)
@@ -30,7 +30,7 @@
</parent>
<groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-ui-iteration-assembler</artifactId>
+ <artifactId>richfaces-ui-misc-assembler</artifactId>
<version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Richfaces UI Misc Assembler</name>
14 years