Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-2807 in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    117
    Vote Rating
    0
    tmancini is on a distinguished road

      0  

    Default Possible Bug with SummaryRenderer?

    Possible Bug with SummaryRenderer?


    I currently have a SummaryColumnConfig defined as:

    Code:
        SummaryColumnConfig<CompareData, BigDecimal> changeCol = new SummaryColumnConfig<CompareData, BigDecimal>(compareDataAccess.change(), 100, "Change");
        changeCol.setMenuDisabled(true);
        changeCol.setAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
        changeCol.setCell(new AbstractCell<BigDecimal>() { 
          @Override
          public void render(Context context, BigDecimal value, SafeHtmlBuilder sb) {
            String style = "style='color: " + (value.compareTo(Constants.ZERO) < 0 ? "red" : value.compareTo(Constants.ZERO) > 0 ? "green" : "black") + "'";
            sb.appendHtmlConstant("<span " + style + ">" + NumberFormat.getFormat("###.00 %").format(value.doubleValue()) + "</span>");
          }
        });
        changeCol.setSummaryType(new SummaryType.SumSummaryType<BigDecimal>());
        changeCol.setSummaryRenderer(new SummaryRenderer<CompareData>() {
          @Override
          public SafeHtml render(Number value, Map<ValueProvider<? super CompareData, ?>, Number> data) {
            String style = "style='color: " + (value.doubleValue() < 0 ? "red" : value.doubleValue() > 0 ? "green" : "black") + "'";
            return SafeHtmlUtils.fromTrustedString("<span " + style + ">" + NumberFormat.getFormat("###.00 %").format(value.doubleValue()) + "</span>");
          }
        });
    This summary column is displaying the HTML as a string. After stepping through the code with Eclipse, it appears the HTML is being escaped on line 163 of the GroupSummaryView class via
    Code:
    SafeHtmlUtils.fromString(value)
    Note: The changeCol cells appear correctly in the grid, while the summary column does not.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Yah that should be corrected. I will move this thread to the bugs forum so we can take a look at it. Thanks for bringing it up

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    aspadev is on a distinguished road

      0  

    Default


    This does not appear to have been fixed yet. It seems like a straighforward issue - when will it be resolved ?

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,639
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    This has been fixed in SVN and will be available in the next release.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar