I will rework it on thursday, I wonder why your tests failed it worked for me , anyway I will rework it...
I rather prefer to do it in one regexp instead of finding startEx and endEx



Ganesh schrieb:
Hi Werner,

After some testing with <\s*html[^>]*>(.*)<\/\s*html[^>]*> I couldn't get it to work properly. Instead I used

           var htmlStartEx = /<\s*html[^>]*>/gi;
           var htmlEndEx = /<\/\s*html[^>]*>/gi;

and substring similar to Mojarra (same for head and body). Your approach would be a lot cooler, but, as I said, it doesn't work for me. Maybe you can get it to run?




The jsdocs and Mojarra want only the body CONTENTS replaced, omitting the body tag's attributes. I see this as a bug and used replaceHtmlItem to replace the entire body including the body tag for the patch. If you can get your strippers to run, they will probably need some adjustment to include the the tags, not only their contents.

Here is how I tested it: I renamed scriptTest.html to scriptTest.xhtml and made it a JSF page. Then I modified index.xhtml to contain a button that navigates to scriptTest.xhtml and ajaxified it. The server now responds with a javax.faces.ViewRoot and replaces the complete contents of index.xhtml with the contents of scriptTest.xhtml - works great :-)

Best Regards,
Ganesh


Reply via email to