Varargs would definitely be an improvement over taking an array,
so +1 to that - and (showing how rarely I've used that language
feature) you can pass a String[], especially a cached one (for
efficiency), to a vararg function, right?

I'd also like to look at getting some of the hooks we (myself,
Jeanne, Gabrielle, etc.) have been working on in our
day jobs into the XhtmlRenderer class;  these are APIs like:

 protected String getDefaultStyleClass(
   FacesContext        context,
   RenderingContext arc,
   FacesBean           bean)
 protected List<String> getRootStateStyleClasses(
   FacesContext        context,
   RenderingContext arc,
   FacesBean           bean)

The latter is especially handy, since many of the CSS state
markers that come up can be handled with fixed
Collections.singletonList() instances, and together these
eliminate a lot of the need for annoying String[] invocations.

-- Adam



On 9/23/06, Simon Lessard <[EMAIL PROTECTED]> wrote:

Hello all,

Currently that method requires a string array and it's kind of annoying to
use because of that. Java 5 offers varargs that would make its usage much
more interesting imho. So I would like to merge both renderStyleClasses in
a
single one using the following signature:

public static void renderStyleClasses(FacesContext context,
RenderingContext
arc, String... styleClasses);


Backward compatiblity should be kept as varargs allow both array and
sequence of arguments to be passed.


Any objection?

~ Simon


Reply via email to