You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2009/06/16 09:25:07 UTC
[jira] Issue Comment Edited: (FELIX-1015) Hardcoded HTML
Header/Footer in AbstractWebConsolePlugin
[ https://issues.apache.org/jira/browse/FELIX-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719958#action_12719958 ]
Felix Meschberger edited comment on FELIX-1015 at 6/16/09 12:24 AM:
--------------------------------------------------------------------
Actually, I have to say, that I like the Service oriented approach better because it is more flexible offers better extensibility.
But we could support both approaches: On the one hand we have the Branding service. On the other hand the DefaultBranding would access such property files.
There is a chance/danger of collision, though, which would be resolved as follows:
* A Branding service always has more precedence as branding properties
* If multiple bundles are providing branding properties, the properties from the bundle with the lowest ID are taken
* Branding services are "ordered" according to the spec by their service.ranking and sevice.id properties
was (Author: fmeschbe):
Actually, I have to say, that I like the Service oriented approach better because it is more flexible offers better extensibility.
But we could support both approaches: On the one hand we have the Branding service. On the other hande the DefaultBranding would access such property files.
> Hardcoded HTML Header/Footer in AbstractWebConsolePlugin
> --------------------------------------------------------
>
> Key: FELIX-1015
> URL: https://issues.apache.org/jira/browse/FELIX-1015
> Project: Felix
> Issue Type: Sub-task
> Components: Web Console
> Affects Versions: webconsole-1.2.8
> Reporter: Thomas Diesler
> Assignee: Felix Meschberger
> Attachments: branding.patch
>
>
> Instead of
> private static final String HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
> + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">"
> + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
> + "<head>"
> + "<meta http-equiv=\"Content-Type\" content=\"text/html; utf-8\">"
> + "<link rel=\"icon\" href=\"{6}/res/imgs/favicon.ico\">"
> + "<title>{0} - {2}</title>"
> + "<script src=\"{5}/res/ui/jquery-1.3.2.min.js\" language=\"JavaScript\"></script>"
> + "<script src=\"{5}/res/ui/jquery.tablesorter-2.0.3.min.js\" language=\"JavaScript\"></script>"
> + "<script src=\"{5}/res/ui/admin.js\" language=\"JavaScript\"></script>"
> + "<script src=\"{5}/res/ui/ui.js\" language=\"JavaScript\"></script>"
> + "<script language=\"JavaScript\">"
> + "appRoot = \"{5}\";"
> + "pluginRoot = appRoot + \"/{6}\";"
> + "</script>"
> + "<link href=\"{5}/res/ui/admin.css\" rel=\"stylesheet\" type=\"text/css\">"
> + "</head>"
> + "<body>"
> + "<div id=\"main\">"
> + "<div id=\"lead\">"
> + "<h1>"
> + "{0}<br>{2}"
> + "</h1>"
> + "<p>"
> + "<a target=\"_blank\" href=\"{3}\" title=\"{1}\"><img src=\"{5}/res/imgs/logo.png\" width=\"165\" height=\"63\" border=\"0\"></a>"
> + "</p>" + "</div>";
> we propose
> protected String getHeader()
> {
> String HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
> + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"xhtml1-transitional.dtd\">"
> + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
> + "<head>"
> + "<meta http-equiv=\"Content-Type\" content=\"text/html; utf-8\">"
> + "<link rel=\"icon\" href=\"{6}/res/imgs/favicon.ico\">"
> + "<title>{0} - {2}</title>"
> + "<script src=\"{5}/res/ui/jquery-1.3.2.min.js\" language=\"JavaScript\"></script>"
> + "<script src=\"{5}/res/ui/jquery.tablesorter-2.0.3.min.js\" language=\"JavaScript\"></script>"
> + "<script src=\"{5}/res/ui/admin.js\" language=\"JavaScript\"></script>"
> + "<script src=\"{5}/res/ui/ui.js\" language=\"JavaScript\"></script>"
> + "<script language=\"JavaScript\">"
> + "appRoot = \"{5}\";"
> + "pluginRoot = appRoot + \"/{6}\";"
> + "</script>"
> + "<link href=\"{5}/res/ui/admin.css\" rel=\"stylesheet\" type=\"text/css\">"
> + "</head>"
> + "<body>"
> + "<div id=\"main\">"
> + "<div id=\"lead\">"
> + "<h1>"
> + "{0}<br>{2}"
> + "</h1>"
> + "<p>"
> + "<a target=\"_blank\" href=\"{3}\" title=\"{1}\"><img src=\"{5}/res/imgs/logo.png\" width=\"165\" height=\"63\" border=\"0\"></a>"
> + "</p>" + "</div>";
> return HEADER;
> }
> -------------
> protected PrintWriter startResponse( HttpServletRequest request, HttpServletResponse response ) throws IOException
> {
> ...
> String header = MessageFormat.format( getHeader(), new Object[]
> }
> protected void endResponse( HttpServletRequest request, PrintWriter pw )
> {
> pw.println( "</body>" );
> pw.println( "</html>" );
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.