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

Create/Edit/Copy actions on lookups can't be turned on when fronting a custom Rice app outside of the standard "index.html" page

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.9.2.1
    • Fix Version/s: Not version specific
    • Component/s: Development
    • Labels:
      None
    • Similar issues:
      KULRICE-9416Make documentation portal.html index.html
      KULRICE-2717can't edit person from "edit" link in lookup result list
      KULRICE-3126Remove Recipe Ingredient links from index.html
      KULRICE-2644Implement a "front page" for routing rule creation that allows the user to select the document type and rule template prior to creating the rule
      KULRICE-1200Get Rice sample app working again
      KULRICE-3815Expanding pages when using standalone Rice
      KULRICE-7905Create standard page for Javadocs
      KULRICE-12278Action list outbox customizes results and is unbounded
      KULRICE-10045KRAD Sample App: Traveler Authorization Request Page. Lookups throw BadSqlGrammerException
      KULRICE-6563Add the standard "jump to main content" link
    • Rice Module:
      KNS
    • Application Requirement:
      Rice

      Description

      Lines 319 - 323 in LookupForm.java show that the flag that turns these actions on derives its setting by looking at the returnLocation (backLocation) variable and comparing it to some hard-coded pattern of either <application.url>/portal.jsp OR <application.url>/index.html

      The problem with this hard-coded derivation is that I can never front lookup links from a web page that doesn't conform to this standard naming and get proper behavior.

      Additionally, there is a setShowMaintenanceLinks() method that can be used to override this, but it requires that a lookup helper impl class be written for each lookup, which would require complexity in code to determine if the lookup request was coming from a document versus a static web page... a lot of work for a simple feature and not a reasonable way to toggle these on and off.

      Suggestion:
      Provide a new parameter on the LookupAction class called "showMaintenanceLinksIfAuthorized" which when set to true in the URL to the lookup.do action, flips this feature on so that the maintenance features can be accessible from any web site without heavy overriding of lookup impls, etc.

        Activity

        Hide
        Eric Westfall added a comment -

        Hi Aaron, I actually think I already implemented a query parameter in 0.9.4 for this. Once you get to that version try passing showMaintenanceLinks=true

        Show
        Eric Westfall added a comment - Hi Aaron, I actually think I already implemented a query parameter in 0.9.4 for this. Once you get to that version try passing showMaintenanceLinks=true
        Hide
        Aaron Godert (Inactive) added a comment -

        Hmmm.... thanks. I traced through the 0.9.4 br code but didn't see where that query param was being handled in LookupAction or KualiAction. I'd like to reproduce the customization in 0.9.2.1. If I look at the performLookup method in KualiAction, I don't see that one getting specifically passed through anywhere. Is the pojo form processor just handling it automatically because it's the same name as an attribute specifically on the form?

        Show
        Aaron Godert (Inactive) added a comment - Hmmm.... thanks. I traced through the 0.9.4 br code but didn't see where that query param was being handled in LookupAction or KualiAction. I'd like to reproduce the customization in 0.9.2.1. If I look at the performLookup method in KualiAction, I don't see that one getting specifically passed through anywhere. Is the pojo form processor just handling it automatically because it's the same name as an attribute specifically on the form?
        Hide
        Aaron Godert (Inactive) added a comment -

        I'll dig some more on this now... don't worry about wasting any time on this.

        I'll toss another comment down if I run into a brick wall.

        Show
        Aaron Godert (Inactive) added a comment - I'll dig some more on this now... don't worry about wasting any time on this. I'll toss another comment down if I run into a brick wall.
        Hide
        Eric Westfall added a comment -

        See LookupForm line 318:

        // if showMaintenanceLinks is not already true, only show maintenance links if the lookup was called from the portal (or index.html for the generated applications)
        if (!isShowMaintenanceLinks()) {
        if (StringUtils.contains(backLocation, KNSServiceLocator.getKualiConfigurationService().getPropertyString(KNSConstants.APPLICATION_URL_KEY) + "/" + KNSConstants.MAPPING_PORTAL) || StringUtils.contains(backLocation, KNSServiceLocator.getKualiConfigurationService().getPropertyString(KNSConstants.APPLICATION_URL_KEY) + "/index.html"))

        { showMaintenanceLinks = true; }

        }

        Show
        Eric Westfall added a comment - See LookupForm line 318: // if showMaintenanceLinks is not already true, only show maintenance links if the lookup was called from the portal (or index.html for the generated applications) if (!isShowMaintenanceLinks()) { if (StringUtils.contains(backLocation, KNSServiceLocator.getKualiConfigurationService().getPropertyString(KNSConstants.APPLICATION_URL_KEY) + "/" + KNSConstants.MAPPING_PORTAL) || StringUtils.contains(backLocation, KNSServiceLocator.getKualiConfigurationService().getPropertyString(KNSConstants.APPLICATION_URL_KEY) + "/index.html")) { showMaintenanceLinks = true; } }
        Hide
        Aaron Godert (Inactive) added a comment -

        This looks to be good... I've implemented a local custom mod for us in the meantime for 0.9.2.1. I'll re-open if necessary once we upgrade to 1.0.

        Show
        Aaron Godert (Inactive) added a comment - This looks to be good... I've implemented a local custom mod for us in the meantime for 0.9.2.1. I'll re-open if necessary once we upgrade to 1.0.
        Hide
        Eric Westfall added a comment -

        Thanks for checking Aaron.

        Show
        Eric Westfall added a comment - Thanks for checking Aaron.

          People

          • Assignee:
            Unassigned
            Reporter:
            Aaron Godert (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel