[ 
https://issues.apache.org/jira/browse/WICKET-6266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633880#comment-15633880
 ] 

Sebastian Gooren commented on WICKET-6266:
------------------------------------------

[~bitstorm]: after giving this a bit of thought and doing some experiments, I 
wonder about the following: should I be setting the id in a component resolver. 
The markup stream is cached by wicket, and shared across multiple requests, 
correct?

I see that the id I set on the tag is remembered across requests, so I would 
consider it a bad thing to manipulate it per request. It opens up race 
conditions: what if one request changes the id to X1 and another to X2?

Most wicket resolvers are implemented as markup filters that set a "fixed" id, 
and then a component resolver which checks for a known prefix in the id. I 
guess I should be doing the same thing...

> Component resolvers & variation broken in 7.5.0
> -----------------------------------------------
>
>                 Key: WICKET-6266
>                 URL: https://issues.apache.org/jira/browse/WICKET-6266
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 7.5.0
>            Reporter: Sebastian Gooren
>            Assignee: Andrea Del Bene
>         Attachments: quickstart.zip
>
>
> Auto components fail to render in certain cases due to changes in 
> https://issues.apache.org/jira/browse/WICKET-6231.
> See attached quickstart.
> If you use a component resolver in a page which overrides {{getVariation()}}, 
> but the html file for that page is the "default" one (without the variation 
> in the filename), wicket throws an RTE (MarkupNotFoundException: Markup not 
> found for Component: [WebMarkupContainer [Component id = custom0]]).
> Debugging reveals that this is caused by the change to 
> {{Component#getMarkup()}}. The markup that is set for auto-components might 
> not have the same variation as the html file in which it is used. Because of 
> this, the new {{markupHasCurrentVariation()}} returns {{false}}, and we fall 
> through to the end of {{getMarkup()}}. As the auto-component is dynamically 
> added on each render, {{parent.getMarkup(this)}} returns {{null}} - the 
> markup id gets created on the fly by component resolvers.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to