You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org> on 2007/07/10 13:29:04 UTC

[jira] Commented: (TOBAGO-435) Add support for different media-styles

    [ https://issues.apache.org/jira/browse/TOBAGO-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511393 ] 

Udo Schnurpfeil commented on TOBAGO-435:
----------------------------------------

I see 2 resolutions:

1. add media type to style-tag
  - disadvantage: all files in the search-path must support the same media typ, but there is no mechanism to check that automatically.

2. set no media type in the page renderer. Use instead media deklaration in the style files. 

> Add support for different media-styles
> --------------------------------------
>
>                 Key: TOBAGO-435
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-435
>             Project: MyFaces Tobago
>          Issue Type: New Feature
>          Components: Themes
>    Affects Versions: 1.0.11
>            Reporter: Matthias Wronka
>            Priority: Minor
>
> Currently the <tc:style> tag does not allow the specification of a media-type the style should be used for. As in the Scarborough PageRenderer this media-type is hardcoded set to "screen" there is no way to specify print-styles except from overwriting the renderer.
> This is the Code-Fragment from PageRenderer:
>     // style files
>     for (String styleFile : page.getStyleFiles()) {
>       List<String> styles = ResourceManagerUtil.getStyles(facesContext, styleFile);
>       for (String styleString : styles) {
>         if (styleString.length() > 0) {
>           writer.startElement(HtmlConstants.LINK, null);
>           writer.writeAttribute(HtmlAttributes.REL, "stylesheet", false);
>           writer.writeAttribute(HtmlAttributes.HREF, styleString, false);
>           writer.writeAttribute(HtmlAttributes.MEDIA, "screen", false);
>           writer.writeAttribute(HtmlAttributes.TYPE, "text/css", false);
>           writer.endElement(HtmlConstants.LINK);
>         }
>       }
>     }

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