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

topGroup AND View header needs to display updated information (ie. when a page loads, not just the view)

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-m2
    • Fix Version/s: 2.3.0-m3, 2.3
    • Component/s: Development
    • Labels:
      None
    • Similar issues:
      KULRICE-10669topGroup should only be displayed when there are items to show
      KULRICE-11552When a KRAD view is loading in a lightbox, the page blocking does not block the view
      KULRICE-9955'Null' growl appears on page load in IE 10
      KULRICE-12558Support for ajax refresh of the view
      KULRICE-13147Inefficiencies in view lifecycle and rendering
      KULRICE-5991View/Page Loading fixes - indicator and visual appearance during load
      KULRICE-9370404 when getting loading message on load of any KRAD view
      KULRICE-9997Prevent initial Spring loading of all pages
      KULRICE-10775Automatic display docTitle in view header
      KULRICE-3119Error messages at the top of the maintenance.do page do not display properly in IE
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      UIF Component
    • Application Requirement:
      KS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      KS has starting using the new topGroup to display something we call the "context bar". Basically, this will be a place where we show information about the view / page. It sits above the breadcrumbs.

      I had posted information on the issue in the google group:
      https://groups.google.com/a/kuali.org/forum/?fromgroups#!topic/rice.usergroup.krad/XwUHyvfcww0

      So, for every search the Term (201201) and the SocState (Published) will change based on the search result.

      The only way we can get the objects in the "topGroup" to update is to do it explictly with Javascript... which is NOT desired.

      Do you know how we can update the display of data in the topGroup when the page updates?

      Here's some of our base xml from the View:

      <property name="topGroup">
      <bean id="KS-CourseOfferingManagement-ContextBar" parent="KS-Uif-HorizontalBoxGroup-TopGroup">
      <property name="items">
      <list merge="true">
      <bean id="contextBarTermCode" parent="Uif-InputField" p:readOnly="true" p:propertyName="contextBarTermCode"/>
      <bean id="contextBarSocState" parent="KS-Lozenge-Grey-Uif-InputField" p:readOnly="true" p:propertyName="contextBarSocState" />
      </list>
      </property>
      </bean>
      </property>

      Xml from our page, that's inside the view: (notice the call to updateContextBar())
      <bean id="KS-CourseOfferingManagement-ManageCourseOfferingsPage" parent="Uif-Page" p:disclosure.render="false"
      p:id="manageCourseOfferingsPage" p:onDocumentReadyScript="updateContextBar();">
      <property name="items">
      <list>
      <ref bean="KS-CourseOfferingManagement-CriteriaSection"/>
      <ref bean="KS-CourseOfferingManagement-CourseOfferingResultSection"/>
      </list>
      </property>
      </bean>

      Javascript to update two fields:
      function updateContextBar()

      Unknown macro: { var termCode = jQuery("#contextBarTermCodeId_control"); var termCodeLabel = jQuery("#contextBarTermCode"); termCodeLabel.text(termCode.val()); var socState = jQuery("#contextBarSocStateId_control"); var socStateLabel = jQuery("#contextBarSocState"); socStateLabel.text(socState.val()); }

      [1:58:55 PM] Brian Smith: you have to do it with javascript as topGroup is not included in page content
      [1:58:59 PM] Brian Smith: or refresh the whole view
      [1:59:51 PM] Brian Smith: another alternative is to change the page template to include this information but this is the most dangerous

      Brian suggested this js method:
      [2:11:20 PM] Brian Smith: jQuery(document).on(kradVariables.PAGE_LOAD_EVENT, function (event)

      Unknown macro: { //your code here }

      );

      [2:12:43 PM] Brian Smith: but if you already have it working some other way its probably fine too
      [2:13:01 PM] Garey: so we have a very specific fix
      [2:13:29 PM] Brian Smith: yeah I was afraid something like this would happen
      [2:14:06 PM] Brian Smith: because these are tied to the view they only can change when the whole view refreshes (unless js)
      [2:14:22 PM] Brian Smith: its the same for the View header
      [2:14:42 PM] Brian Smith: I think we may need to send back the whole view header and top group with each page change
      [2:14:57 PM] Brian Smith: so it can change in response to other changes
      [2:15:53 PM] Brian Smith: I was on the fence about this during implementation, but it looks like there may be multiple uses

      [2:16:02 PM] Brian Smith: maybe we should file a jira for this
      [2:16:45 PM] Garey: Did you want me to create one?
      [2:17:26 PM] Garey: I would also like to put this conversation on the google group so others don't bump into it

      [2:17:36 PM] Brian Smith: can you include view header in the title/description cause Im sure youll want to do that at some point too
      [2:18:30 PM] Brian Smith: right now view header is the same problem you cant update anything about it after its there
      [2:18:37 PM] Brian Smith: other than the page (thats automated)
      [2:19:04 PM] Brian Smith: but someone will probably want to do this at some point

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Brian Smith (Inactive)
              Reporter:
              Garey Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel