This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've run into a little problem and with my limited knowledge in Struts 2 I've been unable to figure it out.
So I have an ArrayList of Strings being set in my action class and I can access it fine in the JSP via the Struts 2 tags (iterator with checkbox, OR using checkboxlist and no iterator). But I need an HTML text box input corresponding to each check box. So I want something that looks like the following once the HTML is rendered:
I've modified the checkboxlist tag once and have created my own "theme" that just has that change. I don't really want to do it again (create a second theme for another change to checkboxlist) unless I can modify my custom theme already to do what I currently have OR put a text box after the label.
Any ideas on how to use some kind of condition check in the FreeMarker checkboxlist.ftl file so after the label I can do what I'm already doing OR add the text field?
Is this what you wanted.
If there are 10 values in ArrayList, then you needed 10 checkboxes and 10 textboxes where one checkbox and one textbox in a row.
So there will be 10 rows.
Joined: Nov 05, 2009
Yes. That's exactly what I want. Again though, I have modified the checkboxlist template once so if there is some kind of condition check I can make (I've tried once but failed. It's still a little bit beyond my understanding) to either do what I already modified to do after the label OR add the text box that would be fantastic.
Joined: Aug 21, 2009
This can be achieved by using Iterator tags in JSP
Joined: Nov 05, 2009
Ah I'm an idiot sometimes. I was just trying to use the struts2 tags to do it...was so dead set on that that I didn't even think about just using normal HTML. Gah!
Yay for overcomplicating things. I need to work on that.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com