I solved it by doing something this:

***** PRODUCT panel HTML *************
<wicket:panel>
        <wicket:container wicket:id="test">
        <div class="product">

        </div>
        </wicket:container>
</wicket:panel>


**** PRODUCT panel JAVA ************
                WebMarkupContainer test = new WebMarkupContainer("test") {
                        @Override
                        public void onRender(MarkupStream stream) {
                                if (forSomeCondition) {
                                        getResponse().write(" \"someurl\" ");
                                }
                                
                                renderComponent(stream);
                                if (forSomeCondition) {
                                        getResponse().write(" ");
                                        
                                }

                        }
                };
                
                add(test);






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-tp22067906p22111910.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]

Reply via email to