My JSF Books/Videos My JSF Tutorials OmniFaces/JSF PPTs
JSF 2.3 Tutorial
JSF Caching Tutorial
JSF Navigation Tutorial
JSF Scopes Tutorial
JSF Page Author Beginner's Guide
OmniFaces 2.3 Tutorial Examples
OmniFaces 2.2 Tutorial Examples
JSF Events Tutorial
OmniFaces Callbacks Usages
JSF State Tutorial
JSF and Design Patterns
JSF 2.3 New Features (2.3-m04)
Introduction to OmniFaces
25+ Reasons to use OmniFaces in JSF
OmniFaces Validators
OmniFaces Converters
JSF Design Patterns
Mastering OmniFaces
Reusable and less-verbose JSF code

My JSF Resources ...

Java EE Guardian
Member of JCG Program
Member MVB DZone
Blog curated on ZEEF
OmniFaces is an utility library for JSF, including PrimeFaces, RichFaces, ICEfaces ...









[OmniFaces Utilities] - Find the right JSF OmniFaces 2 utilities methods/functions

Search on blog

Petition by Java EE Guardians


marți, 17 februarie 2015

[OmniFaces utilities (2.0)] Check whether the given UI input component is editable

[OmniFaces utilities] The isEditable() method returns whether the given UI input component is editable. That is when it is rendered, not disabled and not readonly.


<h:inputText value="..."/>                      // uiinput_1
<h:inputText value="..." readonly="true"/>      // uiinput_2
<h:inputText value="..." disabled="true"/>      // uiinput_3
<h:inputText value="..." rendered="false"/>     // uiinput_4

import org.omnifaces.util.Components;
boolean is_1 = Components.isEditable(uiinput_1); // return true
boolean is_2 = Components.isEditable(uiinput_2); // return false
boolean is_3 = Components.isEditable(uiinput_3); // return false
boolean is_4 = Components.isEditable(uiinput_4); // return false

Niciun comentariu :

Trimiteți un comentariu


Postări populare

OmniFaces/JSF Fans

Visitors Starting 4 September 2015

Locations of Site Visitors