I am using firebug and Venkman to debug. No requests are sent to get
data for the list. After debugging the problem seems to be that the
Struts comboBoxDataProvider's init method never gets called. This means
the widget never loads data from the server. Every time the user edits
the input field events are fired and the widget searches for data
matching the input string. However since no data is loaded from the
server no match is found and no autocomplete list is shown.
So the problem is with the data provider. Looking more carefully at the
dojo.widget.ComboBox component the problem would seem to be that the
0.4.2 release of dojo is NOT the same as the one bundled with struts.
There are significant differences in the dojo.ComboBox and data provider
in the two versions. I've tried copying the dojo code included in the
struts bundle to the dojo 0.4.2 release but the build fails.
Which is the dojo version that was used in the build of
struts2-core-0.011.jar?
Jeromy Evans wrote:
Max Pimm wrote:
I am trying to make a custom build of dojo for my application in
order to speed it up a bit.
(See threads "[s2] Struts head tag KILLS (> 10s) page load time" and
"How to improve dojo performance in Struts 2.0.9")
I have followed the instructions for doing this are carefully as
possible from
http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-209.html.
My custom build appears to have worked. dojo.js is generated with the
struts widgets "Internalized", each page i load makes minimal
requests for other dojo scripts and the basic bind functionality of
dojo works.
However the Struts:Combobox component used in my autocompleters does
not work. Some code is executed when i edit the field but it does not
result in a petition to the server y hence no autocomplete list is
shown. Dojo is configured in debug mode but gives no errors. The
struts folder containing the widgets is present in
<contextroot>/struts/dojo. Dojo correctly finds the dropdown image
for the input and uses the styles in ComboBox.css the only problem is
that it does not issue petitions to the server when the onKeyUp event
fires.
I am using the 2.011 build of struts, is the process for building a
custom dojo build the same as in 2.09? I can't find any changes in
the ComboBox between these versions but is there anything else that
might be causing these problems.
Does anyone have any advice for how to start debugging this?
Thanks,
max
I'm not sure what is wrong, but the approach I'd take to debug it is:
- Use firebug to see if the page is getting a 404 trying to load any
of the resources required by dojo. This is the most likely cause if
it was working before you created the custom build
- Replace your dojo.js file with the dojo.js-uncompressed.js file
also created by the build process. This one contains comments and
debug info. See if any errors are now displayed
- Find the combobox code in dojo.js-uncompressed.js and use
breakpoints in firebug to find out exactly what's happening.
Let me know how you go.
cheers,
Jeormy Evans
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]