Hi Martin,

Thanks for your guidance on how to post a question. 

My scenario is like this. 

i'm having a webpage where i have a panel inside it and then inside the
panel i have a form where i'm placing a fragment conditionally. 

This the code for adding the panel to the page.

<div id="MenuFirstPanel" wicket:id="MenuFirstPanel" ></div>

This is the code for adding the fragment. 

    <form wicket:id="form">  
        <div wicket:id="MenuPanel"></div>   
            <wicket:fragment  wicket:id="testFragment">
                <div class="clear"></div>
sample test
                <p class="welcome">test message: 244326.</p>
                <div style="margin-top: 10px;">Your name is: </div>

this is how i add the fragment in my corresponding panel.java class. 

Fragment testFrag  = new Fragment("MenuPanel","testFragment", this);
              testFrag.add(new Label("shortcode", "11111");

when i do this the following exception is thrown: 

org.apache.wicket.markup.MarkupNotFoundException: No Markup found for
Fragment 'testFragment' in providing markup container [MenuFirstPanel
[Component id = MenuFirstPanel]]
        at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451)
        at org.apache.wicket.Component.getMarkup(Component.java:743)
        at org.apache.wicket.Component.getMarkupTag(Component.java:1389)
        at org.apache.wicket.Component.getMarkupIdFromMarkup(Component.java:752)
        at org.apache.wicket.Component.getMarkupIdImpl(Component.java:1446)
        at org.apache.wicket.Component.getMarkupId(Component.java:1474)

I tried moving the fragment code outside the form element and it works fine
without an issue.  can any one shed some light on this issue. Thanks in

View this message in context: 
Sent from the Users forum mailing list archive at Nabble.com.

To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to