Wednesday, March 18, 2009

Wicket All Over Again

HAHAHA! I do not remember how to do Wicket (http://wicket.apache.org/) and Cascading Style Sheets (CSS) for html pages. This week for the software engineering class, we are refreshing our minds with an example on wicket, cascading style sheets, and HTML’s. The example is using a menu bar, submenus, and CSS to create an appropriate look. We took the code from a guy named Adam Kalsey (http://kalsey.com/2003/05/css_tabs_with_submenus/) and we have to modify his example to fit what we want.

My first task was to make a new menu (menu 3) in the menu bar that comes with three submenus. That was easy, just have to add some new codes to the BasePage.java and create new htmls for menu 3 and its submenus.


My second task was to make menu 3 to hold ten submenus tabs. So I went into the menu.css and added #menu #subnav 4 to #menu #subnav 10, so this will let the menu bar hold ten submenu tabs.


My third task is that when the header/title text on the page is change to different sizes, the submenus are not dynamically position; they are set to a constant number of pixels. If we change the text size from one to another, we also have to change the fixed position of the submenus. By doing that, we have to go into the menu.css and change this part of the code to the correct number of pixels.


I had trouble doing the final task for this example, is to make the submenu tabs highlight people are viewing that submenu. I did a little research using Google.com to search up any useful implementation of that kind. They had some, but did not work out in the menu bar. A little Java Scripting would be helpful in the future; if possible we can use it for the Devcathlon system.

Had this handy dandy book on the side:


Here are the files that I modify and used, the ten tabs can only be view on test-menu3.java (because that was the page that I modify and did not add to test-menu1.java and test-menu2.java): http://sites.google.com/site/phillipkhlau/files/wicket-example05-phillipkhlau-1.0.318.zip

No comments: