You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Stephen Friedrich (JIRA)" <de...@myfaces.apache.org> on 2008/05/20 18:15:55 UTC

[jira] Commented: (TRINIDAD-462) Add import support to skinning's css files

    [ https://issues.apache.org/jira/browse/TRINIDAD-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598345#action_12598345 ] 

Stephen Friedrich commented on TRINIDAD-462:
--------------------------------------------

Any update on this?
My skin file is getting very hard to understand...

> Add import support to skinning's css files
> ------------------------------------------
>
>                 Key: TRINIDAD-462
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-462
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Skinning
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Jeanne Waldman
>            Priority: Minor
>
> Add @import support to the skinning's css file. It should behave exactly the same as the include support that we have in the XSS files.
> Here are some code snippets where the import happens.
> See StyleSheetDocumentParser.java
>  
> -An included xss file is parsed in _handleImports and stored as a StyleSheetDocument in "_imports" that is an Arraylist of elements of type StyleSheetDocument. 
>  
>   // Handle an import - parse the imported XSS document
>   private void _handleImport(
>     ParseContext context,
>     String href
>     ) throws SAXParseException, IOException
>   {
>     if (href == null)
>     {
>       _LOG.warning("Import missing required href attribute");
>       return;
>     }
>  
>     // Now, parse the imported document
>     StyleSheetDocument doc = null;
>  
>     try
>     {
>       doc = (StyleSheetDocument)XMLUtils.parseInclude(context,
>                                                     href,
>                                                     StyleSheetDocument.class);
>     }
>     catch (SAXException e)
>     {
>       _LOG.severe(e);
>     }
>  
>     if (doc != null)
>     {
>       if (_imports == null)
>         _imports = new ArrayList<StyleSheetDocument>();
>  
>       _imports.add(doc);
>     }
>   }
> And also this:
>   // Return all style sheet nodes - this includes imported style sheets
>   // as well as style sheets from this document.  Imported style
>   // sheets have lower precedence - they come first.
>   private StyleSheetNode[] _getStyleSheets()
> ...
>  

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