>-----Original Message-----
>From: Carlucci, Tony [mailto:[email protected]]
>Sent: Tuesday, August 23, 2011 10:36 AM
>To: [email protected]
>Subject: RE: Widget type attribute
>
>-----Original Message-----
>From: Jasha Joachimsthal [mailto:[email protected]]
>Sent: Tuesday, August 23, 2011 8:36 AM
>To: [email protected]
>Subject: Widget type attribute
>
>> The type attribute for a Widget object is now a String. Shouldn't we change
>> this into an enum to be sure that its value only contains known values?
>
>+1

I disagree.  If we change it to an enum, then we lose the ability to add 
providers easily.  Currently, to add a provider, you only need to create  beans 
that implement the correct interfaces and add javascript to handle the 
client-side rendering pieces.  So long as the beans are in the application 
context at runtime and the script is included in the JSP, the new provider will 
be automatically enabled.  By constraining widget types to an enum, the enum 
will need to have all potential widget types, which may not be the case.  If I 
am Joe Widget Writer with my own proprietary widget type, I don't want to 
modify core rave code to make my provider work.  


>
>Tony
>
>---
>Anthony Carlucci | SW App Dev Eng, Sr. | R501 / KW App Development &
>Maint
>e: [email protected] | v: 781.271.2432 | f: 781.271.3299
>The MITRE Corporation | 202 Burlington Rd | Bedford, MA 01730-1420
>

Reply via email to