3 Replies Latest reply on Jul 8, 2010 2:40 PM by blabno

    Attribute names - problem in generated class

    blabno Master

      If we annotate getter getFor() with @Attribute annotation, then CDK will generate code like this:


      protected static enum Properties {





      public String getFor() {
              Object value = getStateHelper().eval(Properties.for);
              if(value == null) {
                  return null;
              return (String) value;
          public void setFor(String for) {
              getStateHelper().put(Properties.for, for);

      Which doesn't compile, because "for" is a keyword. In _attribute_accessors.ftl template there is a code that checks if aliasFor is specified, however I can't see it set anywhere. Shouldn't first @Alias from @Attribute(alias=...) be used for that? If so then I attach appropriate patch.