• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How i write the code so that at on submit as well as at onload we call same servlet i

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear ALL,
Suppose I have a jsp page which contains three radio buttons.Let say three fields are .ALL .NSE .BSE


When i click the link of jsp page the default of ALL(.ALL radio button) data mapped with servletpage will displayed automatically.

After click the jsp page link,also the user can choose the radio button(Either .ALL/.BSE/.NSE ) and click the submit button
respective data ((Either .ALL/.BSE/.NSE ) mapped with sevletpage and getting displayed.


I dont have facing any problem when i click submit button i will get the data according the radio button i choose.
But i am facing poroblem how automatically the .ALL radio button data(Which must connect to servlet for retrive data from database) will displayed when i click the jsp page link.


Thanks a lot in Advance.

Regards
Sumanta Panda
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you keep mentioning "click the link of the jsp", but don't describe where that link is.

Anyways.. why not make this "link to the jsp" a "link to the servlet" instead?

I assume in your JSP somewhere, you have a form something like this:


And that in your /app/reloadWithChoice servlet, it eventually redirects to the jsp we just got submitted from?

So instead of linking to "choose.jsp", you'd link to "/app/reloadWithChoice?choice=.all"
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
Please look at my code when I click the view at that time it will call submitForm() method and displaying the data properly(Send request to servlet and value will populated).

Similarly I also call the submitForm(buttonObj) method in function loadInitialValues() at the page load time but why didn�t the value populated automatically.

Could please rectify my code at loading time in function loadInitialValues() where I call submitForm (buttonObj).









[ December 12, 2008: Message edited by: Paul Sturrock ]
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
Kindly i request all of you please suggest/advise me for my doubt.

Thanks a lot in Advance.

Regards
Sumanta Panda
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all.Now it is working.

Regards
Sumanta Panda
 
reply
    Bookmark Topic Watch Topic
  • New Topic