On 4/18/11 4:52 PM, bax wrote:
Hi,
I am looking for a widget similar to the
http://plone.org/documentation/manual/developer-manual/archetypes/fields/widgets-reference#ReferenceBrowserWidget
ReferenceBrowserWidget
(allows for browsing, adding and deleting references), but that could also
create an instance, in case the reference do not exist yet.

Have you tried using the build-in support for that?

The ReferenceBrowserWidget inherits some properties from
the ReferenceWidget including

(copy/paste from Products.Archetypes.Widget as shipped with Plone 3.3.5)

'addable' : False, # create createObject link for every addable type
        'destination_types' : None,
        'destination' : None, # may be:
                              # - ".", context object;
                              # - None, any place where
                              #   Field.allowed_types can be added;
                              # - string path;
                              # - name of method on instance
                              #   (it can be a combination list);
                              # - a list, combining all item above;
                              # - a dict, where
# {portal_type:<combination of the items above>}
                              # destination is relative to portal root


Raphael


Use case:
   imagine a secretary in the phone with a patient, scheduling a medical
visit for him. In case of a new patient, whose reference obviously doesn’t
exist yet, the widget I am looking for would allow her not only search
patient references but also create a new patient instance (without leaving
the widget screen) and return the reference to it.

Do you know any widget like this?
Thank you.
Marcello



--
View this message in context: 
http://plone.293351.n2.nabble.com/Improved-ReferenceBrowserWidget-tp6283934p6283934.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
Product-Developers@lists.plone.org
https://lists.plone.org/mailman/listinfo/product-developers


_______________________________________________
Product-Developers mailing list
Product-Developers@lists.plone.org
https://lists.plone.org/mailman/listinfo/product-developers

Reply via email to