igor.vaynberg wrote:
> 
> exactly how does this break the "wicket way"?
> 
> behaviors are meant to augment rendering of components
> 
> -igor
> 

I hope the wording wasn't offensive, it wasn't the aim at all.

back to the topic : here, instead of using a feedback panel (which was
exactly what was needed), the solution is to copy/paste/adapt the feedback
panel inside the behavior. 

However, simply adding the feedbackpanel in it like this would have done the
trick :
            FeedbackPanel dedicatedFP = new FeedbackPanel("fbLabel");
            dedicatedFP.setFilter(new IFeedbackMessageFilter(){

                public boolean accept(FeedbackMessage message)
                {
                    if (message.getReporter().equals(myComponent) &&
!(message.isRendered())){
                        message.markRendered();
                        return true ;
                    }else{
                        return false ;
                    }
                    
                }});
            add(dedicatedFP);

Simply put, I found it odd to rewrite some already existing component.

Furthermore, doing it directly through "write(xxx)" commands feels like good
old servlet and not like wicket, which usually provides a html template.
Where is the usual separation between code and presentation ? 

Hence this suggestion of a "composer", which I thought might nicely solve
this issue (clean separation of html and Java, possibility to add
components).

thanks for your time responding !

zedros



-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-component-in-a-behavior---tp21758993p21821052.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to