myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Schwartz (JIRA)" <>
Subject [jira] Created: (TRINIDAD-1892) Support source template for JSP tag generation
Date Wed, 25 Aug 2010 15:16:16 GMT
Support source template for JSP tag generation

                 Key: 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,

  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, "");
      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() ||

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.

View raw message