aspose file tools*
The moose likes JSF and the fly likes JSF Chrome Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Chrome" Watch "JSF Chrome" New topic
Author

JSF Chrome

chiranjeevi gunturu
Ranch Hand

Joined: Mar 02, 2007
Posts: 59

Hi All,
I am facing problems when i try to use Chrome as browser for my JSF Application.
The issue is chrome is not recognizing java script in my xhtml files.Also i need to call ajax functions from this java script.
If i keep this java script in seperate files, i could able to run as chrome is rendering java script but this will not allow me to call ajax functions in my xhtml.
Can any one suggest me on this.Thanks!
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218

You've not really given me a whole lot to go on (i.e. actual code/error messages) but try
wrapping your pages with this f:view tag:



and wrap your inline javascript in a CDATA section:



It's a long shot but you never know.

Brendan.
chiranjeevi gunturu
Ranch Hand

Joined: Mar 02, 2007
Posts: 59
Hi, As suggested i have CDATA tag to wrap java script in xhtml pages.

But I am getting an error message while running my app in chrome as follows:


This page contains the following errors:

error on line 101 at column 3: Sequence ']]>' not allowed in content
Below is a rendering of the page up to the first error.


I then removed ]]> from the xhtml file and it is running good in Chrome. But this time it is not working in IE browser.
I did not use <f:view > tag. when i use this tag my page is blank. I am using Chrome 10 version.

Please advice me on this. Thanks in advance.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
f:view contentType="text/html" works for everyone else. You must be doing something wrong.
chiranjeevi gunturu
Ranch Hand

Joined: Mar 02, 2007
Posts: 59
Thank you very much. It worked.
Initially i was using <f:view tag> as follows and i was getting blank page in all browsers.

<html>
<f:view content =text/html>

<div>
....
...
</div>

<java script>

<java script>

</f:view>
</html>

But later i tried by placing <f:view> tag at the top of the page after <UI:composition> as follows

<f:view content = text/html/> and i modified my comments for CDATA as

//<!--CDATA>
....
..
//]]>

Then it worked Thanks a lot!!
sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
Hi chiranjeevi
I am getting blank page i put <f:view> tag after <ui:composition> tag and am getting blank page , for the same cdata problem on safari browser ,do you have any idea?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Chrome