PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-33455

As a customization developer I'd like the custom field taglibs to be more extension friendly

    Details

    • Technical Documentation Required:
      Needs Documentation
    • Epic/Theme:
    • Similar Issues:
      Show 5 results 

      Description

      The liferay-ui:custom-attribute* tags are not really friendly for extension. They always go all-or-nothing: If you create extensions using custom attributes, you cannot use the tags "for all other fields, that you don't handle manually".

      The change is to add an attribute "ignore" to the tags - all attributes named as "ignore" will not be displayed, e.g. for users_admin/user/custom_fields.jsp, this is what it looks like:

      <liferay-ui:custom-attribute-list
        className="com.liferay.portal.model.User"
        classPK="<%= (selUser != null) ? selUser.getUserId() : 0 %>"
        editable="<%= true %>"
        label="<%= true %>"
        ignore="some-custom-attribute,another-custom-attribute"
      />

      It will output all custom attributes apart from the ignored ones. Those can be handled separately, e.g. on a separate custom page while the others can still stay on the "custom fields" page.

      (identical change proposed for liferay-ui:custom-attributes-available)

        Activity

        Hide
        Olaf Kock added a comment -

        As we separately talked about... Where do I mark this as a quick win?

        Sorry, it might have some work that's required to pass it through the bchan filter, also, a testsuite for util-taglib might need to be introduced: So far it isn't, and the accompanying test is not executed (I executed it manually)

        Overall the code is meant to be the least intrusive to the existing codebase.

        Show
        Olaf Kock added a comment - As we separately talked about... Where do I mark this as a quick win? Sorry, it might have some work that's required to pass it through the bchan filter, also, a testsuite for util-taglib might need to be introduced: So far it isn't, and the accompanying test is not executed (I executed it manually) Overall the code is meant to be the least intrusive to the existing codebase.
        Hide
        Edward Gonzales added a comment -

        Hello everyone! We are in the process of removing component "Liferay TagLib" from LPS issues that contain more than one component. For issues that only have "Liferay TagLib", we plan to move to them to "Tools > Portal Taglibs". In the end, "Liferay TagLib" will be deprecated. Please make the necessary adjustments to your filters. Thanks!

        Show
        Edward Gonzales added a comment - Hello everyone! We are in the process of removing component "Liferay TagLib" from LPS issues that contain more than one component. For issues that only have "Liferay TagLib", we plan to move to them to "Tools > Portal Taglibs". In the end, "Liferay TagLib" will be deprecated. Please make the necessary adjustments to your filters. Thanks!
        Hide
        Olaf Kock added a comment -

        for documentation purposes: The tag-attribute in the current implementation is named ignoreAttributeNames.

        Repeating the sample from the issue's description as it's now implemented:

        <liferay-ui:custom-attribute-list
          className="com.liferay.portal.model.User"
          classPK="<%= (selUser != null) ? selUser.getUserId() : 0 %>"
          editable="<%= true %>"
          label="<%= true %>"
          ignoreAttributeNames="some-custom-attribute,another-custom-attribute"
        />
        

        And the same goes for liferay-ui:custom-attributes-available

        Show
        Olaf Kock added a comment - for documentation purposes: The tag-attribute in the current implementation is named ignoreAttributeNames. Repeating the sample from the issue's description as it's now implemented: <liferay-ui:custom-attribute-list className= "com.liferay.portal.model.User" classPK= "<%= (selUser != null ) ? selUser.getUserId() : 0 %>" editable= "<%= true %>" label= "<%= true %>" ignoreAttributeNames= "some-custom-attribute,another-custom-attribute" /> And the same goes for liferay-ui:custom-attributes-available

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Subcomponents

                  Structure Helper Panel