You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org> on 2006/01/17 12:11:42 UTC
[jira] Created: (MYFACES-1034) Allow customisable AddResource
implementations
Allow customisable AddResource implementations
----------------------------------------------
Key: MYFACES-1034
URL: http://issues.apache.org/jira/browse/MYFACES-1034
Project: MyFaces
Type: Improvement
Components: Tomahawk
Versions: Nightly
Reporter: Peter Mahoney
I use an alternative version of the AddResource. class
The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
Currently to do this a custom MyFaces has to be built.
Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Peter Mahoney updated MYFACES-1034:
-----------------------------------
Attachment: addresource_patch3.zip
Here is the revised set of patches. I hope they are ok!
Peter
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java, addresource_patch3.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Peter Mahoney updated MYFACES-1034:
-----------------------------------
Attachment: AddResourcePatch.zip
Attached is an updated version of the previous patch files, incorporating the reorganisation of SVN and other changes made since the previous patch was submitted.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Attachments: AddResourcePatch.zip, commonsmain.patch, tomahawkcoremain.patch, tomahawkcoretest.patch, tomahawksandboxmain.patch
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Peter Mahoney updated MYFACES-1034:
-----------------------------------
Attachment: addresource_patch4.zip
Ok here is the revised version.
Thanks.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: addresource_patch4.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Mathias Broekelmann (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12362953 ]
Mathias Broekelmann commented on MYFACES-1034:
----------------------------------------------
sounds nice to me.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Peter Mahoney updated MYFACES-1034:
-----------------------------------
Attachment: tomahawksandboxmain.patch
4th patch
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Attachments: commonsmain.patch, tomahawkcoremain.patch, tomahawkcoretest.patch, tomahawksandboxmain.patch
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: commonsmain.patch)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: DefaultAddResource.java)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: tomahawkcoretest.patch)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12365567 ]
Peter Mahoney commented on MYFACES-1034:
----------------------------------------
Is the patch still ok? It would be great if the changes could be in 1.1.2 so that we can be running an official release again :-)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java, addresource_patch3.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12365576 ]
Peter Mahoney commented on MYFACES-1034:
----------------------------------------
I thought there could be issues with that. Looking at it again, the ExtensionsFilter can pass an instance of ExternalContext to MyfacesConfig, like everything else. Not sure why I went down the ServletContext root. I will make the changes and submit another patch.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java, addresource_patch3.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Peter Mahoney updated MYFACES-1034:
-----------------------------------
Attachment: commonsmain.patch
tomahawkcoremain.patch
tomahawkcoretest.patch
Added 3 out of the 4 patches.
The changes are as previously described. The only additional changes were to MyfacesConfig, which had to accept a ServletContext as well as an ExternalContext in the case that AddResource is used in the ExtensionsFilter.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Attachments: commonsmain.patch, tomahawkcoremain.patch, tomahawkcoretest.patch
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: tomahawkcoremain.patch)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12365269 ]
Martin Marinschek commented on MYFACES-1034:
--------------------------------------------
Hi Peter,
sorry to have to cause you work again - I just tried to commit your patches, and that didn't work with the current changes occurring to AddResource. If you provide me with a patch again today, I'll commit it right away - promised.
regards,
Martin
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Dennis Byrne (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12365696 ]
Dennis Byrne commented on MYFACES-1034:
---------------------------------------
Hi Peter,
Do you think you can write up some documentation for this on the wiki ? Would be appreciated. Also, make sure your name is in the "Contributors" section on the wiki.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: addresource_patch4.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Peter Mahoney updated MYFACES-1034:
-----------------------------------
Attachment: DefaultAddResource.java
Attached is an updated version of DefaultAddResource, which makes the xxxInsertPosition instance variables protected. This allows overriding of the parseResponse() method to set the insert positions.
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Attachments: AddResourcePatch.zip, DefaultAddResource.java, commonsmain.patch, tomahawkcoremain.patch, tomahawkcoretest.patch, tomahawksandboxmain.patch
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: AddResourcePatch.zip)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: tomahawksandboxmain.patch)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek closed MYFACES-1034:
--------------------------------------
Resolution: Fixed
Thanks Peter Mahoney for implementing this. Nice feature!
regards,
Martin
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: addresource_patch4.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12365586 ]
Martin Marinschek commented on MYFACES-1034:
--------------------------------------------
Ok, cool!
regards,
Martin
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=comments#action_12365568 ]
Martin Marinschek commented on MYFACES-1034:
--------------------------------------------
Hi Peter,
Now I got to look at your patches - sorry, but they won't work as such.
You are referring to the ServletContext in MyFacesConfig - this we don't want, we want to make sure we can stay with the external-context, cause if we don't do that, we get problems with casts as soon as a PortletContext is coming in.
Over time, we also want to change the ExtensionsFilter away from the current state where MyFaces will fail with Portlets.
regards,
Martin
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
> Attachments: AddResourcePatch.zip, DefaultAddResource.java, addresource_patch3.zip
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-1034) Allow customisable AddResource
implementations
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1034?page=all ]
Martin Marinschek updated MYFACES-1034:
---------------------------------------
Attachment: (was: addresource_patch3.zip)
> Allow customisable AddResource implementations
> ----------------------------------------------
>
> Key: MYFACES-1034
> URL: http://issues.apache.org/jira/browse/MYFACES-1034
> Project: MyFaces
> Type: Improvement
> Components: Tomahawk
> Versions: Nightly
> Reporter: Peter Mahoney
> Assignee: Martin Marinschek
>
> I use an alternative version of the AddResource. class
> The two areas which I have customised are the getResourceUri() method (which rewrites the URL to call resources through a forwarding controller servlet) and writeWithFullHeader() (which has different rules as to where insertions will take place when there is no <head> or <body> tags, as the applications only output HTML fragments).
> Currently to do this a custom MyFaces has to be built.
> Ideally, AddResource would be an interface. An AddResourceFactory class would provide the getInstance() method (or equivalent). This method would check for a context parameter specifying the implementation class to use. If not specified, an instance of DefaultAddResource would be used. DefaultAddResource would be non-final and would therefore be subclassed to provide the customisations described above.
> Would this be a suitable change? If so, I would be happy to implement the change and supply a patch.
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira