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 dynamic fields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic fields" Watch "dynamic fields" New topic
Author

dynamic fields

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
Hey guys

I have a situation where a user selects one of the links at the start page, and depending upon the option selected the users are directed to the same page but with some of the fields are disabled. How would i do this dynamically so I have only one page and disables fields dependin upon the selected option

thanks
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
one way is to use c:if (JSTL) or logic:equals (struts-logic) for each of the fields (create 2 exact fields, 1 with the disabled attr set to true). otherwise, you'll have to use scriptlets to control the 'disabled' attribute. if you have multiple values that requires disabling, i'd use JSTL.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: dynamic fields