File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes div show/hide with struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "div show/hide with struts2" Watch "div show/hide with struts2" New topic

div show/hide with struts2

Mike Nason

Joined: Apr 19, 2006
Posts: 20
I am using struts2 and need to show/hide some textboxes in my <s:form>.
I did this by using JS code:

The problem that these method doesn't work with default xhtml theme, and I need to set <s:form theme="simple"> and use custom layout to make that works.
Using simple theme broke my UI on that page, because I am using default struts2 layout on others.
Does anybody have any ideas of how to show/hide textboxes by using default html theme with struts2 layout???

Wanna code??
David Newton

Joined: Sep 29, 2008
Posts: 12617

You either need to hide/show individual form elements, or modify a theme to give you more control over what appears.

I don't recall if someone has done the work to give for rows IDs yet--it's been on my list of things to do and now that I have some time hopefully I'll finally get around to it if nobody's done it yet (especially since I have the code sitting on my local machine already :/
I agree. Here's the link:
subject: div show/hide with struts2
It's not a secret anymore!