java - What is the purpose of using a distinct class for each tab in Wicket? -


The wicket example page for TabbedPanel () uses separate, separate squares for each tab (TabPanel1, TabPanel2 and TabPanel3) is. Is there any reason not to use three instances of the same class? If yes, what is it? I am still quite new to the wicket, but these classes look like me.

Edit: I gave a simple example, using all three tabs, all the square tab panels were set to use each separate label, and they displayed properly.

EDIT: After using more and reading the answers posted later, I realized that my first example was very easy. Using a class, the tab title may be different but the argument will still be the same. It will not work unless a person does not mention it, it became a "swiss army knife" class, which is a bad design and will still not address the markup file.

The wicket is designed to encourage the development of reusable components. See the three different sections as separate components with different behaviors and content, which you want to use in different pages of your application. For contact information, press tab 1, tab 2 for a map and say tab 3 for photos. You do not really want to create a Swiss-Army Knife-Panel to manage those different objectives. For example, different panel squares are used.

Of course this example does not use the best prices - but it may be a better idea if you work from the general principles of the wicket (special care), instead of these special components from the wikipedia-extension package. is.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -