• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help for a bean:write on jsp

 
kaushal sharma
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,


i am having one column tabular data on my jsp page and filling it with <bean:write...

This bean is having 2 type of values, 1 is Text and second is Boolean.

The current scenario is i am getting all the data into my table but now i need to do something new.

I need to display the text into the <input type="text" > as it is working for me now, but need to identify the Boolean value and according to that change the <input type="text" > to <select> (drop-down with the right Boolean value).

Not sure, for this....

Need your help, suggestions, docs, examples, or anything to solve this.



-Thanks & Regards,
Kaushal Sharma

 
Kartik Tal
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kaushal,

Your topic is completely confusing, first clear some points like

1) Is is of Struts 1 or Struts 2?

2) For <bean:write> we have to give a property i.e nothing but a value from a bean class, so it will have only one type like String or Boolean or List or blah blah.....

So if possible please give us the code so that we can explain you better.

Regards,
Kartik
 
kaushal sharma
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kartik,

In reference to your point 2.

2) For <bean:write> we have to give a property i.e nothing but a value from a bean class, so it will have only one type like String or Boolean or List or blah blah.....



Are you sure, one bean can provide one type of values (String or Boolean)?
Isn't it possible to get the String and Boolean both through a bean to my JSP page?

Please suggest.



-Thanks & Regards,
Kaushal Sharma
 
Kartik Tal
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the way

Bean class Sample



Action Class


JSP


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic