问题
See this minimal demo at GitHub: https://github.com/ErikVerheul/PaletteBugDemo.git
I expected that the code line palette.add(new DefaultTheme()); would do the trick. However, it did not.
When changing the Wicket version to 6.20.0 all works fine.
Did I miss something?
help appreciated, Erik
回答1:
Short answer: Remove your paragraph <p>
and use a <div>
instead of the <span>
for the palette.
Long answer
The p
paragraph cannot contain other block elements. In Wicket 6.x the palette uses a table
to layout the "Available" und "Selected" options. In Wicket 7.x div
s are used for that, since tables only should be used for tabular data and not for layouting. Neither tables nor divs are allowed in a paragraph though. I guess browsers are just a bit more forgiving when using tables at wrong places, hence you are seeing a somewhat correct result with version 6.x.
Another problem is that you are using a span
tag for your palette. Again, the palette is inserting either a table
or several div
tags, but neither of these are valid in between the span tag.
So something like this should do it:
<form>
<div class="mystyle">
<div wicket:id="palette"></div>
</div>
...
</form>
回答2:
Problem SOLVED. Thank you Martin! As a Wicket novice I used a version 6 example not knowing the changes in version 7. The working version is now on GitHub.
回答3:
It does work fine here: http://examples7-apachewicket.rhcloud.com/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage
Please check what is different in your app.
来源:https://stackoverflow.com/questions/33740642/palette-does-not-render-arrows-since-wicket-7-x-x