Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12547

Convert a display-entity to hyperlink if subhyperlink this empty

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • Upcoming Branch, 22.01.01
    • 22.01.01
    • framework/widget
    • None

    Description

      When you define a display-entity you have the possibility to add a sub-hyperlink related to the element displayed.

                   <field name="partyIdFrom">
                      <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName} ${lastName}">
                          <sub-hyperlink target="viewprofile" description="view">...</sub-hyperlink>
                      </display-entity>
                  <field>
      

      This display the party name with a link "view" connected.

      When you use the name a as link without a dedicate sub link, you need to change all the form to resolve the information to display for creating an hyperlink

                  <row-actions>
                      <entity-one entity-name="PartyNameView" value-field="partyName">
                              <field-map field-name="partyId" from-field="partyIdFrom"/>
                      </entity-one>
                      <set field="partyNameValue" value=" ${partyName.groupName}${partyName.firstName} ${partyName.lastName}"/>
                  </row-actions>
                  <field name="partyIdFrom">
                      <hyperlink target="viewprofile" description="${partyNameValue}">..</hyperlink>
                  </field>
      

      We lost the advantage of the display-entity. We can suggest to improve display-entity with the rule :

      If the display-entity has a subhyperlink and the subhyperlink haven't description, the description of the link is the display-entity description.
      In the code, if a sub-hyperlink has an empty description, we convert the display entity as a hyperlink

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nmalin Nicolas Malin
            nmalin Nicolas Malin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment