Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-7594

Provide input field instance to key value finder method getKeyValues

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-6961Add support for passing the component to UifKeyValuesFinder getKeyValues method
      KULRICE-4733Improve key values finder support
      KULRICE-7694input field assumes option value of type string
      KULRICE-10907Caching for key value finders
      KULRICE-12037Newer Rice 2.3.x releases are ignoring a KRAD field's default value finder class
      KULRICE-5183alternate/additonal DisplayAttributeName implementation not honoring key values finders
      KULRICE-13570Create Default Value Finder Class AFT
      KULRICE-12670Input field not rendering on collection add line item
      KULRICE-4279Better support for conditional hidden, required, read-only, and valid values on lookup and maintenance screens
      KULRICE-11891Default Values not being applied on Input and Data Fields
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Data Dictionary
    • Application Requirement:
      KPME
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      I tried to implement this using the "finalizeMethodToCall" property of an InputField with a DropdownControl. It doesn't work however because the finalize method i created is called before the InputField's performFinalize() method, which in turn calls getKeyValues of the optionsFinder. so consequently the control.options property is always null, since i guess it hasn't been set yet. i need a method which gets called after the optionsFinder has been used to populate the field. can you give me some more hints for this? i assume i should be using a different property/method than finalizeMethodToCall but i don't know what it is.

        Issue Links

          Activity

          Hide
          Jerry Neal (Inactive) added a comment -

          Note, looks like also passing the line for key value finders on a collection would be useful:

          Hi Jerry,
          Thanks for your suggestion. If I cannot figure out which line it's trying to populate, even with a different key value finder for all "added" lines, there will still be an issue since each "added" line should display different options in control #2 based on the value of control #1 of that line. Is there a possible workaround for that?
          Which version is the enhancement going to be in? Could you tell me the jira #?
          Thanks,
          Ying

          ----Original Message----
          From: Jerry Neal jkneal@indiana.edu
          Sent: Friday, May 10, 2013 12:48 PM
          To: 'Ying Zhou'; 'Rice KRAD User Group'
          Subject: RE: [kuali] DropdownControl optionFinder in TableCollectionGroup

          Hi Ying,

          Not currently. There is an enhancement request to provide the field to the key values finder. What you can do though is use a property replace and switch key values finder that is used. Make the default finder for the existing lines, then create a property replace with condition #isAddLine, and the substitution the key value finder to use for the add line.

          Jerry

          ----Original Message----
          From: Ying Zhou yingzhou@kuali.org
          Sent: Friday, May 10, 2013 1:40 PM
          To: Rice KRAD User Group
          Subject: [kuali] DropdownControl optionFinder in TableCollectionGroup

          Hi,
          I have two drop down controls in a TableCollectionGroup. Control #2 is refreshed using a KeyValueFinder when control #1 is changed. The KeyValueFinder is a subclass of UifKeyValuesFinderBase.

          The issue is after I added a line to the table, the "added" line should display different options than the "add new" line. In getKeyValues(ViewModel
          model) method of the KeyValueFinder I have trouble figuring out which line it's trying to populate. Is there an indication of the current line it's working on in model or somewhere else?

          Thanks!
          Ying

          Show
          Jerry Neal (Inactive) added a comment - Note, looks like also passing the line for key value finders on a collection would be useful: Hi Jerry, Thanks for your suggestion. If I cannot figure out which line it's trying to populate, even with a different key value finder for all "added" lines, there will still be an issue since each "added" line should display different options in control #2 based on the value of control #1 of that line. Is there a possible workaround for that? Which version is the enhancement going to be in? Could you tell me the jira #? Thanks, Ying ---- Original Message ---- From: Jerry Neal jkneal@indiana.edu Sent: Friday, May 10, 2013 12:48 PM To: 'Ying Zhou'; 'Rice KRAD User Group' Subject: RE: [kuali] DropdownControl optionFinder in TableCollectionGroup Hi Ying, Not currently. There is an enhancement request to provide the field to the key values finder. What you can do though is use a property replace and switch key values finder that is used. Make the default finder for the existing lines, then create a property replace with condition #isAddLine, and the substitution the key value finder to use for the add line. Jerry ---- Original Message ---- From: Ying Zhou yingzhou@kuali.org Sent: Friday, May 10, 2013 1:40 PM To: Rice KRAD User Group Subject: [kuali] DropdownControl optionFinder in TableCollectionGroup Hi, I have two drop down controls in a TableCollectionGroup. Control #2 is refreshed using a KeyValueFinder when control #1 is changed. The KeyValueFinder is a subclass of UifKeyValuesFinderBase. The issue is after I added a line to the table, the "added" line should display different options than the "add new" line. In getKeyValues(ViewModel model) method of the KeyValueFinder I have trouble figuring out which line it's trying to populate. Is there an indication of the current line it's working on in model or somewhere else? Thanks! Ying
          Hide
          Claus Niesen added a comment -

          Committed this non, impacting implementation:

          Added

          getKeyValues(ViewModel model, InputField field)
          

          which uses

          getKeyValues(ViewModel model)
          

          and then

          getKeyValues()
          

          if not overridden. Null is being returned if none of these methods are overridden.

          To use the FoodKeyValueFinder in a collection one would do something like:

          foodType = ObjectPropertyUtils.getPropertyValue(model, field.getBindingInfo().getBindByNamePrefix() + ".field4");
          
          Show
          Claus Niesen added a comment - Committed this non, impacting implementation: Added getKeyValues(ViewModel model, InputField field) which uses getKeyValues(ViewModel model) and then getKeyValues() if not overridden. Null is being returned if none of these methods are overridden. To use the FoodKeyValueFinder in a collection one would do something like: foodType = ObjectPropertyUtils.getPropertyValue(model, field.getBindingInfo().getBindByNamePrefix() + ".field4" );

            People

            • Assignee:
              Claus Niesen
              Reporter:
              Bob Hurt (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel