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 Struts2: I want to use <s:textfield> inside <s:checkbox>, is it possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2: I want to use <s:textfield> inside <s:checkbox>, is it possible?" Watch "Struts2: I want to use <s:textfield> inside <s:checkbox>, is it possible?" New topic
Author

Struts2: I want to use <s:textfield> inside <s:checkbox>, is it possible?

Paul Michael Serrano
Ranch Hand

Joined: Nov 22, 2004
Posts: 59
I do have a snippet of code for my jsp....


I tried to change the line enclosed with <!-- need help for this line-->
<s:checkbox name="dueDate" >Test due <s:textfield name="repTimeDueDays" size="3"/> days prior to due date.</s:checkbox>


but the page is distorted, it seems that <s:checkbox> creates a new <tr></tr> within my jsp page.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The default "xhtml" theme uses table rows. Use the simple theme if you want to have complete control over your layout--but be aware you'll lose some functionality like showing error messages (which you can do manually).

That said, there's no reason to nest anything here.
Paul Michael Serrano
Ranch Hand

Joined: Nov 22, 2004
Posts: 59
Thanks David it did work...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2: I want to use <s:textfield> inside <s:checkbox>, is it possible?