ICEfaces
  1. ICEfaces
  2. ICE-3121

Add new "focus" attribute to ice:outputBody component

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8RC2, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      n/a
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      A nice new feature would be to have declarative focus management off the body tag with a new attribute 'focus' to could use valueBindings and locate focusable components from either their component id or client id.

      Adding this feature would address two current deficiencies with ICEfaces focus mgmt.:

      1. It's not currently possible to setFocus on a component without resorting to component binding.
      2. Even with component binding, setting the initial focus (when the page is first loaded) is not dependable.

      1. bodyFocus.diff
        6 kB
        Philip Breau

        Issue Links

          Activity

          Hide
          Philip Breau added a comment -

          suggested impl

          Show
          Philip Breau added a comment - suggested impl
          Hide
          Philip Breau added a comment -

          Test case (comp showcase):

          • navigate to text entry content
          • enter a component id in the 'focus' inputText
          Show
          Philip Breau added a comment - Test case (comp showcase): navigate to text entry content enter a component id in the 'focus' inputText
          Hide
          Adnan Durrani added a comment -

          focus attribute added to the ice:outputBody component.

          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java
          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml
          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java
          Completed: At revision: 18386

          Show
          Adnan Durrani added a comment - focus attribute added to the ice:outputBody component. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java Completed: At revision: 18386
          Hide
          Adnan Durrani added a comment -

          Demo added for new focus attribute.

          Show
          Adnan Durrani added a comment - Demo added for new focus attribute.
          Hide
          Adnan Durrani added a comment -

          Changes made so the component would not find a component, if the "clientId" was specified. So now the component would find the component only if "id" was specified.

          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java
          Completed: At revision: 18496

          Show
          Adnan Durrani added a comment - Changes made so the component would not find a component, if the "clientId" was specified. So now the component would find the component only if "id" was specified. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\OutputBody.java Completed: At revision: 18496
          Hide
          Adnan Durrani added a comment -

          Updated description:
          -------------------------

          There is a new attribute "focus" added to the ice:outputBody component, which allows to focus to a component by just setting the "id" or the "clientId" of the component. It also avoids the need of component binding. The value of the focus attribute can be bind to the bean using the value binding. So application can dynamically change the focus.

          Note:

          • To focus the elements inside the UIData type of components, the element can not be focused using the "id", the clientId has to be used instead.
          • The focus would only be requested when there is a value change on the focus attribute.
          • If you setting the initial focus, the focused component must be rendered on first render call, if not then set the focus attribute only when component gets renders.
          Show
          Adnan Durrani added a comment - Updated description: ------------------------- There is a new attribute "focus" added to the ice:outputBody component, which allows to focus to a component by just setting the "id" or the "clientId" of the component. It also avoids the need of component binding. The value of the focus attribute can be bind to the bean using the value binding. So application can dynamically change the focus. Note: To focus the elements inside the UIData type of components, the element can not be focused using the "id", the clientId has to be used instead. The focus would only be requested when there is a value change on the focus attribute. If you setting the initial focus, the focused component must be rendered on first render call, if not then set the focus attribute only when component gets renders.
          Hide
          Adnan Durrani added a comment -

          Tld docs updated for focus attribute.

          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\components\ice-outputBody-renderer.xml
          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\components\ice-outputBody-renderer.xml
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml
          Completed: At revision: 18497

          Show
          Adnan Durrani added a comment - Tld docs updated for focus attribute. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\components\ice-outputBody-renderer.xml Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\components\ice-outputBody-renderer.xml Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_properties\ice-outputBody-props.xml Completed: At revision: 18497

            People

            • Assignee:
              Unassigned
              Reporter:
              Philip Breau
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: