Wicket Fragments and Wicket Extends

2012-04-03 Thread Ciaran Liedeman
Hello,

I've been trying to use fragments in a page but can't seem to get it to work.
It fails with an error saying No markup found for fragment id...

I used the example as if from the 1.5 javadocs
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/markup/html/panel/Fragment.html

the only difference being my page extends a base page. If I remove the 
wicket:extend in the html
and the extends BasePage in the java the fragment markup is found.

I mananged to get it to work with extending the BasePage by placing the 
fragment code in the BasePage.html
File but this means all my fragments will have to be placed in that file.

Am I missing something simple? Where should fragment html code be placed for 
pages that use
wicket:extend?

Ciaran

Paltrack Pty (Ltd) Reg No 2000/002936/07
Directors: A.J. Mouton (Managing) |  J.G.F. du Plessis | J. vW. Rossouw 
(Chairman)


This email and any accompanying attachments may contain confidential and 
proprietary information. This information is private
and protected by law and, accordingly, if you are not the intended recipient, 
you are requested to delete this entire
communication immediately and are notified that any disclosure, copying or 
distribution of or taking any action based on this
information is prohibited.

Emails cannot be guaranteed to be secure or free of errors or viruses. The 
sender does not accept any liability or
responsibility for any interception, corruption, destruction, loss, late 
arrival or incompleteness of or tampering or
interference with any of the information contained in this email or for its 
incorrect delivery or non-delivery for whatsoever
reason or for its effect on any electronic device of the recipient.

If verification of this email or any attachment is required, please request a 
hard copy version.
__
Queries to: helpd...@paltrack.co.za

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



Re: Wicket Fragments and Wicket Extends

2012-04-03 Thread Martin Grigorov
Hi,

See 
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java#L70
wicket:fragment should be inside the HTML element to which is
assigned 'markupProvider' component.

Show us your code if you need more help.

On Tue, Apr 3, 2012 at 6:08 PM, Ciaran Liedeman cia...@paltrack.co.za wrote:
 Hello,

 I've been trying to use fragments in a page but can't seem to get it to work.
 It fails with an error saying No markup found for fragment id...

 I used the example as if from the 1.5 javadocs
 http://wicket.apache.org/apidocs/1.5/org/apache/wicket/markup/html/panel/Fragment.html

 the only difference being my page extends a base page. If I remove the 
 wicket:extend in the html
 and the extends BasePage in the java the fragment markup is found.

 I mananged to get it to work with extending the BasePage by placing the 
 fragment code in the BasePage.html
 File but this means all my fragments will have to be placed in that file.

 Am I missing something simple? Where should fragment html code be placed for 
 pages that use
 wicket:extend?

 Ciaran

 Paltrack Pty (Ltd) Reg No 2000/002936/07
 Directors: A.J. Mouton (Managing) |  J.G.F. du Plessis | J. vW. Rossouw 
 (Chairman)


 This email and any accompanying attachments may contain confidential and 
 proprietary information. This information is private
 and protected by law and, accordingly, if you are not the intended recipient, 
 you are requested to delete this entire
 communication immediately and are notified that any disclosure, copying or 
 distribution of or taking any action based on this
 information is prohibited.

 Emails cannot be guaranteed to be secure or free of errors or viruses. The 
 sender does not accept any liability or
 responsibility for any interception, corruption, destruction, loss, late 
 arrival or incompleteness of or tampering or
 interference with any of the information contained in this email or for its 
 incorrect delivery or non-delivery for whatsoever
 reason or for its effect on any electronic device of the recipient.

 If verification of this email or any attachment is required, please request a 
 hard copy version.
 __
 Queries to: helpd...@paltrack.co.za

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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