You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by hese <10...@gmail.com> on 2011/06/27 19:02:26 UTC

how do i highlight a text field with a different color?

Hi,

I have a form for which I am trying to implement bulk edit functionality. 
Lets say it is a customer details form and I am bulk editing the members of
the same family.  What I want is, for the address field to have the values
filled (because it is the same for everyone), and the age/dob/.. fields to
be highlighted, indicating they have different values for each member.  It
is enough even if I can highlight the field labels if that will be easier.

Any general directions as to how to go about this?

Thanks!


--
View this message in context: http://tapestry.1045711.n5.nabble.com/how-do-i-highlight-a-text-field-with-a-different-color-tp4529092p4529092.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how do i highlight a text field with a different color?

Posted by Taha Hafeez <ta...@gmail.com>.
Hi

All fields extend AbstractField which is annotated with
@SupportsInformalParameters, so you can add attrirbute class='myclass'
to all these fields

regards
Taha


On Mon, Jun 27, 2011 at 10:59 PM, hese <10...@gmail.com> wrote:
>
> Thanks. I get the general idea - have a css defined for highlighting and add
> the css class dynamically to the desired form component.
>
> How do I set the css class to the components in my java class?  Would
> appreciate any lead.
>
> I've written custom components where I can add attributes to a component by
> manipulating MarkupWriter in beginRender().  But is there a way to do it for
> tapestry components like TextField, Checkbox etc?
>
> Thanks.
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/how-do-i-highlight-a-text-field-with-a-different-color-tp4529092p4529167.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how do i highlight a text field with a different color?

Posted by hese <10...@gmail.com>.
Thanks for all the replies!

@thiago - guess thats the simplest solution!  Thanks.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/how-do-i-highlight-a-text-field-with-a-different-color-tp4529092p4529290.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how do i highlight a text field with a different color?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 27 Jun 2011 14:29:46 -0300, hese <10...@gmail.com> wrote:

> How do I set the css class to the components in my java class?  Would
> appreciate any lead.

<input ... class="${cssClass}">

public String getCssClass() {
	...
}

> I've written custom components where I can add attributes to a component  
> by manipulating MarkupWriter in beginRender().  But is there a way to do  
> it for tapestry components like TextField, Checkbox etc?

Just add the "class" attribute to them. I couldn't be easier.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how do i highlight a text field with a different color?

Posted by hese <10...@gmail.com>.
Thanks. I get the general idea - have a css defined for highlighting and add
the css class dynamically to the desired form component.

How do I set the css class to the components in my java class?  Would
appreciate any lead.

I've written custom components where I can add attributes to a component by
manipulating MarkupWriter in beginRender().  But is there a way to do it for
tapestry components like TextField, Checkbox etc?

Thanks.




--
View this message in context: http://tapestry.1045711.n5.nabble.com/how-do-i-highlight-a-text-field-with-a-different-color-tp4529092p4529167.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how do i highlight a text field with a different color?

Posted by Josh Canfield <jo...@gmail.com>.
Are you asking for general HTML/CSS help? Add a class to your fields
or their containers that are going to be edited so that you can apply
the CSS?

On Mon, Jun 27, 2011 at 10:02 AM, hese <10...@gmail.com> wrote:
>
> Hi,
>
> I have a form for which I am trying to implement bulk edit functionality.
> Lets say it is a customer details form and I am bulk editing the members of
> the same family.  What I want is, for the address field to have the values
> filled (because it is the same for everyone), and the age/dob/.. fields to
> be highlighted, indicating they have different values for each member.  It
> is enough even if I can highlight the field labels if that will be easier.
>
> Any general directions as to how to go about this?
>
> Thanks!
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/how-do-i-highlight-a-text-field-with-a-different-color-tp4529092p4529092.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org