• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom menu system(s) -- Best design approach ?  RSS feed

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
Got this idea that I could have a choice for users --
- drop down menu
- animtree
depending on the user choice, the css would change, but the HTML would also change. Unfortunately, it's not perfectly structured HTML, but rather divs and spans. The structure for either menu system is different.
Would it be best to use XML for this? What I mean is, to have the links in XML and then transform this depending on the user's choice?
Since it's only 2 nav systems, I could hand code them out. This would be a lot easier initially, but it would be a little annoying to change links in two places.
What should I do? I've never used XSLT with server side java.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's not perfectly structured HTML, but rather divs and spans

I don't understand this statement. What's not 'perfectly structured HTML' about divs and spans?
bear
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Personally I'd opt for a custom tag over a transform....
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfectly structured would mean that you'd have a tag for each purpose.
H1 is for the first-level heading. If you want it to be smaller, you can use CSS. Now, if you were to use H2 to make it smaller, that would be structurally incorrect.
Now for my DHTML, I have a nested menu system for the tree, which is pretty well structured, but the glidemenuse has a menu that is wrapped in a div. This is purely to facilitate the clipping effect -- it has no logical structure in the doc.
I don't know if custom tag would be right because I'd have to use a lot of app state and presentation coupling in the tag handler and I would have a lot of messy html in there. Here's what I see as a potential pitfall with custom tags:

If I could use the Java DOM bindings, that might work. I know HTML dom ECMAScript bindings well, so it wouldn't be entirely unfamiliar.
[ August 09, 2003: Message edited by: Garrett Smith ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could write out like this:


- include the correct file
How to get the correct file?
- look in session for filename
- if not found, look in cookie
- if still not found, use default

- How do I create the file? The data should initially be in xml, I think. The actual presentation file will be jsp as content-type=text/html, but depending on that filename, I'll have to create a file with different contents.
[ August 10, 2003: Message edited by: Garrett Smith ]
[ August 10, 2003: Message edited by: Garrett Smith ]
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could write custom tags that will parse (DOM) an xml file and display the links however you want. That way the name and path of the link can be changed easily. That's the way that i'd do it.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name and path of the link? What link?
Can you write out a little code or pseudocode?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!