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.
Is it possible to change / set the attributes of struts2 UI component dynamically..As an example i will take the following example..
Suppose we have 10 text boxes on a page [<s:textarea>], out of which 5 are necessary and the rest are optional for a user to input data into.
So not to confuse the user i would want to just display 5 by default and give a button for example..lets say "More" which when clicked makes the other 5 visible on the form and the user can input data into these..
I tried to do exactly this but seems that there are problems with java script and the struts2 tags, opening a pop up window and asking the user to input to enter values in that window, take the values back to the parent form as hidden values seems a little cumbersome.
Can anybody let me know of how to achieve this kind of a functionality in Struts2 by changing the attributes, in our case for example disabled attribute or visible attribute (although, i think that this property is not available)..
That aside, the "cssStyle" attribute lets you set styles.
Joined: May 21, 2001
Can you help by maybe citing example..