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>