jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] PrimeFaces InputHolder interface

From: Kito Mann <kito.mann_at_virtua.com>
Date: Fri, 20 Nov 2015 12:52:13 -0500

Here's another PrimeFaces innovation that's ripe for standardization:

public abstract interface org.primefaces.component.api.InputHolder {

  public abstract java.lang.String getInputClientId();

  public abstract java.lang.String getValidatableInputClientId();

  public abstract java.lang.String getLabelledBy();

  public abstract void setLabelledBy(java.lang.String arg0);
}

I mention this because I'm having an issue where the standard
<h:outputLabel> doesn't properly render the label for a component, since it
naively assumes that the client id of the component is the id of the input
control. This is often not the case with modern widgets, since they often
contain <div> or <span> elements with nested input controls. The PrimeFaces
<p:outputLabel> uses the InputHolder interface to determine the proper
client id for the input control.

Thoughts?
___

Kito D. Mann | @kito99 | Author, JSF in Action
Web Components/Polymer, JSF/Java EE, and Liferay training and consulting
Virtua, Inc. | http://www.virtua.com |
http://www.JSFCentral.com | @jsfcentral
+1 203-998-0403

* Listen to the Enterprise Java Newscast: *http://
<http://blogs.jsfcentral.com/JSFNewscast/>enterprisejavanews.com
<http://ww.enterprisejavanews.com>*