You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Angel Gruev <a....@gmail.com> on 2007/11/28 16:05:44 UTC

css_xhtml theme -

Hello,

I want to use the css_xhtml theme of struts 2. The problem is that by
default, the <s:textfield ../> results in HTML of Label and input field that
have <br/> between them.
This makes it hard to align the lable and the input field on the same line
using css.
Why is this <br/> tag there?! An how can be removed easily?

Thanks!
Angel Gruev
Dreamix Ltd <www.dreamix.eu>

Re: Get the message from DB instead of from the default MessageResources.properties

Posted by mg...@hotmail.com.
Will you need to support UTF-8 Encoding?
Will you want a factory to create these class objects for you?
Did you have anything specific in mind?

M--
----- Original Message -----
Wrom: WFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKP
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, November 28, 2007 2:48 PM
Subject: Get the message from DB instead of from the default
MessageResources.properties



 Do we still need to create

MessageResourcesFactory

And MessageResources to facilate the requirment. Do we have an easier
way to achieve the requirement? Thanks

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



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


Get the message from DB instead of from the default MessageResources.properties

Posted by "Zhang, Larry (L.)" <lz...@ford.com>.
 Do we still need to create

MessageResourcesFactory 

And MessageResources to facilate the requirment. Do we have an easier
way to achieve the requirement? Thanks

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


Re: css_xhtml theme -

Posted by Dave Newton <ne...@yahoo.com>.
That certainly works, but I think removing the <br/> altogether is a cleaner
solution since it shouldn't be in there in the first place.

d.

--- Zarar Siddiqi <za...@gmail.com> wrote:

> A much easier way to do this would be to apply a CSS style like this:
> 
> div.wwgrp br {
>   display: none;
> }
> 
> See this old blog post:
> 
> http://arsenalist.com/2007/04/11/struts-2-form-control-templates/
> 
> 
> 
> On Dec 5, 2007 9:14 AM, Angel Gruev <a....@gmail.com> wrote:
> > Thank you both for the quick response.
> > It worked!
> >
> > 2007/11/28, Eric Martin <er...@ericmmartin.com>:
> >
> > >
> > >
> > > Agreed...the <br /> is irritating ;)
> > >
> > > Just to expand on what Dave said...
> > >
> > > 1) extract the template/simple/inputtransferselect.ftl file from the
> > > struts
> > > jar.
> > > 2) put the file in your classpath, we have it in
> > > WEB-INF/classes/template/simple
> > > 3) edit the file and remove the <br />. For example:
> > > change: <label for="leftTitle">${parameters.leftTitle}</label><br />
> > > to: <label for="leftTitle">${ parameters.leftTitle}</label>
> > >
> > > HTH
> > >
> > > -Eric
> > >
> > >
> > > newton.dave wrote:
> > > >
> > > > You can customize the templates by extracting them
> > > > from the jar and putting them in your classpath. The
> > > > <br/> thing is irritating.
> > > >
> > > > d.
> > > >
> > > > --- Angel Gruev <a....@gmail.com> wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> I want to use the css_xhtml theme of struts 2. The
> > > >> problem is that by
> > > >> default, the <s:textfield ../> results in HTML of
> > > >> Label and input field that
> > > >> have <br/> between them.
> > > >> This makes it hard to align the lable and the input
> > > >> field on the same line
> > > >> using css.
> > > >> Why is this <br/> tag there?! An how can be removed
> > > >> easily?
> > > >>
> > > >> Thanks!
> > > >> Angel Gruev
> > > >> Dreamix Ltd < www.dreamix.eu>
> > > >>
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> http://www.nabble.com/css_xhtml-theme---%3Cbr%3E-tf4889135.html#a13995673
> > > 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
> > >
> > >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


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


Re: css_xhtml theme -

Posted by Zarar Siddiqi <za...@gmail.com>.
A much easier way to do this would be to apply a CSS style like this:

div.wwgrp br {
  display: none;
}

See this old blog post:

http://arsenalist.com/2007/04/11/struts-2-form-control-templates/



On Dec 5, 2007 9:14 AM, Angel Gruev <a....@gmail.com> wrote:
> Thank you both for the quick response.
> It worked!
>
> 2007/11/28, Eric Martin <er...@ericmmartin.com>:
>
> >
> >
> > Agreed...the <br /> is irritating ;)
> >
> > Just to expand on what Dave said...
> >
> > 1) extract the template/simple/inputtransferselect.ftl file from the
> > struts
> > jar.
> > 2) put the file in your classpath, we have it in
> > WEB-INF/classes/template/simple
> > 3) edit the file and remove the <br />. For example:
> > change: <label for="leftTitle">${parameters.leftTitle}</label><br />
> > to: <label for="leftTitle">${ parameters.leftTitle}</label>
> >
> > HTH
> >
> > -Eric
> >
> >
> > newton.dave wrote:
> > >
> > > You can customize the templates by extracting them
> > > from the jar and putting them in your classpath. The
> > > <br/> thing is irritating.
> > >
> > > d.
> > >
> > > --- Angel Gruev <a....@gmail.com> wrote:
> > >
> > >> Hello,
> > >>
> > >> I want to use the css_xhtml theme of struts 2. The
> > >> problem is that by
> > >> default, the <s:textfield ../> results in HTML of
> > >> Label and input field that
> > >> have <br/> between them.
> > >> This makes it hard to align the lable and the input
> > >> field on the same line
> > >> using css.
> > >> Why is this <br/> tag there?! An how can be removed
> > >> easily?
> > >>
> > >> Thanks!
> > >> Angel Gruev
> > >> Dreamix Ltd < www.dreamix.eu>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/css_xhtml-theme---%3Cbr%3E-tf4889135.html#a13995673
> > 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
> >
> >
>

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


Re: css_xhtml theme -

Posted by Angel Gruev <a....@gmail.com>.
Thank you both for the quick response.
It worked!

2007/11/28, Eric Martin <er...@ericmmartin.com>:
>
>
> Agreed...the <br /> is irritating ;)
>
> Just to expand on what Dave said...
>
> 1) extract the template/simple/inputtransferselect.ftl file from the
> struts
> jar.
> 2) put the file in your classpath, we have it in
> WEB-INF/classes/template/simple
> 3) edit the file and remove the <br />. For example:
> change: <label for="leftTitle">${parameters.leftTitle}</label><br />
> to: <label for="leftTitle">${ parameters.leftTitle}</label>
>
> HTH
>
> -Eric
>
>
> newton.dave wrote:
> >
> > You can customize the templates by extracting them
> > from the jar and putting them in your classpath. The
> > <br/> thing is irritating.
> >
> > d.
> >
> > --- Angel Gruev <a....@gmail.com> wrote:
> >
> >> Hello,
> >>
> >> I want to use the css_xhtml theme of struts 2. The
> >> problem is that by
> >> default, the <s:textfield ../> results in HTML of
> >> Label and input field that
> >> have <br/> between them.
> >> This makes it hard to align the lable and the input
> >> field on the same line
> >> using css.
> >> Why is this <br/> tag there?! An how can be removed
> >> easily?
> >>
> >> Thanks!
> >> Angel Gruev
> >> Dreamix Ltd < www.dreamix.eu>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/css_xhtml-theme---%3Cbr%3E-tf4889135.html#a13995673
> 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: css_xhtml theme -

Posted by Eric Martin <er...@ericmmartin.com>.
Agreed...the <br /> is irritating ;)

Just to expand on what Dave said...

1) extract the template/simple/inputtransferselect.ftl file from the struts
jar.
2) put the file in your classpath, we have it in
WEB-INF/classes/template/simple
3) edit the file and remove the <br />. For example:
change: <label for="leftTitle">${parameters.leftTitle}</label><br />
to: <label for="leftTitle">${parameters.leftTitle}</label>

HTH

-Eric


newton.dave wrote:
> 
> You can customize the templates by extracting them
> from the jar and putting them in your classpath. The
> <br/> thing is irritating.
> 
> d.
> 
> --- Angel Gruev <a....@gmail.com> wrote:
> 
>> Hello,
>> 
>> I want to use the css_xhtml theme of struts 2. The
>> problem is that by
>> default, the <s:textfield ../> results in HTML of
>> Label and input field that
>> have <br/> between them.
>> This makes it hard to align the lable and the input
>> field on the same line
>> using css.
>> Why is this <br/> tag there?! An how can be removed
>> easily?
>> 
>> Thanks!
>> Angel Gruev
>> Dreamix Ltd <www.dreamix.eu>
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/css_xhtml-theme---%3Cbr%3E-tf4889135.html#a13995673
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: css_xhtml theme -

Posted by Dave Newton <ne...@yahoo.com>.
You can customize the templates by extracting them
from the jar and putting them in your classpath. The
<br/> thing is irritating.

d.

--- Angel Gruev <a....@gmail.com> wrote:

> Hello,
> 
> I want to use the css_xhtml theme of struts 2. The
> problem is that by
> default, the <s:textfield ../> results in HTML of
> Label and input field that
> have <br/> between them.
> This makes it hard to align the lable and the input
> field on the same line
> using css.
> Why is this <br/> tag there?! An how can be removed
> easily?
> 
> Thanks!
> Angel Gruev
> Dreamix Ltd <www.dreamix.eu>
> 


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