Prag,
It would be tough to write a component that could "replace" itself,
and I think that it's impossible to have a component that's visible
when its parent is invisible.
What you want to do is create a Panel that either displays the link
with the product within it, or just displays the product. You'll
probably want to use Fragment within the Panel, which will let you use
a different bit of markup for each case while still keeping it in one
HTML file. You could also just create the components for both cases
(a standalone Label and a Link containing a second Label) and just
show one or the other.
W
On Feb 17, 2009, at 5:37 PM, Prag wrote:
For a component (A) I would like to be able to add a surrounding
component
(B) (a link) in some cases. Component A itself should be able to add
surrounding component B.
Example:
A product component in some cases has detailed info. If this is the
case,
the product component should be linkable to the detailed page. If it's
linkable, the product component should add a surrounding link to
itself to
the detailed page.
So the product component should be able to hide/add its parent without
itself become hidden.
How can I achieve this?
--
View this message in context:
http://www.nabble.com/Add-a-surrounding-component-to-itself-tp22067906p22067906.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]