def createField(self, item, propertyId, uiContext):
        if 'countryCode' == propertyId:
            # filtering ComboBox w/ country names
            return self.countries
        elif 'password' == propertyId:
            # Create a password field so the password is not shown
            f = self.createPasswordField(propertyId)
        else:
            # Use the super class to create a suitable field base on the
            # property type.
            f = super(PersonFieldFactory, self).createField(item,
                    propertyId, uiContext)

        if 'firstName' == propertyId:
            tf = f
            tf.setRequired(True)
            tf.setRequiredError('Please enter a First Name')
            tf.setWidth(self._c._COMMON_FIELD_WIDTH)
            tf.addValidator(StringLengthValidator(
                    'First Name must be 3-25 characters', 3, 25, False))
        elif 'lastName' == propertyId:
            tf = f
            tf.setRequired(True)
            tf.setRequiredError('Please enter a Last Name')
            tf.setWidth(self._c._COMMON_FIELD_WIDTH)
            tf.addValidator(StringLengthValidator(
                    'Last Name must be 3-50 characters', 3, 50, False))
        elif 'password' == propertyId:
            pf = f
            pf.setRequired(True)
            pf.setRequiredError('Please enter a password')
            pf.setWidth('10em')
            pf.addValidator(StringLengthValidator(
                    'Password must be 6-20 characters', 6, 20, False))
        elif 'shoesize' == propertyId:
            tf = f
            tf.setNullRepresentation('')
            tf.setNullSettingAllowed(True)
            tf.addValidator(IntegerValidator('Shoe size must be an Integer'))
            tf.setWidth('2em')
        elif 'uuid' == propertyId:
            tf = f
            tf.setWidth('20em')

        return f
dataset/ETHPy150Open rwl/muntjac/muntjac/demo/sampler/features/form/FormPojoExample.py/PersonFieldFactory.createField/original