That's a very fine approach if have full control over the markup. However in a corporate environment, that's not always the case. As it happens, yes I can (and probably will) do that in this instance, althought 99% of the time the link tags will be redundant, and they are already buried 8 or 9 layers down, and I was hoping to avoid another. It would be useful to have a mechanism whereby markup could be injected or wrapped in this way. One little 'protected'->'public' access modifer change could sort that! ;)
thanks, -S. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juergen Donnerstag Sent: 07 September 2005 18:56 To: [email protected] Subject: Re: [Wicket-user] How can I pass a detached component the MarkupStream, or a forced parent? - Found word(s) list error in the Text body What about the approach to allways wrap it and depending on your business logic use setRenderBody() only. Thus either the surrounding tags are render or not. Juergen On 9/7/05, Simon Berriman <[EMAIL PROTECTED]> wrote: > My brief here is to create a WebMarkupContainer that will take a Component in > it constructor, and effectively 'wrap' a Link around it. This Link has no > corresponding markup id of its own; it basically 'hijacks' the id of the > passed Component. This is only for the purpose of positioning itself in the > render order correctly - the intention is to still let the passed and stored > Component 'consume' the tag. (Btw. 'onClick' event handlers are a no-go, as > the public sector accessibility guidelines I have to adhere to mandate that a > link should still work in a non-JavaScript environment.) This is for use > within a Loop, where sometimes the LoopItem is just an Image that gets > displayed, but sometimes the Image needs a hyperlink around it. > > My attempt so far is attached for public nitpicking. Feel free to do with it > what you want. All goes well until I want to render the passed and stored > (and now parentless) Component. Simply calling render() throws an NPE, as it > expects a parent from which to get the MarkupStream. Of course, I can't add > it to anything, as its in the render phase. What I ideally want to do is > call the stored components renderComponent(MarkupStream) method, but can't > because its protected. > > Any ideas/comments/alternative approaches? > -S. > Come visit us at: Content Management Europe Exhibition. 29th November - 1st December 2005, Olympia Grand Hall, London. Stand # 341 GOSS - Ranked 4th in the Deloitte Technology Fast 50 Awards 2004 and 88th in the Deloitte Technology Fast 500 EMEA. This email contains proprietary information, some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this email, please notify the author by replying to this email. If you are not the intended recipient you may not use, disclose, distribute, copy, print or rely on this email. Email transmission cannot be guaranteed to be secure or error free, as information may be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. This email and any files attached to it have been checked with virus detection software before transmission. You should nonetheless carry out your own virus check before opening any attachment. GOSS Interactive Ltd accepts no liability for any loss or damage that may be caused by software viruses. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
