ICEfaces
  1. ICEfaces
  2. ICE-9625

ACE Generator - Add ability to determine which of our properties are set

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ACE
    • Assignee Priority:
      P1

      Description

      There is an issue in ICE-9471 that involves using the properties from a header column for the body column when a property has not itself been specified on the body column. That is, the body column property would take precedence if it were specified, and would otherwise comes from the corresponding header column. To accomplish this, there needs to be a mechanism to determine if a property has been set on a column component. Some of the properties have default values, so simply checking for null won't work.

      In the past we've explored ways of implementing attributesThatAreSet, but with ACE we have not, since passthrough attributes are not widely used, and that was the main use case for it. There were difficulties in having a complete list of set properties, including those specified by JSF component superclasses. This is much simpler, since we only need to know about properties that are generated by the ACE generator itself.

        Activity

        Hide
        Judy Guglielmin added a comment -

        HI mark rev 38604 has the ability now to check which properties are set. I put the following in a component which had a "label" property set as a test:-
        @Override
        public String getLabel(){
        System.out.println("########GET LABEL RADIO BUTTON size = "+checkEnumSetSize());
        String temp = super.getLabel();
        if (isInEnumSet("label"))

        { System.out.println(" label is in enumSet!!!!"); }

        else

        { System.out.println(" cannot find label in enumSet"); }

        return temp;
        }

        I tested for xhtml markup where property is static and when using el, both passed. Also, I tested the williams poc. I did not state save the EnumSet. Method is protected so can only be accessed from the component class, but concern for performance as I was testing only in getter and due to jsf that gets called several times. Please test to see if this satisfies your requirement.
        Also, I have "set" in method name, but might want to rename to better show functionality

        Show
        Judy Guglielmin added a comment - HI mark rev 38604 has the ability now to check which properties are set. I put the following in a component which had a "label" property set as a test:- @Override public String getLabel(){ System.out.println("########GET LABEL RADIO BUTTON size = "+checkEnumSetSize()); String temp = super.getLabel(); if (isInEnumSet("label")) { System.out.println(" label is in enumSet!!!!"); } else { System.out.println(" cannot find label in enumSet"); } return temp; } I tested for xhtml markup where property is static and when using el, both passed. Also, I tested the williams poc. I did not state save the EnumSet. Method is protected so can only be accessed from the component class, but concern for performance as I was testing only in getter and due to jsf that gets called several times. Please test to see if this satisfies your requirement. Also, I have "set" in method name, but might want to rename to better show functionality

          People

          • Assignee:
            Mark Collette
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: