You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "John Ray (JIRA)" <ji...@apache.org> on 2007/10/03 00:27:50 UTC
[jira] Created: (WICKET-1032) MarkupNotFoundException when fragment
is rerendered during AJAX call
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
Fix For: 1.3.0-beta4
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.
[jira] Resolved: (WICKET-1032) MarkupNotFoundException when
fragment is rerendered during AJAX call
Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (WICKET-1032) MarkupNotFoundException when
fragment is rerendered during AJAX call
Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535381 ]
Gerolf Seitz commented on WICKET-1032:
--------------------------------------
the problem is, that the markup is not associated with the form but rather with the page.
so instead of
if ((stream == null) && (getParent() != null))
{
stream = getParent().getAssociatedMarkupStream();
}
we could do:
steam = getParent().getMarkupStream()
or find the associated markupstream somewhere in the hierarchy above the fragment:
MarkupContainer parent = getParent();
while ((stream == null) && (parent != null))
{
stream = parent.getAssociatedMarkupStream();
parent = parent.getParent();
}
Matej, wdyt?
> 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
> Priority: Minor
> Fix For: 1.3.0-beta5
>
> 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.
[jira] Commented: (WICKET-1032) MarkupNotFoundException when
fragment is rerendered during AJAX call
Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534537 ]
Matej Knopp commented on WICKET-1032:
-------------------------------------
Can you please provide a quickstart for this?
> 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
> Priority: Minor
> Fix For: 1.3.0-beta5
>
>
> 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.
[jira] Updated: (WICKET-1032) MarkupNotFoundException when fragment
is rerendered during AJAX call
Posted by "John Ray (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Ray updated WICKET-1032:
-----------------------------
Fix Version/s: (was: 1.3.0-beta4)
Priority: Minor (was: Major)
> 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
> Priority: Minor
>
> 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.
[jira] Updated: (WICKET-1032) MarkupNotFoundException when fragment
is rerendered during AJAX call
Posted by "John Ray (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Ray updated WICKET-1032:
-----------------------------
Attachment: quickstart.zip
I've attached a simple quick start page. Simply add this to your application
mountBookmarkablePage("/test.html", quickstart.MarkupNotFound.class);
My original problem involved putting a fragment inside a ListItem but I simplified the example by putting it inside a form.
> 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
> Priority: Minor
> Fix For: 1.3.0-beta5
>
> 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.
[jira] Updated: (WICKET-1032) MarkupNotFoundException when fragment
is rerendered during AJAX call
Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matej Knopp updated WICKET-1032:
--------------------------------
Fix Version/s: 1.3.0-beta5
> 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
> Priority: Minor
> Fix For: 1.3.0-beta5
>
>
> 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.
[jira] Assigned: (WICKET-1032) MarkupNotFoundException when
fragment is rerendered during AJAX call
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reassigned WICKET-1032:
-------------------------------------
Assignee: Juergen Donnerstag
> 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-beta5
>
> 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.
[jira] Updated: (WICKET-1032) MarkupNotFoundException when fragment
is rerendered during AJAX call
Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Frank Bille Jensen updated WICKET-1032:
---------------------------------------
Fix Version/s: (was: 1.3.0-rc1)
1.3.0-rc2
> 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.