Skip to main content

CombinedResources servlet issues with h:form

4 replies [Last post]
shridharns
Offline
Joined: 2006-07-05
Points: 0

Hi,

We use jmaki extensively in our application. We use several widgets in a single
page. So we wanted to make use of CombinedResourceServlet. But when you have an
h:form in the jsf page and have the widgets loading after the closing of h:form
tag, then the combined resources loads right at the closing h:form tag, ahead of
the jmaki.js and rest of the widgets loading at a later stage. This causes the
jmaki object being not available for the initialization of the widgets' js and
hence results in exception on client.

The reason seems to be the fact that PageRenderer extends Renderer class and
closing of h:form results in calling the encodeEnd method. encodeEnd method
inserts the combined resources into the jsf response!

Anyone facing this issue?

Thanks,
Shridhar

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Can you try placing a tag near the top of the page?

Something like this:

<f:view>
<html>
<a:page>
<head>
<title>Combined Test</title>
<a:resources/>
</head>
<body>
<h2>Combined Test</h2>
<hr>
<a:widget name="jmaki.test.combined1"/>
<a:widget name="jmaki.test.combined2"/>
<a:widget name="jmaki.test.combined3"/>
</body>
</a:page>
</html>
</f:view>

This should get things in the right place I hope. This is from our Combined Resource Manager tests in the ajax project in case you were wondering.

-Greg

bouteill
Offline
Joined: 2004-07-02
Points: 0

Hi Greg, yes that works but it's loading 2 js scripts at the top of the page and I understand this is not good performance best practice.
As discussed, Mojarra may do some flushing on that may be interacting badly with jMaki CRS. Do you think there is workaround possible?
Thanks,

sloanb
Offline
Joined: 2003-09-14
Points: 0

Hi Shridhar,

I haven't seen this specific problem before. I will look into the issue and let you know. We appreciate your support very much. I will let you know what I find.

Regards,
--Sloan

bouteill
Offline
Joined: 2004-07-02
Points: 0

Hey Sloan, did you get a chance to investigate this issue? We're stuck on this to be able to deploy the CRS on production. Thanks!