Skip to main content

CombinedResources servlet issues with h:form

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


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?


Reply viewing options

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

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

Something like this:

<title>Combined Test</title>
<h2>Combined Test</h2>
<a:widget name="jmaki.test.combined1"/>
<a:widget name="jmaki.test.combined2"/>
<a:widget name="jmaki.test.combined3"/>

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.


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?

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.


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!