On Nov 17, 12:53 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> simoneinweb schrieb:
>
> > Hi Guys!
>
> > I'm using turbogears for a project and I need an ajaxgrid that
> > displays a list of user-submitted data in real time. Ajaxgid works
> > great but I need to embeed some html (links most of all) in its
> > output. The problem is that every tag is escaped (or, probably, not
> > interpreted) and as result I see in the browser, together with the
> > text, the html not parsed.
>
> > I've searched a lot but I have not found any solution ([1] has not
> > been helpful).
> > Any help much appreciated!!!
>
> Without you showing code I'm not sure what exactly you need - but most
> probably either kid.XML or genshi.XML. They will take valid XHTML and
> return a template-embeddable tree-object.
>

Hi Diez. Here's the code

==controllers.py===
problem_grid = AjaxGrid(refresh_url="summarize_problems")
[...]
    @expose(format="json")
    def summarize_problems(self):
        rows = []
        problems = identity.current.user.rosco_problems
        for p in problems:
            rows.append([p.problem_name, p.problem_rows,
p.problem_cols, p.problem_notes])

        return dict(
            headers = ["Nome del Problema", "Giorni", "Ore", "Note"],
            rows = rows
            )
[...]

==main.kid===
[...]
        <div id="problem_grid">
          <span py:content="problem_grid.display()"></span>
        </div>
[...]

The problem is that if i try to concatenate some html in the rows,
like:
rows.append(["<a href='/'>"+p.problem_name+"</a>", p.problem_rows,
p.problem_cols, p.problem_notes])

the html is not parsed and while browsing the ajaxgrid in the browser,
html is shown 'as-is' (i.e. if, p.problem_name is "myProblem",
ajaxgrid shows up a row  <a href='/'>myProblem</a>)

Thank you in advance for your help!

Simone
> Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to