[KULRICE-9693] topGroup AND View header needs to display updated information (ie. when a page loads, not just the view) Created: 06/Jun/13  Updated: 19/Sep/13  Resolved: 07/Jun/13

Status: Closed
Project: Kuali Rice Development
Component/s: Development
Affects Version/s: 2.3.0-m2
Fix Version/s: 2.3.0-m3, 2.3

Type: Improvement Priority: Major
Reporter: Garey Taylor Assignee: Brian Smith (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File screenshot-1.jpg    
Issue Links:
Fix
fixes KSENROLL-7481 Awaiting Rice Fix: Static Unified Pag... Closed
Rely
is relied upon by KSENROLL-9616 Remove updateViewHeaderText JS workar... Closed
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


Generated at Wed Sep 30 04:20:28 CDT 2020 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.