myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (TRINIDAD-1892) Sub-class support for for JSP tag generation
Date Fri, 26 Apr 2013 22:02:16 GMT

     [ https://issues.apache.org/jira/browse/TRINIDAD-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Robinson resolved TRINIDAD-1892.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.8-plugins

Provided the ability to generate the base classes of JSP tags so that custom sub-classes may
be used to override functionality. The plug-in will now create Partial[tag name].java files
that can be extended by custom classes.
                
> Sub-class support for 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
>            Assignee: Andrew Robinson
>             Fix For: 2.0.8-plugins
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message