If you set
struts.ui.theme=simple in the struts.properties file
you won't fight with the templates and it will be sort of like good old struts 1.

However, there are other gotchas in store. You have to get validation errors on the screen yourself using <s:fielderror/> since the theme cleverly puts the validation errors next to the invalid fields but not with "simple". This is how I have done it but there is probably a better way:
<s:if test="hasErrors()">
<h3><span style="color:red; font-weight:bold">Validation Error</span></h3>
   <s:actionerror/>
   <s:fielderror/>
</s:if>
The hasErrors() comes from the value stack from you action that extended ActionSupport.

But this didn't really answer your question of how to make themes and templates work for you :(.


Juan Espinosa wrote:
Hi to all, im building an struts2 based application and i dont understan the
concept of themes an templates. In the past i used struts 1, and in the view
i used jsp tags and struts tags like iterate and others.
Now in the application that im buildin i use tags provided by struts like
s:action s:include s:iterator,  s:form etc. the problem started when i was
using the radio button tag that renders radio buttons based on a list. The
buttons are put side by side... and i want to put one below the other
label radio1 label radio2 (now) label radio1
label radio2 (mi needs)
I want to know if render of buttons tables forms and other tags are based on
this templates..and how i could change it
Regards Juan


--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to