Support source template for JSP tag generation
----------------------------------------------

                 Key: TRINIDAD-1892
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1892
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Build
    Affects Versions: 2.0.0-alpha
            Reporter: Andy Schwartz


Trinidad's GenerateComponentMojo allows a base source template to be specified 
for components that are generated.  The contents of the template file are 
merged with the generated contents to form the complete component class.

Trinidad's GenerateJspTaglibsMojo, while containing some code that hints at 
this support, eg:

  private class IfComponentModifiedFilter extends ComponentFilter
  {
    protected boolean accept(
      ComponentBean component)
    {
      String tagClass = component.getTagClass();
      String sourcePath = Util.convertClassToSourcePath(tagClass, ".java");
      String templatePath = Util.convertClassToSourcePath(tagClass, 
"Template.java");
      File targetFile = new File(generatedSourceDirectory, sourcePath);
      File templateFile = new File(templateSourceDirectory, templatePath);

      // accept if templateFile is newer or component has been modified
      return (templateFile.lastModified() > targetFile.lastModified() ||
              component.isModifiedSince(targetFile.lastModified()));
    }
  }


Does not appear to fully support this.

Opening this issue to request that we enhance GenerateJspTaglibsMojo to include 
support for allowing a base template source file to be specified for generated 
component tags.  Without this, if any tag customization is necessary, the tag 
generation tool cannot be used - ie. the entire tag must be written from 
scratch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to