4 Replies Latest reply: May 13, 2012 3:10 PM by 796392 RSS

    Lov command link does not get refreshed

    796392
      We are using Jheadstart 11.1.1.4.26 with Jdeveloper 11.1.1.4 and we think we have found a bug.

      The scenario includes two items, an inputtext (FirstName) and an LovItem (ManagerId)

      The LovItem (ManagerId) is dependent on the inputtext (FirstName) with Clear/Refresh and has a Disabled Expession #{bindings.EmployeesFirstName.inputValue==null} so that when the Firstname is null the LovItem (ManagerId) is disabled.

      This seems to work fine except from the commandLink of the LovItem which does not get refreshed. This is probably because the Id of the commandLink is not included in the componentsToRefresh item inside the EmployeesFirstNameDependsOnItem.
      Of course we could create a custom vm for the default/misc/facesConfig/dependsOnItemBean.vm and pass the id of the commandlink but we are looking for a more generic way.


      <managed-bean id="__168">
      <managed-bean-name id="__169">EmployeesFirstNameDependsOnItem</managed-bean-name>
      <managed-bean-class id="__170">oracle.jheadstart.controller.jsf.bean.DependsOnItemBean</managed-bean-class>
      <managed-bean-scope id="__171">application</managed-bean-scope>
      <managed-property id="__172">
      <property-name id="__173">itemsToClear</property-name>
      <list-entries id="__174">
      <value id="__175">EmployeesManagerId</value>
      </list-entries>
      </managed-property>
      <managed-property id="__176">
      <property-name id="__177">componentsToRefresh</property-name>
      <list-entries id="__178">
      <value id="__179">EmployeesManagerId</value>
      </list-entries>
      </managed-property>
      </managed-bean>

      I sent a testcase to 'idevcoe_nl@oracle.com' last friday.

      Regards
      Vasileios
        • 1. Re: Lov command link does not get refreshed
          Steven Davelaar-Oracle
          Vasileios,

          I did not receive a testcase for this issue.
          Please send it again and make sure it reproduces before you send it (the other testcase with the LOV bug does not repdoruce the issue you mentioned).

          Steven Davelaar,
          Jheadstart team.
          • 2. Re: Lov command link does not get refreshed
            796392
            Steven

            I have sent you the testcase.
            I have made sure it reproduces the bug.

            By the way this bug was present in the older version of Jheadstart JHS11.1.1.2.29


            Regards
            Vasileios
            • 3. Re: Lov command link does not get refreshed
              Steven Davelaar-Oracle
              Vasileios,

              Thank, I was able to reproduce this. We will fix it in the next release.
              Here is how you can fix it using custom templates:


              - add the following macro to your custom macros file:

              #macro (ITEM_LINK_PARTIAL_TRIGGERS)
              partialTriggers = "#foreach($item in $JHS.current.item.dependsOnItems) #if (($JHS.current.pageComponent.hasOverflowRight || $JHS.current.pageComponent.hasOverflowRightWithSplitter || $JHS.current.pageComponent.hasOverflowBelow || $JHS.current.pageComponent.hasOverflowBelowWithSplitter) && $JHS.current.item.displayInTableOverflow && !$item.displayInTableOverflow)${JHS.current.group.shortName}PC:${JHS.current.group.shortName}Tab:#end${item.id}#end" #end

              - in the custom formLovItem and tableLovItem templates, add this macro to the commandLink element:

              <af:commandLink immediate="true" partialSubmit="true" #ITEM_DISABLED_IN_FORM() #ITEM_UPDATEABLE_IN_FORM() id="#NEW_ID("cl")" #ITEM_LINK_PARTIAL_TRIGGERS()

              Steven Davelaar,
              JHeadstart team.
              • 4. Re: Lov command link does not get refreshed
                796392
                This works!
                Thank you Steven.