File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Need help for a bean:write on jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need help for a bean:write on jsp" Watch "Need help for a bean:write on jsp" New topic
Author

Need help for a bean:write on jsp

kaushal sharma
Greenhorn

Joined: Oct 04, 2009
Posts: 26
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 Talasu
Ranch Hand

Joined: Aug 21, 2009
Posts: 98
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

Joined: Oct 04, 2009
Posts: 26
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 Talasu
Ranch Hand

Joined: Aug 21, 2009
Posts: 98
This is the way

Bean class Sample



Action Class


JSP


 
 
subject: Need help for a bean:write on jsp
 
Similar Threads
variable Jquery ID attribute in input tag
how to combine html:text and bean:write
Cannot use one struts tag within another one?
Need help regarding text fields
getting updated value of input text in next tag?