[
https://issues.apache.org/jira/browse/WICKET-5724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164182#comment-14164182
]
Palancher aurélien commented on WICKET-5724:
--------------------------------------------
What do you think about this solution :
The problem is when a dequeue is processed after adding an autocomponent, it is
not retrieved in MarkupContainer#dequeue(DequeueContext), line 2079 in 7.0.0-M3
Component child = get(tag.getId()); returns null because the tag id is
different from the autocomponent id.
I tried this solution with success : in tag resolvers RelativePathPrefixHandler
and HtmlHeaderResolver i checked the isOpen status of the tag. when true, i
modify the tag id to the newly created autocomponent
ex if(tag.isOpen()) //WICKET-5724
{
tag.setId(id);
}
return new TransparentWebMarkupContainer(id);
and when the dequeue process the get(id) returns the autocomponent.
(Not sure to be comprehensible :) )
I tried with HtmlHeaderResolver because i create "title component" in title
meta head tag, and it works good.
Maybe it could be interesting to do the same with the others "Auto-Open Tags
Resolvers" ?
Just added queueing-solution?zip in attachments, and as in WICKET-5722, you can
follow WICKET-5724 in RelativePathPrefixHandler and HtmlHeaderResolver
> Queueing component in autocomponent
> -----------------------------------
>
> Key: WICKET-5724
> URL: https://issues.apache.org/jira/browse/WICKET-5724
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 7.0.0-M3
> Reporter: Palancher aurélien
> Assignee: Andrea Del Bene
> Attachments: queueing-problem.zip, queueing-solution.zip
>
>
> There is an exception when a component is added to queue when its parent is
> an auto component
> <body>
> <a href="panier.html">
> <span wicket:id="inlink"></span>
> </a>
> </body>
> Last cause: Unable to find component with id 'inlink' in
> [TransparentWebMarkupContainer [Component id = wicket_relative_path_prefix_1]]
> Expected: 'wicket_relative_path_prefix_1:inlink'.
> Found with similar names: ''
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)