You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nick Heudecker <nh...@gmail.com> on 2005/06/30 16:38:44 UTC

Conditionally including stylesheet

Hi,

I've built a Border component based on Geoff's suggestion and it's
working fine.  I haven't been able to figure out how to conditionally
change the stylesheet based on user preferences.  Is there any way to
do this?

Before the user logs in, I want to use the default stylesheet.  After,
I want to use the stylesheet in their preferences.  Thanks for any
information.

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


Re: Conditionally including stylesheet

Posted by Ron Piterman <mp...@vollbio.de>.
Use some binding for the stylesheet in your border:

<span jwcid="@Shell" ... stylesheet="ognl:stylesheet"/>

---

public IAsset getStyleshhet() {
  if (isLogedIn())
   return getAssets().get("stylesheet2");
  else
   return getAssets().get("styleshhet1");
}

Cheers,
Ron





ציטוט Nick Heudecker:
> Hi,
> 
> I've built a Border component based on Geoff's suggestion and it's
> working fine.  I haven't been able to figure out how to conditionally
> change the stylesheet based on user preferences.  Is there any way to
> do this?
> 
> Before the user logs in, I want to use the default stylesheet.  After,
> I want to use the stylesheet in their preferences.  Thanks for any
> information.
> 
> ---------------------------------------------------------------------
> 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: Conditionally including stylesheet

Posted by Pablo Ruggia <pr...@gmail.com>.
I posted this solution answering to Vinicius last week using Shell's 
delegate parameter. Please, search it in the list, a can't find that mail.


On 6/30/05, Nick Heudecker <nh...@gmail.com> wrote:
> 
> Hi,
> 
> I've built a Border component based on Geoff's suggestion and it's
> working fine. I haven't been able to figure out how to conditionally
> change the stylesheet based on user preferences. Is there any way to
> do this?
> 
> Before the user logs in, I want to use the default stylesheet. After,
> I want to use the stylesheet in their preferences. Thanks for any
> information.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>