

def __init__(self):
    super(FormPojoExample, self).__init__()
    self._person = Person()
    personItem = BeanItem(self._person)
    personForm = Form()
    personForm.setCaption('Personal details')
    personForm.setWriteThrough(False)
    personForm.setInvalidCommitted(False)
    personForm.setFormFieldFactory(PersonFieldFactory(self))
    personForm.setItemDataSource(personItem)
    personForm.setVisibleItemProperties(['firstName', 'lastName', 'countryCode', 'password', 'birthdate', 'shoesize', 'uuid'])
    self.addComponent(personForm)
    buttons = HorizontalLayout()
    buttons.setSpacing(True)
    discardChanges = Button('Discard changes', DiscardListener(personForm))
    discardChanges.setStyleName(BaseTheme.BUTTON_LINK)
    buttons.addComponent(discardChanges)
    buttons.setComponentAlignment(discardChanges, Alignment.MIDDLE_LEFT)
    aply = Button('Apply', ApplyListener(personForm))
    buttons.addComponent(aply)
    personForm.getFooter().addComponent(buttons)
    personForm.getFooter().setMargin(False, False, True, True)
    l = InternalStateListener(self)
    showPojoState = Button('Show POJO internal state', aply)
    self.addComponent(showPojoState)

dataset/ETHPy150Open rwl/muntjac/muntjac/demo/sampler/features/form/FormPojoExample.py FormPojoExample.__init__/VarMisuse@222/339 `l`->`aply`