1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    rmulcha is on a distinguished road

      0  

    Default Unanswered: Example for SafeStyles with XTemplate

    Unanswered: Example for SafeStyles with XTemplate


    Is there any example using SafeStyle with XTemplate please.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    There are a few internal samples in the Base theme (com.sencha.gxt.theme.base.client.button.ButtonCellDefaultAppearance.render(ButtonCell<C>, Context, C, SafeHtmlBuilder), com.sencha.gxt.theme.base.client.button.ButtonCellDefaultAppearance.writeText(SafeHtmlBuilder, String, int, int)) and another in the Portal Layout (UiBinder) example. The basic idea is that you need to set a specific style on an element, and something that can't be set using CSS (and you should use CSS if possible, it will make building the string faster, and will make sure the style is only set in one place instead of every time the template is drawn). Build up the SafeStyle instance using the utilities provided by GWT (I.E. SafeStylesUtils, SafeStylesBuilder) and pass that as an argument to the template. In the template html body, reference that style within a style attribute of an element:

    Code:
    interface SafeStylesSampleTemplate extends XTemplates {
      @XTemplate("<div style='{customStyle}'>This element has a custom style</div>")
      SafeHtml renderWithCustomStyle(SafeStyles customStyle);
    }

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi