Palette does not render arrows since Wicket 7.x.x

自古美人都是妖i 提交于 2019-12-11 13:55:37

问题


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 divs 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!