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

          Philip Breau created issue -
          Hide
          Philip Breau added a comment -

          suggested impl

          Show
          Philip Breau added a comment - suggested impl
          Philip Breau made changes -
          Field Original Value New Value
          Attachment bodyFocus.diff [ 11028 ]
          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
          Philip Breau made changes -
          Attachment Test_ComponentShowcase.war [ 11029 ]
          Ken Fyten made changes -
          Fix Version/s 1.7.2 [ 10130 ]
          Ken Fyten made changes -
          Fix Version/s 1.8DR#2 [ 10142 ]
          Fix Version/s 1.7.2 [ 10130 ]
          Ken Fyten made changes -
          Fix Version/s 1.8DR#3 [ 10143 ]
          Fix Version/s 1.8DR#2 [ 10142 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0 [ 10032 ]
          Fix Version/s 1.8DR#3 [ 10143 ]
          Ken Fyten made changes -
          Summary body focus attribute Add new "setFocus" attribute to ice:body component
          Salesforce Case []
          Fix Version/s 1.8 [ 10161 ]
          Fix Version/s 2.0 [ 10032 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.)]
          Assignee Priority P1
          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. 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.

          Ken Fyten made changes -
          Link This issue is duplicated by ICE-2729 [ ICE-2729 ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Adnan Durrani [ adnan.durrani ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18386 Fri Feb 20 14:42:37 MST 2009 adnan.durrani Fix for ICE-3121 (Add new "focus" attribute to ice:outputBody component)
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/OutputBody.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_properties/ice-outputBody-props.xml
          Adnan Durrani made changes -
          Summary Add new "setFocus" attribute to ice:body component Add new "focus" attribute to ice:outputBbody component
          Salesforce Case []
          Adnan Durrani made changes -
          Summary Add new "focus" attribute to ice:outputBbody component Add new "focus" attribute to ice:outputBody component
          Salesforce Case []
          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
          Adnan Durrani made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Adnan Durrani added a comment -

          Demo added for new focus attribute.

          Show
          Adnan Durrani added a comment - Demo added for new focus attribute.
          Adnan Durrani made changes -
          Attachment ICE-3121.war [ 11536 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18496 Mon Mar 09 14:32:42 MDT 2009 adnan.durrani Fix related to ICE-3121 (Add new "focus" attribute to ice:outputBody component)
          Changes made so the component would not find a component, if clientId has been specified. So now the component would find the component only if "id" was specified.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/OutputBody.java
          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
          Ken Fyten made changes -
          Fix Version/s 1.8RC2 [ 10163 ]
          Fix Version/s 1.8 [ 10161 ]
          Ken Fyten made changes -
          Fix Version/s 1.8 [ 10161 ]
          Assignee Priority P1
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Adnan Durrani [ adnan.durrani ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: