ReferenceBrowserWidget: Programatically setting a startup_directory

Andreas Jung lists at zopyx.com
Sat Apr 14 05:06:36 UTC 2007



--On 10. April 2007 12:40:59 -0400 Eric Steele <ems174 at psu.edu> wrote:

> Hi,
>
> I'm using ReferenceBrowserWidget (1.7.1) on my Person object ("John Doe"
> below) to allow people to link to Specialty object in a
> SpecialtiesFolder. I'd like to be able to set startup_directory to be the
> path to my SpecialtiesFolder (which I won't know the exact name of).
>
> - "Directory" (FacultyStaffDirectory)
>      - "Specialties" (SpecialtiesFolder)
>          - "Some Specialty" (Specialty)
>      - "John Doe" (Person)
>
>
> Since, I don't know the name and can't hardcode a path, I've tried using
> a method name as the value of startup_directory, but that's throwing an
> AttributeError. Is there another/any way to do this?
>

In this case you must extend the functionality of the ReferenceBrowserWidget
implementation. Your problem is an unsupported usecase. Patches are welcome.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20070414/bef78c86/attachment.asc>


More information about the Product-Developers mailing list