You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Muthu Velappan <mu...@aspiresys.com> on 2009/03/18 08:22:41 UTC

Theme Selection Options

Hi,

I have a jsp with a custom theme set on my form tag like this <s:form
action="CreateUser" theme="myxhtml">.  "myxhtml" is our custom theme extends
xhtml theme. 

I extended the Struts2 basic TextFieldTag to toggle it based on the custom
visible property. Everything is working fine but I end up getting a empty
row b/w two controls if the visiblity is false... I tried to overcome this
by setting the "simple" theme programatically in the tag class like this 

			if(visible){
				textField.setCssStyle("visibility:visible;");
			} else {
				textField.setSize("0");
				textField.setCssStyle("visibility:hidden;width:0px;height:0px;");
				textField.setLabel(null); // Label should be empty when field is hidden
				textField.setKey(null); // I18n key should also be empty for the given
field
				textField.setTheme("simple");
			}


but this is not working, it still shows the additonal empty row of data by
adding 
<tr><td>"input tag with hidden visibility"</td></tr>. I expect this tag to
just print out a "input tag with hidden visibility" becase I set the theme
as "Simple" if visible property is false..

Can anybody let me know where i'm going wrong here?

Regards,
Muthu


-- 
View this message in context: http://www.nabble.com/Theme-Selection-Options-tp22573846p22573846.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org