Re: Setting css of a row

2010-11-06 Thread cellterry

OK, I think a possible way, which is, for example, the following, will show
color or style if a record is cancelled or not.



class="data_cancelled0"
class="data_cancelled1">


But if I want to compute css of all records with 3 days before outstanding
day, I will need to add a temporary field in data model for ease of
computation of stylesheet as I want to keep logic not in view side.

Terry.


Dave Newton-6 wrote:
> 
> The same way you retrieve any action property.
> 
> That said, I'm not a fan of mixing layers like that: * possibly* get
> something business- oriented from the action and use CSS to style it...
> but
> a color from the action is poor design.
> 
> Dave
>  On Nov 6, 2010 12:46 AM, "cellterry"  wrote:
>>
>> Dear all,
>>
>> I want to set a table row with a color retrieved from an action class,
> could
>> I do that?
>>
>> If yes, how to do that?
>>
>> Terry.
>>
>> --
>> View this message in context:
> http://old.nabble.com/Setting-css-of-a-row-tp30146983p30146983.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Re%3A-Setting-css-of-a-row-tp30147066p30152211.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Setting css of a row

2010-11-06 Thread Maurizio Cucchiara
As Dave suggested CSS style is the best candidate for this purpose.
The only things that could change my mind, it's if is a model-related
property (f.e. user defined color, preference, etc)

2010/11/6 cellterry :
>
> Dear all,
>
> I want to set a table row with a color retrieved from an action class, could
> I do that?
>
> If yes, how to do that?
>
> Terry.
>
> --
> View this message in context: 
> http://old.nabble.com/Setting-css-of-a-row-tp30146983p30146983.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Maurizio Cucchiara

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



Re: Setting css of a row

2010-11-06 Thread Mead Lai
right, set a property in Action.
private String color;
private String css;
then generate get/set.

...


Regards,
Mead


Re: Setting css of a row

2010-11-05 Thread Dave Newton
The same way you retrieve any action property.

That said, I'm not a fan of mixing layers like that: * possibly* get
something business- oriented from the action and use CSS to style it... but
a color from the action is poor design.

Dave
 On Nov 6, 2010 12:46 AM, "cellterry"  wrote:
>
> Dear all,
>
> I want to set a table row with a color retrieved from an action class,
could
> I do that?
>
> If yes, how to do that?
>
> Terry.
>
> --
> View this message in context:
http://old.nabble.com/Setting-css-of-a-row-tp30146983p30146983.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>


Setting css of a row

2010-11-05 Thread cellterry

Dear all,

I want to set a table row with a color retrieved from an action class, could
I do that?

If yes, how to do that?

Terry.

-- 
View this message in context: 
http://old.nabble.com/Setting-css-of-a-row-tp30146983p30146983.html
Sent from the Struts - User mailing list archive at Nabble.com.


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