- java.lang.Object
-
- javax.faces.view.ViewMetadata
-
public abstract class ViewMetadata extends Object
ViewMetadata
is reponsible for extracting and providing view parameter metadata from VDL views. BecauseViewDeclarationLanguage.getViewMetadata(javax.faces.context.FacesContext, java.lang.String)
is required to returnnull
for JSP views and non-null
for views authored in Facelets for JSF 2, this specification only applys to Facelets for JSF 2.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor and Description ViewMetadata()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract UIViewRoot
createMetadataView(FacesContext context)
Creates a new
UIViewRoot
containing only view parameter metadata.static Collection<UIViewAction>
getViewActions(UIViewRoot root)
Utility method to extract view metadata from the provided
UIViewRoot
.abstract String
getViewId()
static Collection<UIViewParameter>
getViewParameters(UIViewRoot root)
Utility method to extract view metadata from the provided
UIViewRoot
.static boolean
hasMetadata(UIViewRoot root)
Utility method to determine if the the provided
UIViewRoot
has metadata.
-
-
-
Method Detail
-
getViewId
public abstract String getViewId()
- Returns:
- the view ID for which this
ViewMetadata
instance was created
-
createMetadataView
public abstract UIViewRoot createMetadataView(FacesContext context)
Creates a new
UIViewRoot
containing only view parameter metadata. The processing of building thisUIViewRoot
with metadata should not cause any events to be published to the application. The implementation must callFacesContext.setProcessingEvents(boolean)
passingfalse
as the argument, at the beginning of the method, and passtrue
to the same method at the end. The implementation must ensure that this happens regardless of ant exceptions that may be thrown.- Parameters:
context
- theFacesContext
for the current request- Returns:
- a
UIViewRoot
containing only view parameter metadata (if any)
-
getViewParameters
public static Collection<UIViewParameter> getViewParameters(UIViewRoot root)
Utility method to extract view metadata from the provided
UIViewRoot
.- Parameters:
root
- theUIViewRoot
from which the metadata will be extracted.- Returns:
- a
Collection
ofUIViewParameter
instances. If the view has no metadata, the collection will be empty.
-
getViewActions
public static Collection<UIViewAction> getViewActions(UIViewRoot root)
Utility method to extract view metadata from the provided
UIViewRoot
.- Parameters:
root
- theUIViewRoot
from which the metadata will be extracted.- Returns:
- a
Collection
ofUIViewAction
instances. If the view has no metadata, the collection will be empty.
-
hasMetadata
public static boolean hasMetadata(UIViewRoot root)
Utility method to determine if the the provided
UIViewRoot
has metadata. The default implementation will return true if the providedUIViewRoot
has a facet namedUIViewRoot.METADATA_FACET_NAME
and that facet has children. It will return false otherwise.- Parameters:
root
- theUIViewRoot
from which the metadata will be extracted from- Returns:
- true if the view has metadata, false otherwise.
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/faces/view/viewmetadata.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.