Mike,
Could you please point me the link for the latest web helper (Pylons
0.9.7)? I couldn't find anything myself.
Regards,
Gopal
On Aug 17, 10:30 am, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> On Sat, Aug 16, 2008 at 8:40 PM, Krishgy <[EMAIL PROTECTED]> wrote:
>
> > To Add items to the Combo Box, I do the following method. But this
> > method is not convincing me. Are there any better method to add the
> > combo items to the control?
>
> > <%
> > option = ""
> > for store in c.stores:
> > option = option + "<option value=%s>" % store.uid +
> > store.title + "</option>"
> > %>
> > ${h.form(h.url_for(controller ='store',
> > action='add_deal_to_store', id = c.deal.uid),
> > method='post')}
> > ${h.select('store', option)}
> > <input type="submit" value="Save" />
> > ${h.end_form()}
>
> It looks like you're still using the rails helpers. if you upgrade to
> Webhelpers 0.6 as shown in
>
> http://docs.pythonweb.org/pages/viewpage.action?pageId=11174779
> What's New in Pylons 0.97
>
> and change your imports to use webhelpers.html.tags, the syntax
> becomes more straightforward:
>
> options = [(x.uid, x.title) for x in c.stores]
>
> ${h.select("store", None, options)}
>
> (The second argument is the values you want preselected, if any.)
>
> --
> Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---