On Fri, Nov 25, 2011 at 8:20 AM, Fabiosakiyam <[email protected]>wrote:
> Hello,
>
> Sorry if this is already solved, but i couldn't find it, 'cause i don't
> really know what is the name of this, that's why the subject is weird.
>
> Ok so, im creating a new component (extends panel), and his .java is
> something like this:
>
> class Component {
> getType().buildContainer();
> }
>
> It builds a container, depending on it's type. At the moment i have to 2
> types only.
> And the component .html is something like this:
>
> <wicket:panel>
> <div wicket:id="firstContainerName"/>
> <div wicket:id="secondeContainerName"/>
> </wicket:panel>
>
> the first and second container have a .java and a .html as well, declaring
> the fields, etc.
> I want to know if it's possible to do what i'm trying at the component.html
> , i mean, declaring all types of containers i have (but only 1 will be
> built, at the getType().buildContainer()), and by declaring the wicket:id
> of
> them, it will get the wicket:id from the fields declared at the container
> too.
>
> It's kinda confuse to explain, i hope someone understand.
> Sorry for bad english.
>
> Thanks.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dynamic-component-tp4107323p4107323.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
This is an XY problem [1]. You're asking "can I do this weird thing with a
panel". Hard to say. Why don't you explain to us what you're really
trying to accomplish. My bet is that there is a much better way of doing
it than what you're asking about above. That's the nature of XY problems.
[1] - http://www.perlmonks.org/?node_id=542341
--
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket? Use Brix! http://brixcms.org*