You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/11/10 00:44:04 UTC
svn commit: r1200044 [5/7] - in
/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared:
application/ component/ config/ context/flash/ renderkit/ renderkit/html/
renderkit/html/util/ resource/ taglib/ test/ util/ util/el/ util/servlet/
view...
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java Wed Nov 9 23:44:02 2011
@@ -50,8 +50,8 @@ public class HtmlResponseWriterImpl
private static final String DEFAULT_CHARACTER_ENCODING = "ISO-8859-1";
private static final String UTF8 = "UTF-8";
- private static String APPLICATION_XML_CONTENT_TYPE = "application/xml";
- private static String TEXT_XML_CONTENT_TYPE = "text/xml";
+ private static final String APPLICATION_XML_CONTENT_TYPE = "application/xml";
+ private static final String TEXT_XML_CONTENT_TYPE = "text/xml";
//private boolean _writeDummyForm = false;
//private Set _dummyFormParams = null;
@@ -96,7 +96,7 @@ public class HtmlResponseWriterImpl
private boolean _cdataOpen;
- private static final Set<String> s_emptyHtmlElements = new HashSet<String>();
+ private static final Set<String> S_EMPTY_HTML_ELEMENTS = new HashSet<String>();
private static final String CDATA_START = "<![CDATA[ \n";
private static final String CDATA_START_NO_LINE_RETURN = "<![CDATA[";
@@ -110,19 +110,19 @@ public class HtmlResponseWriterImpl
static
{
- s_emptyHtmlElements.add("area");
- s_emptyHtmlElements.add("br");
- s_emptyHtmlElements.add("base");
- s_emptyHtmlElements.add("basefont");
- s_emptyHtmlElements.add("col");
- s_emptyHtmlElements.add("frame");
- s_emptyHtmlElements.add("hr");
- s_emptyHtmlElements.add("img");
- s_emptyHtmlElements.add("input");
- s_emptyHtmlElements.add("isindex");
- s_emptyHtmlElements.add("link");
- s_emptyHtmlElements.add("meta");
- s_emptyHtmlElements.add("param");
+ S_EMPTY_HTML_ELEMENTS.add("area");
+ S_EMPTY_HTML_ELEMENTS.add("br");
+ S_EMPTY_HTML_ELEMENTS.add("base");
+ S_EMPTY_HTML_ELEMENTS.add("basefont");
+ S_EMPTY_HTML_ELEMENTS.add("col");
+ S_EMPTY_HTML_ELEMENTS.add("frame");
+ S_EMPTY_HTML_ELEMENTS.add("hr");
+ S_EMPTY_HTML_ELEMENTS.add("img");
+ S_EMPTY_HTML_ELEMENTS.add("input");
+ S_EMPTY_HTML_ELEMENTS.add("isindex");
+ S_EMPTY_HTML_ELEMENTS.add("link");
+ S_EMPTY_HTML_ELEMENTS.add("meta");
+ S_EMPTY_HTML_ELEMENTS.add("param");
}
public HtmlResponseWriterImpl(Writer writer, String contentType, String characterEncoding)
@@ -158,7 +158,8 @@ public class HtmlResponseWriterImpl
{
if (log.isLoggable(Level.FINE))
{
- log.fine("No character encoding given, using default character encoding " + DEFAULT_CHARACTER_ENCODING);
+ log.fine("No character encoding given, using default character encoding " +
+ DEFAULT_CHARACTER_ENCODING);
}
_characterEncoding = DEFAULT_CHARACTER_ENCODING;
}
@@ -259,7 +260,8 @@ public class HtmlResponseWriterImpl
}
@Override
- public void startCDATA() throws IOException {
+ public void startCDATA() throws IOException
+ {
if (!_cdataOpen)
{
write(CDATA_START_NO_LINE_RETURN);
@@ -268,7 +270,8 @@ public class HtmlResponseWriterImpl
}
@Override
- public void endCDATA() throws IOException {
+ public void endCDATA() throws IOException
+ {
if (_cdataOpen)
{
write(CDATA_END_NO_LINE_RETURN);
@@ -280,7 +283,7 @@ public class HtmlResponseWriterImpl
{
if (_startTagOpen)
{
- if (!_useStraightXml && s_emptyHtmlElements.contains(_startElementName.toLowerCase()))
+ if (!_useStraightXml && S_EMPTY_HTML_ELEMENTS.contains(_startElementName.toLowerCase()))
{
_currentWriter.write(" />");
// make null, this will cause NullPointer in some invalid element nestings
@@ -374,13 +377,14 @@ public class HtmlResponseWriterImpl
}
else
{
- if (!_useStraightXml && s_emptyHtmlElements.contains(name.toLowerCase()))
+ if (!_useStraightXml && S_EMPTY_HTML_ELEMENTS.contains(name.toLowerCase()))
{
/*
Should this be here? It warns even when you have an x:htmlTag value="br", it should just close.
if (log.isWarnEnabled())
- log.warn("HTML nesting warning on closing " + name + ": This element must not contain nested elements or text in HTML");
+ log.warn("HTML nesting warning on closing " + name +
+ ": This element must not contain nested elements or text in HTML");
*/
}
else
@@ -418,17 +422,20 @@ public class HtmlResponseWriterImpl
// simple CDATA without comments, but note we need to check
// when we are using any valid notation (simple CDATA, commented CDATA, xml comment)
String trimmedContent = content.trim();
- if (trimmedContent.startsWith(CommentUtils.CDATA_SIMPLE_START) && trimmedContent.endsWith(CommentUtils.CDATA_SIMPLE_END))
+ if (trimmedContent.startsWith(CommentUtils.CDATA_SIMPLE_START) && trimmedContent.endsWith(
+ CommentUtils.CDATA_SIMPLE_END))
{
_outputWriter.write(content);
return;
}
- else if (CommentUtils.isStartMatchWithCommentedCDATA(trimmedContent) && CommentUtils.isEndMatchWithCommentedCDATA(trimmedContent))
+ else if (CommentUtils.isStartMatchWithCommentedCDATA(trimmedContent) &&
+ CommentUtils.isEndMatchWithCommentedCDATA(trimmedContent))
{
_outputWriter.write(content);
return;
}
- else if (trimmedContent.startsWith(CommentUtils.COMMENT_SIMPLE_START) && trimmedContent.endsWith(CommentUtils.COMMENT_SIMPLE_END))
+ else if (trimmedContent.startsWith(CommentUtils.COMMENT_SIMPLE_START) &&
+ trimmedContent.endsWith(CommentUtils.COMMENT_SIMPLE_END))
{
//Use comment wrap is valid, but for xhtml it is preferred to use CDATA
_outputWriter.write(CDATA_START);
@@ -486,12 +493,14 @@ public class HtmlResponseWriterImpl
return;
}
- else if (CommentUtils.isStartMatchWithCommentedCDATA(trimmedContent) && CommentUtils.isEndMatchWithCommentedCDATA(trimmedContent))
+ else if (CommentUtils.isStartMatchWithCommentedCDATA(trimmedContent) &&
+ CommentUtils.isEndMatchWithCommentedCDATA(trimmedContent))
{
_outputWriter.write(content);
return;
}
- else if (CommentUtils.isStartMatchWithInlineCommentedCDATA(trimmedContent) && CommentUtils.isEndMatchWithInlineCommentedCDATA(trimmedContent))
+ else if (CommentUtils.isStartMatchWithInlineCommentedCDATA(trimmedContent) &&
+ CommentUtils.isEndMatchWithInlineCommentedCDATA(trimmedContent))
{
_outputWriter.write(content);
return;
@@ -535,12 +544,14 @@ public class HtmlResponseWriterImpl
_outputWriter.write(content);
return;
}
- else if (CommentUtils.isStartMatchWithCommentedCDATA(trimmedContent) && CommentUtils.isEndMatchWithCommentedCDATA(trimmedContent))
+ else if (CommentUtils.isStartMatchWithCommentedCDATA(trimmedContent) &&
+ CommentUtils.isEndMatchWithCommentedCDATA(trimmedContent))
{
_outputWriter.write(content);
return;
}
- else if (CommentUtils.isStartMatchWithInlineCommentedCDATA(trimmedContent) && CommentUtils.isEndMatchWithInlineCommentedCDATA(trimmedContent))
+ else if (CommentUtils.isStartMatchWithInlineCommentedCDATA(trimmedContent) &&
+ CommentUtils.isEndMatchWithInlineCommentedCDATA(trimmedContent))
{
_outputWriter.write(content);
return;
@@ -605,7 +616,8 @@ public class HtmlResponseWriterImpl
}
if (!_startTagOpen)
{
- throw new IllegalStateException("Must be called before the start element is closed (attribute '" + name + "')");
+ throw new IllegalStateException("Must be called before the start element is closed (attribute '"
+ + name + "')");
}
if (value instanceof Boolean)
@@ -626,7 +638,8 @@ public class HtmlResponseWriterImpl
_currentWriter.write(' ');
_currentWriter.write(name);
_currentWriter.write("=\"");
- _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(strValue, false, false, !UTF8.equals(_characterEncoding)));
+ _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(
+ strValue, false, false, !UTF8.equals(_characterEncoding)));
_currentWriter.write('"');
}
}
@@ -639,7 +652,8 @@ public class HtmlResponseWriterImpl
}
if (!_startTagOpen)
{
- throw new IllegalStateException("Must be called before the start element is closed (attribute '" + name + "')");
+ throw new IllegalStateException("Must be called before the start element is closed (attribute '"
+ + name + "')");
}
String strValue = value.toString();
@@ -648,7 +662,8 @@ public class HtmlResponseWriterImpl
_currentWriter.write("=\"");
if (strValue.toLowerCase().startsWith("javascript:"))
{
- _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(strValue, false, false, !UTF8.equals(_characterEncoding)));
+ _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(
+ strValue, false, false, !UTF8.equals(_characterEncoding)));
}
else
{
@@ -680,7 +695,9 @@ public class HtmlResponseWriterImpl
}
*/
//_writer.write(strValue);
- _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encodeURIAtributte(strValue, _characterEncoding));
+ _currentWriter.write(
+ org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encodeURIAtributte(
+ strValue, _characterEncoding));
}
_currentWriter.write('"');
}
@@ -723,7 +740,8 @@ public class HtmlResponseWriterImpl
}
else
{
- _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(strValue, false, false, !UTF8.equals(_characterEncoding)));
+ _currentWriter.write(org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(
+ strValue, false, false, !UTF8.equals(_characterEncoding)));
}
}
@@ -756,12 +774,14 @@ public class HtmlResponseWriterImpl
else if (isTextarea())
{
// For textareas we must *not* map successive spaces to   or Newlines to <br/>
- org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(cbuf, off, len, false, false, !UTF8.equals(_characterEncoding), _currentWriter);
+ org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(
+ cbuf, off, len, false, false, !UTF8.equals(_characterEncoding), _currentWriter);
}
else
{
// We map successive spaces to and Newlines to <br/>
- org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(cbuf, off, len, true, true, !UTF8.equals(_characterEncoding), _currentWriter);
+ org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(
+ cbuf, off, len, true, true, !UTF8.equals(_characterEncoding), _currentWriter);
}
}
@@ -840,7 +860,8 @@ public class HtmlResponseWriterImpl
public ResponseWriter cloneWithWriter(Writer writer)
{
HtmlResponseWriterImpl newWriter
- = new HtmlResponseWriterImpl(writer, getContentType(), getCharacterEncoding(), _wrapScriptContentWithXmlCommentTag);
+ = new HtmlResponseWriterImpl(writer, getContentType(), getCharacterEncoding(),
+ _wrapScriptContentWithXmlCommentTag);
//newWriter._writeDummyForm = _writeDummyForm;
//newWriter._dummyFormParams = _dummyFormParams;
return newWriter;
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlSecretRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlSecretRendererBase.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlSecretRendererBase.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlSecretRendererBase.java Wed Nov 9 23:44:02 2011
@@ -102,7 +102,8 @@ public class HtmlSecretRendererBase
}
else
{
- isRedisplay = org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(uiComponent, JSFAttr.REDISPLAY_ATTR, false);
+ isRedisplay = org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(uiComponent,
+ JSFAttr.REDISPLAY_ATTR, false);
}
if (isRedisplay)
{
@@ -111,13 +112,15 @@ public class HtmlSecretRendererBase
}
Map<String, List<ClientBehavior>> behaviors = null;
- if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
+ if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(
+ facesContext.getExternalContext()))
{
behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, uiComponent, behaviors);
HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, uiComponent, behaviors);
- HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(facesContext, writer, uiComponent, behaviors);
+ HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
+ facesContext, writer, uiComponent, behaviors);
if (isCommonPropertiesOptimizationEnabled(facesContext))
{
CommonPropertyUtils.renderInputPassthroughPropertiesWithoutDisabledAndEvents(writer,
@@ -125,7 +128,8 @@ public class HtmlSecretRendererBase
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
+ HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+ HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
}
}
else
@@ -137,7 +141,8 @@ public class HtmlSecretRendererBase
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
+ HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+ HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
}
}
@@ -198,7 +203,8 @@ public class HtmlSecretRendererBase
}
}
- public Object getConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object submittedValue) throws ConverterException
+ public Object getConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object submittedValue)
+ throws ConverterException
{
RendererUtils.checkParamValidity(facesContext, uiComponent, UIOutput.class);
return RendererUtils.getConvertedUIOutputValue(facesContext,
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java Wed Nov 9 23:44:02 2011
@@ -68,7 +68,8 @@ public class HtmlTableRendererBase exten
* @param component dataTable
* @return number of layout columns
*/
- protected int getNewspaperColumns(UIComponent component) {
+ protected int getNewspaperColumns(UIComponent component)
+ {
return 1;
}
@@ -76,7 +77,8 @@ public class HtmlTableRendererBase exten
* @param component dataTable
* @return component to display between layout columns
*/
- protected UIComponent getNewspaperTableSpacer(UIComponent component) {
+ protected UIComponent getNewspaperTableSpacer(UIComponent component)
+ {
return null;
}
@@ -84,7 +86,8 @@ public class HtmlTableRendererBase exten
* @param component dataTable
* @return whether dataTable has component to display between layout columns
*/
- protected boolean hasNewspaperTableSpacer(UIComponent component) {
+ protected boolean hasNewspaperTableSpacer(UIComponent component)
+ {
return false;
}
@@ -92,7 +95,8 @@ public class HtmlTableRendererBase exten
* @param component dataTable
* @return whether dataTable has newspaper columns layed out horizontally
*/
- protected boolean isNewspaperHorizontalOrientation(UIComponent component) {
+ protected boolean isNewspaperHorizontalOrientation(UIComponent component)
+ {
return false;
}
@@ -138,7 +142,8 @@ public class HtmlTableRendererBase exten
writer.startElement(HTML.TABLE_ELEM, uiComponent);
Map<String, List<ClientBehavior>> behaviors = null;
- if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
+ if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(
+ facesContext.getExternalContext()))
{
behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
if (!behaviors.isEmpty())
@@ -158,7 +163,8 @@ public class HtmlTableRendererBase exten
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TABLE_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS);
+ HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+ HTML.TABLE_PASSTHROUGH_ATTRIBUTES_WITHOUT_EVENTS);
}
}
else
@@ -172,7 +178,8 @@ public class HtmlTableRendererBase exten
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TABLE_PASSTHROUGH_ATTRIBUTES);
+ HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+ HTML.TABLE_PASSTHROUGH_ATTRIBUTES);
}
}
}
@@ -232,13 +239,17 @@ public class HtmlTableRendererBase exten
/**
* Gets styles for the specified component.
*/
- protected static Styles getStyles(UIData uiData) {
+ protected static Styles getStyles(UIData uiData)
+ {
String rowClasses;
String columnClasses;
- if(uiData instanceof HtmlDataTable) {
+ if(uiData instanceof HtmlDataTable)
+ {
rowClasses = ((HtmlDataTable)uiData).getRowClasses();
columnClasses = ((HtmlDataTable)uiData).getColumnClasses();
- } else {
+ }
+ else
+ {
rowClasses = (String)uiData.getAttributes().get(JSFAttr.ROW_CLASSES_ATTR);
columnClasses = (String)uiData.getAttributes().get(JSFAttr.COLUMN_CLASSES_ATTR);
}
@@ -248,12 +259,14 @@ public class HtmlTableRendererBase exten
/**
* Class manages the styles from String lists.
*/
- protected static class Styles {
+ protected static class Styles
+ {
private String[] _columnStyle;
private String[] _rowStyle;
- Styles(String rowStyles, String columnStyles) {
+ Styles(String rowStyles, String columnStyles)
+ {
_rowStyle = (rowStyles == null)
? ArrayUtils.EMPTY_STRING_ARRAY
: StringUtils.trim(
@@ -264,15 +277,19 @@ public class HtmlTableRendererBase exten
StringUtils.splitShortString(columnStyles, ','));
}
- public String getRowStyle(int idx) {
- if(!hasRowStyle()) {
+ public String getRowStyle(int idx)
+ {
+ if(!hasRowStyle())
+ {
return null;
}
return _rowStyle[idx % _rowStyle.length];
}
- public String getColumnStyle(int idx) {
- if(!hasColumnStyle()) {
+ public String getColumnStyle(int idx)
+ {
+ if(!hasColumnStyle())
+ {
return null;
}
//return _columnStyle[idx % _columnStyle.length];
@@ -283,11 +300,13 @@ public class HtmlTableRendererBase exten
return null;
}
- public boolean hasRowStyle() {
+ public boolean hasRowStyle()
+ {
return _rowStyle.length > 0;
}
- public boolean hasColumnStyle() {
+ public boolean hasColumnStyle()
+ {
return _columnStyle.length > 0;
}
}
@@ -300,14 +319,16 @@ public class HtmlTableRendererBase exten
* This method is separated from the encodeChildren so that it can be overridden by
* subclasses. One class that uses this functionality is autoUpdateDataTable.
*/
- public void encodeInnerHtml(FacesContext facesContext, UIComponent component)throws IOException{
+ public void encodeInnerHtml(FacesContext facesContext, UIComponent component)throws IOException
+ {
UIData uiData = (UIData) component;
ResponseWriter writer = facesContext.getResponseWriter();
int rowCount = uiData.getRowCount();
- if (rowCount == 0) {
+ if (rowCount == 0)
+ {
//nothing to render, to get valid xhtml we render an empty dummy row
writer.startElement(HTML.TBODY_ELEM, uiData);
writer.writeAttribute(HTML.ID_ATTR, component.getClientId(facesContext) + ":tbody_element", null);
@@ -378,7 +399,8 @@ public class HtmlTableRendererBase exten
{
boolean rowStartRendered = false;
// walk through the newspaper columns
- for(int nc = 0; nc < newspaperColumns; nc++) {
+ for(int nc = 0; nc < newspaperColumns; nc++)
+ {
// the current row in the 'real' table
int currentRow;
@@ -399,12 +421,14 @@ public class HtmlTableRendererBase exten
// bail if any row does not exist
uiData.setRowIndex(currentRow);
- if(!uiData.isRowAvailable()) {
+ if(!uiData.isRowAvailable())
+ {
log.severe("Row is not available. Rowindex = " + currentRow);
break;
}
- if (nc == 0) {
+ if (nc == 0)
+ {
// first column in table, start new row
beforeRow(facesContext, uiData);
@@ -443,7 +467,8 @@ public class HtmlTableRendererBase exten
beforeColumn(facesContext, uiData, j);
}
- encodeColumnChild(facesContext, writer, uiData, child, styles, nc * uiData.getChildCount() + j);
+ encodeColumnChild(facesContext, writer, uiData, child,
+ styles, nc * uiData.getChildCount() + j);
if (columnRendering)
{
@@ -558,9 +583,11 @@ public class HtmlTableRendererBase exten
}
}
- protected void renderRowStyle(FacesContext facesContext, ResponseWriter writer, UIData uiData, Styles styles, int rowStyleIndex) throws IOException
+ protected void renderRowStyle(FacesContext facesContext, ResponseWriter writer,
+ UIData uiData, Styles styles, int rowStyleIndex) throws IOException
{
- if(styles.hasRowStyle()) {
+ if(styles.hasRowStyle())
+ {
String rowStyle = styles.getRowStyle(rowStyleIndex);
writer.writeAttribute(HTML.CLASS_ATTR, rowStyle, null);
}
@@ -662,7 +689,8 @@ public class HtmlTableRendererBase exten
* @param header true if the header of the column child is rendered
* @param columnIndex the index of the currenly rendered column
*/
- protected void beforeColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) throws IOException
+ protected void beforeColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header,
+ int columnIndex) throws IOException
{
}
/**
@@ -673,7 +701,8 @@ public class HtmlTableRendererBase exten
* @param header true if the header of the column child is rendered
* @param columnIndex the index of the currenly rendered column
*/
- protected void afterColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) throws IOException
+ protected void afterColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header,
+ int columnIndex) throws IOException
{
}
@@ -870,7 +899,8 @@ public class HtmlTableRendererBase exten
protected void renderTableHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component,
UIComponent headerFacet, String headerStyleClass, int colspan) throws IOException
{
- renderTableHeaderOrFooterRow(facesContext, writer, component, headerFacet, headerStyleClass, determineHeaderCellTag(facesContext, component),
+ renderTableHeaderOrFooterRow(facesContext, writer, component, headerFacet, headerStyleClass,
+ determineHeaderCellTag(facesContext, component),
colspan, true);
}
@@ -923,8 +953,10 @@ public class HtmlTableRendererBase exten
renderColumnHeaderOrFooterRow(facesContext, writer, component, footerStyleClass, false);
}
- protected void renderTableHeaderOrFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component,
- UIComponent facet, String styleClass, String colElementName, int colspan, boolean isHeader) throws IOException
+ protected void renderTableHeaderOrFooterRow(FacesContext facesContext, ResponseWriter writer,
+ UIComponent component,
+ UIComponent facet, String styleClass, String colElementName, int colspan, boolean isHeader)
+ throws IOException
{
HtmlRendererUtils.writePrettyLineSeparator(facesContext);
writer.startElement(HTML.TR_ELEM, component);
@@ -1007,7 +1039,9 @@ public class HtmlTableRendererBase exten
/**
* Renders a spacer between adjacent newspaper columns.
*/
- protected void renderSpacerCell(FacesContext facesContext, ResponseWriter writer, UIComponent component) throws IOException {
+ protected void renderSpacerCell(FacesContext facesContext, ResponseWriter writer, UIComponent component)
+ throws IOException
+ {
UIComponent spacer = getNewspaperTableSpacer(component);
if(spacer == null)
{
@@ -1026,7 +1060,8 @@ public class HtmlTableRendererBase exten
if (uiComponent instanceof UIColumn)
{
// allow column to override style class, new in JSF 1.2
- if (uiComponent instanceof HtmlColumn) {
+ if (uiComponent instanceof HtmlColumn)
+ {
HtmlColumn column = (HtmlColumn)uiComponent;
if (isHeader && column.getHeaderClass()!=null)
{
@@ -1036,20 +1071,27 @@ public class HtmlTableRendererBase exten
{
styleClass = column.getFooterClass();
}
- }else{
+ }
+ else
+ {
//This code corrects MYFACES-1790, because HtmlColumnTag
//has as component type javax.faces.Column, so as side
//effect it not create HtmlColumn, it create UIColumn
//classes.
UIColumn column = (UIColumn) uiComponent;
- if (isHeader){
+ if (isHeader)
+ {
String headerClass = (String) column.getAttributes().get("headerClass");
- if (headerClass != null){
+ if (headerClass != null)
+ {
styleClass = (String) headerClass;
}
- }else{
+ }
+ else
+ {
String footerClass = (String) column.getAttributes().get("footerClass");
- if (footerClass != null){
+ if (footerClass != null)
+ {
styleClass = (String) footerClass;
}
}
@@ -1187,7 +1229,8 @@ public class HtmlTableRendererBase exten
}
else
{
- return (String) component.getAttributes().get(org.apache.myfaces.shared.renderkit.JSFAttr.HEADER_CLASS_ATTR);
+ return (String) component.getAttributes().get(
+ org.apache.myfaces.shared.renderkit.JSFAttr.HEADER_CLASS_ATTR);
}
}
@@ -1204,7 +1247,8 @@ public class HtmlTableRendererBase exten
}
else
{
- return (String) component.getAttributes().get(org.apache.myfaces.shared.renderkit.JSFAttr.FOOTER_CLASS_ATTR);
+ return (String) component.getAttributes().get(
+ org.apache.myfaces.shared.renderkit.JSFAttr.FOOTER_CLASS_ATTR);
}
}
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java Wed Nov 9 23:44:02 2011
@@ -101,7 +101,8 @@ public class HtmlTextRendererBase
}
else
{
- escape = RendererUtils.getBooleanAttribute(component, org.apache.myfaces.shared.renderkit.JSFAttr.ESCAPE_ATTR,
+ escape = RendererUtils.getBooleanAttribute(component,
+ org.apache.myfaces.shared.renderkit.JSFAttr.ESCAPE_ATTR,
true); //default is to escape
}
if (text != null)
@@ -212,13 +213,15 @@ public class HtmlTextRendererBase
}
Map<String, List<ClientBehavior>> behaviors = null;
- if (component instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
+ if (component instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(
+ facesContext.getExternalContext()))
{
behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, component, behaviors);
HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, component, behaviors);
- HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(facesContext, writer, component, behaviors);
+ HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
+ facesContext, writer, component, behaviors);
if (isCommonPropertiesOptimizationEnabled(facesContext))
{
CommonPropertyUtils.renderInputPassthroughPropertiesWithoutDisabledAndEvents(writer,
@@ -226,7 +229,8 @@ public class HtmlTextRendererBase
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, component, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
+ HtmlRendererUtils.renderHTMLAttributes(writer, component,
+ HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
}
}
else
@@ -238,7 +242,8 @@ public class HtmlTextRendererBase
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, component, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
+ HtmlRendererUtils.renderHTMLAttributes(writer, component,
+ HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
}
}
@@ -268,7 +273,8 @@ public class HtmlTextRendererBase
return ((HtmlInputText)component).isDisabled();
}
- return org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(component, HTML.DISABLED_ATTR, false);
+ return org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(component,
+ HTML.DISABLED_ATTR, false);
}
@@ -314,7 +320,8 @@ public class HtmlTextRendererBase
}
- public Object getConvertedValue(FacesContext facesContext, UIComponent component, Object submittedValue) throws ConverterException
+ public Object getConvertedValue(FacesContext facesContext, UIComponent component, Object submittedValue)
+ throws ConverterException
{
org.apache.myfaces.shared.renderkit.RendererUtils.checkParamValidity(facesContext, component, UIOutput.class);
return RendererUtils.getConvertedUIOutputValue(facesContext,
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextareaRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextareaRendererBase.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextareaRendererBase.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextareaRendererBase.java Wed Nov 9 23:44:02 2011
@@ -18,14 +18,10 @@
*/
package org.apache.myfaces.shared.renderkit.html;
-import org.apache.myfaces.shared.renderkit.RendererUtils;
-import org.apache.myfaces.shared.renderkit.html.HTML;
-import org.apache.myfaces.shared.renderkit.html.HtmlRenderer;
-import org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils;
-import org.apache.myfaces.shared.renderkit.html.util.JavascriptUtils;
-import org.apache.myfaces.shared.renderkit.html.util.ResourceUtils;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
-import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
@@ -35,9 +31,10 @@ import javax.faces.component.html.HtmlIn
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.convert.ConverterException;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
+
+import org.apache.myfaces.shared.renderkit.RendererUtils;
+import org.apache.myfaces.shared.renderkit.html.util.JavascriptUtils;
+import org.apache.myfaces.shared.renderkit.html.util.ResourceUtils;
/**
@@ -59,7 +56,8 @@ public class HtmlTextareaRendererBase
behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
if (!behaviors.isEmpty())
{
- ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
+ ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext,
+ facesContext.getResponseWriter());
}
}
@@ -67,7 +65,9 @@ public class HtmlTextareaRendererBase
}
- protected void encodeTextArea(FacesContext facesContext, UIComponent uiComponent) throws IOException {
+ protected void encodeTextArea(FacesContext facesContext, UIComponent uiComponent)
+ throws IOException
+ {
//allow subclasses to render custom attributes by separating rendering begin and end
renderTextAreaBegin(facesContext, uiComponent);
renderTextAreaValue(facesContext, uiComponent);
@@ -83,7 +83,8 @@ public class HtmlTextareaRendererBase
writer.startElement(HTML.TEXTAREA_ELEM, uiComponent);
Map<String, List<ClientBehavior>> behaviors = null;
- if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
+ if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(
+ facesContext.getExternalContext()))
{
behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
if (!behaviors.isEmpty())
@@ -97,7 +98,8 @@ public class HtmlTextareaRendererBase
}
HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, uiComponent, behaviors);
HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, uiComponent, behaviors);
- HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(facesContext, writer, uiComponent, behaviors);
+ HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
+ facesContext, writer, uiComponent, behaviors);
if (isCommonPropertiesOptimizationEnabled(facesContext))
{
CommonPropertyUtils.renderCommonFieldPassthroughPropertiesWithoutDisabledAndEvents(writer,
@@ -106,7 +108,8 @@ public class HtmlTextareaRendererBase
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
+ HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+ HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
}
}
else
@@ -121,7 +124,8 @@ public class HtmlTextareaRendererBase
}
else
{
- HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
+ HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+ HTML.TEXTAREA_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
}
}
@@ -153,7 +157,8 @@ public class HtmlTextareaRendererBase
return ((HtmlInputTextarea)uiComponent).isDisabled();
}
- return org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(uiComponent, HTML.DISABLED_ATTR, false);
+ return org.apache.myfaces.shared.renderkit.RendererUtils.getBooleanAttribute(
+ uiComponent, HTML.DISABLED_ATTR, false);
}
@@ -168,7 +173,8 @@ public class HtmlTextareaRendererBase
}
}
- public Object getConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object submittedValue) throws ConverterException
+ public Object getConvertedValue(FacesContext facesContext, UIComponent uiComponent, Object submittedValue)
+ throws ConverterException
{
RendererUtils.checkParamValidity(facesContext, uiComponent, UIOutput.class);
return org.apache.myfaces.shared.renderkit.RendererUtils.getConvertedUIOutputValue(facesContext,
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java Wed Nov 9 23:44:02 2011
@@ -100,9 +100,14 @@ public abstract class HTMLEncoder
app = "<br/>";
}
break;
+ default:
+ break;
}
- } else if (encodeNonLatin && (int)c > 0x80) {
- switch(c) {
+ }
+ else if (encodeNonLatin && (int)c > 0x80)
+ {
+ switch(c)
+ {
//german umlauts
case '\u00E4' : app = "ä"; break;
case '\u00C4' : app = "Ä"; break;
@@ -132,7 +137,9 @@ public abstract class HTMLEncoder
sb = new StringBuilder(string.substring(0, i));
}
sb.append(app);
- } else {
+ }
+ else
+ {
if (sb != null)
{
sb.append(c);
@@ -161,7 +168,8 @@ public abstract class HTMLEncoder
/**
* Variant of {@link #encode} where encodeNbsp is true.
*/
- public static void encode (char[] string, int offset, int length, boolean encodeNewline, Writer writer) throws IOException
+ public static void encode (char[] string, int offset, int length, boolean encodeNewline, Writer writer)
+ throws IOException
{
encode(string, offset, length, encodeNewline, true, writer);
}
@@ -169,7 +177,8 @@ public abstract class HTMLEncoder
/**
* Variant of {@link #encode} where encodeNbsp and encodeNonLatin are true
*/
- public static void encode (char[] string, int offset, int length, boolean encodeNewline, boolean encodeSubsequentBlanksToNbsp, Writer writer) throws IOException
+ public static void encode (char[] string, int offset, int length, boolean encodeNewline,
+ boolean encodeSubsequentBlanksToNbsp, Writer writer) throws IOException
{
encode(string, offset, length, encodeNewline, encodeSubsequentBlanksToNbsp, true, writer);
}
@@ -226,9 +235,14 @@ public abstract class HTMLEncoder
app = "<br/>";
}
break;
+ default:
+ break;
}
- } else if (encodeNonLatin && (int)c > 0x80) {
- switch(c) {
+ }
+ else if (encodeNonLatin && (int)c > 0x80)
+ {
+ switch(c)
+ {
//german umlauts
case '\u00E4' : app = "ä"; break;
case '\u00C4' : app = "Ä"; break;
@@ -259,7 +273,9 @@ public abstract class HTMLEncoder
sb.append(string, offset, i - offset);
}
sb.append(app);
- } else {
+ }
+ else
+ {
if (sb != null)
{
sb.append(c);
@@ -480,7 +496,9 @@ public abstract class HTMLEncoder
sb = new StringBuilder(string.substring(0, i));
}
sb.append(app);
- } else {
+ }
+ else
+ {
if (sb != null)
{
sb.append(c);
@@ -572,13 +590,14 @@ public abstract class HTMLEncoder
c = string.charAt(i);
// - From %00 to %20 (' ' %20 could encode as +, but %20 also works, so we keep %20)
- // - <"> %22 (If there is encode of "%", there is a risk of duplicate encoding, so we make easier and omit this one)
+ // - <"> %22 (If there is encode of "%", there is a risk of duplicate encoding, so
+ // we make easier and omit this one)
// - "<" %3C, ">" %3E,
// - "\" %5C, "^" %5E, "`" %60
// - "{" %7B, "|" %7C, "}" %7D
// - From %7F ad infinitum (each character as many bytes as necessary but take into account
- // that a single char should contain 2,3 or more bytes!. This data should be encoded translating from the document
- // character encoding to percent encoding)
+ // that a single char should contain 2,3 or more bytes!. This data should be encoded
+ // translating from the document character encoding to percent encoding)
//
// "&" should be encoded as "&" because this link is inside an html page, and
// put & is invalid in this context
@@ -646,7 +665,9 @@ public abstract class HTMLEncoder
sb = new StringBuilder(string.substring(0, i));
}
sb.append(app);
- } else {
+ }
+ else
+ {
if (sb != null)
{
sb.append(c);
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java Wed Nov 9 23:44:02 2011
@@ -214,6 +214,7 @@ public final class JavascriptUtils
case '\'' : app = "\\'"; break;
case '\n' : app = "\\n"; break;
case '\r' : app = "\\r"; break;
+ default:
}
if (app != null)
{
@@ -222,7 +223,9 @@ public final class JavascriptUtils
sb = new StringBuffer(string.substring(0, i));
}
sb.append(app);
- } else {
+ }
+ else
+ {
if (sb != null)
{
sb.append(c);
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/ResourceUtils.java Wed Nov 9 23:44:02 2011
@@ -19,7 +19,6 @@
package org.apache.myfaces.shared.renderkit.html.util;
import java.io.IOException;
-import java.lang.String;
import java.util.HashMap;
import java.util.Map;
@@ -28,7 +27,6 @@ import javax.faces.component.UIComponent
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
import org.apache.myfaces.shared.config.MyfacesConfig;
import org.apache.myfaces.shared.renderkit.JSFAttr;
import org.apache.myfaces.shared.renderkit.html.HTML;
@@ -38,7 +36,8 @@ import org.apache.myfaces.shared.renderk
* @version $Revision$ $Date$
* @since 4.0.1
*/
-public class ResourceUtils {
+public class ResourceUtils
+{
public final static String JAVAX_FACES_LIBRARY_NAME = "javax.faces";
public final static String JSF_JS_RESOURCE_NAME = "jsf.js";
@@ -59,7 +58,8 @@ public class ResourceUtils {
public final static String JSF_MYFACES_JSFJS_EXPERIMENTAL = "jsf-experimental.js";
public final static String JSF_MYFACES_JSFJS_LEGACY = "jsf-legacy.js";
- private final static String RENDERED_STYLESHEET_RESOURCES_SET = "org.apache.myfaces.RENDERED_STYLESHEET_RESOURCES_SET";
+ private final static String RENDERED_STYLESHEET_RESOURCES_SET =
+ "org.apache.myfaces.RENDERED_STYLESHEET_RESOURCES_SET";
private final static String RENDERED_SCRIPT_RESOURCES_SET = "org.apache.myfaces.RENDERED_SCRIPT_RESOURCES_SET";
private final static String RENDERED_JSF_JS = "org.apache.myfaces.RENDERED_JSF_JS";
public final static String HEAD_TARGET = "head";
@@ -81,7 +81,8 @@ public class ResourceUtils {
@SuppressWarnings("unchecked")
private static Map<String, Boolean> getRenderedStylesheetResources(FacesContext facesContext)
{
- Map<String, Boolean> map = (Map<String, Boolean>) facesContext.getAttributes().get(RENDERED_STYLESHEET_RESOURCES_SET);
+ Map<String, Boolean> map = (Map<String, Boolean>) facesContext.getAttributes().get(
+ RENDERED_STYLESHEET_RESOURCES_SET);
if (map == null)
{
map = new HashMap<String, Boolean>();
@@ -100,7 +101,8 @@ public class ResourceUtils {
@SuppressWarnings("unchecked")
private static Map<String, Boolean> getRenderedScriptResources(FacesContext facesContext)
{
- Map<String, Boolean> map = (Map<String, Boolean>) facesContext.getAttributes().get(RENDERED_SCRIPT_RESOURCES_SET);
+ Map<String, Boolean> map = (Map<String, Boolean>) facesContext.getAttributes().get(
+ RENDERED_SCRIPT_RESOURCES_SET);
if (map == null)
{
map = new HashMap<String, Boolean>();
@@ -111,32 +113,38 @@ public class ResourceUtils {
public static void markScriptAsRendered(FacesContext facesContext, String libraryName, String resourceName)
{
- getRenderedScriptResources(facesContext).put(libraryName != null ? libraryName+'/'+resourceName : resourceName, Boolean.TRUE);
+ getRenderedScriptResources(facesContext).put(
+ libraryName != null ? libraryName+'/'+resourceName : resourceName, Boolean.TRUE);
if (JAVAX_FACES_LIBRARY_NAME.equals(libraryName) &&
JSF_JS_RESOURCE_NAME.equals(resourceName))
{
// If we are calling this method, it is expected myfaces core is being used as runtime and note
// oamSubmit script is included inside jsf.js, so mark this one too.
- getRenderedScriptResources(facesContext).put(MYFACES_LIBRARY_NAME+'/'+MYFACES_JS_RESOURCE_NAME, Boolean.TRUE);
+ getRenderedScriptResources(facesContext).put(
+ MYFACES_LIBRARY_NAME+'/'+MYFACES_JS_RESOURCE_NAME, Boolean.TRUE);
}
}
public static void markStylesheetAsRendered(FacesContext facesContext, String libraryName, String resourceName)
{
- getRenderedStylesheetResources(facesContext).put(libraryName != null ? libraryName+'/'+resourceName : resourceName, Boolean.TRUE);
+ getRenderedStylesheetResources(facesContext).put(
+ libraryName != null ? libraryName+'/'+resourceName : resourceName, Boolean.TRUE);
}
public static boolean isRenderedScript(FacesContext facesContext, String libraryName, String resourceName)
{
- return getRenderedScriptResources(facesContext).containsKey(libraryName != null ? libraryName+'/'+resourceName : resourceName);
+ return getRenderedScriptResources(facesContext).containsKey(
+ libraryName != null ? libraryName+'/'+resourceName : resourceName);
}
public static boolean isRenderedStylesheet(FacesContext facesContext, String libraryName, String resourceName)
{
- return getRenderedStylesheetResources(facesContext).containsKey(libraryName != null ? libraryName+'/'+resourceName : resourceName);
+ return getRenderedStylesheetResources(facesContext).containsKey(
+ libraryName != null ? libraryName+'/'+resourceName : resourceName);
}
- public static void writeScriptInline(FacesContext facesContext, ResponseWriter writer, String libraryName, String resourceName) throws IOException
+ public static void writeScriptInline(FacesContext facesContext, ResponseWriter writer, String libraryName,
+ String resourceName) throws IOException
{
if (!ResourceUtils.isRenderedScript(facesContext, libraryName, resourceName))
{
@@ -152,7 +160,8 @@ public class ResourceUtils {
else
{
//Fast shortcut, don't create component instance and do what HtmlScriptRenderer do.
- Resource resource = facesContext.getApplication().getResourceHandler().createResource(resourceName, libraryName);
+ Resource resource = facesContext.getApplication().getResourceHandler().createResource(
+ resourceName, libraryName);
markScriptAsRendered(facesContext, libraryName, resourceName);
writer.startElement(HTML.SCRIPT_ELEM, null);
writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT , null);
@@ -162,7 +171,8 @@ public class ResourceUtils {
}
}
- public static void renderDefaultJsfJsInlineIfNecessary(FacesContext facesContext, ResponseWriter writer) throws IOException
+ public static void renderDefaultJsfJsInlineIfNecessary(FacesContext facesContext, ResponseWriter writer)
+ throws IOException
{
if (facesContext.getAttributes().containsKey(RENDERED_JSF_JS))
{
@@ -210,7 +220,8 @@ public class ResourceUtils {
else
{
//Fast shortcut, don't create component instance and do what HtmlScriptRenderer do.
- Resource resource = facesContext.getApplication().getResourceHandler().createResource(JSF_JS_RESOURCE_NAME, JAVAX_FACES_LIBRARY_NAME);
+ Resource resource = facesContext.getApplication().getResourceHandler().createResource(
+ JSF_JS_RESOURCE_NAME, JAVAX_FACES_LIBRARY_NAME);
markScriptAsRendered(facesContext, JAVAX_FACES_LIBRARY_NAME, JSF_JS_RESOURCE_NAME);
writer.startElement(HTML.SCRIPT_ELEM, null);
writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
@@ -223,8 +234,11 @@ public class ResourceUtils {
return;
}
- public static void renderMyfacesJSInlineIfNecessary(FacesContext facesContext, ResponseWriter writer) throws IOException {
- if (facesContext.getAttributes().containsKey(RENDERED_MYFACES_JS)) {
+ public static void renderMyfacesJSInlineIfNecessary(FacesContext facesContext, ResponseWriter writer)
+ throws IOException
+ {
+ if (facesContext.getAttributes().containsKey(RENDERED_MYFACES_JS))
+ {
return;
}
@@ -238,7 +252,8 @@ public class ResourceUtils {
}
// Check first if we have lucky, we are using myfaces and the script has
// been previously rendered
- if (isRenderedScript(facesContext, MYFACES_LIBRARY_NAME, MYFACES_JS_RESOURCE_NAME)) {
+ if (isRenderedScript(facesContext, MYFACES_LIBRARY_NAME, MYFACES_JS_RESOURCE_NAME))
+ {
facesContext.getAttributes().put(RENDERED_MYFACES_JS, Boolean.TRUE);
return;
}
@@ -268,7 +283,8 @@ public class ResourceUtils {
else
{
//Fast shortcut, don't create component instance and do what HtmlScriptRenderer do.
- Resource resource = facesContext.getApplication().getResourceHandler().createResource(MYFACES_JS_RESOURCE_NAME, MYFACES_LIBRARY_NAME);
+ Resource resource = facesContext.getApplication().getResourceHandler().createResource(
+ MYFACES_JS_RESOURCE_NAME, MYFACES_LIBRARY_NAME);
markScriptAsRendered(facesContext, MYFACES_LIBRARY_NAME, MYFACES_JS_RESOURCE_NAME);
writer.startElement(HTML.SCRIPT_ELEM, null);
writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java Wed Nov 9 23:44:02 2011
@@ -42,7 +42,8 @@ public abstract class UnicodeEncoder
c = string.charAt(i);
if (((int)c) >= 0x80)
{
- if( sb == null ){
+ if( sb == null )
+ {
sb = new StringBuilder( string.length()+4 );
sb.append( string.substring(0,i) );
}
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java Wed Nov 9 23:44:02 2011
@@ -38,7 +38,8 @@ public class BaseResourceHandlerSupport
{
/**
- * Set the max time in miliseconds set on the "Expires" header for a resource rendered by the default ResourceHandler.
+ * Set the max time in miliseconds set on the "Expires" header for a resource rendered by
+ * the default ResourceHandler.
* (default to one week in miliseconds or 604800000)
*/
@JSFWebConfigParam(since="2.0", defaultValue="604800000", group="resources", tags="performance")
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ClassLoaderResourceLoader.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ClassLoaderResourceLoader.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ClassLoaderResourceLoader.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ClassLoaderResourceLoader.java Wed Nov 9 23:44:02 2011
@@ -21,10 +21,6 @@ package org.apache.myfaces.shared.resour
import java.io.InputStream;
import java.net.URL;
-import javax.faces.application.ProjectStage;
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.shared.renderkit.html.util.ResourceUtils;
import org.apache.myfaces.shared.util.ClassUtils;
/**
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ExternalContextResourceLoader.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ExternalContextResourceLoader.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ExternalContextResourceLoader.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ExternalContextResourceLoader.java Wed Nov 9 23:44:02 2011
@@ -39,14 +39,14 @@ public class ExternalContextResourceLoad
*
* Used on getLibraryVersion to filter resource directories
**/
- protected static Pattern VERSION_CHECKER = Pattern.compile("/\\p{Digit}+(_\\p{Digit}*)*/");
+ protected static final Pattern VERSION_CHECKER = Pattern.compile("/\\p{Digit}+(_\\p{Digit}*)*/");
/**
* It checks version like this: /1.js, /1_0.js, /1_0_0.js, /100_100.js
*
* Used on getResourceVersion to filter resources
**/
- protected static Pattern RESOURCE_VERSION_CHECKER = Pattern.compile("/\\p{Digit}+(_\\p{Digit}*)*\\..*");
+ protected static final Pattern RESOURCE_VERSION_CHECKER = Pattern.compile("/\\p{Digit}+(_\\p{Digit}*)*\\..*");
public ExternalContextResourceLoader(String prefix)
{
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java Wed Nov 9 23:44:02 2011
@@ -43,16 +43,21 @@ public class ResourceHandlerCache
*
* <p>See org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED for details.</p>
*/
- @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="resources", classType="java.lang.Integer", tags="performance")
- private static final String RESOURCE_HANDLER_CACHE_SIZE_ATTRIBUTE = "org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE";
+ @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="resources",
+ classType="java.lang.Integer", tags="performance")
+ private static final String RESOURCE_HANDLER_CACHE_SIZE_ATTRIBUTE =
+ "org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE";
private static final int RESOURCE_HANDLER_CACHE_DEFAULT_SIZE = 500;
/**
- * Enable or disable the cache used to "remember" if a resource handled by the default ResourceHandler exists or not.
+ * Enable or disable the cache used to "remember" if a resource handled by
+ * the default ResourceHandler exists or not.
*
*/
- @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", group="resources", expectedValues="true,false", tags="performance")
- private static final String RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE = "org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED";
+ @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", group="resources",
+ expectedValues="true,false", tags="performance")
+ private static final String RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE =
+ "org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED";
private static final boolean RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT = true;
public ResourceValue getResource(String resourceName, String libraryName,
@@ -123,7 +128,8 @@ public class ResourceHandlerCache
//first, check to make sure that ProjectStage is production, if not, skip caching
if (!facesContext.isProjectStage(ProjectStage.Production))
{
- return _resourceCacheEnabled = Boolean.FALSE;
+ _resourceCacheEnabled = Boolean.FALSE;
+ return _resourceCacheEnabled;
}
ExternalContext externalContext = facesContext.getExternalContext();
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceImpl.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceImpl.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceImpl.java Wed Nov 9 23:44:02 2011
@@ -175,13 +175,15 @@ public class ResourceImpl extends Resour
}
catch(ELException e)
{
- ExceptionQueuedEventContext equecontext = new ExceptionQueuedEventContext (context, e, null);
+ ExceptionQueuedEventContext equecontext = new ExceptionQueuedEventContext (
+ context, e, null);
context.getApplication().publishEvent (context, ExceptionQueuedEvent.class, equecontext);
Logger log = Logger.getLogger(ResourceImpl.class.getName());
if (log.isLoggable(Level.SEVERE))
{
- log.severe("Cannot evaluate EL expression " + convertToExpression(expressionList) + " in resource " + getLibraryName() + ":" + getResourceName());
+ log.severe("Cannot evaluate EL expression " + convertToExpression(expressionList)
+ + " in resource " + getLibraryName() + ":" + getResourceName());
}
delegate.unread(c3);
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceLoaderUtils.java Wed Nov 9 23:44:02 2011
@@ -40,14 +40,14 @@ public class ResourceLoaderUtils
"EEE, dd MMM yyyy HH:mm:ss zzz", "EEEEEE, dd-MMM-yy HH:mm:ss zzz",
"EEE MMMM d HH:mm:ss yyyy" };
- private static TimeZone __GMT = TimeZone.getTimeZone("GMT");
+ private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
public static String formatDateHeader(long value)
{
SimpleDateFormat format = new SimpleDateFormat(
HTTP_RESPONSE_DATE_HEADER,
Locale.US);
- format.setTimeZone(__GMT);
+ format.setTimeZone(GMT);
return format.format(new Date(value));
}
@@ -60,12 +60,11 @@ public class ResourceLoaderUtils
{
SimpleDateFormat format = new SimpleDateFormat(
HTTP_REQUEST_DATE_HEADER[i], Locale.US);
- format.setTimeZone(__GMT);
+ format.setTimeZone(GMT);
date = format.parse(value);
}
catch (ParseException e)
{
- ;
}
}
if (date == null)
Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagBase.java?rev=1200044&r1=1200043&r2=1200044&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagBase.java (original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagBase.java Wed Nov 9 23:44:02 2011
@@ -30,8 +30,7 @@ import javax.faces.webapp.UIComponentELT
* @author Bruno Aranda (JSR-252)
* @version $Revision$ $Date$
*/
-public abstract class UIComponentELTagBase
- extends UIComponentELTag
+public abstract class UIComponentELTagBase extends UIComponentELTag
{
//private static final Log log = LogFactory.getLog(UIComponentTagBase.class);
@@ -48,16 +47,18 @@ public abstract class UIComponentELTagBa
//Special UIComponent attributes (ValueHolder, ConvertibleValueHolder)
private ValueExpression _value;
private ValueExpression _converter;
+
//attributes id, rendered and binding are handled by UIComponentTag
- public void release() {
+ public void release()
+ {
super.release();
_forceId = null;
_forceIdIndex = null;
- _value=null;
- _converter=null;
+ _value = null;
+ _converter = null;
_javascriptLocation = null;
_imageLocation = null;
@@ -68,11 +69,26 @@ public abstract class UIComponentELTagBa
{
super.setProperties(component);
- setBooleanProperty(component, org.apache.myfaces.shared.renderkit.JSFAttr.FORCE_ID_ATTR, _forceId);
- setBooleanProperty(component, org.apache.myfaces.shared.renderkit.JSFAttr.FORCE_ID_INDEX_ATTR, _forceIdIndex, DEFAULT_FORCE_ID_INDEX_VALUE);
- if (_javascriptLocation != null) setStringProperty(component, JSFAttr.JAVASCRIPT_LOCATION, _javascriptLocation);
- if (_imageLocation != null) setStringProperty(component, JSFAttr.IMAGE_LOCATION, _imageLocation);
- if (_styleLocation != null) setStringProperty(component, JSFAttr.STYLE_LOCATION, _styleLocation);
+ setBooleanProperty(component,
+ org.apache.myfaces.shared.renderkit.JSFAttr.FORCE_ID_ATTR,
+ _forceId);
+ setBooleanProperty(
+ component,
+ org.apache.myfaces.shared.renderkit.JSFAttr.FORCE_ID_INDEX_ATTR,
+ _forceIdIndex, DEFAULT_FORCE_ID_INDEX_VALUE);
+ if (_javascriptLocation != null)
+ {
+ setStringProperty(component, JSFAttr.JAVASCRIPT_LOCATION,
+ _javascriptLocation);
+ }
+ if (_imageLocation != null)
+ {
+ setStringProperty(component, JSFAttr.IMAGE_LOCATION, _imageLocation);
+ }
+ if (_styleLocation != null)
+ {
+ setStringProperty(component, JSFAttr.STYLE_LOCATION, _styleLocation);
+ }
//rendererType already handled by UIComponentTag
@@ -113,7 +129,6 @@ public abstract class UIComponentELTagBa
_converter = converter;
}
-
/**
* Sets the javascript location attribute of the tag. NOTE: Not every tag that extends this class will
* actually make use of this attribute. Check the TLD to see which components actually implement it.
@@ -149,111 +164,141 @@ public abstract class UIComponentELTagBa
// sub class helpers
- protected void setIntegerProperty(UIComponent component, String propName, ValueExpression value)
+ protected void setIntegerProperty(UIComponent component, String propName,
+ ValueExpression value)
{
UIComponentELTagUtils.setIntegerProperty(component, propName, value);
}
- protected void setIntegerProperty(UIComponent component, String propName, ValueExpression value, Integer defaultValue)
+ protected void setIntegerProperty(UIComponent component, String propName,
+ ValueExpression value, Integer defaultValue)
{
- UIComponentELTagUtils.setIntegerProperty(component, propName, value, defaultValue);
+ UIComponentELTagUtils.setIntegerProperty(component, propName, value,
+ defaultValue);
}
- protected void setLongProperty(UIComponent component, String propName, ValueExpression value)
+ protected void setLongProperty(UIComponent component, String propName,
+ ValueExpression value)
{
UIComponentELTagUtils.setLongProperty(component, propName, value);
}
- protected void setLongProperty(UIComponent component, String propName, ValueExpression value, Long defaultValue)
+ protected void setLongProperty(UIComponent component, String propName,
+ ValueExpression value, Long defaultValue)
{
- UIComponentELTagUtils.setLongProperty(component, propName, value, defaultValue);
+ UIComponentELTagUtils.setLongProperty(component, propName, value,
+ defaultValue);
}
@Deprecated
- protected void setStringProperty(UIComponent component, String propName, String value)
+ protected void setStringProperty(UIComponent component, String propName,
+ String value)
{
- UIComponentTagUtils.setStringProperty(getFacesContext(), component, propName, value);
+ UIComponentTagUtils.setStringProperty(getFacesContext(), component,
+ propName, value);
}
- protected void setStringProperty(UIComponent component, String propName, ValueExpression value)
+ protected void setStringProperty(UIComponent component, String propName,
+ ValueExpression value)
{
UIComponentELTagUtils.setStringProperty(component, propName, value);
}
- protected void setStringProperty(UIComponent component, String propName, ValueExpression value, String defaultValue)
+ protected void setStringProperty(UIComponent component, String propName,
+ ValueExpression value, String defaultValue)
{
- UIComponentELTagUtils.setStringProperty(component, propName, value, defaultValue);
+ UIComponentELTagUtils.setStringProperty(component, propName, value,
+ defaultValue);
}
@Deprecated
- protected void setBooleanProperty(UIComponent component, String propName, String value)
+ protected void setBooleanProperty(UIComponent component, String propName,
+ String value)
{
- UIComponentTagUtils.setBooleanProperty(getFacesContext(), component, propName, value);
+ UIComponentTagUtils.setBooleanProperty(getFacesContext(), component,
+ propName, value);
}
- protected void setBooleanProperty(UIComponent component, String propName, ValueExpression value)
+ protected void setBooleanProperty(UIComponent component, String propName,
+ ValueExpression value)
{
UIComponentELTagUtils.setBooleanProperty(component, propName, value);
}
- protected void setBooleanProperty(UIComponent component, String propName, ValueExpression value, Boolean defaultValue)
+ protected void setBooleanProperty(UIComponent component, String propName,
+ ValueExpression value, Boolean defaultValue)
{
- UIComponentELTagUtils.setBooleanProperty(component, propName, value, defaultValue);
+ UIComponentELTagUtils.setBooleanProperty(component, propName, value,
+ defaultValue);
}
private void setValueProperty(UIComponent component, ValueExpression value)
{
- UIComponentELTagUtils.setValueProperty(getFacesContext(), component, value);
+ UIComponentELTagUtils.setValueProperty(getFacesContext(), component,
+ value);
}
- private void setConverterProperty(UIComponent component, ValueExpression value)
+ private void setConverterProperty(UIComponent component,
+ ValueExpression value)
{
- UIComponentELTagUtils.setConverterProperty(getFacesContext(), component, value);
+ UIComponentELTagUtils.setConverterProperty(getFacesContext(),
+ component, value);
}
- protected void addValidatorProperty(UIComponent component, MethodExpression value)
+ protected void addValidatorProperty(UIComponent component,
+ MethodExpression value)
{
- UIComponentELTagUtils.addValidatorProperty(getFacesContext(), component, value);
+ UIComponentELTagUtils.addValidatorProperty(getFacesContext(),
+ component, value);
}
@Deprecated
protected void setActionProperty(UIComponent component, String action)
{
- UIComponentTagUtils.setActionProperty(getFacesContext(), component, action);
+ UIComponentTagUtils.setActionProperty(getFacesContext(), component,
+ action);
}
- protected void setActionProperty(UIComponent component, MethodExpression action)
+ protected void setActionProperty(UIComponent component,
+ MethodExpression action)
{
- UIComponentELTagUtils.setActionProperty(getFacesContext(), component, action);
+ UIComponentELTagUtils.setActionProperty(getFacesContext(), component,
+ action);
}
@Deprecated
- protected void setActionListenerProperty(UIComponent component, String actionListener)
+ protected void setActionListenerProperty(UIComponent component,
+ String actionListener)
{
- UIComponentTagUtils.setActionListenerProperty(getFacesContext(), component, actionListener);
+ UIComponentTagUtils.setActionListenerProperty(getFacesContext(),
+ component, actionListener);
}
- protected void setActionListenerProperty(UIComponent component, MethodExpression actionListener)
+ protected void setActionListenerProperty(UIComponent component,
+ MethodExpression actionListener)
{
- UIComponentELTagUtils.addActionListenerProperty(getFacesContext(), component, actionListener);
+ UIComponentELTagUtils.addActionListenerProperty(getFacesContext(),
+ component, actionListener);
}
- protected void addValueChangedListenerProperty(UIComponent component, MethodExpression valueChangedListener)
+ protected void addValueChangedListenerProperty(UIComponent component,
+ MethodExpression valueChangedListener)
{
- UIComponentELTagUtils.addValueChangedListenerProperty(getFacesContext(), component, valueChangedListener);
+ UIComponentELTagUtils.addValueChangedListenerProperty(
+ getFacesContext(), component, valueChangedListener);
}
- protected void setValueBinding(UIComponent component,
- String propName,
- ValueExpression value)
+ protected void setValueBinding(UIComponent component, String propName,
+ ValueExpression value)
{
- UIComponentELTagUtils.setValueBinding(getFacesContext(), component, propName, value);
+ UIComponentELTagUtils.setValueBinding(getFacesContext(), component,
+ propName, value);
}
-
+
protected Object evaluateValueExpression(ValueExpression expression)
{
- return UIComponentELTagUtils.evaluateValueExpression(getFacesContext().getELContext(), expression);
+ return UIComponentELTagUtils.evaluateValueExpression(getFacesContext()
+ .getELContext(), expression);
}
-
}