• 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

can set bean value from jsp?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to struts and want to know,

Is it possible to set, the value of any set method in the bean, from jsp?

I have a beanslist and iterate them in the jsp. when a row is clicked i want to set the setSelectedBean(Bean bean){} method in the bean. i will process that in action class by calling getSelectedBean().

thanks
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

daffny nila wrote:when a row is clicked i want to set the setSelectedBean(Bean bean){} method in the bean.


I'm not sure what you are trying to do. After a JSP page is rendered into the browser, it works as normal HTML, you can't do any JSP specific processing after that i.e. you can't use anything like jsp:setProperty on the click of the user. What exactly do you want to achieve?? You may use an AJAX request if you want to do some processing on the click of the mouse without submitting the page...
 
daffny nila
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply.


I have a form bean which displays, list of beans in a table. in that i should select a bean and delete. when i click on a row in the form bean , setSelected should be set to that bean so that i can delete it.now i am not able to find which has been clickded and the first row is getting deleted ,( i use formBean.getSelectedBean() to get the bean in the action class).


 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use a form. This is what forms are for: getting information from the browser back to the server.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic