I'll work on a patch next week, it's something i really need ;) Cheers,
Ben On 24 February 2011 14:03, Carl Franks <fireart...@gmail.com> wrote: > On 24 February 2011 12:58, Ben Vinnerd <ben-for...@vinnerd.com> wrote: >> Hi, >> >> I'm looking for a way to set some content in a Block element, easy if >> the content is static, but i'd like to be able to pass a code ref >> instead that returns a text string, based on the type of user >> currently logged in (some field in a DBIx::Class row) . e.g. <below> > >> content_xml => '+Myapp::FormFu::Content', > > It sounds useful, but the interface need a bit more thought. > content_xml() here is just receiving a string - how does it know it's > meant to be a package-name? > Following the convension used for other methods, it would be something like: > > content_callback_xml => 'Myapp::FormFu::Content::return_string' > > If HTML::FormFu::Attribute::mk_output_accessors() were extended to > provide the new methods > *_callback() > *_callback_xml() > *_callback_loc() > then anything that uses mk_output_accessors() to create methods would > benefit from it. > > A patch for this would be welcome! > > Cheers, > Carl > > _______________________________________________ > HTML-FormFu mailing list > HTML-FormFu@lists.scsys.co.uk > http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu > _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu