Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-12815

Expressions in field labels not carried through for table headers

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.1
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Team:
      Framework
    • Rice Module:
      KRAD
    • Application Requirement:
      KS
    • Sprint:
      Framework 2.5.1 Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      3

      Description

      From: <Neal>, Jerry K <jkneal@iu.edu>
      Date: Tuesday, June 10, 2014 at 3:27 PM
      To: Christopher Maurer <chmaurer@iu.edu>, "rice.usergroup.krad@kuali.org" <rice.usergroup.krad@kuali.org>
      Subject: RE:

      {Rice KRAD User Group} Can't use an expression in a rich table's field label?


      I think the problem is here. When building the table we build each header and set the label text from the item label:



      if (useShortLabels) { headerLabel.setLabelText(field.getShortLabel()); } else { headerLabel.setLabelText(field.getLabel()); }



      However, when expressions are used the label is empty (the expression gets evaluated later and stuck back into the property). We need to be copying the expressions as well.



      What version of Rice are you using? Just wondering if we need this in a 2.4 patch or 2.5.



      If you need a patch before then, you can extend TableLayoutManagerBase and override addHeaderField, then copy the expressonGraph from the field parameter to the tail of headerLabels. Then override the bean for table layout.



      Or if you just need to fix this one case, specify a finalizeMethodToCall on the collection group, and create that method in a custom view helper. Then you can get the layoutManager from the group, and header labels are in the property headerLabels. Within the code you can of course call the needed service to get the label text.



      Sorry for the issue here.



      Thanks,

      Jerry



      From: Maurer, Christopher Wayne chmaurer@iu.edu
      Sent: Tuesday, June 10, 2014 2:57 PM
      To: rice.usergroup.krad@kuali.org
      Subject: {Rice KRAD User Group}

      Can't use an expression in a rich table's field label?

      Anyone know if there's a reason why an expression won't work as a message/data label for a rich table's column? Or perhaps I'm just doing it wrong? I get no text at all when doing something like this:

      <bean parent="Uif-MessageField"

      p:label="@

      {T(org.kuali.student.ap.framework.config.KsapFrameworkServiceLocator).getTextHelper().getText('details.ao.header.code')}

      "

      p:messageText="@

      {#line.activityOfferingCode}

      ">

      </bean>

      I'm guessing it has something to do with when it gets evaluated and how the table gets created?

      Is there a better way to pass in “dynamic” values for the column headers?

      I could use that exact bean somewhere else on the page and it works fine.

      Chris

        Attachments

          Activity

          Hide
          masargen Matt Sargent added a comment -

          Moving to 2.4.3; 2.4.2 is "closed" for new, non-blocker JIRAs

          Show
          masargen Matt Sargent added a comment - Moving to 2.4.3; 2.4.2 is "closed" for new, non-blocker JIRAs
          Hide
          mztaylor Martin Taylor (Inactive) added a comment -

          Closing 2.5.1 Development

          Show
          mztaylor Martin Taylor (Inactive) added a comment - Closing 2.5.1 Development

            People

            • Assignee:
              jheckel Jeff Heckel (Inactive)
              Reporter:
              chmaurer Chris Maurer (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours
                1d 4h