Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Using navigation menus to display dynamic content.

  1. #1
    Junior Member switcha's Avatar
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    20
    My Mood
    Fine
    Thanks
    0
    Thanked 1 Time in 1 Post

    Talking Using navigation menus to display dynamic content.

    Hi folks,
    I have created a a simple hobby site about Nintendo (see screenshot) and I am currently converting it to .jsp. I have divided the index page into effectively five regions, including one horizontal navigation bar, one vertical navigation bar and one main section. I have done this by effectively creating five different .jspf files for each region i.e. hornav,vertnav & main.
    Rather than reload the static content, I would like it so that when users click on the horizontal or vertical navigation buttons (links), only the main.jspf changes. From my conversion from html to .jsp, I realise its redundant creating an identical pages that change in only one section. I should mention the horizontal and navigation buttons are purely html and css with hyperlinks.
    I was thinking about using the JSTL c select statement eqivalent in the hornav.jspf and vertnav.jspf respectively but I am not too sure how to organise the coding. I should also mention when the button is clicked on the hornav.jspf or vertnav.jspf, it will need to trigger the update on the main.jspf. I'm open to suggestions on how to resolve this issue.
    Cheers,
    Switcha.
    Attached Images Attached Images
    “You must let what happens happen. Everything must be equal in your eyes, good and evil, beautiful and ugly, foolish and wise.” - Michael Ende


  2. #2
    Junior Member
    Join Date
    Mar 2010
    Location
    Home-Ujjain /Job-Mumbai
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Using navigation menus to display dynamic content.

    Hi I am not so sure but as per your problem you can solve it as follows

    Look at your Main.jsp page It should contains Different HTML or JSP Tags

    What you have to do is simply devide your JSP Page into two part (like head.jsp and tail.jsp) in such a way that your menu contents what will not change will come under these two pages and all other variable things which will change for each and every page should come in between it.

    <Import head.jsp>

    Put your body contents which will change for each page, All the tags like <HTML start><Head> <Body Start> etc will come in Head.jsp

    and <Body End> <HTML End > will come in tail.jsp

    <Import Tail.jsp>

    Just try this and let me know if any problem
    Programmer

  3. #3
    Junior Member switcha's Avatar
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    20
    My Mood
    Fine
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Using navigation menus to display dynamic content.

    Hi,
    thanks for your response . I have structured the Index.jsp to be main(host) file that contains include references to the Header.jspx, HorizontalNav.jspf,VerticalNav.jspf, Main.jspx and Footer.jspf. What I would like to do is organise the links in the HorizontalNav.jspf + VerticalNav.jspf to change only the content in the main.jspf. Main.jspf is the section of the page that changes the most. I am thinking about re-organising my site even though its like five pages.
    “You must let what happens happen. Everything must be equal in your eyes, good and evil, beautiful and ugly, foolish and wise.” - Michael Ende

Similar Threads

  1. Re: linking two or more java files using menus
    By simonphilip102 in forum Object Oriented Programming
    Replies: 3
    Last Post: September 30th, 2011, 06:08 AM
  2. [SOLVED] Menus appear behind AWT List when spinner is focused
    By Kanyon in forum AWT / Java Swing
    Replies: 2
    Last Post: September 13th, 2011, 04:47 PM
  3. Swing Drop Down Menus
    By x3rubiachica3x in forum AWT / Java Swing
    Replies: 2
    Last Post: November 5th, 2010, 04:58 PM
  4. Menu of Menus Help
    By Strivelli in forum Java Theory & Questions
    Replies: 10
    Last Post: June 5th, 2010, 02:40 PM
  5. How to display the contents of my queue?
    By rocafella5007 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 30th, 2009, 11:46 AM