steven0lisa / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

update and refresh style sheet on fly #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*** This issue was imported from http://java.net/jira/browse/XHTMLRENDERER-182

It was reported by savitham on 11.07.2007 16:11:12 +0200 and last updated in 
the previous bug tracker on 20.07.2008 19:17:38 +0200

Found in
Operating System: All
Platform: All

The priority for this issue at migration was Major.

Original description: 
Currently there is no support for refreshing the style sheet on fly. 
I tried updating the style sheet with below code in my Custom XHTMLPanel

StylesheetInfo[] stylesheets = this.getSharedContext().getNamespaceHandler
().getStylesheets(this.getDocument());
for (int i = 0; i < stylesheets.length; i++) {
StringBuffer modifiedStyle = new StringBuffer(stylesheets[i].getContent());
modifiedStyle.append(".question_1");
modifiedStyle.append("{ ");
modifiedStyle.append("background-color : green;").append(" }");
stylesheets[i].setContent(modifiedStyle.toString()); 
System.out.println("AFTER MODIFIYTHING stylesheets: CONTENT "+stylesheets
[i].getContent());

the above code modifies the content of the style sheet but after this i called 
restyle and relayout but modified styles is not getting refresshed.

Original issue reported on code.google.com by pdoubl...@gmail.com on 16 Feb 2011 at 9:55

GoogleCodeExporter commented 9 years ago
pdoubleya wrote on 20.07.2008 19:17:38 +0200:
There is caching going on that's probably interacting poorly here. Will need to
look into the current API and see what is possible. Will defer to R9 for now.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:55