Hi Balaji,

I am not sure if this helps but I have used fragments in wicket 1.5.7 and from 
what I see in your code, it should work. Here is a simple snippet that shows 
how I used it:

In my page class, here is what I have to different and show a scrolling 
fragment or ordered list of items fragment:

                Fragment filterViewFragment;
                if (isScrollingFragment(catList)) {
                        filterViewFragment = new Fragment("filterViewFragment", 
"scrollingFragment", this);
                        // some other components or fields
                } else {
                        filterViewFragment = new Fragment("filterViewFragment", 
"regularFragment", this);
                        // some other components or fields
                }

In my page html, here is what I have:
        <wicket:panel>
                <wicket:container wicket:id="filterViewFragment" />
                <div class="clear"></div>

                <wicket:fragment wicket:id="scrollingFragment">
                        <div style="height: 355px; overflow: hidden; padding: 
0px; width: 199px;" id="pane2" class="scroll-pane jspScrollable" tabindex="0">
                                // somethig here
                        </div>
                </wicket:fragment>

                <wicket:fragment wicket:id="regularFragment">
                        <div>
                                <ul wicket:id="catListContainer">
                                        // something here
                                </ul>
                        </div>
                </wicket:fragment>
                
        </wicket:panel>

Thanks
Rama




-----Original Message-----
From: bala ji [mailto:balaji....@gmail.com] 
Sent: Wednesday, August 22, 2012 5:46 AM
To: users@wicket.apache.org
Subject: How to use wicket:fragment?

I've added a scenario where i need to use wicket:fragments.
Following is my parent html.
<html>
<body>
<wicket:child/>
</body>
</html>

Now i'm giving child html which will replace <wicket:child/> of my parent
html
<html>
<body>
<wicket:extend>
     ...
    <span wicket:id="myPanel">Example input (will be removed)</span>
     ...
     <wicket:fragment wicket:id="frag1">panel 1</wicket:fragment>
     <wicket:fragment wicket:id="frag2">panel 2</wicket:fragment>
 </wicket:extend>
</body>
</html>

 The above situation is working fine in case of wicket 1.4, but now in
wicket 1.5.3 its giving me an error of No Markup found.

-- 
Balaji.N

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

Reply via email to