A huge element to the Devcathlon system is its dynamic pieces. Because ICS 414 is Java-centric, the team is using the Wicket framework to develop the web segment of Devcathlon. The class was given an exercise to highlight menu tabs using css, html, and wicket.
Code
I have a limited background working with css and html. With this assignment I am getting a lot of hands on experience with setting up links and adjusting the page's layout.

<ul id="subnav-3"> <li><a href="test-submenu5.html">submenu5</a></li> <li><a href="test-submenu6.html" class="active">submenu6</a></li> <li><a href="test-submenu7.html">submenu7</a></li> </ul> add(new Link("SubMenu6Link") { private static final long serialVersionUID = 1L; /** Upon clicking this link, go to FormPage. */ @Override public void onClick() { setResponsePage(new SubMenu6Page()); } }); ...With Wicket and a small addition of script on the html side I added three sub-menus to Menu 3.
- Add three links via html.
- Add three new sub-menu links via Wicket.
- Clicking on a sub-menu tab will link to the selected page.
- css handles the tabs' construction.


body.section-1 #menu ul#subnav-1, body.section-2 #menu ul#subnav-2, body.section-3 #menu ul#subnav-3, body.section-4 #menu ul#subnav-4 { display : inline; left : 10px; position : absolute; top : 66px; <--- To adjust the positioning of the sub-menus, I had to play with the numbers. }


#menu a.active { font-weight : bold; } <ul id="menu"> <li id="nav-1"><a href="test-menu1.html">menu1</a></li> <li id="nav-2"><a href="test-menu2.html" class="active">menu2</a> <li id="nav-3"><a href="test-menu3.html">menu3</a> </ul>Conclusion
Making changes to a web page using only html and css can be time consuming and tedious. By spending some time learning the Wicket framework editing a web page will be much less of hassle.
Updated Version
Daniel's version of the menu bars.
Task 5

<ul id="menu"> <li id="nav-1"><a wicket:id="Menu1Link" href="#">Menu1</a></li> <li id="nav-2"><a wicket:id="Menu2Link" href="#">Menu2</a> <ul id="subnav-1"> <li><a wicket:id="SubMenu1Link" href="#">SubMenu1</a></li> <ul id="subnav-2"> <li><a wicket:id="SubMenu2Link" href="#">SubMenu2</a></li> </ul> </ul> </li> <li id="nav-3"><a wicket:id="Menu3Link" href="#">Menu3</a> <ul id="subnav-3"> <li><a wicket:id="SubMenu5Link" href="#">SubMenu5</a></li> <ul id="subnav-4"> <li><a wicket:id="SubMenu6Link" href="#">SubMenu6</a></li> <ul id="subnav-5"> <li><a wicket:id="SubMenu7Link" href="#">SubMenu7</a></li>Task 6 & 7
body.section-1 #menu li#nav-1 a, body.section-2 #menu li#nav-2 a, body.section-3 #menu li#nav-3 a, body.section-4 #menu li#nav-4 a { background : White; border-bottom : 1px solid White; color : #3366CC; cursor : default; } #menu #subnav-1, #menu #subnav-2, #menu #subnav-3, #menu #subnav-4, #menu #subnav-5 { display : none; width: 90%; } body.section-2 #menu ul#subnav-1, body.section-3 #menu ul#subnav-3 { display : inline; left : 10px; position : absolute; top : 66px; } body.section-2 #menu ul#subnav-2, body.section-3 #menu ul#subnav-4, body.section-3 #menu ul#subnav-5 { display : inline; left : 88px; position : absolute; top : 0px; } body.section-2 #menu ul#subnav-1 a, body.section-2 #menu ul#subnav-2 a, body.section-3 #menu ul#subnav-3 a, body.section-3 #menu ul#subnav-4 a, body.section-3 #menu ul#subnav-5 a { background : White; border : none; border-left : 1px solid #3366CC; color : #3366CC; line-height : 10px; margin-right : 4px; padding : 5px 10px 5px 10px; text-decoration : none; cursor : default; }

<li id="nav-3"><a wicket:id="Menu3Link" href="#">Menu3</a> <ul id="subnav-3"> <li><a wicket:id="SubMenu5Link" href="#">SubMenu5</a></li> <ul id="subnav-4"> <li><a wicket:id="SubMenu6Link" href="#">SubMenu6</a></li> <ul id="subnav-5"> <li><a wicket:id="SubMenu7Link" href="#">SubMenu7</a></li> <ul id="subnav-6"> <li><a wicket:id="SubMenu8Link" href="#">SubMenu8</a></li> <ul id="subnav-7"> <li><a wicket:id="SubMenu9Link" href="#">SubMenu9</a></li> <ul id="subnav-8"> <li><a wicket:id="SubMenu10Link" href="#">SubMenu10</a></li> <ul id="subnav-9"> <li><a wicket:id="SubMenu11Link" href="#">SubMenu11</a></li> <ul id="subnav-10"> <li><a wicket:id="SubMenu12Link" href="#">SubMenu12</a></li> <ul id="subnav-11"> <li><a wicket:id="SubMenu13Link" href="#">SubMenu13</a></li> <ul id="subnav-12"> <li><a wicket:id="SubMenu14Link" href="#">SubMenu14</a></li> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </ul> //Java code snippet add(new Link("SubMenu14Link") { private static final long serialVersionUID = 1L; /** Upon clicking this link, go to FormPage. */ @Override public void onClick() { setResponsePage(new SubMenu14Page()); } });In the css file menu.css, I added 7 more subnav tags to deal with the new submenu tabs.
Task 8

public Menu1Page() { add(new WebMarkupContainer("body") { private static final long serialVersionUID = 1L; @Override public boolean isTransparentResolver() { return true; } @Override protected void onComponentTag(ComponentTag tag) { tag.put("class","section-1"); } }); get("Menu1Link").add(new SimpleAttributeModifier("class", "active")); }The above code calls on the active tag in menu.css to make a given tab bold anytime a user clicks on it.