• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Navigating on jsp page.

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am using struts 1.3(myeclipse 6.0.1),

I need to navigate on my Jsp page. Have to use buttons like (Next, Previous,First and last). I am very new to this environment. Please guide me.

-raka
 
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings raka,

What do you mean by

I need to navigate on my Jsp page. Have to use buttons like (Next, Previous,First and last).



Do you mean that you have multiple JSPs and on each JSP you have buttons like Next ,previous , first , last ? And on each button click , you need to open another JSP ?

I would like to mention that calling in a JSP directly will not trigger the Action processing of struts , thus not letting the Dispatcher to initialize the request processing cycle and create needed value stack. Opening JSP pages directly in struts is bad practice.
 
raka oscr
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Saif,

I actually mean that, I am showing a form format as a parent and a child as a table format. I need to navigate to different record using First, Last, Next, Previous buttons on the parent form.


regards,
-raka
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you are implementing pagination concept via JSPs and struts. Well you can accomplish this via multiple ways. One way may be to trigger an Ajax requests on each button click and replace the current JSP with the html of the response .
 
raka oscr
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am very new to struts, and ajax. Really it sounds strange to me, can you please give an example to implement this concept.

Thanks & regards,
-raka
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well if your new at struts and all , I suggest you first acquaint yourself with the basics of struts first as to how we actualy get a particular JSP to display based on some result obtained from an action class. You should be able to navigate from one jsp to another via struts Action ( either by form submits or button clicks ). Next , look at how you can work with AJAX to trigger these struts actions asynchronously. I will recommend using Jquery to trigger ajax events. ( relatively easy )

Take it one step at a time. First, get to know struts.

Do post back for any queries and questions. We will surely help you along the way.
 
raka oscr
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot saif. Sure I do.


-raka
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic