You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by PSW <su...@wachtel.us> on 2005/02/11 18:22:55 UTC
Best Practice Question about Dynamic CSS selector in a TR
Hi there,
I'm wondering what the best practice is for having a dynamic css selector in
Tapestry.
Example:
In one case:
<tr class="activeVisitType">
In another case:
<tr class="inactiveVisitType">
or just
<tr>
It's really a simple need. The css class value just has to change depending
on some dynamic information from the page class.
I'm trying to avoid something like:
<conditional ...>
<tr class="activeVisitType">
</conditional>
<conditional ...>
<tr class="inactiveVisitType">
</conditional>
Thanks much!
Philip
Re: Best Practice Question about Dynamic CSS selector in a TR [auf Viren
geprueft]
Posted by Jonathan O'Connor <Jo...@xcom.de>.
Erik,
The description in the component reference is too dry, and does not tell
the user what they need to know. Your sentence, should be inserted at the
start of the description. Thus:
Description
@Any is one of Tapestry's hidden gems - it brings a tag alive allowing
OGNL expressions (and message:) on attributes. Informal parameters are
used to fill in the attributes of the element.
In fact I think a lot of the components could do with less programmer
speak, and more advice as to when and where to use these components.
I'm sure the knives will be out for me, for what I've just written. It's
not that the information is missing, it just needs some of the best
practice info we get in this mailing list added to it.
Ciao,
Jonathan O'Connor
XCOM Dublin
Erik Hatcher <er...@ehatchersolutions.com>
14/02/2005 12:34
Please respond to
"Tapestry users" <ta...@jakarta.apache.org>
To
"Tapestry users" <ta...@jakarta.apache.org>
cc
Subject
Re: Best Practice Question about Dynamic CSS selector in a TR [auf Viren
geprueft]
On Feb 14, 2005, at 6:24 AM, Jonathan O'Connor wrote:
> Erik,
> you wrote: @Any is one of Tapestry's hidden gems - it brings a tag
> alive
> allowing
> OGNL expressions (and message:) on attributes.
>
> Wow, this should be in component reference. After using Tapestry for a
> year, I had no idea that @Any was so simple.
It is in the component reference:
http://jakarta.apache.org/tapestry/doc/ComponentReference/Any.html
What else is needed there?
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
*** Aktuelle Veranstaltungen der XCOM AG ***
XCOM laedt ein zur IBM Workplace Roadshow in Frankfurt (16.02.2005), Duesseldorf (23.02.2005) und Berlin (02.03.2005)
Anmeldung und Information unter http://lotus.xcom.de/events
Workshop-Reihe "Mobilisierung von Lotus Notes Applikationen" in Frankfurt (17.02.2005), Duesseldorf (24.02.2005) und Berlin (05.03.2005)
Anmeldung und Information unter http://lotus.xcom.de/events
*** XCOM AG Legal Disclaimer ***
Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns eine Nachricht zukommen zu lassen.
This email may contain material that is confidential and for the sole use of the intended recipient. Any review, distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: Best Practice Question about Dynamic CSS selector in a TR [auf Viren geprueft]
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 14, 2005, at 6:24 AM, Jonathan O'Connor wrote:
> Erik,
> you wrote: @Any is one of Tapestry's hidden gems - it brings a tag
> alive
> allowing
> OGNL expressions (and message:) on attributes.
>
> Wow, this should be in component reference. After using Tapestry for a
> year, I had no idea that @Any was so simple.
It is in the component reference:
http://jakarta.apache.org/tapestry/doc/ComponentReference/Any.html
What else is needed there?
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best Practice Question about Dynamic CSS selector in a TR [auf Viren
geprueft]
Posted by Jonathan O'Connor <Jo...@xcom.de>.
Erik,
you wrote: @Any is one of Tapestry's hidden gems - it brings a tag alive
allowing
OGNL expressions (and message:) on attributes.
Wow, this should be in component reference. After using Tapestry for a
year, I had no idea that @Any was so simple.
Ciao,
Jonathan O'Connor
XCOM Dublin
*** Aktuelle Veranstaltungen der XCOM AG ***
XCOM laedt ein zur IBM Workplace Roadshow in Frankfurt (16.02.2005), Duesseldorf (23.02.2005) und Berlin (02.03.2005)
Anmeldung und Information unter http://lotus.xcom.de/events
Workshop-Reihe "Mobilisierung von Lotus Notes Applikationen" in Frankfurt (17.02.2005), Duesseldorf (24.02.2005) und Berlin (05.03.2005)
Anmeldung und Information unter http://lotus.xcom.de/events
*** XCOM AG Legal Disclaimer ***
Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns eine Nachricht zukommen zu lassen.
This email may contain material that is confidential and for the sole use of the intended recipient. Any review, distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
RE: Best Practice Question about Dynamic CSS selector in a TR
Posted by PSW <su...@wachtel.us>.
Awesome Erik!
Exactly what I needed. I'm kind of new at this and this @Any tag is going
to be quite useful. Thanks for your advice.
(Thanks Derek, as well -- you suggested the same thing a couple of minutes
later.)
PSW
-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Friday, February 11, 2005 12:46 PM
To: Tapestry users
Subject: Re: Best Practice Question about Dynamic CSS selector in a TR
On Feb 11, 2005, at 12:22 PM, PSW wrote:
> It's really a simple need. The css class value just has to change
> depending
> on some dynamic information from the page class.
>
>
>
> I'm trying to avoid something like:
>
>
>
> <conditional ...>
>
> <tr class="activeVisitType">
>
> </conditional>
>
> <conditional ...>
>
> <tr class="inactiveVisitType">
>
> </conditional>
I'm glad you asked rather than putting in the Conditional.
<tr jwcid="@Any" class="ognl:pageMethodToReturnClassName">
@Any is one of Tapestry's hidden gems - it brings a tag alive allowing
OGNL expressions (and message:) on attributes. I use it all the time.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best Practice Question about Dynamic CSS selector in a TR
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 11, 2005, at 12:22 PM, PSW wrote:
> It's really a simple need. The css class value just has to change
> depending
> on some dynamic information from the page class.
>
>
>
> I'm trying to avoid something like:
>
>
>
> <conditional ...>
>
> <tr class="activeVisitType">
>
> </conditional>
>
> <conditional ...>
>
> <tr class="inactiveVisitType">
>
> </conditional>
I'm glad you asked rather than putting in the Conditional.
<tr jwcid="@Any" class="ognl:pageMethodToReturnClassName">
@Any is one of Tapestry's hidden gems - it brings a tag alive allowing
OGNL expressions (and message:) on attributes. I use it all the time.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best Practice Question about Dynamic CSS selector in a TR
Posted by Derek Brown <ze...@yahoo.com>.
Hello,
Check out the Any Component, You can do something
like:
<component id="row" type="Any">
<binding name="class"
expression="getVisitTypeStatus"/>
</component>
--- PSW <su...@wachtel.us> wrote:
> Hi there,
>
>
>
> I'm wondering what the best practice is for having a
> dynamic css selector in
> Tapestry.
>
>
>
> Example:
>
> In one case:
>
> <tr class="activeVisitType">
>
>
>
> In another case:
>
> <tr class="inactiveVisitType">
>
> or just
>
> <tr>
>
>
>
> It's really a simple need. The css class value just
> has to change depending
> on some dynamic information from the page class.
>
>
>
> I'm trying to avoid something like:
>
>
>
> <conditional ...>
>
> <tr class="activeVisitType">
>
> </conditional>
>
> <conditional ...>
>
> <tr class="inactiveVisitType">
>
> </conditional>
>
>
>
> Thanks much!
>
>
>
> Philip
>
>
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
__________________________________
Do you Yahoo!?
All your favorites on one personal page � Try My Yahoo!
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org