JSF - Java Server Faces Keretrendszer

JSF attribútumok

JSF alapvető attribútumok

Attribute Component Types Description
id A (25) Identifier for a component
binding A (25) Reference to the component that can be used in a backing bean
rendered A (25) A boolean; false suppresses rendering
styleClass A (23) Cascading stylesheet (CSS) class name
value I, O, C (19) A component’s value, typically a value binding
valueChangeListener I (11) A method binding to a method that responds to value changes
converter I, O (15) Converter class name
validator I (11) Class name of a validator that’s created and attached to a component
required I (11) A boolean; if true, requires a value to be entered in the associated field

JSF DHTML esemény attribútumok

Attribute Description
onblur Element loses focus
onchange Element’s value changes
onclick Mouse button is clicked over the element
ondblclick Mouse button is double-clicked over the element
onfocus Element receives focus
onkeydown Key is pressed
onkeypress Key is pressed and subsequently released
onkeyup Key is released
onmousedown Mouse button is pressed over the element
onmousemove Mouse moves over the element
onmouseout Mouse leaves the element’s area
onmouseover Mouse moves onto an element
onmouseup Mouse button is released
onreset Form is reset
onselect Text is selected in an input field
onsubmit Form is submitted


Példa

<!-- #################################################################### --> <!-- A linkre kattintva meghívja a JavaScript alert() metódusát, amely --> <!-- egy külön felugró ablakban kiírja a "Hello World!" szöveget majd --> <!-- a User.logOut metódus is végrehajtásra kerül. --> <!-- ################################################################### --> <h:commandLink value="JavaScript hívás" action="#{User.logOut}" onclick="alert("Hello World!");"> </h:commandLink>