You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by me...@investorservicing.natixis.fr on 2007/05/04 10:53:43 UTC

Re: ui tags behaviour aka overriding default theme

Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis Investor Servicing. Les adresses mails des collaborateurs ayant changé, veillez à la mise à jour de votre carnet d'adresses.


Thank you for the url that you pointed me. 
I've read and searched a lot in the themes topic. But my problem is far to 
be solved.
It seems to me that I have to extend or override the default form theme if 
I want to render
my form elements as I want.

The problem is that I that I've not found a simple sample that doing what 
I want. 

The code below describe my need.

<s:form action="delete"> 
<table border=0 width=80% cellpadding=0 cellspacing=0 align=center>
<tr nowrap class="datavalueblue" >
     <td>&nbsp;<b>Titre :</td>
     <td align=left>
        <s:textfield label="titre" name="article.titre" size="50"/>
     </td>
</tr>
<tr>
     <td></td>
     <td>
     <input type=submit value="Ajouter">
     </td>
</tr>

</table>
</s:form>

The code generated by struts ignores all of my rendering needs. 


when I write it in a pure struts2 style like below:

<s:form action="create"> 
     <s:textfield label="titre" name="article.titre" size="50"/>
     <s:submit key="button.add"/>
</s:form>

The default html form theme is used and you can guest the result.

Can someone explain me simply how I can set a style to the generated label
instead of the default used by struts.

Any meaningful help would be greetly appreciated.

Meissa.








"Martin Gainty" <mg...@hotmail.com> 
02/05/2007 19:20
Veuillez répondre à
"Struts Users Mailing List" <us...@struts.apache.org>


A
"Struts Users Mailing List" <us...@struts.apache.org>
cc

Objet
Re: ui tags behaviour






As in setting theme ="cssxhtml-theme" to incorporate your css 
classes..more 
information available at
http://struts.apache.org/2.x/docs/cssxhtml-theme.html

Anyone else?
M

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please 
notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: <me...@investorservicing.natixis.fr>
To: <us...@struts.apache.org>
Sent: Wednesday, May 02, 2007 11:32 AM
Subject: ui tags behaviour


> Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis 

> Investor Servicing. Les adresses mails des collaborateurs ayant changé, 
> veillez à la mise à jour de votre carnet d'adresses.
>
>
> Hi all,
> I'm using the textfield ui form inside an a form tag like below:
>
> <s:form action="create">
>     <s:textfield key="article.dateEnreg" size="20"/>
> </s:form>
>
> I would like to apply my own class to the label. When i use the cssClass
> attribute, it goes
> to the input.
> Can someone tells me how to manage to give to the generated label a
> desired class.
>
> thank in advance.
> Meissa
>
> L'integrite de ce message n'etant pas assuree sur internet, Natixis ne 
> peut etre tenu responsable de son contenu. Toute utilisation ou 
diffusion 
> non autorisee est interdite. Si vous n'etes pas destinataire de ce 
> message, merci de le detruire et d'avertir l'expediteur.
> Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails 
> que si necessaire
>
> The integrity of this message cannot be guaranteed on the Internet. 
> Natixis can not therefore be considered responsible for the contents. 
Any 
> unauthorized use or dissemination is prohibited. If you are not the 
> intended recipient of this message, then please delete it and notify the 

> sender.
> Let us mind the environment : let's print our mails only when necessary.
>
> 


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




L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can not therefore be considered responsible for the contents. Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender.
Let us mind the environment : let's print our mails only when necessary.


Re: ui tags behaviour aka overriding default theme

Posted by me...@investorservicing.natixis.fr.
Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis Investor Servicing. Les adresses mails des collaborateurs ayant changé, veillez à la mise à jour de votre carnet d'adresses.


I've used the simple theme and it's working as I expected. 
I'll try to write my own ...

Thank you very much.
Meissa



Zoran Avtarovski <zo...@sparecreative.com> 
04/05/2007 14:06
Veuillez répondre à
"Struts Users Mailing List" <us...@struts.apache.org>


A
Struts Users Mailing List <us...@struts.apache.org>
cc

Objet
Re: ui tags behaviour aka overriding default theme






I suggest you use the simple theme by specifying theme="simple" in your 
form
tag and then create your own labels and styling. Also, S2(WW) uses default
styles which you can override in your local style sheet. I'm pretty sure
these are the styles used for the default theme:

.label {font-style:italic; }
.errorLabel {font-style:italic; color:red; }
.errorMessage {font-weight:bold; text-align: center; color:red; }
.checkboxLabel {} 
.checkboxErrorLabel {color:red; }
.required {color:red;}

Other wise you write your own theme using velocity and the sky's the 
limit.

Z. 

> Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis
> Investor Servicing. Les adresses mails des collaborateurs ayant changé,
> veillez à la mise à jour de votre carnet d'adresses.
> 
> 
> Thank you for the url that you pointed me.
> I've read and searched a lot in the themes topic. But my problem is far 
to
> be solved.
> It seems to me that I have to extend or override the default form theme 
if
> I want to render
> my form elements as I want.
> 
> The problem is that I that I've not found a simple sample that doing 
what
> I want. 
> 
> The code below describe my need.
> 
> <s:form action="delete">
> <table border=0 width=80% cellpadding=0 cellspacing=0 align=center>
> <tr nowrap class="datavalueblue" >
>      <td>&nbsp;<b>Titre :</td>
>      <td align=left>
>         <s:textfield label="titre" name="article.titre" size="50"/>
>      </td>
> </tr>
> <tr>
>      <td></td>
>      <td>
>      <input type=submit value="Ajouter">
>      </td>
> </tr>
> 
> </table>
> </s:form>
> 
> The code generated by struts ignores all of my rendering needs.
> 
> 
> when I write it in a pure struts2 style like below:
> 
> <s:form action="create">
>      <s:textfield label="titre" name="article.titre" size="50"/>
>      <s:submit key="button.add"/>
> </s:form>
> 
> The default html form theme is used and you can guest the result.
> 
> Can someone explain me simply how I can set a style to the generated 
label
> instead of the default used by struts.
> 
> Any meaningful help would be greetly appreciated.
> 
> Meissa.
> 
> 



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




L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can not therefore be considered responsible for the contents. Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender.
Let us mind the environment : let's print our mails only when necessary.


Re: ui tags behaviour aka overriding default theme

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
I suggest you use the simple theme by specifying theme="simple" in your form
tag and then create your own labels and styling. Also, S2(WW) uses default
styles which you can override in your local style sheet. I'm pretty sure
these are the styles used for the default theme:

.label {font-style:italic; }
.errorLabel {font-style:italic; color:red; }
.errorMessage {font-weight:bold; text-align: center; color:red; }
.checkboxLabel {} 
.checkboxErrorLabel {color:red; }
.required {color:red;}

Other wise you write your own theme using velocity and the sky's the limit.

Z. 

> Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis
> Investor Servicing. Les adresses mails des collaborateurs ayant changé,
> veillez à la mise à jour de votre carnet d'adresses.
> 
> 
> Thank you for the url that you pointed me.
> I've read and searched a lot in the themes topic. But my problem is far to
> be solved.
> It seems to me that I have to extend or override the default form theme if
> I want to render
> my form elements as I want.
> 
> The problem is that I that I've not found a simple sample that doing what
> I want. 
> 
> The code below describe my need.
> 
> <s:form action="delete">
> <table border=0 width=80% cellpadding=0 cellspacing=0 align=center>
> <tr nowrap class="datavalueblue" >
>      <td>&nbsp;<b>Titre :</td>
>      <td align=left>
>         <s:textfield label="titre" name="article.titre" size="50"/>
>      </td>
> </tr>
> <tr>
>      <td></td>
>      <td>
>      <input type=submit value="Ajouter">
>      </td>
> </tr>
> 
> </table>
> </s:form>
> 
> The code generated by struts ignores all of my rendering needs.
> 
> 
> when I write it in a pure struts2 style like below:
> 
> <s:form action="create">
>      <s:textfield label="titre" name="article.titre" size="50"/>
>      <s:submit key="button.add"/>
> </s:form>
> 
> The default html form theme is used and you can guest the result.
> 
> Can someone explain me simply how I can set a style to the generated label
> instead of the default used by struts.
> 
> Any meaningful help would be greetly appreciated.
> 
> Meissa.
> 
> 



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