[jboss-cvs] jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk ...
Gavin King
gavin.king at jboss.com
Tue Jun 19 22:46:17 EDT 2007
User: gavin
Date: 07/06/19 22:46:17
Modified: ui/src/main/java/org/jboss/seam/ui/util/cdk
RendererBase.java RendererUtils.java
SimpleActionMethodBinding.java
Log:
warnings
Revision Changes Path
1.2 +10 -23 jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk/RendererBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RendererBase.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk/RendererBase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- RendererBase.java 19 Jun 2007 21:57:44 -0000 1.1
+++ RendererBase.java 20 Jun 2007 02:46:17 -0000 1.2
@@ -35,8 +35,8 @@
*
* Base Renderer for all chameleon Skin's and components.
* At most, make all common procedures and realise concrete work in "template" methods.
- * @author asmirnov at exadel.com (latest modification by $Author: pmuir $)
- * @version $Revision: 1.1 $ $Date: 2007/06/19 21:57:44 $
+ * @author asmirnov at exadel.com (latest modification by $Author: gavin $)
+ * @version $Revision: 1.2 $ $Date: 2007/06/20 02:46:17 $
*
*/
public abstract class RendererBase extends Renderer {
@@ -47,9 +47,7 @@
protected static final String JAVASCRIPT_NAMESPACE = "JBossSeam";
private static final RendererUtils utils = new RendererUtils();
- /* (non-Javadoc)
- * @see javax.faces.render.Renderer#decode(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
- */
+ @Override
public void decode(FacesContext context, UIComponent component) {
// Test for correct parameters.
if (context == null) throw new NullPointerException("Context must not be null");
@@ -69,9 +67,7 @@
}
- /* (non-Javadoc)
- * @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
- */
+ @Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
// Test for correct parameters.
if (context == null) throw new NullPointerException("Context must not be null");
@@ -84,11 +80,7 @@
}
}
-
-
- /* (non-Javadoc)
- * @see javax.faces.render.Renderer#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
- */
+ @Override
public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
// Test for correct parameters.
if (context == null) throw new NullPointerException("Context must not be null");
@@ -101,9 +93,7 @@
}
}
- /* (non-Javadoc)
- * @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
- */
+ @Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
// Test for correct parameters.
if (context == null) throw new NullPointerException("Context must not be null");
@@ -115,18 +105,15 @@
}
}
-
-
/**
* Get base component slass , targetted for this renderer. Used for check arguments in decode/encode.
- * @return
*/
protected abstract Class getComponentClass();
/**
* Template method for custom decoding of concrete renderer.
- * All parameters checking if performed in original {@see decode } method.
+ * All parameters checking if performed in original decode() method.
* @param context
* @param component
*/
@@ -136,7 +123,7 @@
/**
* Template method for custom start encoding of concrete renderer.
- * All parameters checking and writer is performed in original {@link encodeBegin } method.
+ * All parameters checking and writer is performed in original encodeBegin() method.
* @param writer
* @param context
* @param component
@@ -155,7 +142,7 @@
/**
* Template method for custom finish encoding of concrete renderer.
- * All parameters checking and writer is performed in original {@link encodeEnd } method.
+ * All parameters checking and writer is performed in original encodeEnd() method.
* @param writer
* @param context
* @param component
1.2 +6 -73 jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk/RendererUtils.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RendererUtils.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk/RendererUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- RendererUtils.java 19 Jun 2007 21:57:44 -0000 1.1
+++ RendererUtils.java 20 Jun 2007 02:46:17 -0000 1.2
@@ -21,7 +21,6 @@
package org.jboss.seam.ui.util.cdk;
-import java.awt.Dimension;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
@@ -42,8 +41,7 @@
/**
* Util class for common render operations - render passthru html attributes,
* iterate over child components etc.
- * @author asmirnov at exadel.com (latest modification by $Author: pmuir $)
- * @version $Revision: 1.1 $ $Date: 2007/06/19 21:57:44 $
+ * @author asmirnov at exadel.com (latest modification by $Author: gavin $)
*
*/
public class RendererUtils {
@@ -62,8 +60,8 @@
}
/**
* Common HTML elements and attributes names.
- * @author asmirnov at exadel.com (latest modification by $Author: pmuir $)
- * @version $Revision: 1.1 $ $Date: 2007/06/19 21:57:44 $
+ * @author asmirnov at exadel.com (latest modification by $Author: gavin $)
+ * @version $Revision: 1.2 $ $Date: 2007/06/20 02:46:17 $
*
*/
public interface HTML {
@@ -305,9 +303,6 @@
/**
* Encode id attribute with clientId component property
- * @param context
- * @param component
- * @throws IOException
*/
public void encodeId(FacesContext context, UIComponent component) throws IOException {
encodeId(context,component,HTML.id_ATTRIBUTE);
@@ -315,10 +310,6 @@
/**
* Encode clientId to custom attribute ( for example, to control name )
- * @param context
- * @param component
- * @param attribute
- * @throws IOException
*/
public void encodeId(FacesContext context,UIComponent component, String attribute) throws IOException {
String clientId = null;
@@ -336,9 +327,6 @@
/**
* Encode id attribute with clientId component property.
* Encoded only if id not auto generated.
- * @param context
- * @param component
- * @throws IOException
*/
public void encodeCustomId(FacesContext context, UIComponent component) throws IOException {
if(component.getId() != null && !component.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)){
@@ -348,9 +336,6 @@
/**
* Encode common pass-thru html attributes.
- * @param context
- * @param component
- * @throws IOException
*/
public void encodePassThru(FacesContext context, UIComponent component) throws IOException {
encodeAttributesFromArray(context,component,HTML.PASS_THRU);
@@ -384,11 +369,6 @@
/**
* Encode one pass-thru attribute, with plain/boolean/url value, got from properly component attribute.
- * @param context
- * @param component
- * @param writer
- * @param attribute
- * @throws IOException
*/
public void encodePassThruAttribute(FacesContext context, Map attributes, ResponseWriter writer, String attribute) throws IOException {
Object value = attributeValue(attribute,attributes.get(getComponentAttributeName(attribute)));
@@ -427,13 +407,7 @@
encodeAttributesFromArray(context,component,attrsArray);
}
}
- /**
- * @param context
- * @param component
- * @param string
- * @param string2
- * @throws IOException
- */
+
public void encodeAttribute(FacesContext context, UIComponent component, Object property, String attributeName) throws IOException {
ResponseWriter writer = context.getResponseWriter();
Object value = component.getAttributes().get(property);
@@ -515,9 +489,6 @@
/**
* Convert HTML attribute name to component property name.
- *
- * @param key
- * @return
*/
protected Object getComponentAttributeName(Object key) {
Object converted = substitutions.get(key);
@@ -531,9 +502,7 @@
/**
* Convert attribute value to proper object. For known html boolean attributes return name
* for true value, otherthise - null. For non-boolean attributes return same value.
- * @param name attribute name.
- * @param value
- * @return
+ * @param name attribute name
*/
protected Object attributeValue(String name, Object value){
if (null != value && Arrays.binarySearch(HTML.PASS_THRU_BOOLEAN,name)>=0) {
@@ -575,9 +544,6 @@
/**
* Return converted value for {@link javax.faces.component.ValueHolder} as String,
* perform nessesary convertions.
- * @param context
- * @param component
- * @return
*/
public String getValueAsString(FacesContext context, UIComponent component) {
// First - get submitted value for input components
@@ -599,9 +565,6 @@
/**
* Convert any object value to string. If component instance of {@link ValueHolder } got {@link Converter} for formatting.
* If not, attempt to use converter based on value type.
- * @param context
- * @param component
- * @return
*/
public String formatValue(FacesContext context, UIComponent component,Object value) {
if(value instanceof String) {
@@ -634,7 +597,6 @@
/**
* Find nested form for given component
- * @param component
* @return nested <code>UIForm</code> component, or <code>null</code>
*/
public UIForm getNestingForm(FacesContext context,UIComponent component)
@@ -654,12 +616,6 @@
return nestingForm;
}
- /**
- * @param context
- * @param component
- * @return
- * @throws IOException
- */
public void encodeBeginFormIfNessesary(FacesContext context, UIComponent component) throws IOException {
UIForm form = getNestingForm(context, component);
if(null == form) {
@@ -670,13 +626,6 @@
}
}
- /**
- * @param context
- * @param component
- * @param writer
- * @param clientId
- * @throws IOException
- */
public void encodeBeginForm(FacesContext context, UIComponent component, ResponseWriter writer, String clientId) throws IOException {
String actionURL = getActionUrl(context);
String encodeActionURL = context.getExternalContext().encodeActionURL(actionURL);
@@ -691,11 +640,6 @@
"action");
}
- /**
- * @param context
- * @param component
- * @throws IOException
- */
public void encodeEndFormIfNessesary(FacesContext context, UIComponent component) throws IOException {
UIForm form = getNestingForm(context, component);
if(null == form) {
@@ -705,18 +649,12 @@
}
}
- /**
- * @param context
- * @param writer
- * @throws IOException
- */
public void encodeEndForm(FacesContext context, ResponseWriter writer) throws IOException {
writer.endElement(HTML.FORM_ELEMENT);
}
/**
- * @param facesContext
* @return String A String representing the action URL
*/
public String getActionUrl(FacesContext facesContext)
@@ -726,9 +664,7 @@
return viewHandler.getActionURL(facesContext, viewId);
}
/**
- * Simplified version of {@link encodeId}
- * @param context
- * @param component
+ * Simplified version of encodeId()
* @return client id of current component
*/
public String clientId(FacesContext context, UIComponent component){
@@ -743,9 +679,6 @@
/**
* Wtrie JavaScript with start/end elements and type.
- * @param context
- * @param tab
- * @param string
*/
public void writeScript(FacesContext context, UIComponent component, Object script) throws IOException {
1.2 +4 -8 jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk/SimpleActionMethodBinding.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SimpleActionMethodBinding.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/ui/src/main/java/org/jboss/seam/ui/util/cdk/SimpleActionMethodBinding.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- SimpleActionMethodBinding.java 19 Jun 2007 21:57:44 -0000 1.1
+++ SimpleActionMethodBinding.java 20 Jun 2007 02:46:17 -0000 1.2
@@ -28,14 +28,8 @@
import javax.faces.el.MethodNotFoundException;
/**
- * @author shura (latest modification by $Author: pmuir $)
- * @version $Revision: 1.1 $ $Date: 2007/06/19 21:57:44 $
- *
- */
-/**
* Simple method binding for constant action outcome.
- * @author asmirnov at exadel.com (latest modification by $Author: pmuir $)
- * @version $Revision: 1.1 $ $Date: 2007/06/19 21:57:44 $
+ * @author asmirnov at exadel.com (latest modification by $Author: gavin $)
*
*/
public class SimpleActionMethodBinding extends MethodBinding implements StateHolder {
@@ -48,11 +42,13 @@
_outcome = outcome;
}
+ @Override
public Object invoke(FacesContext facescontext, Object aobj[])
throws EvaluationException, MethodNotFoundException {
return _outcome;
}
+ @Override
public Class getType(FacesContext facescontext)
throws MethodNotFoundException {
return String.class;
More information about the jboss-cvs-commits
mailing list