+1
-- Blake Sullivan
Matthias Wessendorf said the following On 10/16/2009 11:12 AM PT:
On Thu, Oct 15, 2009 at 6:12 PM, Blake Sullivan
<blake.sulli...@oracle.com> wrote:
Matthias Wessendorf said the following On 10/15/2009 5:48 PM PT:
Hi,
I'd like to move the XhtmlConstants class to the API.
The only dependency on another IMPL class is very simple.
It is a constant, that resolves to a String ("portlet").
If nobody disagrees, I will move on with the move.
Yeah, just on trunk (Trinidad 1.2.x)
Thx,
Matthias
Matthias,
A bunch of the constants appear to be implementation-dependent. Rather than
making the entire class public, I think you should come up with a proposal
for which constants you want to move to a public class.
took a more detailed look and noticed that a bunch of mixed things are
in that class.
I think we should maybe just move the XHTML specific stuff to be an
API part, b/c
some of the stuff *can* be useful one other (renderer) implementations as well.
Here is a list, of what I have in mind:
public static final String FACET_PORTLET = "portlet";
public static final String SCRIPT_NAME = "script";
public static final String H_ALIGN_END = "end";
public static final String V_ALIGN_MIDDLE = "middle";
public static final String V_ALIGN_TOP = "top";
public static final String DIV_ELEMENT = "div";
public static final List<String> HEADER_ELEMENTS =
Arrays.asList(new String[]{"h1", "h2", "h3",
"h4", "h5", "h6"});
public static final String LINK_ELEMENT = "a";
public static final String PARAGRAPH_ELEMENT = "p";
public static final String SCRIPT_ELEMENT = "script";
public static final String SPAN_ELEMENT = "span";
public static final String TABLE_DATA_ELEMENT = "td";
public static final String TABLE_BODY_ELEMENT = "tbody";
public static final String TABLE_ELEMENT = "table";
public static final String TABLE_HEADER_ELEMENT = "th";
public static final String TABLE_ROW_ELEMENT = "tr";
public static final String FIELDSET_ELEMENT = "fieldset";
public static final String LEGEND_ELEMENT = "legend";
public static final char NBSP_CHAR = 0xA0;
public static final String NBSP_STRING = String.valueOf(NBSP_CHAR);
public static final String ALIGN_ATTRIBUTE = "align";
public static final String COLS_ATTRIBUTE = "cols";
public static final String COLSPAN_ATTRIBUTE = "colspan";
public static final String HEIGHT_ATTRIBUTE = "height";
public static final String HREF_ATTRIBUTE = "href";
public static final String ID_ATTRIBUTE = "id";
public static final String NOWRAP_ATTRIBUTE = "nowrap";
public static final String ONCLICK_ATTRIBUTE = "onclick";
public static final String ROWS_ATTRIBUTE = "rows";
public static final String ROWSPAN_ATTRIBUTE = "rowspan";
public static final String SIZE_ATTRIBUTE = "size";
public static final String STYLE_ATTRIBUTE = "style";
public static final String VALIGN_ATTRIBUTE = "valign";
public static final String WIDTH_ATTRIBUTE = "width";
public static final String DIR_ATTRIBUTE_VALUE = "dir";
public static final String EMPTY_STRING_ATTRIBUTE_VALUE = "";
public static final String LEFT_ATTRIBUTE_VALUE = "left";
public static final String MIDDLE_ATTRIBUTE_VALUE = "middle";
public static final String ONE_HUNDRED_PERCENT_ATTRIBUTE_VALUE = "100%";
public static final String RIGHT_ATTRIBUTE_VALUE = "right";
most of the other things are really more specific to internal stuff,
e.g. event param names etc.
For the package, I think that the new XhtmlConstants.java could sit in here:
org.apache.myfaces.trinidad.render
-Matthias
-- Blake Sullivan