wicket's default components do not mutate markup, so you cannot do
that. a better contract is eg

componentfactor { panel getpanel(string id); } eg ITab in extensions.
that way you know it will always work.

-igor

On Wed, Jun 18, 2008 at 7:39 PM, Dreamage <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> If for example I have the following panel:
>
> <html xmlns:wicket>
> <wicket:panel>
> <div>
>  < span wicket:id="genericComponent"/>
> </div>
> </wicket:panel>
> </html>
>
> And I want to insert a component at the place of span tag, but the component
> is not instanciated by the panel ... it's provided by a factory. Here is the
> code :
>
> public class MyPanel extends Panel{
>        public MyPanel(String id, ComponentFactory factory) {
>                super(id);
>                //Create a new generic component using a specific id
>                add(factory.getComponent("genericComponent"));
>        }
>
> }
>
> The problem is that if the factory returns a TextField, the placeholder tag
> need to be a input tag instead of a span. Is there a generic wicket tag that
> could allow me to indicate where a component goes without binding it to a
> specific tag ? If not, can this be done another way ?
>
> Thanks
> --
> View this message in context: 
> http://www.nabble.com/Generic-component-placeholder-tp17996229p17996229.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to