You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dirk Forchel (JIRA)" <ji...@apache.org> on 2012/05/09 13:35:50 UTC

[jira] [Created] (WICKET-4545) MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

Dirk Forchel created WICKET-4545:
------------------------------------

             Summary: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
                 Key: WICKET-4545
                 URL: https://issues.apache.org/jira/browse/WICKET-4545
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.6
            Reporter: Dirk Forchel


Create a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. Add a Fragment to one of these subsclasses, the markup of the Fragment is not found. 
See also http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html

Exception thrown:

org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment testFragment in providing markup container [Page class = org.foo.HomePage, id = 0, render count = 1]
at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4545) MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271481#comment-13271481 ] 

Martin Grigorov commented on WICKET-4545:
-----------------------------------------

The problem is in org.apache.wicket.markup.Markup#find(String) method which skips the body of the ComponentTag assigned to TransparentWebMarkupContainer.
#find() method looks for the child's markup only at one level depth but it should look one more lever deeper for TWMC. But since Component#onComponentTag() works with a copy of the real ComponentTag I see no way how to mark the ComponentTag as auto or to set it some other flag/userData which to be used when deciding whether to skip the children or not.

Anyone have ideas ?  
                
> MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
> ----------------------------------------------------------------------
>
>                 Key: WICKET-4545
>                 URL: https://issues.apache.org/jira/browse/WICKET-4545
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.6
>            Reporter: Dirk Forchel
>         Attachments: quickstart.zip
>
>
> Create a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. Add a Fragment to one of these subsclasses, the markup of the Fragment is not found. 
> See also http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html
> Exception thrown:
> org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment testFragment in providing markup container [Page class = org.foo.HomePage, id = 0, render count = 1]
> at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4545) MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

Posted by "Sebastian Gooren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13474945#comment-13474945 ] 

Sebastian Gooren commented on WICKET-4545:
------------------------------------------

In the meantime, this can be fixed by using the TransparentWebMarkupContainer as the markupProvider constructor argument.

Cloning the markup stream or marking the TWMC as an auto component seems overkill or abusing the auto flag, no?
On the other end the wicket internals have become so much cleaner since 1.5 that an "if (component instanceof IComponentResolver) look_deeper" is out of the question?
                
> MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
> ----------------------------------------------------------------------
>
>                 Key: WICKET-4545
>                 URL: https://issues.apache.org/jira/browse/WICKET-4545
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.6
>            Reporter: Dirk Forchel
>         Attachments: quickstart.zip
>
>
> Create a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. Add a Fragment to one of these subsclasses, the markup of the Fragment is not found. 
> See also http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html
> Exception thrown:
> org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment testFragment in providing markup container [Page class = org.foo.HomePage, id = 0, render count = 1]
> at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4545) MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271486#comment-13271486 ] 

Martin Grigorov commented on WICKET-4545:
-----------------------------------------

Currently org.apache.wicket.Component#internalRenderComponent() gets a mutable ComponentTag from the MarkupStream's current tag and uses it for #onComponentTag(), #onComponentTagBody(), etc.
The problem can be solved if instead a mutable copy of the MarkupStream is created when a Page starts to render and this mutable MarkupStream is used for the rendering of all components in the page. This way TWMC can mark itself as auto component and Markup#find() will look into its children too.
                
> MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
> ----------------------------------------------------------------------
>
>                 Key: WICKET-4545
>                 URL: https://issues.apache.org/jira/browse/WICKET-4545
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.6
>            Reporter: Dirk Forchel
>         Attachments: quickstart.zip
>
>
> Create a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. Add a Fragment to one of these subsclasses, the markup of the Fragment is not found. 
> See also http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html
> Exception thrown:
> org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment testFragment in providing markup container [Page class = org.foo.HomePage, id = 0, render count = 1]
> at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4545) MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13474954#comment-13474954 ] 

Martin Grigorov commented on WICKET-4545:
-----------------------------------------

[~bgooren] Please attach a patch and we will evaluate it.
                
> MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
> ----------------------------------------------------------------------
>
>                 Key: WICKET-4545
>                 URL: https://issues.apache.org/jira/browse/WICKET-4545
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.6
>            Reporter: Dirk Forchel
>         Attachments: quickstart.zip
>
>
> Create a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. Add a Fragment to one of these subsclasses, the markup of the Fragment is not found. 
> See also http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html
> Exception thrown:
> org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment testFragment in providing markup container [Page class = org.foo.HomePage, id = 0, render count = 1]
> at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4545) MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

Posted by "Dirk Forchel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dirk Forchel updated WICKET-4545:
---------------------------------

    Attachment: quickstart.zip

Quickstart attached.
                
> MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
> ----------------------------------------------------------------------
>
>                 Key: WICKET-4545
>                 URL: https://issues.apache.org/jira/browse/WICKET-4545
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.6
>            Reporter: Dirk Forchel
>         Attachments: quickstart.zip
>
>
> Create a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. Add a Fragment to one of these subsclasses, the markup of the Fragment is not found. 
> See also http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html
> Exception thrown:
> org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment testFragment in providing markup container [Page class = org.foo.HomePage, id = 0, render count = 1]
> at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira