Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
-
Component/s: Framework
-
Labels:None
-
Environment:ICEfaces 3.x
-
Assignee Priority:P2
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
Description
Add a new ice core:focusManager component that would provide the following automatic focus setting features when it is included inside a form component:
- The first visible (enabled) input element in the form has focus set on it initially.
- Alternatively, if there is an invalid component in the form (failed validation), the first visible (enabled) invalid component will receive focus instead.
- The application also specify a component to have focus set on it via the "for" attribute.
- The first visible (enabled) input element in the form has focus set on it initially.
- Alternatively, if there is an invalid component in the form (failed validation), the first visible (enabled) invalid component will receive focus instead.
- The application also specify a component to have focus set on it via the "for" attribute.
Implemented icecore:focusManager component. The component behaves as described in the requirements, above. The for attribute can be used to point to the component that will receive focus when the page is loaded. If not specified the focus will be set on the first component or in case one or more enclosed components are invalid the focus will be set on the first invalid component.
By default icecore:focusManager will set the focus on the element corresponding to the root of the markup rendered by the component.
For components that are more complex a new interface was introduced that used to specify which element rendered by the component should receive focus. See org.icefaces.component.Focusable javadoc.