Urgh... I was trying to create a build from the src in 2.0.9 as well
without any progress. Glad you solved it.
Yes, please go ahead and update the wiki. I was the original author of
that page and that's why it's a wiki :-)
Max Pimm wrote:
Solved.
I have downloaded and created the custom build from the dojo 0.4.0
release instead of dojo 0.4.2 and now all works well. From comparing
files i am pretty sure that 0.4.0 was the release used in the
struts2.0.11, 2.0.10, 2.0.9 and 2.0.8 releases but it would be good if
someone could confirm that.
We should also update the wiki
(http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-struts-209.html)
to change all references to 0.4.2 to 0.4.0. I have access but perhaps
this should be approved by the developers first?
max
Max Pimm wrote:
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]
---------------------------------------------------------------------
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]