When controller returns list of widgets, widget JS files are not loaded

View: New views
3 Messages — Rating Filter:   Alert me  

When controller returns list of widgets, widget JS files are not loaded

by Matt Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have a controller like this:

    @expose('.templates.employee.search')
    def search(self, **kwargs):
        return dict(f1=forms.emailsearchform, f2=forms.namesearchform)

My template is really boring:

${f1.display()}
${f2.display()}

Here's the (possible) bug.  I changed my controller to return a list
of widgets, rather than separate widgets, like this:

    @expose('.templates.employee.search')
    def search(self, **kwargs):
        return dict(flist=[forms.emailsearchform,
forms.namesearchform])

And I changed my template to look like this:

<div py:for="f in flist">${f.display()}</div>

I notice that in the second method, my template does not get the
required widget javascript files added to the page <head> section.

I'm reading the turbogears _process_output method now to try to figure
out what is going on.

Is this a known bug?  Am I doing something wrong?

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


Re: When controller returns list of widgets, widget JS files are not loaded

by Matt Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I submitted a patch to fix this issue.  I don't know the process of
bringing the patch to people's attention.  Here's the ticket:
http://trac.turbogears.org/ticket/1877

I named it [PATCH] When controller returns list of widgets, widget JS
and CSS are not loaded.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: When controller returns list of widgets, widget JS files are not loaded

by Florent Aide :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, Jul 2, 2008 at 3:54 PM, Matt Wilson <mw44118@...> wrote:
>
> I submitted a patch to fix this issue.  I don't know the process of
> bringing the patch to people's attention.  Here's the ticket:
> http://trac.turbogears.org/ticket/1877

That's the way to do it :) Thanks.

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

LightInTheBox - Buy quality products at wholesale price