users@woodstock.java.net

Re: Rendering fails on all browsers

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Tue, 10 Jun 2008 16:09:04 -0400

If you're using a milestone build of 4.3, the browser may have cached
previously loaded resources. Try clearing the browser cache and reload
the page.

During development, we are setting the browser cahce to 24 hours via the
web.xml file. You can also disabled the cache completely.

<!--
  <context-param>
    <param-name>com.sun.webui.theme.CACHE_DISABLED</param-name>
    <param-value>true</param-value>
  </context-param>
-->

  <!-- Set browser cache to expire in 24 hours for milestone releases. -->
  <context-param>
    <param-name>com.sun.webui.theme.CACHE_EXPIRES</param-name>
    <param-value>86400</param-value>
  </context-param>

Dan

Federico Vela wrote:
> Hi list,
>
> I have a small web app that has had problems rendering on some pc's
> running firefox.
>
> Now i'm trying to redeploy the latest, except the controls do not
> render on any platform now!!!
>
> Object cannot be created in this context" code: "9
> (no name)() Blogger (line 89)
> loaded()bootstrap.js (line 1002)
> _callLoaded()bootstrap.js (line 1087)
> _modulesLoaded()bootstrap.js (line 1074)
> _loadInit(load )
>
>
>
> woodstock4_3._base.body is not a constructor
> woodstock4_3._dojo.addOnLoad(function() {new
> woodstock4_3._base.body('/index.xhtml',
> '/Blogger/index.xhtml',null,null,'com_sun_webui_util_FocusManager_focusElementId',true);});90
>
>
>
>
> I have upgraded to latest woodstock and here's the page:
>
> <f:view xmlns="http://www.w3.org/1999/xhtml"
> xmlns:w="http://www.sun.com/webui/webuijsf"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
> <w:page frame="false"
> xhtml="false">
> <w:html>
> <w:head title="PaySett Blogger"/>
> <w:body>
> <w:messageGroup />
> <w:markup tag="h1">PaySett Blogger</w:markup><br/>
> <w:markup tag="div"
> styleClass="#{themeStyles.CONTENT_MARGIN}">
> <w:form id ="loginForm">
> Username123 : <w:textField id="tfUsername"
> text="#{LoginBean.username}" /><br/>
> Password : <w:passwordField
> id="tfPassword" text="#{LoginBean.password}" /><br/>
> <w:button id="cmbSubmit"
> action="#{LoginBean.doLogin}"
> primary="true"
> text="Login"/>
> <w:hiddenField id="isLoggedIn"
> value="#{LoginBean.isLoggedIn}"/>
> </w:form>
> </w:markup>
> </w:body>
> </w:html>
> </w:page>
> </f:view>
>
> Any ideas would be highly appreciated!
>
>
> Federico Vela
>
>
>
> Dan Labrecque wrote:
>> Actually, I meant to use a "return" statement like so:
>>
>> function init() {
>> var domNode = document.getElementById("form1:dropDown1");
>> if (domNode == null || typeof domNode.subscribe !=
>> "function") {
>> return setTimeout('init();', 10);
>> }
>> domNode.subscribe(domNode.event.refresh.endTopic,
>> processEvents, "update");
>> }
>>
>> If your alerts are not being executed, it may be that you have the
>> wrong id.
>>
>> Dan
>>
>> Ryan de Laplante wrote:
>>> The init function was causing hundreds of "dojo.event has no
>>> properties" errors. I think you intended for the subscribe to be in
>>> an else block, so I changed it to look like this:
>>>
>>> function init() {
>>> var domNode = document.getElementById('form1:dropDown1');
>>> if (domNode == null || domNode.event == null) {
>>> setTimeout("init();", 10);
>>> } else {
>>> alert('before subscribe');
>>> domNode.subscribe(domNode.event.refresh.endTopic,
>>> processEvents, "update");
>>> alert('after subscribe');
>>> }
>>> }
>>>
>>> I never see the alerts because it seems that domNode.event always ==
>>> null.
>>>
>>> Thanks,
>>> Ryan
>>>
>>>
>>> Dan Labrecque wrote:
>>>> When are you calling the document.getElementById function? I
>>>> suspect you're calling this too early and the widget has not been
>>>> created, yet. In Woodstock 4.3 (next milestone), I've added an
>>>> onLoad attribute to the head tag. This will ensure your function is
>>>> executed after all widgets have been initialized. In the mean time,
>>>> you can use the approach below.
>>>>
>>>> <head>
>>>> <script type="text/javascript">
>>>> var processEvents = {
>>>> update: function(props) {
>>>>
>>>> document.getElementById('form1:progressBar1').setProps({"visible":false});
>>>>
>>>> }
>>>> }
>>>> function init() {
>>>> var domNode = document.getElementById("form1:dropDown1");
>>>> if (domNode == null || domNode.event == null) {
>>>> setTimeout("init();", 10);
>>>> }
>>>> domNode.subscribe(domNode.event.refresh.endTopic,
>>>> processEvents, "update");
>>>> }
>>>> </script>
>>>> </head>
>>>> <body onload="init();">
>>>> ...
>>>>
>>>> Dan
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>