You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/07/01 16:23:00 UTC

[jira] [Commented] (OFBIZ-12547) Convert a display-entity to hyperlink if subhyperlink this empty

    [ https://issues.apache.org/jira/browse/OFBIZ-12547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561524#comment-17561524 ] 

ASF subversion and git services commented on OFBIZ-12547:
---------------------------------------------------------

Commit e0f61dceb7395a5e31d6e8416d93c635de9f12d5 in ofbiz-framework's branch refs/heads/trunk from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=e0f61dceb7 ]

Improved: Convert a display-entity to hyperlink if subhyperlink this empty (OFBIZ-12547)

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 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. With this case, we improve display-entity with the following 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


> Convert a display-entity to hyperlink if subhyperlink this empty
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-12547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12547
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/widget
>    Affects Versions: 22.01.01, Upcoming Branch
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>         Attachments: OFBIZ-12547.patch
>
>
> When you define a display-entity you have the possibility to add a sub-hyperlink related to the element displayed.
> {code}
>              <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>
> {code}
> 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
> {code}
>             <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>
> {code}
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)