You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2007/12/01 10:31:43 UTC
[jira] Resolved: (WICKET-1032) MarkupNotFoundException when
fragment is rerendered during AJAX call
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juergen Donnerstag resolved WICKET-1032.
----------------------------------------
Resolution: Fixed
thanks. should be fixed
> MarkupNotFoundException when fragment is rerendered during AJAX call
> --------------------------------------------------------------------
>
> Key: WICKET-1032
> URL: https://issues.apache.org/jira/browse/WICKET-1032
> Project: Wicket
> Issue Type: Bug
> Reporter: John Ray
> Assignee: Juergen Donnerstag
> Priority: Minor
> Fix For: 1.3.0-rc2
>
> Attachments: quickstart.zip
>
>
> I have a Fragment with a TextField inside of it. Everything works fine when the page is first loaded. However inside of an AJAX call I add the TextField to be rendered again and I get a MarkupNotFoundException from the fragment. Apparently because the TextField asks the Fragment for the markup and the fragment can't find it. I tracked the problem down and when I'm constructing the Fragment I pass in a ListItem (that contains the fragment) as the markupProvider. If I pass in the WebPage then everything works fine.
> I noticed in the Fragment.chooseMarkupStream() there is this section of code that get's called during the initial page rendering.
> stream = markupProvider.getAssociatedMarkupStream(false);
> if (stream == null)
> {
> // The following statement assumes that the markup provider is a
> // parent along the line up to the Page
> stream = markupProvider.getMarkupStream();
> }
> However during the AJAX call back Fragment.getAssociatedMarkupStream() is called and it only has
> if (markupProvider != null)
> {
> stream = markupProvider.getAssociatedMarkupStream(false);
> }
> If I add the "if (stream == null)" section that chooseMarkupStream() has to the above code then AJAX calls work fine even if I pass in a ListItem as the markupProvider to a Fragment. I'm not sure if this is the correct fix as I don't know the wicket code that well. I suppose another fix might be to prohibit passing in components such as ListItems as the markupProvider or at least make the Java Docs a little clearer.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.