users@woodstock.java.net

Re: change in span id generation [was Re: multiple JSF portlet error: javascript init problem?]

From: Istvan Soos <syntern_at_sch.bme.hu>
Date: Thu, 20 Mar 2008 21:06:18 +0100

>>>>
>> I've tried your suggestion and other ideas too, however it is still
>> not perfect. This modification is definitely one step further and
>> required, as if I use this, I see one JSF portlet working (the last
>> one on the page). The ids seem to be ok, but the other portlets
>> just do not show anything. That leaves one last option: there is
>> some initialization code that creates some inconsistency. I am not
>> a JavaScript guy, so I am unable to tell where could be this one
>> wrong... Any idea I can look into?
>
> Are there any JavaScript errors in the page?
>
> Does each Portlet have its own head tag? (Typically, CSS and
> JavaScript are typically added to the page via the head tag.) If so,
> your portlets could be overriding previously initialized JavaScript.
> Or, it may be that the browser cannot handle more than one HTML head
> tag and simply displays the last tag in the page. I can ensure these
> resources are not re-initialized, but perhaps you can ensure your
> portlets are not outputting multiple head tags?

Firefox Error Console does not indicate any error. The head tags are
right (= no extra head tags), an example HTML source part from the
previously attached files:

<div class="portlet-content">
<div class="portlet-content-container" style="">
<div>
<div style="-rave-layout: grid; position: relative; height: 400px;
width: 400px;">
<link rel="stylesheet" type="text/css" href="/IPCSampleJSFPortlet/
theme/com/sun/webui/jsf/suntheme4_1_1/css/css_master-all.css" />
<script type="text/javascript">var
djConfig={"isDebug":false,"parseOnLoad":false}</script>
<script type="text/javascript" src="/IPCSampleJSFPortlet/theme/META-
INF/json2_0/json.js"></script>
<script type="text/javascript" src="/IPCSampleJSFPortlet/theme/META-
INF/prototype1_5/prototype.js"></script>
<script type="text/javascript" src="/IPCSampleJSFPortlet/theme/META-
INF/com_sun_faces_ajax.js"></script>
<script type="text/javascript" src="/IPCSampleJSFPortlet/theme/META-
INF/dojo1_0_1/dojo/dojo.js"></script>
<script type="text/javascript" src="/IPCSampleJSFPortlet/theme/META-
INF/dojo1_0_1/dijit/dijit.js"></script>
<script type="text/
javascript">dojo.registerModulePath("webui.suntheme", "/
IPCSampleJSFPortlet/theme/com/sun/webui/jsf/suntheme4_1_1/
javascript");</script>
<script type="text/javascript" src="/IPCSampleJSFPortlet/theme/com/sun/
webui/jsf/suntheme4_1_1/javascript/webui-jsfx.js"></script>
<script type="text/javascript">webui.suntheme.bootstrap.init({"theme":
{"module":"webui.suntheme.theme","locale":"en-US","prefix":"/
IPCSampleJSFPortlet/theme","bundle":"suntheme","modulePath":"/com/sun/
webui/jsf/suntheme4_1_1/javascript/theme"},"debug":false});</script>
<form
id="_IPCSampleJSFPortlet_WAR_IPCSampleJSFPortlet_INSTANCE_gW22_:form1"
class="form" method="post" action="...." ...>

And yes, I'd agree that the overriding of a previously initialized
JavaScript is the typical situation here. Could you please help me in
this? I can debug / check all the Java codes but you can kill me with
JavaScript :)

Thanks,
    Istvan