Stripes

Include and exclude attributes for options-enumeration tag

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Tag Library
  • Labels:
    None

Description

I often need to output an options-enumeration list with only a subset of the options. This was so common on the project I have been working on that I added "include" and "exclude" attributes to the InputOptionsEnumerationTag. Both attributes take a comma-delimited list of enum names that will either be the only options output (the "include" case) or the only options out of the enumeration not output (the "exclude" case).

This is a much simpler version of the feature request that was included with STS-300.

This enhancement is unit tested and has been working well in production for the last 6 weeks or so. I am happy to submit a patch for it if the community thinks it would be generally useful.

Here is an example of the tag with the new attribute:
<stripes:options-enumeration enum="com.diio.BatchingType" exclude="PURCHASE_DATE,TRAVEL_DATE"/>

Activity

Hide
Ben Gunter added a comment - 03/Mar/11 2:47 PM

A patch would be greatly appreciated. It sounds like a useful feature.

Show
Ben Gunter added a comment - 03/Mar/11 2:47 PM A patch would be greatly appreciated. It sounds like a useful feature.
Hide
Ken Koster added a comment - 03/Mar/11 11:41 PM

Patch implementing include and exclude attributes for the options-enumeration tag. Includes changes to Tag class, tld file, and unit test files. Based off of r1416.

Show
Ken Koster added a comment - 03/Mar/11 11:41 PM Patch implementing include and exclude attributes for the options-enumeration tag. Includes changes to Tag class, tld file, and unit test files. Based off of r1416.

People

Vote (0)
Watch (2)

Dates

  • Created:
    23/Jul/10 1:04 PM
    Updated:
    03/Mar/11 11:41 PM