You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Narayana S <na...@gmail.com> on 2008/07/10 11:48:27 UTC

Customizing CSS

Hi,

        as per my requirement, i have to apply two different colors to
alternate rows.can any one guide me how to extend theme to implement this?

RE: Customizing CSS

Posted by Ku...@iflexsolutions.com.
Use 

<style>  
.cust tr.odd {background-color:#ffffff;}   
.cust tr.even {background-color:#DDDDDD;}   
</style>
 or
Find in google

-----Original Message-----
From: Narayana S [mailto:narayanasgs1@gmail.com] 
Sent: Thursday, July 10, 2008 3:18 PM
To: Struts Users Mailing List
Subject: Customizing CSS

Hi,

        as per my requirement, i have to apply two different colors to
alternate rows.can any one guide me how to extend theme to implement
this?


DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore,  does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.

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


Re: Customizing CSS

Posted by Lukasz Lenart <lu...@googlemail.com>.
Iterator Tag [1], second and third example

[1] http://struts.apache.org/2.0.11.2/docs/iterator.html


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Re: Customizing CSS

Posted by Jim Kiley <jh...@summa-tech.com>.
Actually you don't even have to use the modulus operator there -- you can
access #stat.even or #stat.odd directly.

jk

On Thu, Jul 10, 2008 at 5:56 AM, ManiKanta G <ma...@sifycorp.com>
wrote:

> In which theme u want to implement?
> If it is in S2, u can use DisplayTag (displaytag.sourceforge.net), which
> will look almost all needs of tabular reports or form (including paging,
> sorting).
>
> If you want to implement using <s:iterator /> tag, then use rowStatus of
> the iterator and using the modulo (%) division by 2, u can get whether the
> current iteration is even or odd, and based that you can decorate your
> table.
>
> Regards,
> ManiKanta
>
>
>
> Narayana S wrote:
>
>> Hi,
>>
>>        as per my requirement, i have to apply two different colors to
>> alternate rows.can any one guide me how to extend theme to implement this?
>>
>>
>>
>
>
>
> ********** DISCLAIMER **********
> Information contained and transmitted by this E-MAIL is proprietary to Sify
> Limited and is intended for use only by the individual or entity to which it
> is addressed, and may contain information that is privileged, confidential
> or exempt from disclosure under applicable law. If this is a forwarded
> message, the content of this E-MAIL may not have been sent with the
> authority of the Company. If you are not the intended recipient, an agent of
> the intended recipient or a  person responsible for delivering the
> information to the named recipient,  you are notified that any use,
> distribution, transmission, printing, copying or dissemination of this
> information in any way or in any manner is strictly prohibited. If you have
> received this communication in error, please delete this mail & notify us
> immediately at admin@sifycorp.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

Re: Customizing CSS

Posted by ManiKanta G <ma...@sifycorp.com>.
In which theme u want to implement? 

If it is in S2, u can use DisplayTag (displaytag.sourceforge.net), which 
will look almost all needs of tabular reports or form (including paging, 
sorting).

If you want to implement using <s:iterator /> tag, then use rowStatus of 
the iterator and using the modulo (%) division by 2, u can get whether 
the current iteration is even or odd, and based that you can decorate 
your table.

Regards,
ManiKanta


Narayana S wrote:
> Hi,
>
>         as per my requirement, i have to apply two different colors to
> alternate rows.can any one guide me how to extend theme to implement this?
>
>   



********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at admin@sifycorp.com

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


RE: Customizing CSS

Posted by Jishnu Viswanath <ji...@tavant.com>.
I don't have much idea, but you can give it a try on <s:label
value="Employee ID" cssClass="class2"/>

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: Narayana S [mailto:narayanasgs1@gmail.com] 
Sent: Monday, July 14, 2008 1:47 PM
To: Struts Users Mailing List
Subject: Re: Customizing CSS

Hi Jishnu,

           Thanks for your reply, it applies background color to the
text
field, but i want it to be applied to that entire row(that have label
employee id and text field), not to the text field component alone.



On Mon, Jul 14, 2008 at 12:19 PM, Jishnu Viswanath <
jishnu.viswanath@tavant.com> wrote:

> <s:textfield name="empid" label="Employee ID :" cssClass="class1">
> <s:textfield name="empname" label="Employee Name : "
cssClass="class2">
>
>
> .class1{
>        background-color:red;
> }
> .class2{
>        background-color:blue;
> }
>
> Sorry I have not seen your earlier mail, what ever you want to do
using
> class
>
>
> Regards,
>
> Jishnu Viswanath
>
> Software Engineer
>
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>
> Tavant Technologies Inc.,
>
> www.tavant.com
>
> PEOPLE :: PASSION :: EXCELLENCE
>
> -----Original Message-----
> From: Narayana S [mailto:narayanasgs1@gmail.com]
> Sent: Monday, July 14, 2008 11:40 AM
> To: Struts Users Mailing List
> Subject: Re: Customizing CSS
>
> Hi,
>
>         Thanks for your reply, but i am talking about UI screen, not a
> table display. in the screen itself for every control i want to apply
an
> alternate back ground color. for example
>
> <s:textfield name="empid" label="Employee ID :">
> <s:textfield name="empname" label="Employee Name : ">
>
> these two should come with two different background colors.
>
> On Thu, Jul 10, 2008 at 3:18 PM, Narayana S <na...@gmail.com>
> wrote:
>
> > Hi,
> >
> >         as per my requirement, i have to apply two different colors
to
> > alternate rows.can any one guide me how to extend theme to implement
> this?
> >
> Any comments or statements made in this email are not necessarily
those of
> Tavant Technologies.
> The information transmitted is intended only for the person or entity
to
> which it is addressed and may
> contain confidential and/or privileged material. If you have received
this
> in error, please contact the
> sender and delete the material from any computer. All e-mails sent
from or
> to Tavant Technologies
> may be subject to our monitoring procedures.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may 
contain confidential and/or privileged material. If you have received this in error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies 
may be subject to our monitoring procedures.


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


Re: Customizing CSS

Posted by Narayana S <na...@gmail.com>.
Hi Jishnu,

           Thanks for your reply, it applies background color to the text
field, but i want it to be applied to that entire row(that have label
employee id and text field), not to the text field component alone.



On Mon, Jul 14, 2008 at 12:19 PM, Jishnu Viswanath <
jishnu.viswanath@tavant.com> wrote:

> <s:textfield name="empid" label="Employee ID :" cssClass="class1">
> <s:textfield name="empname" label="Employee Name : " cssClass="class2">
>
>
> .class1{
>        background-color:red;
> }
> .class2{
>        background-color:blue;
> }
>
> Sorry I have not seen your earlier mail, what ever you want to do using
> class
>
>
> Regards,
>
> Jishnu Viswanath
>
> Software Engineer
>
> *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll
>
> Tavant Technologies Inc.,
>
> www.tavant.com
>
> PEOPLE :: PASSION :: EXCELLENCE
>
> -----Original Message-----
> From: Narayana S [mailto:narayanasgs1@gmail.com]
> Sent: Monday, July 14, 2008 11:40 AM
> To: Struts Users Mailing List
> Subject: Re: Customizing CSS
>
> Hi,
>
>         Thanks for your reply, but i am talking about UI screen, not a
> table display. in the screen itself for every control i want to apply an
> alternate back ground color. for example
>
> <s:textfield name="empid" label="Employee ID :">
> <s:textfield name="empname" label="Employee Name : ">
>
> these two should come with two different background colors.
>
> On Thu, Jul 10, 2008 at 3:18 PM, Narayana S <na...@gmail.com>
> wrote:
>
> > Hi,
> >
> >         as per my requirement, i have to apply two different colors to
> > alternate rows.can any one guide me how to extend theme to implement
> this?
> >
> Any comments or statements made in this email are not necessarily those of
> Tavant Technologies.
> The information transmitted is intended only for the person or entity to
> which it is addressed and may
> contain confidential and/or privileged material. If you have received this
> in error, please contact the
> sender and delete the material from any computer. All e-mails sent from or
> to Tavant Technologies
> may be subject to our monitoring procedures.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Customizing CSS

Posted by Jishnu Viswanath <ji...@tavant.com>.
<s:textfield name="empid" label="Employee ID :" cssClass="class1">
<s:textfield name="empname" label="Employee Name : " cssClass="class2">


.class1{
	background-color:red;
}
.class2{
	background-color:blue;
}

Sorry I have not seen your earlier mail, what ever you want to do using
class


Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE

-----Original Message-----
From: Narayana S [mailto:narayanasgs1@gmail.com] 
Sent: Monday, July 14, 2008 11:40 AM
To: Struts Users Mailing List
Subject: Re: Customizing CSS

Hi,

         Thanks for your reply, but i am talking about UI screen, not a
table display. in the screen itself for every control i want to apply an
alternate back ground color. for example

<s:textfield name="empid" label="Employee ID :">
<s:textfield name="empname" label="Employee Name : ">

these two should come with two different background colors.

On Thu, Jul 10, 2008 at 3:18 PM, Narayana S <na...@gmail.com>
wrote:

> Hi,
>
>         as per my requirement, i have to apply two different colors to
> alternate rows.can any one guide me how to extend theme to implement
this?
>
Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may 
contain confidential and/or privileged material. If you have received this in error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies 
may be subject to our monitoring procedures.


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


Re: Customizing CSS

Posted by Narayana S <na...@gmail.com>.
Hi,

         Thanks for your reply, but i am talking about UI screen, not a
table display. in the screen itself for every control i want to apply an
alternate back ground color. for example

<s:textfield name="empid" label="Employee ID :">
<s:textfield name="empname" label="Employee Name : ">

these two should come with two different background colors.

On Thu, Jul 10, 2008 at 3:18 PM, Narayana S <na...@gmail.com> wrote:

> Hi,
>
>         as per my requirement, i have to apply two different colors to
> alternate rows.can any one guide me how to extend theme to implement this?
>