You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sajidbigler <sa...@gmail.com> on 2009/03/03 11:53:49 UTC

Re: Struts Themes Problem - help

As said below is that a only solution or can we set theme=xhtml for
fielderror tag with in the   form which uses theme= simple.

but we will be rendering error after the filed not the above as xhtml
does.how can we make it to render it above the field instead below the
field?

<s:fielderror>
            <s:param>clientname</s:param>
</s:fielderror> 
-- 
View this message in context: http://www.nabble.com/Struts-Themes-Problem---help-tp18054982p22306342.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


Re: Struts Themes Problem - help

Posted by Edward Song <ed...@nuhorizons.com>.
I recently had to override the 'simple' template to remove the HTML list
formatting.

Try these links....
http://struts.apache.org/2.0.14/docs/themes-and-templates.html
http://struts.apache.org/2.0.14/docs/template-loading.html

I found them extremely helpful.

HTH

On Tue, Mar 3, 2009 at 8:57 AM, Jim Kiley <jh...@summa-tech.com> wrote:

> If I am understanding you correctly, your best bet might be to customize
> the
> fielderror.ftl template for a custom theme of your own.  If I were going to
> display errors in a custom way more than once, that's what I would do.
>
> Make a "template" directory in the root of your webapp, then make a new
> folder that has the name you want to give your template. (Mine is cleverly
> named "my".)  Then copy fielderror.ftl out of the struts jar into
> webapp/my/fielderror.ftl, then customize the contents of fielderror.ftl.
>
> jk
>
> On Tue, Mar 3, 2009 at 5:53 AM, sajidbigler <sa...@gmail.com> wrote:
>
> >
> > As said below is that a only solution or can we set theme=xhtml for
> > fielderror tag with in the   form which uses theme= simple.
> >
> > but we will be rendering error after the filed not the above as xhtml
> > does.how can we make it to render it above the field instead below the
> > field?
> >
> > <s:fielderror>
> >            <s:param>clientname</s:param>
> > </s:fielderror>
> > --
> > View this message in context:
> >
> http://www.nabble.com/Struts-Themes-Problem---help-tp18054982p22306342.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
> >
> >
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>



-- 
Regards,
Edward Song
Java Web Developer
631-396-5000 x306

Re: Struts Themes Problem - help

Posted by Jim Kiley <jh...@summa-tech.com>.
If I am understanding you correctly, your best bet might be to customize the
fielderror.ftl template for a custom theme of your own.  If I were going to
display errors in a custom way more than once, that's what I would do.

Make a "template" directory in the root of your webapp, then make a new
folder that has the name you want to give your template. (Mine is cleverly
named "my".)  Then copy fielderror.ftl out of the struts jar into
webapp/my/fielderror.ftl, then customize the contents of fielderror.ftl.

jk

On Tue, Mar 3, 2009 at 5:53 AM, sajidbigler <sa...@gmail.com> wrote:

>
> As said below is that a only solution or can we set theme=xhtml for
> fielderror tag with in the   form which uses theme= simple.
>
> but we will be rendering error after the filed not the above as xhtml
> does.how can we make it to render it above the field instead below the
> field?
>
> <s:fielderror>
>            <s:param>clientname</s:param>
> </s:fielderror>
> --
> View this message in context:
> http://www.nabble.com/Struts-Themes-Problem---help-tp18054982p22306342.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
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com