in myfaces-html5-core/src/main/java/org/apache/myfaces/html5/handler/MediaSourceHandler.java [98:138]
public void apply(FaceletContext faceletContext, UIComponent parent) throws IOException
{
if (!(parent instanceof MediaSourceHolder))
{
if (log.isLoggable(Level.WARNING))
log.warning("parent component " + DebugUtils.getPathToComponent(parent) + " is not a MediaSourceHolder. handler will not apply anything.");
return;
}
else
{
String valueVal = null;
String codecVal = null;
String contentTypeVal = null;
String mediaVal = null;
boolean disabledVal = false;
// src is required, no need to check nullness
valueVal = this.src.getValue(faceletContext);
if (this.codec != null)
codecVal = this.codec.getValue(faceletContext);
if (this.contentType != null)
contentTypeVal = this.contentType.getValue(faceletContext);
if (this.media != null)
mediaVal = this.media.getValue(faceletContext);
if (this.disabled != null)
disabledVal = this.disabled.getBoolean(faceletContext);
MediaInfo mediaInfo = new MediaInfo(valueVal, contentTypeVal, codecVal, mediaVal, disabledVal);
if (log.isLoggable(Level.FINE))
log.fine("MediaInfo instance created, adding it into parent's set.");
// add mediaInfo to parent
MediaSourceHolder msh = (MediaSourceHolder) parent;
msh.addMediaInfo(mediaInfo);
}
}