Task #350

Renderer component refactor

Added by Davide Principi about 10 years ago. Updated over 8 years ago.

Status:CLOSEDStart date:07/29/2011
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-nethgui
Target version:Sigma

Description

Suppress inconsistencies when calling echo on a Renderer object

The resulting API should look like the following:

// insert(): returns the object itself;
// create<CtrlType>(): returns a new object - i.e. fieldsetSwitch()

echo $view->createFieldsetSwitch('fsname', 'fs1value', <flags>)
              ->insert($view->createRadioButton('rdname1', 'rd1value', <flags>))
              ->insert($view->createRadioButton('rdname1', 'rd1value', <flags>))
              ->insert($view->createTextInput('txname1', <flags>));

echo $view->createFieldsetSwitch('fsname', 'fs2value', <flags>)
              ->insert($view->createRadioButton('rdname2', 'rd2value', <flags>))
              ->insert($view->createRadioButton('rdname2', 'rd2value', <flags>))
              ->insert($view->createTextInput('txname2', <flags>));

echo $view->createTabs()
            ->insert($view->createInset('page1'))
            ->insert($view->createInset('page2'))            
            ->insert($view->createInset('page3'))  

echo $view->createCheckBox('chkname', 'chkvalue', <flags>);
Note:
  • each create*() method returns a Widget object
  • Methods of an abstract Widget object
    • insert()
    • render()
    • __toString() , same as render()

Related issues

Related to Nethgui - Task #358: Server response format CLOSED 08/04/2011

Associated revisions

Revision 104a8474
Added by Davide Principi about 10 years ago

WIP! Refs #350 Renderer interface modified.

Revision f07f8685
Added by Davide Principi about 10 years ago

WIP Refs #350. Splitted NethGui_Renderer_Abstract into ReadonlyView and interface parts.

Revision 13451fb8
Added by Davide Principi about 10 years ago

WIP Refs #350. New Widget package.

Revision fd207519
Added by Davide Principi about 10 years ago

WIP Refs #350. Fixed getAttribute() calls. Renamed Abstract renderer constants.

Revision 7b225f31
Added by Davide Principi about 10 years ago

WIP Refs #350. Applied refactor to all templates (both scripts and callback methods).

Revision 25a476ae
Added by Davide Principi about 10 years ago

WIP Refs #350. Added flags inheritance throughout inset() calls.

Revision 31da0a8d
Added by Davide Principi about 10 years ago

WIP Refs #350. Fixed unchecked checkbox value submission. Fixed enabling/disabiling of controls under tabs widget.

Revision 347221a1
Added by Davide Principi about 10 years ago

Refs #350. Fixed selector widget server-side rendering.

Revision 72328047
Added by Davide Principi about 10 years ago

WIP Refs #350. Applied new renderer API to NotificationArea and TableController classes

Revision 06dd73d7
Added by Davide Principi about 10 years ago

WIP Refs #350. Removed the Dialog widget - implemented as a composite control (panel+inset).

Revision 46ee8a7c
Added by Davide Principi about 10 years ago

WIP Refs #350. Removed ID attribute from hidden INPUT tag in checkbox control.

Revision a8a0abbf
Added by Davide Principi about 10 years ago

WIP Refs #350. Fixed problem with module menu.

Revision 34f77dd4
Added by Davide Principi about 10 years ago

Refs #350. Fixed some control css class names. Fixed hidden controls disabled flag.

Revision ea832414
Added by Davide Principi about 10 years ago

Refs #350. Fixed class names..

History

#1 Updated by Davide Principi about 10 years ago

  • Status changed from ON_DEV to CLOSED
  • % Done changed from 0 to 100

Also available in: Atom PDF