Example #1
0
 public function __construct()
 {
     parent::__construct();
     $label = new picon\Label('text', new picon\PropertyModel($this, 'text'));
     $label->setOutputMarkupId(true);
     $this->add($label);
     $self = $this;
     $this->add(new \picon\AjaxLink('alterLink', function (picon\AjaxRequestTarget $target) use($self, $label) {
         $self->text = 'Update in callback text';
         $target->add($label);
     }));
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     $feedback = new \picon\FeedbackPanel('feedback');
     $feedback->setOutputMarkupId(true);
     $this->add($feedback);
     $label = new picon\Label('text', new picon\PropertyModel($this, 'text'));
     $label->setOutputMarkupId(true);
     $this->add($label);
     $form = new picon\Form('form');
     $this->add($form);
     $form->add(new picon\RequiredTextField('text', new picon\PropertyModel($this, 'text')));
     $self = $this;
     $form->add(new \picon\AjaxButton('button', function (picon\AjaxRequestTarget $target) use($label, $feedback) {
         $target->add($label);
         $target->add($feedback);
     }, function (picon\AjaxRequestTarget $target) use($feedback) {
         $target->add($feedback);
     }));
 }