You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/11/15 18:11:10 UTC
svn commit: r1542331 [22/28] - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/
tobago-core/src/main/java/org/apache/myfaces/tobago/application/
tobago-core/src/main/java/org/apache/myfaces/tobago/compat/ tobago-core/...
Modified: myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SplitLayoutRenderer.java Fri Nov 15 17:10:58 2013
@@ -50,23 +50,23 @@ public class SplitLayoutRenderer extends
private static final String POSITION_ID_POSTFIX = "_spLP";
@Override
- public void decode(FacesContext facesContext, UIComponent component) {
- String clientId = component.getClientId();
+ public void decode(final FacesContext facesContext, final UIComponent component) {
+ final String clientId = component.getClientId();
if (clientId.equals(ComponentUtils.findPage(facesContext).getActionId())) {
// only decode and update layout at resize request
- Map<String, String> parameterMap = facesContext.getExternalContext().getRequestParameterMap();
- String position = parameterMap.get(clientId + POSITION_ID_POSTFIX);
+ final Map<String, String> parameterMap = facesContext.getExternalContext().getRequestParameterMap();
+ final String position = parameterMap.get(clientId + POSITION_ID_POSTFIX);
((AbstractUISplitLayout) component).updateLayout(Integer.parseInt(position));
}
}
@Override
- public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {
- LayoutContainer container = (LayoutContainer) ((AbstractUISplitLayout) component).getParent();
+ public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final LayoutContainer container = (LayoutContainer) ((AbstractUISplitLayout) component).getParent();
if (!((LayoutContainer) container).isLayoutChildren()) {
return;
} else {
- List<LayoutComponent> components = container.getComponents();
+ final List<LayoutComponent> components = container.getComponents();
if (components.size() != 2) {
LOG.warn("Illegal component count in splitLayout: {}", components.size());
}
@@ -79,19 +79,19 @@ public class SplitLayoutRenderer extends
}
}
- protected void encodeHandle(FacesContext facesContext, AbstractUISplitLayout layout) throws IOException {
- String id = layout.getClientId(facesContext);
+ protected void encodeHandle(final FacesContext facesContext, final AbstractUISplitLayout layout) throws IOException {
+ final String id = layout.getClientId(facesContext);
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.SPAN, layout);
writer.writeIdAttribute(id);
writer.writeAttribute("data-tobago-split-layout", layout.getOrientation().toLowerCase(), true);
writer.writeAttribute("data-tobago-split-layout-containment", createDraggableContainment(layout), true);
- Style style = calculateHandleStyle(layout);
+ final Style style = calculateHandleStyle(layout);
writer.writeStyleAttribute(style);
writer.writeClassAttribute(Classes.create(layout, layout.getOrientation().toLowerCase()));
- int position;
+ final int position;
if (AbstractUISplitLayout.HORIZONTAL.equals(layout.getOrientation())) {
position = style.getLeft().getPixel();
} else {
@@ -109,30 +109,30 @@ public class SplitLayoutRenderer extends
}
- private String createDraggableContainment(AbstractUISplitLayout layout) {
- LayoutContainer container = (LayoutContainer) ((AbstractUISplitLayout) layout).getParent();
- LayoutComponent firstComponent = container.getComponents().get(0);
- LayoutComponent secondComponent = container.getComponents().get(1);
+ private String createDraggableContainment(final AbstractUISplitLayout layout) {
+ final LayoutContainer container = (LayoutContainer) ((AbstractUISplitLayout) layout).getParent();
+ final LayoutComponent firstComponent = container.getComponents().get(0);
+ final LayoutComponent secondComponent = container.getComponents().get(1);
if (AbstractUISplitLayout.HORIZONTAL.equals(layout.getOrientation())) {
- int minimumSize1 = firstComponent.getMinimumWidth().getPixel();
- int minimumSize2 = secondComponent.getMinimumWidth().getPixel();
- int totalSize = container.getCurrentWidth().getPixel();
+ final int minimumSize1 = firstComponent.getMinimumWidth().getPixel();
+ final int minimumSize2 = secondComponent.getMinimumWidth().getPixel();
+ final int totalSize = container.getCurrentWidth().getPixel();
return new StringBuilder("[").append(minimumSize1).append(", 0, ").append(totalSize-minimumSize2).append(", 0]")
.toString();
} else {
- int minimumSize1 = firstComponent.getMinimumHeight().getPixel();
- int minimumSize2 = secondComponent.getMinimumHeight().getPixel();
- int totalSize = container.getCurrentHeight().getPixel();
+ final int minimumSize1 = firstComponent.getMinimumHeight().getPixel();
+ final int minimumSize2 = secondComponent.getMinimumHeight().getPixel();
+ final int totalSize = container.getCurrentHeight().getPixel();
return new StringBuilder("[0, ").append(minimumSize1).append(", 0, ").append(totalSize-minimumSize2).append("]")
.toString();
}
}
- private Style calculateHandleStyle(AbstractUISplitLayout layout) {
- LayoutContainer container = (LayoutContainer) ((AbstractUISplitLayout) layout).getParent();
- LayoutComponent secondComponent = container.getComponents().get(1);
- Style style = new Style();
+ private Style calculateHandleStyle(final AbstractUISplitLayout layout) {
+ final LayoutContainer container = (LayoutContainer) ((AbstractUISplitLayout) layout).getParent();
+ final LayoutComponent secondComponent = container.getComponents().get(1);
+ final Style style = new Style();
if (AbstractUISplitLayout.HORIZONTAL.equals(layout.getOrientation())) {
style.setWidth(Measure.valueOf(5));
style.setHeight(container.getCurrentHeight());
Modified: myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/util/Slf4jLogger.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/util/Slf4jLogger.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/util/Slf4jLogger.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/util/Slf4jLogger.java Fri Nov 15 17:10:58 2013
@@ -25,15 +25,15 @@ public class Slf4jLogger implements Logg
private org.slf4j.Logger log;
- public Slf4jLogger(org.slf4j.Logger log) {
+ public Slf4jLogger(final org.slf4j.Logger log) {
this.log = log;
}
- public void debug(String reference) {
+ public void debug(final String reference) {
log.debug(reference);
}
- public void debug(String reference, Throwable throwable) {
+ public void debug(final String reference, final Throwable throwable) {
log.debug(reference, throwable);
}
@@ -41,11 +41,11 @@ public class Slf4jLogger implements Logg
return log.isDebugEnabled();
}
- public void info(String reference) {
+ public void info(final String reference) {
log.info(reference);
}
- public void info(String reference, Throwable throwable) {
+ public void info(final String reference, final Throwable throwable) {
log.info(reference, throwable);
}
@@ -53,11 +53,11 @@ public class Slf4jLogger implements Logg
return log.isInfoEnabled();
}
- public void warn(String reference) {
+ public void warn(final String reference) {
log.warn(reference);
}
- public void warn(String reference, Throwable throwable) {
+ public void warn(final String reference, final Throwable throwable) {
log.warn(reference, throwable);
}
@@ -65,11 +65,11 @@ public class Slf4jLogger implements Logg
return log.isWarnEnabled();
}
- public void error(String reference) {
+ public void error(final String reference) {
log.error(reference);
}
- public void error(String reference, Throwable throwable) {
+ public void error(final String reference, final Throwable throwable) {
log.error(reference, throwable);
}
@@ -77,11 +77,11 @@ public class Slf4jLogger implements Logg
return log.isErrorEnabled();
}
- public void fatalError(String reference) {
+ public void fatalError(final String reference) {
log.error(reference);
}
- public void fatalError(String reference, Throwable throwable) {
+ public void fatalError(final String reference, final Throwable throwable) {
log.error(reference, throwable);
}
@@ -89,7 +89,7 @@ public class Slf4jLogger implements Logg
return log.isErrorEnabled();
}
- public Logger getChildLogger(String reference) {
+ public Logger getChildLogger(final String reference) {
return null;
}
}
Modified: myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/test/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SandboxGenericTagUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/test/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SandboxGenericTagUnitTest.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/test/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SandboxGenericTagUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/test/java/org/apache/myfaces/tobago/internal/taglib/sandbox/SandboxGenericTagUnitTest.java Fri Nov 15 17:10:58 2013
@@ -26,7 +26,7 @@ public class SandboxGenericTagUnitTest e
@Before
public void setUp() throws Exception {
- String[] tldPaths = new String[1];
+ final String[] tldPaths = new String[1];
tldPaths[0] = "META-INF/org/apache/myfaces/tobago/internal/taglib/sandbox/tobago-sandbox.tld";
setTldPaths(tldPaths);
super.setUp();
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/AuthorizationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/AuthorizationUtils.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/AuthorizationUtils.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/AuthorizationUtils.java Fri Nov 15 17:10:58 2013
@@ -42,9 +42,9 @@ public class AuthorizationUtils {
private AuthorizationUtils() {
}
- public static boolean isAuthorized(FacesContext facesContext, String expression) {
+ public static boolean isAuthorized(final FacesContext facesContext, final String expression) {
- Annotation securityAnnotation = getSecurityAnnotation(facesContext, expression);
+ final Annotation securityAnnotation = getSecurityAnnotation(facesContext, expression);
if (securityAnnotation == null) {
return true;
}
@@ -56,12 +56,12 @@ public class AuthorizationUtils {
return false;
}
if (securityAnnotation instanceof RolesAllowed) {
- String [] roles = ((RolesAllowed) securityAnnotation).value();
+ final String [] roles = ((RolesAllowed) securityAnnotation).value();
if (LOG.isDebugEnabled()) {
LOG.debug("RolesAllowed " + Arrays.asList(((RolesAllowed) securityAnnotation).value()));
}
- for (String role : roles) {
- boolean authorised = facesContext.getExternalContext().isUserInRole(role);
+ for (final String role : roles) {
+ final boolean authorised = facesContext.getExternalContext().isUserInRole(role);
if (authorised) {
return true;
}
@@ -77,7 +77,7 @@ public class AuthorizationUtils {
return true;
}
- private static Annotation getSecurityAnnotations(AnnotatedElement annotatedElement) {
+ private static Annotation getSecurityAnnotations(final AnnotatedElement annotatedElement) {
Annotation annotation = annotatedElement.getAnnotation(RolesAllowed.class);
if (annotation != null) {
return annotation;
@@ -93,9 +93,9 @@ public class AuthorizationUtils {
return null;
}
- private static Annotation getSecurityAnnotation(FacesContext facesContext, String expression) {
+ private static Annotation getSecurityAnnotation(final FacesContext facesContext, String expression) {
if (AUTHORISATION_CACHE.containsKey(expression)) {
- Object obj = AUTHORISATION_CACHE.get(expression);
+ final Object obj = AUTHORISATION_CACHE.get(expression);
if (obj instanceof Annotation) {
return (Annotation) obj;
}
@@ -104,21 +104,21 @@ public class AuthorizationUtils {
Annotation securityAnnotation = null;
if (expression.startsWith("#{") && expression.endsWith("}")) {
expression = expression.substring(2, expression.length()-1);
- int index = expression.lastIndexOf('.');
+ final int index = expression.lastIndexOf('.');
if (index != -1) {
- String methodExpression = expression.substring(index+1, expression.length());
- String beanExpression = expression.substring(0, index);
+ final String methodExpression = expression.substring(index+1, expression.length());
+ final String beanExpression = expression.substring(0, index);
// TODO find a better way
- Object bean =
+ final Object bean =
facesContext.getApplication().getVariableResolver().resolveVariable(facesContext, beanExpression);
if (bean != null) {
try {
- Method method = bean.getClass().getMethod(methodExpression);
+ final Method method = bean.getClass().getMethod(methodExpression);
securityAnnotation = getSecurityAnnotations(method);
if (securityAnnotation == null) {
securityAnnotation = getSecurityAnnotations(bean.getClass());
}
- } catch (NoSuchMethodException e) {
+ } catch (final NoSuchMethodException e) {
LOG.error("No Method " + methodExpression + " in class " + bean.getClass(), e);
}
}
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodBinding.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodBinding.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodBinding.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodBinding.java Fri Nov 15 17:10:58 2013
@@ -38,7 +38,7 @@ public class CheckAuthorisationMethodBin
public CheckAuthorisationMethodBinding() {
}
- public CheckAuthorisationMethodBinding(MethodBinding methodBinding) {
+ public CheckAuthorisationMethodBinding(final MethodBinding methodBinding) {
this.methodBinding = methodBinding;
}
@@ -46,11 +46,11 @@ public class CheckAuthorisationMethodBin
return methodBinding.getExpressionString();
}
- public Class getType(FacesContext facesContext) throws MethodNotFoundException {
+ public Class getType(final FacesContext facesContext) throws MethodNotFoundException {
return methodBinding.getType(facesContext);
}
- public Object invoke(FacesContext facesContext, Object[] objects)
+ public Object invoke(final FacesContext facesContext, final Object[] objects)
throws EvaluationException {
if (LOG.isDebugEnabled()) {
LOG.debug("MethodBinding invoke " + getExpressionString());
@@ -65,14 +65,14 @@ public class CheckAuthorisationMethodBin
}
}
- public Object saveState(FacesContext facesContext) {
- Object[] saveState = new Object[1];
+ public Object saveState(final FacesContext facesContext) {
+ final Object[] saveState = new Object[1];
saveState[0] = UIComponentBase.saveAttachedState(facesContext, methodBinding);
return saveState;
}
- public void restoreState(FacesContext facesContext, Object savedState) {
- Object[] values = (Object[]) savedState;
+ public void restoreState(final FacesContext facesContext, final Object savedState) {
+ final Object[] values = (Object[]) savedState;
methodBinding = (MethodBinding) UIComponentBase.restoreAttachedState(facesContext, values[0]);
}
@@ -80,13 +80,13 @@ public class CheckAuthorisationMethodBin
return methodBinding instanceof StateHolder && ((StateHolder) methodBinding).isTransient();
}
- public void setTransient(boolean bool) {
+ public void setTransient(final boolean bool) {
if (methodBinding instanceof StateHolder) {
((StateHolder) methodBinding).setTransient(bool);
}
}
- public boolean isAuthorized(FacesContext facesContext) {
+ public boolean isAuthorized(final FacesContext facesContext) {
return AuthorizationUtils.isAuthorized(facesContext, getExpressionString());
}
}
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodExpression.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodExpression.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodExpression.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/CheckAuthorisationMethodExpression.java Fri Nov 15 17:10:58 2013
@@ -38,17 +38,17 @@ public class CheckAuthorisationMethodExp
public CheckAuthorisationMethodExpression() {
}
- public CheckAuthorisationMethodExpression(MethodExpression methodExpression) {
+ public CheckAuthorisationMethodExpression(final MethodExpression methodExpression) {
this.methodExpression = methodExpression;
}
@Override
- public MethodInfo getMethodInfo(ELContext context) {
+ public MethodInfo getMethodInfo(final ELContext context) {
return methodExpression.getMethodInfo(context);
}
@Override
- public Object invoke(ELContext context, Object[] objects) {
+ public Object invoke(final ELContext context, final Object[] objects) {
if (LOG.isDebugEnabled()) {
LOG.debug("MethodBinding invoke " + getExpressionString());
}
@@ -69,7 +69,7 @@ public class CheckAuthorisationMethodExp
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
return methodExpression.equals(obj);
}
@@ -83,14 +83,14 @@ public class CheckAuthorisationMethodExp
return methodExpression.isLiteralText();
}
- public Object saveState(FacesContext facesContext) {
- Object[] saveState = new Object[1];
+ public Object saveState(final FacesContext facesContext) {
+ final Object[] saveState = new Object[1];
saveState[0] = UIComponentBase.saveAttachedState(facesContext, methodExpression);
return saveState;
}
- public void restoreState(FacesContext facesContext, Object savedState) {
- Object[] values = (Object[]) savedState;
+ public void restoreState(final FacesContext facesContext, final Object savedState) {
+ final Object[] values = (Object[]) savedState;
methodExpression = (MethodExpression) UIComponentBase.restoreAttachedState(facesContext, values[0]);
}
@@ -98,13 +98,13 @@ public class CheckAuthorisationMethodExp
return methodExpression instanceof StateHolder && ((StateHolder) methodExpression).isTransient();
}
- public void setTransient(boolean bool) {
+ public void setTransient(final boolean bool) {
if (methodExpression instanceof StateHolder) {
((StateHolder) methodExpression).setTransient(bool);
}
}
- public boolean isAuthorized(FacesContext facesContext) {
+ public boolean isAuthorized(final FacesContext facesContext) {
return AuthorizationUtils.isAuthorized(facesContext, getExpressionString());
}
}
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredButton.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredButton.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredButton.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredButton.java Fri Nov 15 17:10:58 2013
@@ -45,7 +45,7 @@ public class UISecuredButton extends UIB
}
@Override
- public void setActionExpression(MethodExpression actionExpression) {
+ public void setActionExpression(final MethodExpression actionExpression) {
if (actionExpression != null) {
super.setActionExpression(new CheckAuthorisationMethodExpression(actionExpression));
} else {
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredCommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredCommand.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredCommand.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredCommand.java Fri Nov 15 17:10:58 2013
@@ -46,7 +46,7 @@ public class UISecuredCommand extends UI
}
@Override
- public void setActionExpression(MethodExpression actionExpression) {
+ public void setActionExpression(final MethodExpression actionExpression) {
if (actionExpression != null) {
super.setActionExpression(new CheckAuthorisationMethodExpression(actionExpression));
} else {
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLink.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLink.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLink.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLink.java Fri Nov 15 17:10:58 2013
@@ -45,7 +45,7 @@ public class UISecuredLink extends UILin
}
@Override
- public void setActionExpression(MethodExpression actionExpression) {
+ public void setActionExpression(final MethodExpression actionExpression) {
if (actionExpression != null) {
super.setActionExpression(new CheckAuthorisationMethodExpression(actionExpression));
} else {
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLinkCommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLinkCommand.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLinkCommand.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredLinkCommand.java Fri Nov 15 17:10:58 2013
@@ -49,7 +49,7 @@ public class UISecuredLinkCommand extend
}
@Override
- public void setActionExpression(MethodExpression actionExpression) {
+ public void setActionExpression(final MethodExpression actionExpression) {
if (actionExpression != null) {
super.setActionExpression(new CheckAuthorisationMethodExpression(actionExpression));
} else {
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredMenuCommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredMenuCommand.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredMenuCommand.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredMenuCommand.java Fri Nov 15 17:10:58 2013
@@ -47,7 +47,7 @@ public class UISecuredMenuCommand extend
}
@Override
- public void setActionExpression(MethodExpression actionExpression) {
+ public void setActionExpression(final MethodExpression actionExpression) {
if (actionExpression != null) {
super.setActionExpression(new CheckAuthorisationMethodExpression(actionExpression));
} else {
Modified: myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredToolBarCommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredToolBarCommand.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredToolBarCommand.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-security/src/main/java/org/apache/myfaces/tobago/security/UISecuredToolBarCommand.java Fri Nov 15 17:10:58 2013
@@ -45,7 +45,7 @@ public class UISecuredToolBarCommand ext
}
@Override
- public void setActionExpression(MethodExpression actionExpression) {
+ public void setActionExpression(final MethodExpression actionExpression) {
if (actionExpression != null) {
super.setActionExpression(new CheckAuthorisationMethodExpression(actionExpression));
} else {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java Fri Nov 15 17:10:58 2013
@@ -43,24 +43,24 @@ import java.io.IOException;
public class BoxRenderer extends BoxRendererBase {
@Override
- public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
- UIBox box = (UIBox) component;
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final UIBox box = (UIBox) component;
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- UIComponent label = box.getFacet(Facets.LABEL);
- String labelString = box.getLabel();
- UIPanel toolbar = (UIPanel) box.getFacet(Facets.TOOL_BAR);
- Style style = new Style(facesContext, box);
+ final UIComponent label = box.getFacet(Facets.LABEL);
+ final String labelString = box.getLabel();
+ final UIPanel toolbar = (UIPanel) box.getFacet(Facets.TOOL_BAR);
+ final Style style = new Style(facesContext, box);
if (toolbar != null) {
- Measure padding = getResourceManager().getThemeMeasure(facesContext, box, "paddingTopWhenToolbar");
+ final Measure padding = getResourceManager().getThemeMeasure(facesContext, box, "paddingTopWhenToolbar");
style.setPaddingTop(padding);
style.setPaddingBottom(Measure.ZERO);
}
writer.startElement(HtmlElements.FIELDSET, box);
writer.writeClassAttribute(Classes.create(box));
- String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, box);
+ final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, box);
if (title != null) {
writer.writeAttribute(HtmlAttributes.TITLE, title, true);
}
@@ -79,7 +79,7 @@ public class BoxRenderer extends BoxRend
writer.endElement(HtmlElements.LEGEND);
}
- Style contentStyle = new Style(facesContext, box);
+ final Style contentStyle = new Style(facesContext, box);
if (toolbar != null) {
writer.startElement(HtmlElements.DIV, null);
writer.writeClassAttribute(Classes.create(box, "toolbarOuter"));
@@ -114,8 +114,8 @@ public class BoxRenderer extends BoxRend
}
@Override
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
- ResponseWriter writer = facesContext.getResponseWriter();
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final ResponseWriter writer = facesContext.getResponseWriter();
writer.endElement(HtmlElements.DIV);
writer.endElement(HtmlElements.FIELDSET);
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java Fri Nov 15 17:10:58 2013
@@ -28,7 +28,7 @@ import javax.faces.component.UIComponent
public class BoxToolBarRenderer extends ToolBarRendererBase {
@Override
- protected String getLabelPosition(UIComponent component) {
+ protected String getLabelPosition(final UIComponent component) {
final String attribute = (String) component.getAttributes().get(Attributes.LABEL_POSITION);
if (UIToolBar.LABEL_BOTTOM.equals(attribute)) {
return UIToolBar.LABEL_RIGHT;
@@ -38,7 +38,7 @@ public class BoxToolBarRenderer extends
}
@Override
- protected String getIconSize(UIComponent component) {
+ protected String getIconSize(final UIComponent component) {
final String attribute = (String) component.getAttributes().get(Attributes.ICON_SIZE);
if (UIToolBar.ICON_BIG.equals(attribute)) {
return UIToolBar.ICON_SMALL;
@@ -48,7 +48,7 @@ public class BoxToolBarRenderer extends
}
@Override
- protected boolean isRightAligned(UIToolBar toolBar) {
+ protected boolean isRightAligned(final UIToolBar toolBar) {
return true;
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Fri Nov 15 17:10:58 2013
@@ -52,7 +52,7 @@ public class ButtonRenderer extends Comm
private static final Logger LOG = LoggerFactory.getLogger(ButtonRenderer.class);
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
final UIButton button = (UIButton) component;
final String clientId = button.getClientId(facesContext);
@@ -85,7 +85,7 @@ public class ButtonRenderer extends Comm
}
}
- Style style = new Style(facesContext, button);
+ final Style style = new Style(facesContext, button);
writer.writeStyleAttribute(style);
HtmlRendererUtils.renderDojoDndItem(component, writer, true);
writer.writeClassAttribute(Classes.create(button));
@@ -104,7 +104,7 @@ public class ButtonRenderer extends Comm
}
writer.startElement(HtmlElements.IMG, null);
writer.writeAttribute(HtmlAttributes.SRC, image, true);
- String tip = button.getTip();
+ final String tip = button.getTip();
writer.writeAttribute(HtmlAttributes.ALT, tip != null ? tip : "", true);
writer.endElement(HtmlElements.IMG);
}
@@ -127,18 +127,18 @@ public class ButtonRenderer extends Comm
}
@Override
- public Measure getPreferredWidth(FacesContext facesContext, Configurable component) {
+ public Measure getPreferredWidth(final FacesContext facesContext, final Configurable component) {
- UIButton button = (UIButton) component;
+ final UIButton button = (UIButton) component;
Measure width = Measure.ZERO;
- boolean image = button.getImage() != null;
+ final boolean image = button.getImage() != null;
if (image) {
width = getResourceManager().getThemeMeasure(facesContext, button, "imageWidth");
}
- LabelWithAccessKey label = new LabelWithAccessKey(button);
+ final LabelWithAccessKey label = new LabelWithAccessKey(button);
width = width.add(RenderUtils.calculateStringWidth(facesContext, button, label.getText()));
- Measure padding = getResourceManager().getThemeMeasure(facesContext, button, "paddingWidth");
+ final Measure padding = getResourceManager().getThemeMeasure(facesContext, button, "paddingWidth");
// left padding, right padding and when an image and an text then a middle padding.
width = width.add(padding.multiply(image && label.getText() != null ? 3 : 2));
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java Fri Nov 15 17:10:58 2013
@@ -46,15 +46,15 @@ import java.util.Locale;
public class CalendarRenderer extends LayoutComponentRendererBase {
@Override
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
- UICalendar output = (UICalendar) component;
- String id = output.getClientId(facesContext);
+ final UICalendar output = (UICalendar) component;
+ final String id = output.getClientId(facesContext);
- Locale locale = facesContext.getViewRoot().getLocale();
+ final Locale locale = facesContext.getViewRoot().getLocale();
- Object value = output.getValue();
- Calendar calendar;
+ final Object value = output.getValue();
+ final Calendar calendar;
if (value instanceof Calendar) {
calendar = (Calendar) value;
} else {
@@ -63,18 +63,18 @@ public class CalendarRenderer extends La
calendar.setTime((Date) value);
}
}
- CalendarModel model = new CalendarModel(calendar);
+ final CalendarModel model = new CalendarModel(calendar);
// rendering
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.DIV, component);
writer.writeIdAttribute(id);
writer.writeClassAttribute(Classes.create(output));
HtmlRendererUtils.writeDataAttributes(facesContext, writer, component);
- Style style = new Style(facesContext, output);
+ final Style style = new Style(facesContext, output);
writer.writeStyleAttribute(style);
- String dateInputId = (String) output.getAttributes().get(Attributes.DATE_INPUT_ID);
+ final String dateInputId = (String) output.getAttributes().get(Attributes.DATE_INPUT_ID);
if (dateInputId != null) {
writer.writeAttribute(DataAttributes.DATE_INPUT_ID, dateInputId, false);
}
@@ -145,9 +145,9 @@ public class CalendarRenderer extends La
writer.startElement(HtmlElements.DIV, null);
writer.writeClassAttribute(Classes.create(output, "row"));
- SimpleDateFormat dayInWeekFormat = new SimpleDateFormat("E", locale);
+ final SimpleDateFormat dayInWeekFormat = new SimpleDateFormat("E", locale);
for (int dayIt = 0; dayIt < 7; ++dayIt) {
- DateModel date = model.getDate(0, dayIt);
+ final DateModel date = model.getDate(0, dayIt);
String dayName = dayInWeekFormat.format(date.getCalendar().getTime());
if (dayName != null) {
dayName = dayName.substring(0, 2);
@@ -170,8 +170,8 @@ public class CalendarRenderer extends La
writer.writeClassAttribute(Classes.create(output, "row"));
for (int dayIt = 0; dayIt < 7; ++dayIt) {
- DateModel date = model.getDate(week, dayIt);
- String dayDescription = String.valueOf(date.getDay());
+ final DateModel date = model.getDate(week, dayIt);
+ final String dayDescription = String.valueOf(date.getDay());
writer.startElement(HtmlElements.SPAN, null);
writer.writeClassAttribute(
@@ -189,10 +189,10 @@ public class CalendarRenderer extends La
writer.endElement(HtmlElements.DIV);
}
- private String getMonthNames(Locale locale) {
- SimpleDateFormat dateFormat = new SimpleDateFormat("MMMMM", locale);
- StringBuilder buffer = new StringBuilder(64);
- Calendar calendar = Calendar.getInstance();
+ private String getMonthNames(final Locale locale) {
+ final SimpleDateFormat dateFormat = new SimpleDateFormat("MMMMM", locale);
+ final StringBuilder buffer = new StringBuilder(64);
+ final Calendar calendar = Calendar.getInstance();
calendar.set(2000, Calendar.JANUARY, 1);
for (int month = 0; month < 12; ++month) {
if (month > 0) {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ColumnRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ColumnRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ColumnRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ColumnRenderer.java Fri Nov 15 17:10:58 2013
@@ -25,7 +25,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.internal.component.AbstractUIMenu;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
+import org.apache.myfaces.tobago.renderkit.util.EncodeUtils;
import org.apache.myfaces.tobago.util.ComponentUtils;
import org.apache.myfaces.tobago.util.FacetUtils;
@@ -36,7 +36,7 @@ import java.io.IOException;
public class ColumnRenderer extends LayoutComponentRendererBase {
@Override
- public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
+ public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
super.prepareRender(facesContext, component);
final UIColumn column = (UIColumn) component;
@@ -53,8 +53,8 @@ public class ColumnRenderer extends Layo
* Pure is needed for <tc:panel>, <tc:in>, etc.<br/>
* Pure is not needed for <tc:out> and <tc:link>
*/
- private boolean isPure(UIColumn column) {
- for (UIComponent child : column.getChildren()) {
+ private boolean isPure(final UIColumn column) {
+ for (final UIComponent child : column.getChildren()) {
if (!(child instanceof UIOut) && !(child instanceof UILink)) {
return true;
}
@@ -68,10 +68,10 @@ public class ColumnRenderer extends Layo
}
@Override
- public void prepareRendersChildren(FacesContext facesContext, UIComponent component) throws IOException {
- AbstractUIMenu dropDownMenu = FacetUtils.getDropDownMenu(component);
+ public void prepareRendersChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final AbstractUIMenu dropDownMenu = FacetUtils.getDropDownMenu(component);
if (dropDownMenu != null) {
- RenderUtils.prepareRendererAll(facesContext, dropDownMenu);
+ EncodeUtils.prepareRendererAll(facesContext, dropDownMenu);
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java Fri Nov 15 17:10:58 2013
@@ -56,7 +56,8 @@ public class DatePickerRenderer extends
private static final Logger LOG = LoggerFactory.getLogger(DatePickerRenderer.class);
@Override
- public void onComponentCreated(FacesContext facesContext, UIComponent component, UIComponent parent) {
+ public void onComponentCreated(
+ final FacesContext facesContext, final UIComponent component, final UIComponent parent) {
final UIDatePicker picker = (UIDatePicker) component;
if (picker.getFor() == null) {
picker.setFor("@auto");
@@ -160,8 +161,8 @@ public class DatePickerRenderer extends
}
@Override
- public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
- UIDatePicker picker = (UIDatePicker) component;
+ public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final UIDatePicker picker = (UIDatePicker) component;
// todo: use Measure instead of int
// todo: call setWidth ???
picker.getAttributes().put(
@@ -174,9 +175,9 @@ public class DatePickerRenderer extends
}
@Override
- public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
- UIDatePicker picker = (UIDatePicker) component;
- UIDate dateInput = (UIDate) picker.getForComponent();
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final UIDatePicker picker = (UIDatePicker) component;
+ final UIDate dateInput = (UIDate) picker.getForComponent();
if (dateInput == null) {
LOG.error("The required UIDate component wasn't found for component id='" + component.getId());
return;
@@ -193,9 +194,9 @@ public class DatePickerRenderer extends
picker.setDisabled(dateInput.isReadonly() || dateInput.isDisabled());
}
}
- UIPopup popup = (UIPopup) picker.getFacets().get(Facets.POPUP);
+ final UIPopup popup = (UIPopup) picker.getFacets().get(Facets.POPUP);
picker.setRenderedPartially(new String[] {popup.getId()});
- Converter converter = getConverter(facesContext, dateInput);
+ final Converter converter = getConverter(facesContext, dateInput);
String converterPattern = "yyyy-MM-dd"; // from tobago-calendar.js initCalendarParse
if (converter instanceof DateTimeConverter) {
converterPattern = DateFormatUtils.findPattern((DateTimeConverter) converter);
@@ -212,12 +213,13 @@ public class DatePickerRenderer extends
super.encodeBegin(facesContext, component);
}
- private void applyConverterPattern(FacesContext facesContext, UIPopup popup, String converterPattern) {
- UIComponent box = popup.getChildren().get(0);
- UIComponent timePanel = box.findComponent("timePanel");
+ private void applyConverterPattern(
+ final FacesContext facesContext, final UIPopup popup, final String converterPattern) {
+ final UIComponent box = popup.getChildren().get(0);
+ final UIComponent timePanel = box.findComponent("timePanel");
if (converterPattern != null && (converterPattern.indexOf('h') > -1 || converterPattern.indexOf('H') > -1)) {
- UITime time = (UITime) timePanel.findComponent("time");
- DateTimeConverter dateTimeConverter
+ final UITime time = (UITime) timePanel.findComponent("time");
+ final DateTimeConverter dateTimeConverter
= (DateTimeConverter) facesContext.getApplication().createConverter(DateTimeConverter.CONVERTER_ID);
if (converterPattern.indexOf('s') > -1) {
dateTimeConverter.setPattern("HH:mm:ss");
@@ -232,9 +234,9 @@ public class DatePickerRenderer extends
}
@Override
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
- UIDatePicker link = (UIDatePicker) component;
- UIDate dateInput = (UIDate) link.getForComponent();
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final UIDatePicker link = (UIDatePicker) component;
+ final UIDate dateInput = (UIDate) link.getForComponent();
if (dateInput != null) {
super.encodeEnd(facesContext, component);
} else {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java Fri Nov 15 17:10:58 2013
@@ -37,13 +37,14 @@ public class DateRenderer extends InRend
@Override
protected void writeAdditionalAttributes(
- FacesContext facesContext, TobagoResponseWriter writer, AbstractUIInput input) throws IOException {
+ final FacesContext facesContext, final TobagoResponseWriter writer, final AbstractUIInput input)
+ throws IOException {
super.writeAdditionalAttributes(facesContext, writer, input);
String pattern = null;
- Converter help = getConverter(facesContext, input);
+ final Converter help = getConverter(facesContext, input);
if (help instanceof DateTimeConverter) {
- DateTimeConverter converter = (DateTimeConverter) help;
+ final DateTimeConverter converter = (DateTimeConverter) help;
pattern = DateFormatUtils.findPattern(converter);
}
if (pattern == null) {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java Fri Nov 15 17:10:58 2013
@@ -46,7 +46,7 @@ public class FileRenderer extends InputR
private static final Logger LOG = LoggerFactory.getLogger(FileRenderer.class);
- public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
+ public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
super.prepareRender(facesContext, component);
FacesContextUtils.setEnctype(facesContext, "multipart/form-data");
}
@@ -55,19 +55,19 @@ public class FileRenderer extends InputR
return true;
}
- public void decode(FacesContext facesContext, UIComponent component) {
+ public void decode(final FacesContext facesContext, final UIComponent component) {
if (ComponentUtils.isOutputOnly(component)) {
return;
}
- AbstractUIFile input = (AbstractUIFile) component;
+ final AbstractUIFile input = (AbstractUIFile) component;
TobagoMultipartFormdataRequest request = null;
- Object requestObject = facesContext.getExternalContext().getRequest();
+ final Object requestObject = facesContext.getExternalContext().getRequest();
if (requestObject instanceof TobagoMultipartFormdataRequest) {
request = (TobagoMultipartFormdataRequest) requestObject;
} else if (requestObject instanceof HttpServletRequestWrapper) {
- ServletRequest wrappedRequest
+ final ServletRequest wrappedRequest
= ((HttpServletRequestWrapper) requestObject).getRequest();
if (wrappedRequest instanceof TobagoMultipartFormdataRequest) {
request = (TobagoMultipartFormdataRequest) wrappedRequest;
@@ -81,7 +81,7 @@ public class FileRenderer extends InputR
+ "See documentation for <tc:file>");
} else {
- FileItem item = request.getFileItem(input.getClientId(facesContext));
+ final FileItem item = request.getFileItem(input.getClientId(facesContext));
if (LOG.isDebugEnabled()) {
LOG.debug("Uploaded file name : \"" + item.getName()
@@ -93,7 +93,7 @@ public class FileRenderer extends InputR
}
}
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
final AbstractUIFile file = (AbstractUIFile) component;
final String clientId = file.getClientId(facesContext);
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FlowLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FlowLayoutRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FlowLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FlowLayoutRenderer.java Fri Nov 15 17:10:58 2013
@@ -41,12 +41,12 @@ import java.io.IOException;
public class FlowLayoutRenderer extends RendererBase implements SpacingValues, MarginValues {
@Override
- public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- UIFlowLayout layout = (UIFlowLayout) component;
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final UIFlowLayout layout = (UIFlowLayout) component;
writer.startElement(HtmlElements.DIV, layout);
writer.writeClassAttribute(Classes.create(layout));
- Style style = new Style();
+ final Style style = new Style();
style.setMarginLeft(getMarginLeft(facesContext, layout));
style.setMarginRight(getMarginRight(facesContext, layout));
style.setMarginTop(getMarginTop(facesContext, layout));
@@ -56,8 +56,8 @@ public class FlowLayoutRenderer extends
}
@Override
- public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {
- UIComponent container = component.getParent();
+ public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final UIComponent container = component.getParent();
if (container instanceof LayoutContainer && !((LayoutContainer) container).isLayoutChildren()) {
return;
}
@@ -65,36 +65,36 @@ public class FlowLayoutRenderer extends
}
@Override
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.endElement(HtmlElements.DIV);
}
- public Measure getColumnSpacing(FacesContext facesContext, Configurable component) {
+ public Measure getColumnSpacing(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.COLUMN_SPACING);
}
- public Measure getRowSpacing(FacesContext facesContext, Configurable component) {
+ public Measure getRowSpacing(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.ROW_SPACING);
}
- public Measure getMarginLeft(FacesContext facesContext, Configurable component) {
- Configurable parent = (Configurable) ((UIComponent) component).getParent();
+ public Measure getMarginLeft(final FacesContext facesContext, final Configurable component) {
+ final Configurable parent = (Configurable) ((UIComponent) component).getParent();
return getResourceManager().getThemeMeasure(facesContext, parent, Attributes.MARGIN_LEFT);
}
- public Measure getMarginRight(FacesContext facesContext, Configurable component) {
- Configurable parent = (Configurable) ((UIComponent) component).getParent();
+ public Measure getMarginRight(final FacesContext facesContext, final Configurable component) {
+ final Configurable parent = (Configurable) ((UIComponent) component).getParent();
return getResourceManager().getThemeMeasure(facesContext, parent, Attributes.MARGIN_RIGHT);
}
- public Measure getMarginTop(FacesContext facesContext, Configurable component) {
- Configurable parent = (Configurable) ((UIComponent) component).getParent();
+ public Measure getMarginTop(final FacesContext facesContext, final Configurable component) {
+ final Configurable parent = (Configurable) ((UIComponent) component).getParent();
return getResourceManager().getThemeMeasure(facesContext, parent, Attributes.MARGIN_TOP);
}
- public Measure getMarginBottom(FacesContext facesContext, Configurable component) {
- Configurable parent = (Configurable) ((UIComponent) component).getParent();
+ public Measure getMarginBottom(final FacesContext facesContext, final Configurable component) {
+ final Configurable parent = (Configurable) ((UIComponent) component).getParent();
return getResourceManager().getThemeMeasure(facesContext, parent, Attributes.MARGIN_BOTTOM);
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FormRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FormRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FormRenderer.java Fri Nov 15 17:10:58 2013
@@ -28,10 +28,10 @@ import javax.faces.context.FacesContext;
public class FormRenderer extends RendererBase {
- public void decode(FacesContext facesContext, UIComponent component) {
- UIForm form = (UIForm) component;
- String actionId = FacesContextUtils.getActionId(facesContext);
- String clientId = form.getClientId(facesContext);
+ public void decode(final FacesContext facesContext, final UIComponent component) {
+ final UIForm form = (UIForm) component;
+ final String actionId = FacesContextUtils.getActionId(facesContext);
+ final String clientId = form.getClientId(facesContext);
if (actionId != null && actionId.startsWith(clientId)) {
form.setSubmitted(true);
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Fri Nov 15 17:10:58 2013
@@ -39,7 +39,7 @@ public class GridLayoutRenderer extends
private static final Logger LOG = LoggerFactory.getLogger(GridLayoutRenderer.class);
@Override
- public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
// TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
// UIGridLayout gridLayout = (UIGridLayout) component;
// writer.startElement(HtmlElements.DIV, gridLayout);
@@ -47,8 +47,8 @@ public class GridLayoutRenderer extends
}
@Override
- public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {
- UIComponent container = component.getParent();
+ public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final UIComponent container = component.getParent();
if (container instanceof LayoutContainer && !((LayoutContainer) container).isLayoutChildren()) {
return;
}
@@ -57,33 +57,33 @@ public class GridLayoutRenderer extends
@Override
public void encodeEnd(
- FacesContext facesContext,
- UIComponent component) throws IOException {
+ final FacesContext facesContext,
+ final UIComponent component) throws IOException {
// TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
// writer.endElement(HtmlElements.DIV);
}
- public Measure getColumnSpacing(FacesContext facesContext, Configurable component) {
+ public Measure getColumnSpacing(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.COLUMN_SPACING);
}
- public Measure getRowSpacing(FacesContext facesContext, Configurable component) {
+ public Measure getRowSpacing(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.ROW_SPACING);
}
- public Measure getMarginLeft(FacesContext facesContext, Configurable component) {
+ public Measure getMarginLeft(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_LEFT);
}
- public Measure getMarginRight(FacesContext facesContext, Configurable component) {
+ public Measure getMarginRight(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_RIGHT);
}
- public Measure getMarginTop(FacesContext facesContext, Configurable component) {
+ public Measure getMarginTop(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_TOP);
}
- public Measure getMarginBottom(FacesContext facesContext, Configurable component) {
+ public Measure getMarginBottom(final FacesContext facesContext, final Configurable component) {
return getResourceManager().getThemeMeasure(facesContext, component, Attributes.MARGIN_BOTTOM);
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/HiddenRenderer.java Fri Nov 15 17:10:58 2013
@@ -37,17 +37,17 @@ import java.io.IOException;
// TODO: Its not nice, that the base class use layout
public class HiddenRenderer extends InputRendererBase {
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
final String clientId = component.getClientId(facesContext);
final String value = RenderUtils.currentValue(component);
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.INPUT, component);
if (component instanceof UIHidden && ((UIHidden) component).isDisabled()) {
writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.TEXT, false);
- Style style = new Style();
+ final Style style = new Style();
style.setDisplay(Display.NONE);
writer.writeStyleAttribute(style);
writer.writeAttribute(HtmlAttributes.DISABLED, true);
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java Fri Nov 15 17:10:58 2013
@@ -41,16 +41,16 @@ public class ImageRenderer extends Layou
private static final Logger LOG = LoggerFactory.getLogger(ImageRenderer.class);
- public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
+ public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
super.prepareRender(facesContext, component);
HtmlRendererUtils.renderDojoDndSource(facesContext, component);
}
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- AbstractUIImage image = (AbstractUIImage) component;
+ final AbstractUIImage image = (AbstractUIImage) component;
final String value = image.getUrl();
String src = value;
if (src != null) {
@@ -87,15 +87,15 @@ public class ImageRenderer extends Layou
writer.writeAttribute(HtmlAttributes.ALT, alt, true);
HtmlRendererUtils.renderTip(image, writer);
writer.writeAttribute(HtmlAttributes.BORDER, border, false);
- Style style = new Style(facesContext, image);
+ final Style style = new Style(facesContext, image);
writer.writeStyleAttribute(style);
HtmlRendererUtils.renderDojoDndItem(image, writer, true);
writer.writeClassAttribute(Classes.create(image));
writer.endElement(HtmlElements.IMG);
}
- private String createSrc(String src, String ext) {
- int dot = src.lastIndexOf('.');
+ private String createSrc(final String src, final String ext) {
+ final int dot = src.lastIndexOf('.');
if (dot == -1) {
LOG.warn("Image src without extension: '" + src + "'");
return src;
@@ -104,7 +104,7 @@ public class ImageRenderer extends Layou
}
}
- private boolean isDisabled(AbstractUIImage graphic) {
+ private boolean isDisabled(final AbstractUIImage graphic) {
return graphic.isDisabled()
|| (graphic.getParent() instanceof UICommand && ((UICommand) graphic.getParent()).isDisabled());
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java Fri Nov 15 17:10:58 2013
@@ -47,9 +47,9 @@ public class InRenderer extends InputRen
private static final Logger LOG = LoggerFactory.getLogger(InRenderer.class);
@Override
- public void decode(FacesContext facesContext, UIComponent component) {
+ public void decode(final FacesContext facesContext, final UIComponent component) {
super.decode(facesContext, component);
- String clientId = component.getClientId(facesContext);
+ final String clientId = component.getClientId(facesContext);
if (clientId.equals(FacesContextUtils.getActionId(facesContext))) {
// this is a inputSuggest request -> render response
facesContext.renderResponse();
@@ -57,7 +57,7 @@ public class InRenderer extends InputRen
}
@Override
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
final AbstractUIInput input = (AbstractUIInput) component;
final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, input);
@@ -85,10 +85,10 @@ public class InRenderer extends InputRen
writer.writeAttribute(HtmlAttributes.TITLE, title, true);
}
int maxLength = 0;
- String pattern = null;
- for (Validator validator : input.getValidators()) {
+ final String pattern = null;
+ for (final Validator validator : input.getValidators()) {
if (validator instanceof LengthValidator) {
- LengthValidator lengthValidator = (LengthValidator) validator;
+ final LengthValidator lengthValidator = (LengthValidator) validator;
maxLength = lengthValidator.getMaximum();
}
/*if (validator instanceof RegexValidator) {
@@ -104,11 +104,11 @@ public class InRenderer extends InputRen
}
writer.writeAttribute(HtmlAttributes.READONLY, readonly);
writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
- Integer tabIndex = input.getTabIndex();
+ final Integer tabIndex = input.getTabIndex();
if (tabIndex != null) {
writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
}
- Style style = new Style(facesContext, input);
+ final Style style = new Style(facesContext, input);
writer.writeStyleAttribute(style);
final String placeholder = input.getPlaceholder();
@@ -129,7 +129,7 @@ public class InRenderer extends InputRen
// writer.writeAttribute(HtmlAttributes.ONCHANGE, onchange, null);
}
} */
- boolean required = ComponentUtils.getBooleanAttribute(input, Attributes.REQUIRED);
+ final boolean required = ComponentUtils.getBooleanAttribute(input, Attributes.REQUIRED);
writer.writeAttribute(HtmlAttributes.REQUIRED, required);
HtmlRendererUtils.renderFocus(id, input.isFocus(), ComponentUtils.isError(input), facesContext, writer);
writeAdditionalAttributes(facesContext, writer, input);
@@ -138,6 +138,7 @@ public class InRenderer extends InputRen
}
protected void writeAdditionalAttributes(
- FacesContext facesContext, TobagoResponseWriter writer, AbstractUIInput input) throws IOException {
+ final FacesContext facesContext, final TobagoResponseWriter writer, final AbstractUIInput input)
+ throws IOException {
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java Fri Nov 15 17:10:58 2013
@@ -44,7 +44,7 @@ public class LabelRenderer extends Layou
private static final Logger LOG = LoggerFactory.getLogger(LabelRenderer.class);
@Override
- public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
+ public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
super.prepareRender(facesContext, component);
ComponentUtils.evaluateAutoFor(component, UIInput.class);
@@ -59,14 +59,14 @@ public class LabelRenderer extends Layou
}
}
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
- UILabel label = (UILabel) component;
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final UILabel label = (UILabel) component;
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- String forValue = ComponentUtils.findClientIdFor(label, facesContext);
+ final String forValue = ComponentUtils.findClientIdFor(label, facesContext);
- String clientId = label.getClientId(facesContext);
+ final String clientId = label.getClientId(facesContext);
writer.startElement(HtmlElements.LABEL, label);
HtmlRendererUtils.writeDataAttributes(facesContext, writer, label);
HtmlRendererUtils.renderDojoDndItem(label, writer, true);
@@ -87,10 +87,11 @@ public class LabelRenderer extends Layou
/** Encodes the text inside of the label.
* Can be overwritten in other themes.
*/
- protected void encodeTextContent(FacesContext facesContext, TobagoResponseWriter writer, UILabel label)
+ protected void encodeTextContent(
+ final FacesContext facesContext, final TobagoResponseWriter writer, final UILabel label)
throws IOException {
- String clientId = label.getClientId(facesContext);
- LabelWithAccessKey key = new LabelWithAccessKey(label);
+ final String clientId = label.getClientId(facesContext);
+ final LabelWithAccessKey key = new LabelWithAccessKey(label);
if (key.getAccessKey() != null) {
writer.writeAttribute(HtmlAttributes.ACCESSKEY, Character.toString(key.getAccessKey()), false);
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java Fri Nov 15 17:10:58 2013
@@ -50,7 +50,7 @@ public class LinkRenderer extends Comman
private static final Logger LOG = LoggerFactory.getLogger(LinkRenderer.class);
- public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
final AbstractUILink link = (AbstractUILink) component;
final String clientId = link.getClientId(facesContext);
@@ -60,7 +60,7 @@ public class LinkRenderer extends Comman
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- LabelWithAccessKey label = new LabelWithAccessKey(link);
+ final LabelWithAccessKey label = new LabelWithAccessKey(link);
if (disabled) {
writer.startElement(HtmlElements.SPAN, link);
@@ -83,7 +83,7 @@ public class LinkRenderer extends Comman
}
}
HtmlRendererUtils.writeDataAttributes(facesContext, writer, link);
- Style style = new Style(facesContext, link);
+ final Style style = new Style(facesContext, link);
writer.writeStyleAttribute(style);
HtmlRendererUtils.renderDojoDndItem(component, writer, true);
writer.writeClassAttribute(Classes.create(link));
@@ -104,7 +104,7 @@ public class LinkRenderer extends Comman
writer.writeClassAttribute(Classes.create(link, "image"));
writer.writeAttribute(HtmlAttributes.SRC, image, true);
writer.writeAttribute(HtmlAttributes.BORDER, 0); // TODO: is border=0 setting via style possible?
- String tip = link.getTip();
+ final String tip = link.getTip();
writer.writeAttribute(HtmlAttributes.ALT, tip != null ? tip : "", true);
if (tip != null) {
writer.writeAttribute(HtmlAttributes.TITLE, tip, true);
@@ -130,9 +130,9 @@ public class LinkRenderer extends Comman
}
}
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
- AbstractUILink link = (AbstractUILink) component;
- ResponseWriter writer = facesContext.getResponseWriter();
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final AbstractUILink link = (AbstractUILink) component;
+ final ResponseWriter writer = facesContext.getResponseWriter();
if (link.isDisabled()) {
writer.endElement(HtmlElements.SPAN);
} else {
@@ -141,7 +141,7 @@ public class LinkRenderer extends Comman
}
@Override
- public Measure getPreferredWidth(FacesContext facesContext, Configurable component) {
+ public Measure getPreferredWidth(final FacesContext facesContext, final Configurable component) {
final AbstractUILink link = (AbstractUILink) component;
final LabelWithAccessKey label = new LabelWithAccessKey(link);
final String text = label.getText();
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java?rev=1542331&r1=1542330&r2=1542331&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java Fri Nov 15 17:10:58 2013
@@ -34,22 +34,22 @@ import java.io.IOException;
public class MenuBarRenderer extends LayoutComponentRendererBase {
@Override
- public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
- UIMenuBar menuBar = (UIMenuBar) component;
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ final UIMenuBar menuBar = (UIMenuBar) component;
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.OL, menuBar);
writer.writeIdAttribute(menuBar.getClientId(facesContext));
writer.writeClassAttribute(Classes.create(menuBar));
HtmlRendererUtils.writeDataAttributes(facesContext, writer, menuBar);
- Style style = new Style(facesContext, menuBar);
+ final Style style = new Style(facesContext, menuBar);
writer.writeStyleAttribute(style);
}
@Override
- public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
- TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.endElement(HtmlElements.OL);
}
}