• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JSF Chrome

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
Ranch Hand
Posts: 218
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
f:view contentType="text/html" works for everyone else. You must be doing something wrong.
 
chiranjeevi gunturu
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
expectation is the root of all heartache - shakespeare. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic