8 Replies Latest reply: May 2, 2012 7:19 AM by attilas79 RSS

    When tab out of an autoSubmit field I lose focus.

    attilas79
      Hello all!
      I'm using jDev 11.1.2.1.0

      I'm facing the following situation. In the employees VO there is a transient attribute which is actually the salary * commissionPct.
      In the jspx, in order to make things interactive, salary and commisionPct have autoSubmit=true. When I change either of the fields the transient column refreshes accordingly. Up to here everything is fine.
      The problem is that when I make a change to either of these fields and tab out the focus is lost. This is very annoying. It happens only in salary and commissionPct fields.
      Is there any way to avoid this??

      Thanks a lot!
      -apostolos
        • 1. Re: When tab out of an autoSubmit field I lose focus.
          Dimitris Stasinopoulos
          Hi,

          Where exactly you want the focus to be after the tab?

          Do you refresh a container of all those fields in order to refresh the transient attribute?

          Hope this helps,
          Dimitris.
          • 2. Re: When tab out of an autoSubmit field I lose focus.
            attilas79
            Hi Dimitris.

            I guess I'm looking for the default behavior. So, when I tab out of these two fields, the focus should be on the very next field.
            I just autoSubmit the 2 fields. I do not refresh a container or something. The transient is populated correctly right after I tab out, but I lose focus.
            • 3. Re: When tab out of an autoSubmit field I lose focus.
              Dimitris Stasinopoulos
              Hi Apostolos,
              According to the documentation

              http://docs.oracle.com/cd/E24382_01/web.1112/e16181/ap_kbd.htm

              The focus should navigate from left to right and from top to bottom.

              Can you reproduce this in a simple auto-submit -partial-trigger scenario in a separate application?

              Regards,
              Dimitris.
              apostolosk wrote:
              Hi Dimitris.

              I guess I'm looking for the default behavior. So, when I tab out of these two fields, the focus should be on the very next field.
              I just autoSubmit the 2 fields. I do not refresh a container or something. The transient is populated correctly right after I tab out, but I lose focus.
              • 4. Re: When tab out of an autoSubmit field I lose focus.
                attilas79
                Yes Dimitris, I have already reproduced that in a very plain page.
                What do you suggest now?

                Thanks for your replies.
                a.
                • 5. Re: When tab out of an autoSubmit field I lose focus.
                  Sudipto Desmukh
                  Do you know where the focus loses to ? If possible a screenshot will help to understand...
                  You can programmatically set focus on the field you want , but I understand that it should happen by default -
                  https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus
                  • 6. Re: When tab out of an autoSubmit field I lose focus.
                    attilas79
                    Hi Sudipto. All I know is that when I lose focus and tab once again, I see the focus on the very first column, although I have made a change in the 7th column and normally by tabbing out the focus should be on the 8th column. I do not want to do it programmatically. I'm trying to understand what's wrong or what I'm doing wrong.

                    Thanks.
                    • 7. Re: When tab out of an autoSubmit field I lose focus.
                      Sudipto Desmukh
                      maybe paste the jspx code here.
                      Also are you refreshing the container in anyways similar to what is mentioned here -
                      Re: ADF Table Refresh and Lose Field focus After Value in Input Text is Changed ?
                      • 8. Re: When tab out of an autoSubmit field I lose focus.
                        attilas79
                        Sudipto thanks for the link. Very useful.
                        I actually use PPR in the employee Iterator, and this is because there is a master-detail functionality in the page. Suppose I have a case similar to department-employees case.
                        If I remove the PPR then the master and detail are not synchronized.

                        At the bottom you see the sums filed which is actually the product of salary and commissionPct.
                        <af:table value="#{bindings.EmployeesVO1.collectionModel}"
                                                  var="row" rows="#{bindings.EmployeesVO1.rangeSize}"
                                                  emptyText="#{bindings.EmployeesVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
                                                  fetchSize="#{bindings.EmployeesVO1.rangeSize}"
                                                  rowBandingInterval="0"
                                                  selectedRowKeys="#{bindings.EmployeesVO1.collectionModel.selectedRow}"
                                                  selectionListener="#{bindings.EmployeesVO1.collectionModel.makeCurrent}"
                                                  rowSelection="single" id="t1">
                                            <af:column sortProperty="#{bindings.EmployeesVO1.hints.EmployeeId.name}"
                                                       sortable="true"
                                                       headerText="#{bindings.EmployeesVO1.hints.EmployeeId.label}"
                                                       id="c1">
                                                <af:inputText value="#{row.bindings.EmployeeId.inputValue}"
                                                              label="#{bindings.EmployeesVO1.hints.EmployeeId.label}"
                                                              required="#{bindings.EmployeesVO1.hints.EmployeeId.mandatory}"
                                                              columns="#{bindings.EmployeesVO1.hints.EmployeeId.displayWidth}"
                                                              maximumLength="#{bindings.EmployeesVO1.hints.EmployeeId.precision}"
                                                              shortDesc="#{bindings.EmployeesVO1.hints.EmployeeId.tooltip}"
                                                              id="it1">
                                                    <f:validator binding="#{row.bindings.EmployeeId.validator}"/>
                                                    <af:convertNumber groupingUsed="false"
                                                                      pattern="#{bindings.EmployeesVO1.hints.EmployeeId.format}"/>
                                                </af:inputText>
                                            </af:column>
                                            <af:column sortProperty="#{bindings.EmployeesVO1.hints.FirstName.name}"
                                                       sortable="true"
                                                       headerText="#{bindings.EmployeesVO1.hints.FirstName.label}"
                                                       id="c2">
                                                <af:inputText value="#{row.bindings.FirstName.inputValue}"
                                                              label="#{bindings.EmployeesVO1.hints.FirstName.label}"
                                                              required="#{bindings.EmployeesVO1.hints.FirstName.mandatory}"
                                                              columns="#{bindings.EmployeesVO1.hints.FirstName.displayWidth}"
                                                              maximumLength="#{bindings.EmployeesVO1.hints.FirstName.precision}"
                                                              shortDesc="#{bindings.EmployeesVO1.hints.FirstName.tooltip}"
                                                              id="it2">
                                                    <f:validator binding="#{row.bindings.FirstName.validator}"/>
                                                </af:inputText>
                                            </af:column>
                                            <af:column sortProperty="#{bindings.EmployeesVO1.hints.LastName.name}"
                                                       sortable="true"
                                                       headerText="#{bindings.EmployeesVO1.hints.LastName.label}"
                                                       id="c3">
                                                <af:inputText value="#{row.bindings.LastName.inputValue}"
                                                              label="#{bindings.EmployeesVO1.hints.LastName.label}"
                                                              required="#{bindings.EmployeesVO1.hints.LastName.mandatory}"
                                                              columns="#{bindings.EmployeesVO1.hints.LastName.displayWidth}"
                                                              maximumLength="#{bindings.EmployeesVO1.hints.LastName.precision}"
                                                              shortDesc="#{bindings.EmployeesVO1.hints.LastName.tooltip}"
                                                              id="it3">
                                                    <f:validator binding="#{row.bindings.LastName.validator}"/>
                                                </af:inputText>
                                            </af:column>
                                            <af:column sortProperty="#{bindings.EmployeesVO1.hints.Salary.name}"
                                                       sortable="true"
                                                       headerText="#{bindings.EmployeesVO1.hints.Salary.label}"
                                                       id="sal">
                                                *<af:inputText value="#{row.bindings.Salary.inputValue}"*
                                                              label="#{bindings.EmployeesVO1.hints.Salary.label}"
                                                              required="#{bindings.EmployeesVO1.hints.Salary.mandatory}"
                                                              columns="#{bindings.EmployeesVO1.hints.Salary.displayWidth}"
                                                              maximumLength="#{bindings.EmployeesVO1.hints.Salary.precision}"
                                                              shortDesc="#{bindings.EmployeesVO1.hints.Salary.tooltip}"
                                                              id="it6" autoSubmit="true">
                                                    <f:validator binding="#{row.bindings.Salary.validator}"/>
                                                </af:inputText>
                                            </af:column>
                                            <af:column sortProperty="#{bindings.EmployeesVO1.hints.CommissionPct.name}"
                                                       sortable="true"
                                                       headerText="#{bindings.EmployeesVO1.hints.CommissionPct.label}"
                                                       id="comm">
                                                *<af:inputText value="#{row.bindings.CommissionPct.inputValue}"*
                                                              label="#{bindings.EmployeesVO1.hints.CommissionPct.label}"
                                                              required="#{bindings.EmployeesVO1.hints.CommissionPct.mandatory}"
                                                              columns="#{bindings.EmployeesVO1.hints.CommissionPct.displayWidth}"
                                                              maximumLength="#{bindings.EmployeesVO1.hints.CommissionPct.precision}"
                                                              shortDesc="#{bindings.EmployeesVO1.hints.CommissionPct.tooltip}"
                                                              id="it7" autoSubmit="true">
                                                    <f:validator binding="#{row.bindings.CommissionPct.validator}"/>
                                                </af:inputText>
                                            </af:column>
                                            <af:column sortProperty="#{bindings.EmployeesVO1.hints.Sums.name}"
                                                       sortable="true"
                                                       headerText="#{bindings.EmployeesVO1.hints.Sums.label}"
                                                       id="c9">
                                                *<af:inputText value="#{row.bindings.Sums.inputValue}"*
                                                              *label="#{bindings.EmployeesVO1.hints.Sums.label}"*
                                                              *required="#{bindings.EmployeesVO1.hints.Sums.mandatory}"*
                                                              *columns="#{bindings.EmployeesVO1.hints.Sums.displayWidth}"*
                                                              *maximumLength="#{bindings.EmployeesVO1.hints.Sums.precision}"*
                                                              *shortDesc="#{bindings.EmployeesVO1.hints.Sums.tooltip}"*
                                                              *id="it8">*
                                                    *<f:validator binding="#{row.bindings.Sums.validator}"/>*
                                                *</af:inputText>*
                                            </af:column>
                                        </af:table>
                        Edited by: apostolosk on May 2, 2012 3:19 PM