I want to remove all elements from a ContentPanel on a mouse click event and add new ones. It is working fine with removeAll() method, this removes all existing components. But when I want to add a new Component it is not added.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe something like this i omitted the click handler but you should get the idea from this.
Most important part is
this.layout(true)to force it to refresh your layout,