There is still problem with unique id of InlineEnclosures.
The introduced counter is field member of InlineEnclosureHandler but IMarkupFilter instances are not shared between markup files. I.e. MyPanelA will use instance of InlineEnclosureHandler and MyPanelB will use another instance of InlineEnclosureHandler. So their produced markup will have unique 'counter' by its own, but the counters will collide in the final page markup.

Martin Grigorov
added a comment - 28/Apr/13 12:37 There is still problem with unique id of InlineEnclosures.
The introduced counter is field member of InlineEnclosureHandler but IMarkupFilter instances are not shared between markup files. I.e. MyPanelA will use instance of InlineEnclosureHandler and MyPanelB will use another instance of InlineEnclosureHandler. So their produced markup will have unique 'counter' by its own, but the counters will collide in the final page markup.

Martin Grigorov
added a comment - 28/Apr/13 12:48 The problem is even deeper.
The problem with the many instances of InlineEnclosureHandler is easily solved by making the 'counter' variable static.
But there is still a problem when PanelA is repeated in Wicket repeater. In this case the produced markup for all renderings of PanelA have the same HTML ids.